OLD | NEW |
1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2012 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 # Environment variable NACL_PACKAGES_BITSIZE should be unset or set to "32" | 5 # Environment variable NACL_ARCH should be unset or set to "i686" |
6 # for a 32-bit build. It should be set to "64" for a 64-bit build. | 6 # for a 32-bit build. It should be set to "x86_64", "pnacl", or "arm" |
| 7 # for a 64-bit, pnacl, or arm builds. |
7 | 8 |
8 | 9 |
9 # NAMING CONVENTION | 10 # NAMING CONVENTION |
10 # ================= | 11 # ================= |
11 # | 12 # |
12 # This file is source'd by other scripts especially those inside libraries/ | 13 # This file is source'd by other scripts especially those inside libraries/ |
13 # and makes functions env variables available to those scripts. | 14 # and makes functions env variables available to those scripts. |
14 # Only variables beginging with "NACL_" are intended to be used by those | 15 # Only variables beginging with "NACL_" are intended to be used by those |
15 # scripts! | 16 # scripts! |
16 | 17 |
(...skipping 18 matching lines...) Expand all Loading... |
35 elif [ $OS_NAME = "Linux" ]; then | 36 elif [ $OS_NAME = "Linux" ]; then |
36 readonly OS_SUBDIR="linux" | 37 readonly OS_SUBDIR="linux" |
37 readonly OS_SUBDIR_SHORT="linux" | 38 readonly OS_SUBDIR_SHORT="linux" |
38 readonly OS_JOBS=4 | 39 readonly OS_JOBS=4 |
39 else | 40 else |
40 readonly OS_SUBDIR="windows" | 41 readonly OS_SUBDIR="windows" |
41 readonly OS_SUBDIR_SHORT="win" | 42 readonly OS_SUBDIR_SHORT="win" |
42 readonly OS_JOBS=1 | 43 readonly OS_JOBS=1 |
43 fi | 44 fi |
44 | 45 |
45 # Get the desired bit size, | 46 # Set default NACL_ARCH based on legacy NACL_PACKAGES_BITSIZE |
46 # Note(robertm): we abuse this to introduce a "pnacl" flavor. | 47 if [ "${NACL_PACKAGES_BITSIZE:-}" = "64" ] ; then |
47 export NACL_PACKAGES_BITSIZE=${NACL_PACKAGES_BITSIZE:-"32"} | 48 export NACL_ARCH=${NACL_ARCH:-"x86_64"} |
48 if [ ${NACL_PACKAGES_BITSIZE} = "32" ] ; then | 49 elif [ "${NACL_PACKAGES_BITSIZE:-}" = "pnacl" ] ; then |
49 readonly CROSS_ID=i686 | 50 export NACL_ARCH=${NACL_ARCH:-"pnacl"} |
50 elif [ ${NACL_PACKAGES_BITSIZE} = "64" ] ; then | |
51 readonly CROSS_ID=x86_64 | |
52 elif [ ${NACL_PACKAGES_BITSIZE} = "pnacl" ] ; then | |
53 readonly CROSS_ID=pnacl | |
54 else | 51 else |
55 echo "Unknown value for NACL_PACKAGES_BITSIZE: '${NACL_PACKAGES_BITSIZE}'" 1>&
2 | 52 export NACL_ARCH=${NACL_ARCH:-"i686"} |
| 53 fi |
| 54 |
| 55 # Set NACL_LIBDIR: the name of the lib folder within the toolchain. |
| 56 # For arm and pnacl toolchains this is just 'lib'. For the x86 |
| 57 # toolchain this is lib32 or lib64 |
| 58 if [ ${NACL_ARCH} = "i686" ] ; then |
| 59 export NACL_LIBDIR=lib32 |
| 60 elif [ ${NACL_ARCH} = "x86_64" ] ; then |
| 61 export NACL_LIBDIR=lib64 |
| 62 elif [ ${NACL_ARCH} = "arm" ] ; then |
| 63 export NACL_LIBDIR=lib |
| 64 elif [ ${NACL_ARCH} = "pnacl" ] ; then |
| 65 export NACL_LIBDIR=lib |
| 66 else |
| 67 echo "Unknown value for NACL_ARCH: '${NACL_ARCH}'" 1>&2 |
56 exit -1 | 68 exit -1 |
57 fi | 69 fi |
58 | 70 |
59 if [ ${NACL_PACKAGES_BITSIZE} = "32" ] ; then | 71 if [ ${NACL_ARCH} = "i686" ] ; then |
60 readonly NACL_SEL_LDR=${NACL_SDK_ROOT}/tools/sel_ldr_x86_32 | 72 readonly NACL_SEL_LDR=${NACL_SDK_ROOT}/tools/sel_ldr_x86_32 |
61 readonly NACL_IRT=${NACL_SDK_ROOT}/tools/irt_core_x86_32.nexe | 73 readonly NACL_IRT=${NACL_SDK_ROOT}/tools/irt_core_x86_32.nexe |
62 else | 74 else |
63 # TODO(eugenis): Is this correct for PNACL? | 75 # TODO(eugenis): Is this correct for PNACL? |
64 readonly NACL_SEL_LDR=${NACL_SDK_ROOT}/tools/sel_ldr_x86_64 | 76 readonly NACL_SEL_LDR=${NACL_SDK_ROOT}/tools/sel_ldr_x86_64 |
65 readonly NACL_IRT=${NACL_SDK_ROOT}/tools/irt_core_x86_64.nexe | 77 readonly NACL_IRT=${NACL_SDK_ROOT}/tools/irt_core_x86_64.nexe |
66 fi | 78 fi |
67 | 79 |
68 # NACL_CROSS_PREFIX is the prefix of the executables in the | 80 # NACL_CROSS_PREFIX is the prefix of the executables in the |
69 # toolchain's "bin" directory. For example: i686-nacl-<toolname>. | 81 # toolchain's "bin" directory. For example: i686-nacl-<toolname>. |
70 if [ ${NACL_PACKAGES_BITSIZE} == "pnacl" ]; then | 82 if [ ${NACL_ARCH} = "pnacl" ]; then |
71 export NACL_CROSS_PREFIX=pnacl | 83 export NACL_CROSS_PREFIX=pnacl |
72 else | 84 else |
73 export NACL_CROSS_PREFIX=${CROSS_ID}-nacl | 85 export NACL_CROSS_PREFIX=${NACL_ARCH}-nacl |
74 fi | 86 fi |
75 | 87 |
76 # configure spec for if MMX/SSE/SSE2/Assembly should be enabled/disabled | 88 # configure spec for if MMX/SSE/SSE2/Assembly should be enabled/disabled |
77 # TODO: Currently only x86-32 will encourage MMX, SSE & SSE2 intrinsics | 89 # TODO: Currently only x86-32 will encourage MMX, SSE & SSE2 intrinsics |
78 # and handcoded assembly. | 90 # and handcoded assembly. |
79 if [ $NACL_PACKAGES_BITSIZE = "32" ] ; then | 91 if [ $NACL_ARCH = "i686" ] ; then |
80 readonly NACL_OPTION="enable" | 92 readonly NACL_OPTION="enable" |
81 else | 93 else |
82 readonly NACL_OPTION="disable" | 94 readonly NACL_OPTION="disable" |
83 fi | 95 fi |
84 | 96 |
85 if [ -z "${NACL_SDK_ROOT:-}" ]; then | 97 if [ -z "${NACL_SDK_ROOT:-}" ]; then |
86 echo "-------------------------------------------------------------------" | 98 echo "-------------------------------------------------------------------" |
87 echo "NACL_SDK_ROOT is unset." | 99 echo "NACL_SDK_ROOT is unset." |
88 echo "This environment variable needs to be pointed at some version of" | 100 echo "This environment variable needs to be pointed at some version of" |
89 echo "the Native Client SDK (the directory containing toolchain/)." | 101 echo "the Native Client SDK (the directory containing toolchain/)." |
90 echo "NOTE: set this to an absolute path." | 102 echo "NOTE: set this to an absolute path." |
91 echo "-------------------------------------------------------------------" | 103 echo "-------------------------------------------------------------------" |
92 exit -1 | 104 exit -1 |
93 fi | 105 fi |
94 | 106 |
95 | 107 |
96 # sha1check python script | 108 # sha1check python script |
97 readonly SHA1CHECK=${NACL_SRC}/build_tools/sha1check.py | 109 readonly SHA1CHECK=${NACL_SRC}/build_tools/sha1check.py |
98 | 110 |
99 # packages subdirectories | 111 # packages subdirectories |
100 readonly NACL_PACKAGES_LIBRARIES=${NACL_PACKAGES}/libraries | 112 readonly NACL_PACKAGES_LIBRARIES=${NACL_PACKAGES}/libraries |
101 readonly NACL_PACKAGES_OUT=${NACL_SRC}/out | 113 readonly NACL_PACKAGES_OUT=${NACL_SRC}/out |
102 readonly NACL_PACKAGES_REPOSITORY=${NACL_PACKAGES_OUT}/repository-${CROSS_ID} | 114 readonly NACL_PACKAGES_REPOSITORY=${NACL_PACKAGES_OUT}/repository-${NACL_ARCH} |
103 readonly NACL_PACKAGES_PUBLISH=${NACL_PACKAGES_OUT}/publish | 115 readonly NACL_PACKAGES_PUBLISH=${NACL_PACKAGES_OUT}/publish |
104 readonly NACL_PACKAGES_TARBALLS=${NACL_PACKAGES_OUT}/tarballs | 116 readonly NACL_PACKAGES_TARBALLS=${NACL_PACKAGES_OUT}/tarballs |
105 | 117 |
106 | 118 |
107 InitializeNaClGccToolchain() { | 119 InitializeNaClGccToolchain() { |
108 # locate default nacl_sdk toolchain | 120 # locate default nacl_sdk toolchain |
109 # TODO: x86 only at the moment | 121 # TODO: x86 only at the moment |
110 NACL_GLIBC=${NACL_GLIBC:-0} | 122 NACL_GLIBC=${NACL_GLIBC:-0} |
111 if [ $NACL_GLIBC = "1" ] ; then | 123 if [ $NACL_ARCH = "arm" ] ; then |
| 124 local TOOLCHAIN_ARCH="arm" |
| 125 else |
| 126 local TOOLCHAIN_ARCH="x86" |
| 127 fi |
| 128 |
| 129 if [ $NACL_ARCH = "arm" ] ; then |
| 130 local TOOLCHAIN_DIR=${OS_SUBDIR_SHORT}_arm_newlib |
| 131 elif [ $NACL_GLIBC = "1" ] ; then |
112 # m15-m17 SDK layouts have the glibc toolchain without the _glibc suffix | 132 # m15-m17 SDK layouts have the glibc toolchain without the _glibc suffix |
113 local TENTATIVE_NACL_GCC=${NACL_SDK_ROOT}/toolchain/${OS_SUBDIR_SHORT}_x86_g
libc/bin/i686-nacl-gcc | 133 local TENTATIVE_NACL_GCC=${NACL_SDK_ROOT}/toolchain/${OS_SUBDIR_SHORT}_x86_g
libc/bin/${NACL_CROSS_PREFIX}-gcc |
114 local TENTATIVE_NEWLIB_NACL_GCC=${NACL_SDK_ROOT}/toolchain/${OS_SUBDIR_SHORT
}_x86_newlib/bin/i686-nacl-gcc | 134 local TENTATIVE_NEWLIB_NACL_GCC=${NACL_SDK_ROOT}/toolchain/${OS_SUBDIR_SHORT
}_x86_newlib/bin/${NACL_CROSS_PREFIX}-gcc |
115 | 135 |
116 echo ${TENTATIVE_NACL_GCC} | |
117 if [ -e ${TENTATIVE_NACL_GCC} ]; then | 136 if [ -e ${TENTATIVE_NACL_GCC} ]; then |
118 local TOOLCHAIN_SUFFIX="_glibc" | 137 local TOOLCHAIN_SUFFIX="_glibc" |
119 elif [ -e ${TENTATIVE_NEWLIB_NACL_GCC} ]; then | 138 elif [ -e ${TENTATIVE_NEWLIB_NACL_GCC} ]; then |
120 local TOOLCHAIN_SUFFIX="" | 139 local TOOLCHAIN_SUFFIX="" |
121 else | 140 else |
122 # if neither _newlib or _glibc suffixes exist, | 141 # if neither _newlib or _glibc suffixes exist, |
123 # this is a pre-m15 release which has no glibc | 142 # this is a pre-m15 release which has no glibc |
124 echo "------------------------------------------------------------------" | 143 echo "------------------------------------------------------------------" |
125 echo "error: glibc toolchain not present" | 144 echo "error: glibc toolchain not present" |
126 echo "Your SDK appears to be pre pepper_15, please upgrade to use glibc." | 145 echo "Your SDK appears to be pre pepper_15, please upgrade to use glibc." |
127 echo "------------------------------------------------------------------" | 146 echo "------------------------------------------------------------------" |
128 exit -1 | 147 exit -1 |
129 fi | 148 fi |
| 149 local TOOLCHAIN_DIR=${OS_SUBDIR_SHORT}_x86${TOOLCHAIN_SUFFIX} |
130 else | 150 else |
131 # Fall back to pre-m15 SDK layout if we can't find i686-nacl-gcc. | 151 # Fall back to pre-m15 SDK layout if we can't find i686-nacl-gcc. |
132 local TENTATIVE_NACL_GCC=${NACL_SDK_ROOT}/toolchain/${OS_SUBDIR_SHORT}_x86_n
ewlib/bin/i686-nacl-gcc | 152 local TENTATIVE_NACL_GCC=${NACL_SDK_ROOT}/toolchain/${OS_SUBDIR_SHORT}_x86_n
ewlib/bin/${NACL_CROSS_PREFIX}-gcc |
133 | 153 |
134 echo ${TENTATIVE_NACL_GCC} | |
135 if [ -e ${TENTATIVE_NACL_GCC} ]; then | 154 if [ -e ${TENTATIVE_NACL_GCC} ]; then |
136 local TOOLCHAIN_SUFFIX="_newlib" | 155 local TOOLCHAIN_SUFFIX="_newlib" |
137 else | 156 else |
138 local TOOLCHAIN_SUFFIX="" | 157 local TOOLCHAIN_SUFFIX="" |
139 fi | 158 fi |
| 159 local TOOLCHAIN_DIR=${OS_SUBDIR_SHORT}_x86${TOOLCHAIN_SUFFIX} |
140 fi | 160 fi |
141 | 161 |
142 | 162 |
143 readonly NACL_TOOLCHAIN_ROOT=${NACL_TOOLCHAIN_ROOT:-${NACL_SDK_ROOT}/toolchain
/${OS_SUBDIR_SHORT}_x86${TOOLCHAIN_SUFFIX}} | 163 readonly NACL_TOOLCHAIN_ROOT=${NACL_TOOLCHAIN_ROOT:-${NACL_SDK_ROOT}/toolchain
/${TOOLCHAIN_DIR}} |
144 # TODO(robertm): can we get rid of NACL_SDK_BASE? | 164 # TODO(robertm): can we get rid of NACL_SDK_BASE? |
145 readonly NACL_SDK_BASE=${NACL_SDK_BASE:-${NACL_TOOLCHAIN_ROOT}} | 165 readonly NACL_SDK_BASE=${NACL_SDK_BASE:-${NACL_TOOLCHAIN_ROOT}} |
146 | 166 |
147 readonly NACL_BIN_PATH=${NACL_TOOLCHAIN_ROOT}/bin | 167 readonly NACL_BIN_PATH=${NACL_TOOLCHAIN_ROOT}/bin |
148 | 168 |
149 # export nacl tools for direct use in patches. | 169 # export nacl tools for direct use in patches. |
150 export NACLCC=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-gcc | 170 export NACLCC=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-gcc |
151 export NACLCXX=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-g++ | 171 export NACLCXX=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-g++ |
152 export NACLAR=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ar | 172 export NACLAR=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ar |
153 export NACLRANLIB=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ranlib | 173 export NACLRANLIB=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ranlib |
154 export NACLLD=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ld | 174 export NACLLD=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ld |
155 export NACLSTRINGS=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strings | 175 export NACLSTRINGS=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strings |
156 export NACLSTRIP=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strip | 176 export NACLSTRIP=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strip |
157 | 177 |
158 # NACL_SDK_GCC_SPECS_PATH is where nacl-gcc 'specs' file will be installed | 178 # NACL_SDK_GCC_SPECS_PATH is where nacl-gcc 'specs' file will be installed |
159 readonly NACL_SDK_GCC_SPECS_PATH=${NACL_TOOLCHAIN_ROOT}/lib/gcc/x86_64-nacl/4.
4.3 | 179 readonly NACL_SDK_GCC_SPECS_PATH=${NACL_TOOLCHAIN_ROOT}/lib/gcc/x86_64-nacl/4.
4.3 |
160 | 180 |
161 # NACL_SDK_USR is where the headers, libraries, etc. will be installed | 181 # NACL_SDK_USR is where the headers, libraries, etc. will be installed |
162 readonly NACL_SDK_USR=${NACL_TOOLCHAIN_ROOT}/${NACL_CROSS_PREFIX}/usr | 182 readonly NACL_SDK_USR=${NACL_TOOLCHAIN_ROOT}/${NACL_CROSS_PREFIX}/usr |
163 readonly NACL_SDK_USR_INCLUDE=${NACL_SDK_USR}/include | 183 readonly NACL_SDK_USR_INCLUDE=${NACL_SDK_USR}/include |
164 readonly NACL_SDK_LIB=${NACL_TOOLCHAIN_ROOT}/x86_64-nacl/lib${NACL_PACKAGES_BI
TSIZE} | 184 readonly NACL_SDK_LIB=${NACL_TOOLCHAIN_ROOT}/${NACL_ARCH}-nacl/${NACL_LIBDIR} |
165 readonly NACL_SDK_USR_LIB=${NACL_SDK_USR}/lib | 185 readonly NACL_SDK_USR_LIB=${NACL_SDK_USR}/lib |
166 readonly NACL_SDK_USR_BIN=${NACL_SDK_USR}/bin | 186 readonly NACL_SDK_USR_BIN=${NACL_SDK_USR}/bin |
167 | 187 |
168 # NACL_SDK_MULITARCH_USR is a version of NACL_SDK_USR that gets passed into | 188 # NACL_SDK_MULITARCH_USR is a version of NACL_SDK_USR that gets passed into |
169 # the gcc specs file. It has a gcc spec-file conditional for ${CROSS_ID} | 189 # the gcc specs file. It has a gcc spec-file conditional for ${NACL_ARCH} |
170 readonly NACL_SDK_MULTIARCH_USR=${NACL_TOOLCHAIN_ROOT}/\%\(nacl_arch\)/usr | 190 readonly NACL_SDK_MULTIARCH_USR=${NACL_TOOLCHAIN_ROOT}/\%\(nacl_arch\)/usr |
171 readonly NACL_SDK_MULTIARCH_USR_INCLUDE=${NACL_SDK_MULTIARCH_USR}/include | 191 readonly NACL_SDK_MULTIARCH_USR_INCLUDE=${NACL_SDK_MULTIARCH_USR}/include |
172 readonly NACL_SDK_MULTIARCH_USR_LIB=${NACL_SDK_MULTIARCH_USR}/lib | 192 readonly NACL_SDK_MULTIARCH_USR_LIB=${NACL_SDK_MULTIARCH_USR}/lib |
173 } | 193 } |
174 | 194 |
175 | 195 |
176 InitializePNaClToolchain() { | 196 InitializePNaClToolchain() { |
177 NACL_GLIBC=${NACL_GLIBC:-0} | 197 NACL_GLIBC=${NACL_GLIBC:-0} |
178 if [ $NACL_GLIBC = "1" ] ; then | 198 if [ $NACL_GLIBC = "1" ] ; then |
179 local TOOLCHAIN_SUFFIX="glibc" | 199 local TOOLCHAIN_SUFFIX="glibc" |
(...skipping 24 matching lines...) Expand all Loading... |
204 export NACLSTRINGS="$(which strings)" | 224 export NACLSTRINGS="$(which strings)" |
205 | 225 |
206 # NACL_SDK_USR is where the headers, libraries, etc. will be installed | 226 # NACL_SDK_USR is where the headers, libraries, etc. will be installed |
207 # FIXME: | 227 # FIXME: |
208 readonly NACL_SDK_USR=${NACL_SDK_BASE}/usr | 228 readonly NACL_SDK_USR=${NACL_SDK_BASE}/usr |
209 readonly NACL_SDK_USR_INCLUDE=${NACL_SDK_USR}/include | 229 readonly NACL_SDK_USR_INCLUDE=${NACL_SDK_USR}/include |
210 readonly NACL_SDK_USR_LIB=${NACL_SDK_USR}/lib | 230 readonly NACL_SDK_USR_LIB=${NACL_SDK_USR}/lib |
211 readonly NACL_SDK_USR_BIN=${NACL_SDK_USR}/bin | 231 readonly NACL_SDK_USR_BIN=${NACL_SDK_USR}/bin |
212 } | 232 } |
213 | 233 |
214 if [ ${NACL_PACKAGES_BITSIZE} = "pnacl" ] ; then | 234 if [ ${NACL_ARCH} = "pnacl" ] ; then |
215 InitializePNaClToolchain | 235 InitializePNaClToolchain |
216 else | 236 else |
217 InitializeNaClGccToolchain | 237 InitializeNaClGccToolchain |
218 fi | 238 fi |
219 | 239 |
220 ###################################################################### | 240 ###################################################################### |
221 # Always run | 241 # Always run |
222 ###################################################################### | 242 ###################################################################### |
223 | 243 |
224 CheckPatchVersion() { | 244 CheckPatchVersion() { |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} | 519 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} |
500 export FREETYPE_CONFIG=${NACL_SDK_USR_BIN}/freetype-config | 520 export FREETYPE_CONFIG=${NACL_SDK_USR_BIN}/freetype-config |
501 export PATH=${NACL_BIN_PATH}:${PATH}; | 521 export PATH=${NACL_BIN_PATH}:${PATH}; |
502 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 522 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
503 Remove ${PACKAGE_NAME}-build | 523 Remove ${PACKAGE_NAME}-build |
504 MakeDir ${PACKAGE_NAME}-build | 524 MakeDir ${PACKAGE_NAME}-build |
505 cd ${PACKAGE_NAME}-build | 525 cd ${PACKAGE_NAME}-build |
506 echo "Directory: $(pwd)" | 526 echo "Directory: $(pwd)" |
507 | 527 |
508 local conf_host=${NACL_CROSS_PREFIX} | 528 local conf_host=${NACL_CROSS_PREFIX} |
509 if [[ ${NACL_PACKAGES_BITSIZE} == "pnacl" ]]; then | 529 if [[ ${NACL_ARCH} = "pnacl" ]]; then |
510 # The PNaCl tools use "pnacl-" as the prefix, but config.sub | 530 # The PNaCl tools use "pnacl-" as the prefix, but config.sub |
511 # does not know about "pnacl". It only knows about "le32-nacl". | 531 # does not know about "pnacl". It only knows about "le32-nacl". |
512 # Unfortunately, most of the config.subs here are so old that | 532 # Unfortunately, most of the config.subs here are so old that |
513 # it doesn't know about that "le32" either. So we just say "nacl". | 533 # it doesn't know about that "le32" either. So we just say "nacl". |
514 conf_host="nacl" | 534 conf_host="nacl" |
515 fi | 535 fi |
516 ../configure \ | 536 ../configure \ |
517 --host=${conf_host} \ | 537 --host=${conf_host} \ |
518 --disable-shared \ | 538 --disable-shared \ |
519 --prefix=${NACL_SDK_USR} \ | 539 --prefix=${NACL_SDK_USR} \ |
(...skipping 16 matching lines...) Expand all Loading... |
536 Banner "Build ${PACKAGE_NAME}" | 556 Banner "Build ${PACKAGE_NAME}" |
537 echo "Directory: $(pwd)" | 557 echo "Directory: $(pwd)" |
538 # assumes pwd has makefile | 558 # assumes pwd has makefile |
539 make clean | 559 make clean |
540 make -j${OS_JOBS} | 560 make -j${OS_JOBS} |
541 } | 561 } |
542 | 562 |
543 | 563 |
544 DefaultTouchStep() { | 564 DefaultTouchStep() { |
545 FULL_PACKAGE="${START_DIR/#${NACL_PACKAGES}\//}" | 565 FULL_PACKAGE="${START_DIR/#${NACL_PACKAGES}\//}" |
546 SENTFILE="${NACL_PACKAGES_OUT}/sentinels/bits${NACL_PACKAGES_BITSIZE}/${FULL_P
ACKAGE}" | 566 SENTFILE="${NACL_PACKAGES_OUT}/sentinels/${NACL_ARCH}/${FULL_PACKAGE}" |
547 SENTDIR=$(dirname "${SENTFILE}") | 567 SENTDIR=$(dirname "${SENTFILE}") |
548 mkdir -p "${SENTDIR}" && touch "${SENTFILE}" | 568 mkdir -p "${SENTDIR}" && touch "${SENTFILE}" |
549 } | 569 } |
550 | 570 |
551 | 571 |
552 DefaultInstallStep() { | 572 DefaultInstallStep() { |
553 # assumes pwd has makefile | 573 # assumes pwd has makefile |
554 make install | 574 make install |
555 DefaultTouchStep | 575 DefaultTouchStep |
556 } | 576 } |
557 | 577 |
558 | 578 |
559 DefaultCleanUpStep() { | 579 DefaultCleanUpStep() { |
560 if [ ${NACL_PACKAGES_BITSIZE} != "pnacl" ] ; then | 580 if [ ${NACL_ARCH} != "pnacl" -a ${NACL_ARCH} != "arm" ] ; then |
561 PatchSpecFile | 581 PatchSpecFile |
562 fi | 582 fi |
563 AddToInstallFile ${PACKAGE_NAME} | 583 AddToInstallFile ${PACKAGE_NAME} |
564 ChangeDir ${SAVE_PWD} | 584 ChangeDir ${SAVE_PWD} |
565 } | 585 } |
566 | 586 |
567 | 587 |
568 RunCommand() { | 588 RunCommand() { |
569 echo "$@" | 589 echo "$@" |
570 time "$@" | 590 time "$@" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 DefaultPackageInstall() { | 661 DefaultPackageInstall() { |
642 DefaultPreInstallStep | 662 DefaultPreInstallStep |
643 DefaultDownloadStep | 663 DefaultDownloadStep |
644 DefaultExtractStep | 664 DefaultExtractStep |
645 DefaultPatchStep | 665 DefaultPatchStep |
646 DefaultConfigureStep | 666 DefaultConfigureStep |
647 DefaultBuildStep | 667 DefaultBuildStep |
648 DefaultInstallStep | 668 DefaultInstallStep |
649 DefaultCleanUpStep | 669 DefaultCleanUpStep |
650 } | 670 } |
OLD | NEW |