OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # | 5 # |
6 #@ This script builds the (trusted) cross toolchain for arm. | 6 #@ This script builds the (trusted) cross toolchain for arm. |
7 #@ It must be run from the native_client/ directory. | 7 #@ It must be run from the native_client/ directory. |
8 #@ | 8 #@ |
9 #@ The toolchain consists primarily of a jail with arm header and libraries. | 9 #@ The toolchain consists primarily of a jail with arm header and libraries. |
10 #@ It also provides additional tools such as QEMU. | 10 #@ It also provides additional tools such as QEMU. |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 # see above for why we can no longer use -static | 497 # see above for why we can no longer use -static |
498 # --static | 498 # --static |
499 | 499 |
500 SubBanner "Make" | 500 SubBanner "Make" |
501 env -i PATH=/usr/bin/:/bin \ | 501 env -i PATH=/usr/bin/:/bin \ |
502 V=99 make MAKE_OPTS=${MAKE_OPTS} | 502 V=99 make MAKE_OPTS=${MAKE_OPTS} |
503 | 503 |
504 SubBanner "Install ${INSTALL_ROOT}" | 504 SubBanner "Install ${INSTALL_ROOT}" |
505 cp arm-linux-user/qemu-arm ${INSTALL_ROOT} | 505 cp arm-linux-user/qemu-arm ${INSTALL_ROOT} |
506 cd ${saved_dir} | 506 cd ${saved_dir} |
507 cp tools/llvm/qemu_tool.sh ${INSTALL_ROOT} | 507 cp tools/llvm/qemu_tool_arm.sh ${INSTALL_ROOT} |
508 ln -sf qemu_tool.sh ${INSTALL_ROOT}/run_under_qemu_arm | 508 ln -sf qemu_tool_arm.sh ${INSTALL_ROOT}/run_under_qemu_arm |
509 } | 509 } |
510 | 510 |
511 #@ | 511 #@ |
512 #@ BuildJail <tarball-name> | 512 #@ BuildJail <tarball-name> |
513 #@ | 513 #@ |
514 #@ Build everything and package it | 514 #@ Build everything and package it |
515 BuildJail() { | 515 BuildJail() { |
516 ClearInstallDir | 516 ClearInstallDir |
517 InstallMissingArmLibrariesAndHeadersIntoJail \ | 517 InstallMissingArmLibrariesAndHeadersIntoJail \ |
518 ${ARMEL_BASE_DEP_FILES} \ | 518 ${ARMEL_BASE_DEP_FILES} \ |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 exit -1 | 573 exit -1 |
574 elif [[ "$(type -t $1)" != "function" ]]; then | 574 elif [[ "$(type -t $1)" != "function" ]]; then |
575 echo "ERROR: unknown function '$1'." >&2 | 575 echo "ERROR: unknown function '$1'." >&2 |
576 echo "For help, try:" | 576 echo "For help, try:" |
577 echo " $0 help" | 577 echo " $0 help" |
578 exit 1 | 578 exit 1 |
579 else | 579 else |
580 SanityCheck | 580 SanityCheck |
581 "$@" | 581 "$@" |
582 fi | 582 fi |
OLD | NEW |