aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Huang <jserv@0xlab.org>2012-12-09 23:47:29 +0800
committerJim Huang <jserv@0xlab.org>2012-12-10 00:18:57 +0800
commitcb3aee6ee66822b544ac679664d63a7b8e5d9a21 (patch)
tree16cf9a82a511d9c278533ebf2ab95d2b5ad0457c
parent106603b925b7f20177c5b7613535d9d43ed35b7d (diff)
downloadbuild-cb3aee6ee66822b544ac679664d63a7b8e5d9a21.tar.gz
libbfd: prevent from incorrect assignment of $CFLAGS
For older versions of binutils, the automake script can not recognize the suffixing environment variable $CFLAGS and complain as following: (cd libbfd-binutils-2.17 ; \ .././../binutils/binutils-2.17/configure \ --prefix=/usr/local --target= --host=x86_64-unknown-linux-gnu \ --build=x86_64-unknown-linux-gnu --program-transform-name='s,y,y,' \ --disable-shared \ --enable-install-libbfd --with-included-gettext CFLAGS=" -m32") && \ touch stmp-config-host-libbfd configure: warning: CFLAGS= -m32: invalid host type creating cache ./config.cache configure: error: can only configure for one host and one target at a time Change-Id: I075a37d4bfd9b5744ec9c5ffc73446cbbba220b8
-rw-r--r--Makefile.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 482d318..cb3a741 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -368,12 +368,12 @@ config-host-libbfd: stmp-config-host-libbfd
LIBBFD_CONFIG_ARGS=--prefix=$(prefix) \
--target=${target_alias} --host=${host} --build=${build} \
$(baseargs) --disable-shared \
- --enable-install-libbfd --with-included-gettext \
- CFLAGS="$(CFLAGS) -m32"
+ --enable-install-libbfd --with-included-gettext
stmp-config-host-libbfd: config.status
([ -d libbfd-${BINUTILS_VERSION} ] || \
mkdir libbfd-${BINUTILS_VERSION}) && \
(cd libbfd-${BINUTILS_VERSION} ; \
+ export CFLAGS="$(CFLAGS) -m32" ; \
$(call find-package-srcdir, ${BINUTILS_VERSION})/configure \
$(LIBBFD_CONFIG_ARGS)) && \
$(STAMP) $@