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

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, 1 month 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') | ports/sdl2-tests/build.sh » ('J')
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 c738a248aa43938c96b2db208dd1339c89507f01..f6a005c541b54f965811e728e96232155b3639da 100644
--- a/build_tools/common.sh
+++ b/build_tools/common.sh
@@ -180,6 +180,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
@@ -987,8 +999,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
@@ -998,17 +1008,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"
@@ -1026,8 +1025,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') | ports/sdl2-tests/build.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698