diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-12-14 20:38:07 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2012-12-14 20:38:07 +0800 |
commit | e9ba2efe4c3ce6cf16ce15fecce3afd7869038ef (patch) | |
tree | 0e5e388a79bf0e420b5d777c8b04964b7b0a1553 | |
parent | 7a683436af4ec1627359a951a16bbbadaacc3e1e (diff) | |
download | build-e9ba2efe4c3ce6cf16ce15fecce3afd7869038ef.tar.gz |
Don't compile host libraries with --with-sysroot
build-gcc.sh passes on --with-sysroot which is really meant for
target. Remove it from "baseargs" to form "host_baseargs"
(borrowed the unused "gold_baseargs") and used it for building
host libraries, otherwise gmp may not have incorrect
dependency_libs= in .libs/libgmpxx.lai.
Change-Id: I2d1c1328039a48b72ce6b4191a71ed5482894459
-rw-r--r-- | Makefile.in | 17 | ||||
-rwxr-xr-x | configure | 19 | ||||
-rw-r--r-- | configure.ac | 19 |
3 files changed, 33 insertions, 22 deletions
diff --git a/Makefile.in b/Makefile.in index 5e558b0..c676d8e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -54,6 +54,7 @@ INSTALL:=@INSTALL@ INSTALL_DATA:=@INSTALL_DATA@ TOPLEVEL_CONFIGURE_ARGUMENTS:=@TOPLEVEL_CONFIGURE_ARGUMENTS@ baseargs = @baseargs@ +host_baseargs = @host_baseargs@ GCC_MIN_VERSION_4_3_0:=@GCC_MIN_VERSION_4_3_0@ GCC_MIN_VERSION_4_5_0:=@GCC_MIN_VERSION_4_5_0@ GDB_MIN_VERSION_7_2:=@GDB_MIN_VERSION_7_2@ @@ -367,7 +368,7 @@ endif config-host-libbfd: stmp-config-host-libbfd LIBBFD_CONFIG_ARGS=--prefix=$(prefix) \ --target=${target_alias} --host=${host} --build=${build} \ - $(baseargs) --disable-shared \ + $(host_baseargs) --disable-shared \ --enable-install-libbfd --with-included-gettext stmp-config-host-libbfd: config.status ([ -d libbfd-${BINUTILS_VERSION} ] || \ @@ -565,7 +566,7 @@ install-target-newlib: stmp-build-target-newlib # host gmp rules .PHONY: config-host-gmp build-host-gmp install-host-gmp config-host-gmp: stmp-config-host-gmp -GMP_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ +GMP_CONFIG_ARGS=$(host_baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ --host=${cur_host} --build=${cur_build} ifeq ($(ENABLE_GRAPHITE),yes) @@ -596,7 +597,7 @@ install-host-gmp: stmp-install-host-gmp # host mpfr rules .PHONY: config-host-mpfr build-host-mpfr install-host-mpfr config-host-mpfr: stmp-config-host-mpfr -MPFR_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ +MPFR_CONFIG_ARGS=$(host_baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ --host=${cur_host} --build=${cur_build} \ --with-gmp=$(GMP_DIR) stmp-config-host-mpfr: config.status stmp-install-host-gmp @@ -622,7 +623,7 @@ install-host-mpfr: stmp-install-host-mpfr # host mpc rules .PHONY: config-host-mpc build-host-mpc install-host-mpc config-host-mpc: stmp-config-host-mpc -MPC_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ +MPC_CONFIG_ARGS=$(host_baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ --host=${cur_host} --build=${cur_build} \ --with-gmp=$(GMP_DIR) --with-mpfr=$(MPFR_DIR) stmp-config-host-mpc: config.status stmp-install-host-gmp stmp-install-host-mpfr @@ -648,7 +649,7 @@ install-host-mpc: stmp-install-host-mpc # host ppl rules .PHONY: config-host-ppl build-host-ppl install-host-ppl config-host-ppl: stmp-config-host-ppl -PPL_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ +PPL_CONFIG_ARGS=$(host_baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ --target=${target_alias} \ --host=${host} --build=${build} \ --disable-nls --with-gmp-prefix=$(GMP_DIR) \ @@ -673,7 +674,7 @@ install-host-ppl: stmp-install-host-ppl # host cloog rules .PHONY: config-host-cloog build-host-cloog install-host-cloog config-host-cloog: stmp-config-host-cloog -CLOOG_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ +CLOOG_CONFIG_ARGS=$(host_baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ --target=${target_alias} \ --host=${host} --build=${build} \ --disable-nls \ @@ -712,7 +713,7 @@ install-host-cloog: stmp-install-host-cloog # host expat rules .PHONY: config-host-expat build-host-expat install-host-expat config-host-expat: stmp-config-host-expat -EXPAT_CONFIG_ARGS=$(baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ +EXPAT_CONFIG_ARGS=$(host_baseargs) --prefix=$(TEMP_INSTALLDIR) --disable-shared \ --host=${cur_host} --build=${cur_build} stmp-config-host-expat: config.status $(canadian_stmp) ([ -d ${EXPAT_VERSION} ] || \ @@ -743,7 +744,7 @@ install-target-gdb: else config-target-gdb: stmp-config-target-gdb -GDB_CONFIG_ARGS=$(baseargs) --prefix=$(prefix) \ +GDB_CONFIG_ARGS=$(host_baseargs) --prefix=$(prefix) \ --target=$(GDB_TARGET) --host=${cur_host} --build=${cur_build} \ --disable-nls @@ -577,7 +577,7 @@ BINUTILS_MIN_VERSION_2_21 BINUTILS_VERSION package_to_srcdir ENABLE_GRAPHITE -gold_baseargs +host_baseargs enable_gold enable_ld_default baseargs @@ -2178,17 +2178,22 @@ fi -# Strip --{enable|disable}-{gold|ld}* from baseargs. These are used for the -# gold binutils. Note that baseargs are quoted. -gold_baseargs= +# Strip --with-sysroot, which is really "target" sysroot, from baseargs +# to form host_baseargs for building host libraries. Passing target +# --with-sysroot is detrimantal (*1). Invent a new option +# --with-host-sysroot if needed in the future. +# Note that baseargs are quoted. +# +# (*1) path dependency_libs= in .libs/libgmpxx.lai has '=' prefix! +# +host_baseargs= for ac_arg in $baseargs do case $ac_arg in - \'--enable-gold\' | \'--enable-gold=*\' | \'--disable-gold\' | \ - \'--enable-ld\' | \'--enable-ld=*\' | \'--disable-ld\' ) + \'--with-sysroot=*\' ) ;; *) - gold_baseargs="$gold_baseargs $ac_arg" + host_baseargs="$host_baseargs $ac_arg" ;; esac done diff --git a/configure.ac b/configure.ac index ab42f71..e8a8fd1 100644 --- a/configure.ac +++ b/configure.ac @@ -204,22 +204,27 @@ AC_SUBST(baseargs) AC_SUBST(enable_gold) AC_SUBST(enable_ld_default) -# Strip --{enable|disable}-{gold|ld}* from baseargs. These are used for the -# gold binutils. Note that baseargs are quoted. -gold_baseargs= +# Strip --with-sysroot, which is really "target" sysroot, from baseargs +# to form host_baseargs for building host libraries. Passing target +# --with-sysroot is detrimantal (*1). Invent a new option +# --with-host-sysroot if needed in the future. +# Note that baseargs are quoted. +# +# (*1) path dependency_libs= in .libs/libgmpxx.lai has '=' prefix! +# +host_baseargs= for ac_arg in $baseargs do case $ac_arg in - \'--enable-gold\' | \'--enable-gold=*\' | \'--disable-gold\' | \ - \'--enable-ld\' | \'--enable-ld=*\' | \'--disable-ld\' ) + \'--with-sysroot=*\' ) ;; *) - gold_baseargs="$gold_baseargs $ac_arg" + host_baseargs="$host_baseargs $ac_arg" ;; esac done -AC_SUBST(gold_baseargs) +AC_SUBST(host_baseargs) ENABLE_GRAPHITE=no AC_ARG_ENABLE([graphite], |