Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 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 source pkg_info | 6 source pkg_info |
| 7 source ../../build_tools/common.sh | 7 source ../../build_tools/common.sh |
| 8 | 8 |
| 9 EXECUTABLES=python.nexe | 9 EXECUTABLES=python.nexe |
| 10 # Currently this package only builds on linux. | 10 # Currently this package only builds on linux. |
| 11 # The build relies on certain host binaries and pythong's configure | 11 # The build relies on certain host binaries and pythong's configure |
| 12 # requires us to sett --build= as well as --host=. | 12 # requires us to sett --build= as well as --host=. |
| 13 EXTRA_CONFIGURE_ARGS="--disable-ipv6 --with-suffix=.nexe --build=x86_64-linux-gn u" | |
| 14 export MAKEFLAGS="PGEN=../build-nacl-host/Parser/pgen" | |
| 15 HERE=$(cd "$(dirname "$BASH_SOURCE")" ; pwd) | 13 HERE=$(cd "$(dirname "$BASH_SOURCE")" ; pwd) |
| 16 | 14 |
| 17 BuildHostPython() { | 15 BuildHostPython() { |
| 18 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_DIR} | 16 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_DIR} |
| 19 MakeDir build-nacl-host | 17 MakeDir build-nacl-host |
| 20 ChangeDir build-nacl-host | 18 ChangeDir build-nacl-host |
| 21 LogExecute ../configure | 19 if [ -f python -a -f Parser/pgen ]; then |
| 20 return | |
| 21 fi | |
| 22 # Reset CFLAGS and LDFLAGS when configuring the host | |
| 23 # version of python since they hold values designed for | |
| 24 # building for NaCl. | |
| 25 CFLAGS="" LDFLAGS="" LogExecute ../configure | |
| 22 LogExecute make -j${OS_JOBS} python Parser/pgen | 26 LogExecute make -j${OS_JOBS} python Parser/pgen |
| 23 } | 27 } |
| 24 | 28 |
| 25 CustomConfigureStep() { | 29 CustomConfigureStep() { |
| 26 BuildHostPython | 30 BuildHostPython |
| 27 export CROSS_COMPILE=true | 31 export CROSS_COMPILE=true |
| 28 # We pre-seed configure with certain results that it cannot determine | 32 # We pre-seed configure with certain results that it cannot determine |
| 29 # since we are doing a cross compile. The $CONFIG_SITE file is sourced | 33 # since we are doing a cross compile. The $CONFIG_SITE file is sourced |
| 30 # by configure early on. | 34 # by configure early on. |
| 31 export CONFIG_SITE=${HERE}/config.site | 35 export CONFIG_SITE=${HERE}/config.site |
| 36 # Disable ipv6 since configure claims it requires a working getaddrinfo | |
| 37 # which we do done provide. TODO(sbc): remove this once nacl_io supports | |
|
Mark Seaborn
2013/07/16 17:10:05
"do not provide"
| |
| 38 # getaddrinfo. | |
| 39 EXTRA_CONFIGURE_ARGS="--disable-ipv6" | |
| 40 EXTRA_CONFIGURE_ARGS+=" --with-suffix=.nexe" | |
| 41 EXTRA_CONFIGURE_ARGS+=" --build=x86_64-linux-gnu" | |
| 42 export MAKEFLAGS="PGEN=../build-nacl-host/Parser/pgen" | |
| 43 export LIBS="-lc -lnosys" | |
| 32 DefaultConfigureStep | 44 DefaultConfigureStep |
| 33 } | 45 } |
| 34 | 46 |
| 35 CustomTestStep() { | 47 CustomTestStep() { |
| 36 WriteSelLdrScript python python.nexe | 48 WriteSelLdrScript python python.nexe |
| 37 } | 49 } |
| 38 | 50 |
| 39 CustomPackageInstall() { | 51 CustomPackageInstall() { |
| 40 DefaultPreInstallStep | 52 DefaultPreInstallStep |
| 41 DefaultDownloadStep | 53 DefaultDownloadStep |
| 42 DefaultExtractStep | 54 DefaultExtractStep |
| 43 DefaultPatchStep | 55 DefaultPatchStep |
| 44 CustomConfigureStep | 56 CustomConfigureStep |
| 45 DefaultBuildStep | 57 DefaultBuildStep |
| 46 DefaultTranslateStep | 58 DefaultTranslateStep |
| 47 DefaultValidateStep | 59 DefaultValidateStep |
| 48 CustomTestStep | 60 CustomTestStep |
| 49 DefaultInstallStep | 61 DefaultInstallStep |
| 50 } | 62 } |
| 51 | 63 |
| 52 CustomPackageInstall | 64 CustomPackageInstall |
| 53 exit 0 | 65 exit 0 |
| OLD | NEW |