| OLD | NEW |
| 1 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 ############################################################################## | 5 ############################################################################## |
| 6 # Helper script for NaCl toolchain development workflow. | 6 # Helper script for NaCl toolchain development workflow. |
| 7 # | 7 # |
| 8 # Buildbots: | 8 # Buildbots: |
| 9 # - Sync needed sources at pinned revision and build newlib-based toolchain: | 9 # - Sync needed sources at pinned revision and build newlib-based toolchain: |
| 10 # make buildbot-build-with-newlib TOOLCHAINLOC=<where-to-install-the-toolcha
in> | 10 # make buildbot-build-with-newlib TOOLCHAINLOC=<where-to-install-the-toolcha
in> |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 $(PREGCC_PREFIX)/$(CROSSARCH)/lib/libcrt_platform.a | 443 $(PREGCC_PREFIX)/$(CROSSARCH)/lib/libcrt_platform.a |
| 444 touch $@ | 444 touch $@ |
| 445 | 445 |
| 446 | 446 |
| 447 ################################################################## | 447 ################################################################## |
| 448 # newlib: | 448 # newlib: |
| 449 # Builds the bare-bones library used by NativeClient applications. | 449 # Builds the bare-bones library used by NativeClient applications. |
| 450 # NOTE: removes the default pthread.h to enable correct install | 450 # NOTE: removes the default pthread.h to enable correct install |
| 451 # by the Native Client threads package build. | 451 # by the Native Client threads package build. |
| 452 ################################################################## | 452 ################################################################## |
| 453 |
| 454 NEWLIB_CFLAGS = -O2 -D_I386MACH_ALLOW_HW_INTERRUPTS -mtls-use-call |
| 455 |
| 453 BUILD/stamp-$(CROSSARCH)-newlib: | SRC/newlib BUILD | 456 BUILD/stamp-$(CROSSARCH)-newlib: | SRC/newlib BUILD |
| 454 rm -rf BUILD/build-newlib-$(CROSSARCH) | 457 rm -rf BUILD/build-newlib-$(CROSSARCH) |
| 455 mkdir BUILD/build-newlib-$(CROSSARCH) | 458 mkdir BUILD/build-newlib-$(CROSSARCH) |
| 456 ../src/trusted/service_runtime/export_header.py ../src/trusted/service_r
untime/include \ | 459 ../src/trusted/service_runtime/export_header.py ../src/trusted/service_r
untime/include \ |
| 457 SRC/newlib/newlib/libc/sys/nacl | 460 SRC/newlib/newlib/libc/sys/nacl |
| 458 » if [ "x$(CROSSARCH)" = "xnacl64" ] ; then \ | 461 » PATH=$(BUILDPATH) && export PATH && \ |
| 459 cd BUILD/build-newlib-$(CROSSARCH) && \ | 462 cd BUILD/build-newlib-$(CROSSARCH) && \ |
| 460 » PATH=$(BUILDPATH) \ | 463 » ../../SRC/newlib/configure \ |
| 461 » » CFLAGS="-O2" \ | 464 » » --disable-libgloss \ |
| 462 » ../../SRC/newlib/configure \ | 465 » » --enable-newlib-iconv \ |
| 463 » » » --disable-libgloss \ | 466 » » --enable-newlib-io-long-long \ |
| 464 » » » --enable-newlib-iconv \ | 467 » » --enable-newlib-io-long-double \ |
| 465 » » » --enable-newlib-io-long-long \ | 468 » » --enable-newlib-io-c99-formats \ |
| 466 » » » --enable-newlib-io-long-double \ | 469 » » --enable-newlib-mb \ |
| 467 » » » --enable-newlib-io-c99-formats \ | 470 » --prefix=$(SDKROOT) \ |
| 468 » » » --enable-newlib-mb \ | 471 » CFLAGS='-O2' \ |
| 469 » --prefix=$(SDKROOT) \ | 472 » CFLAGS_FOR_TARGET='$(NEWLIB_CFLAGS)' \ |
| 470 » --target=$(CROSSARCH) && \ | 473 » CXXFLAGS_FOR_TARGET='$(NEWLIB_CFLAGS)' \ |
| 471 » cd ../.. ; \ | 474 » --target=$(CROSSARCH) && \ |
| 472 » PATH=$(BUILDPATH) \ | 475 » $(MAKE) && \ |
| 473 » $(MAKE) -C BUILD/build-newlib-$(CROSSARCH) \ | 476 » $(MAKE) DESTDIR=$(DESTDIR) install |
| 474 » CCASFLAGS="-D_I386MACH_ALLOW_HW_INTERRUPTS" \ | |
| 475 » » CFLAGS_FOR_TARGET="-m64 -O2" \ | |
| 476 » CXXFLAGS_FOR_TARGET="-m64 -O2" \ | |
| 477 » all ; \ | |
| 478 » else \ | |
| 479 » cd BUILD/build-newlib-$(CROSSARCH) && \ | |
| 480 » PATH=$(BUILDPATH) \ | |
| 481 » » CFLAGS="-O2" \ | |
| 482 » ../../SRC/newlib/configure \ | |
| 483 » » » --disable-libgloss \ | |
| 484 » » » --enable-newlib-iconv \ | |
| 485 » » » --enable-newlib-io-long-long \ | |
| 486 » » » --enable-newlib-io-long-double \ | |
| 487 » » » --enable-newlib-io-c99-formats \ | |
| 488 » » » --enable-newlib-mb \ | |
| 489 » --prefix=$(SDKROOT) \ | |
| 490 » --target=$(CROSSARCH) ; \ | |
| 491 » cd ../.. ; \ | |
| 492 » PATH=$(BUILDPATH) \ | |
| 493 » $(MAKE) -C BUILD/build-newlib-$(CROSSARCH) \ | |
| 494 » » CFLAGS_FOR_TARGET="-m32 -O2" \ | |
| 495 » CXXFLAGS_FOR_TARGET="-m32 -O2" \ | |
| 496 » all ; \ | |
| 497 » fi | |
| 498 » PATH=$(BUILDPATH) \ | |
| 499 » $(MAKE) -C BUILD/build-newlib-$(CROSSARCH) \ | |
| 500 » DESTDIR=$(DESTDIR) install | |
| 501 rm $(DESTDIR)$(SDKROOT)/$(CROSSARCH)/include/pthread.h | 477 rm $(DESTDIR)$(SDKROOT)/$(CROSSARCH)/include/pthread.h |
| 502 touch $@ | 478 touch $@ |
| 503 | 479 |
| 504 .PHONY: newlib | 480 .PHONY: newlib |
| 505 newlib: BUILD/stamp-$(CROSSARCH)-newlib | 481 newlib: BUILD/stamp-$(CROSSARCH)-newlib |
| 506 | 482 |
| 507 | 483 |
| 508 ################################################################## | 484 ################################################################## |
| 509 # glibc: | 485 # glibc: |
| 510 ################################################################## | 486 ################################################################## |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 ################################################################## | 1018 ################################################################## |
| 1043 # Remove the BUILD directory. | 1019 # Remove the BUILD directory. |
| 1044 # Library builds are maintained by scons. | 1020 # Library builds are maintained by scons. |
| 1045 ################################################################## | 1021 ################################################################## |
| 1046 | 1022 |
| 1047 .PHONY: clean | 1023 .PHONY: clean |
| 1048 clean: | 1024 clean: |
| 1049 rm -rf BUILD | 1025 rm -rf BUILD |
| 1050 | 1026 |
| 1051 .PHONY: ALWAYS | 1027 .PHONY: ALWAYS |
| OLD | NEW |