| 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 #@ PNaCl toolchain build script | 6 #@ PNaCl toolchain build script |
| 7 #@------------------------------------------------------------------- | 7 #@------------------------------------------------------------------- |
| 8 #@ This script builds the ARM and PNaCl untrusted toolchains. | 8 #@ This script builds the ARM and PNaCl untrusted toolchains. |
| 9 #@ It MUST be run from the native_client/ directory. | 9 #@ It MUST be run from the native_client/ directory. |
| 10 ###################################################################### | 10 ###################################################################### |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 local tools="pnacl-llc" | 389 local tools="pnacl-llc" |
| 390 if [[ "${arch}" == "i686" ]]; then | 390 if [[ "${arch}" == "i686" ]]; then |
| 391 tools+=" pnacl-sz" | 391 tools+=" pnacl-sz" |
| 392 fi | 392 fi |
| 393 for toolname in ${tools}; do | 393 for toolname in ${tools}; do |
| 394 cp -f "${objdir}"/Release*/bin/${toolname} . | 394 cp -f "${objdir}"/Release*/bin/${toolname} . |
| 395 mv -f ${toolname} ${toolname}.pexe | 395 mv -f ${toolname} ${toolname}.pexe |
| 396 local arches=${arch} | 396 local arches=${arch} |
| 397 if [[ "${arch}" == "universal" ]]; then | 397 if [[ "${arch}" == "universal" ]]; then |
| 398 arches="${SBTC_ARCHES_ALL}" | 398 arches="${SBTC_ARCHES_ALL}" |
| 399 elif [[ "${arch}" == "i686" ]]; then | 399 elif [[ "${arch}" == "i686" && "${toolname}" == "pnacl-llc" ]]; then |
| 400 # LLVM does not separate the i686 and x86_64 backends. | 400 # LLVM does not separate the i686 and x86_64 backends. |
| 401 # Translate twice to get both nexes. | 401 # Translate twice to get both nexes, but only for pnacl-llc. |
| 402 # We do not yet have an x86-64 backend for pnacl-sz. |
| 402 arches="i686 x86_64" | 403 arches="i686 x86_64" |
| 403 fi | 404 fi |
| 404 local have_segment_gap="false" | 405 local have_segment_gap="false" |
| 405 if [ "${toolname}" == "pnacl-sz" ]; then | 406 if [ "${toolname}" == "pnacl-sz" ]; then |
| 406 have_segment_gap="true" | 407 have_segment_gap="true" |
| 407 fi | 408 fi |
| 408 translate-sb-tool ${toolname} "${arches}" "${have_segment_gap}" | 409 translate-sb-tool ${toolname} "${arches}" "${have_segment_gap}" |
| 409 install-sb-tool ${toolname} "${arches}" | 410 install-sb-tool ${toolname} "${arches}" |
| 410 done | 411 done |
| 411 spopd | 412 spopd |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 | 1016 |
| 1016 if [ "$(type -t $1)" != "function" ]; then | 1017 if [ "$(type -t $1)" != "function" ]; then |
| 1017 #Usage | 1018 #Usage |
| 1018 echo "ERROR: unknown function '$1'." >&2 | 1019 echo "ERROR: unknown function '$1'." >&2 |
| 1019 echo "For help, try:" | 1020 echo "For help, try:" |
| 1020 echo " $0 help" | 1021 echo " $0 help" |
| 1021 exit 1 | 1022 exit 1 |
| 1022 fi | 1023 fi |
| 1023 | 1024 |
| 1024 "$@" | 1025 "$@" |
| OLD | NEW |