Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2333)

Unified Diff: build_tools/common.sh

Issue 1435953002: Consistent --host and --build arguments to configure (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ports/dosbox/build.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_tools/common.sh
diff --git a/build_tools/common.sh b/build_tools/common.sh
index b19feda8b71c87ae7355d6e7c1cb01ded4de3d6e..59ccdf11f1dd9472891867a50f7f5c9bb59b2048 100644
--- a/build_tools/common.sh
+++ b/build_tools/common.sh
@@ -179,6 +179,18 @@ if [ -z "${OS_JOBS:-}" ]; then
fi
fi
+CONF_BUILD=$(/bin/sh "${SCRIPT_DIR}/config.guess")
+CONF_HOST=${NACL_CROSS_PREFIX}
+# TODO(gdeepti): Investigate whether emscripten accurately fits this case for
+# long term usage.
+if [[ ${NACL_ARCH} == pnacl ]]; then
+ # The PNaCl tools use "pnacl-" as the prefix, but config.sub
+ # does not know about "pnacl". It only knows about "le32-nacl".
+ # Unfortunately, most of the config.subs here are so old that
+ # it doesn't know about that "le32" either. So we just say "nacl".
+ CONF_HOST="nacl"
+fi
+
GomaTest() {
# test the goma compiler
if [ "${NACL_GOMA_FORCE:-}" = 1 ]; then
@@ -981,8 +993,6 @@ DefaultConfigureStep() {
ConfigureStep_Autoconf() {
- conf_build=$(/bin/sh "${SCRIPT_DIR}/config.guess")
-
SetupCrossEnvironment
# Without this autoconf builds will use the same CFLAGS/LDFLAGS for host
@@ -992,17 +1002,6 @@ ConfigureStep_Autoconf() {
export CFLAGS_FOR_BUILD=""
export LDFLAGS_FOR_BUILD=""
- local conf_host=${NACL_CROSS_PREFIX}
- # TODO(gdeepti): Investigate whether emscripten accurately fits this case for
- # long term usage.
- if [[ ${TOOLCHAIN} == pnacl ]]; then
- # The PNaCl tools use "pnacl-" as the prefix, but config.sub
- # does not know about "pnacl". It only knows about "le32-nacl".
- # Unfortunately, most of the config.subs here are so old that
- # it doesn't know about that "le32" either. So we just say "nacl".
- conf_host="nacl"
- fi
-
# Inject a shim that speed up pnacl invocations for configure.
if [ "${NACL_ARCH}" = "pnacl" ]; then
local PNACL_CONF_SHIM="${TOOLS_DIR}/pnacl-configure-shim.py"
@@ -1020,8 +1019,8 @@ ConfigureStep_Autoconf() {
# it has the correct LLVM bimfmt support. What is more, autoconf will
# generate a warning if only --host is specified.
LogExecute "${NACL_CONFIGURE_PATH}" \
- --build=${conf_build} \
- --host=${conf_host} \
+ --build=${CONF_BUILD} \
+ --host=${CONF_HOST} \
--prefix=${PREFIX} \
--with-http=no \
--with-html=no \
« no previous file with comments | « no previous file | ports/dosbox/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698