summaryrefslogtreecommitdiffstats
path: root/make/binutils.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-11-20 13:49:14 +0000
committerEric Andersen <andersen@codepoet.org>2003-11-20 13:49:14 +0000
commit7e3b1dd126dd2872f4b82d99375338b2c5549986 (patch)
treecb28654ba9266617dc1f96592dd00b27a54e10d3 /make/binutils.mk
parent545d9674b0c25921279f1b57d637765171199bd9 (diff)
downloadbuildroot-novena-7e3b1dd126dd2872f4b82d99375338b2c5549986.tar.gz
buildroot-novena-7e3b1dd126dd2872f4b82d99375338b2c5549986.zip
Add some quoting to handle unusual host compiler naming
Diffstat (limited to 'make/binutils.mk')
-rw-r--r--make/binutils.mk30
1 files changed, 18 insertions, 12 deletions
diff --git a/make/binutils.mk b/make/binutils.mk
index 85c9eea32..291ee62ce 100644
--- a/make/binutils.mk
+++ b/make/binutils.mk
@@ -33,9 +33,10 @@ $(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
$(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
mkdir -p $(BINUTILS_DIR1)
- (cd $(BINUTILS_DIR1); CC=$(HOSTCC) \
- CC_FOR_HOST=$(HOSTCC) \
- CXX_FOR_HOST=$(HOSTCC) \
+ (cd $(BINUTILS_DIR1); CC="$(HOSTCC)" \
+ CC_FOR_HOST="$(HOSTCC)" \
+ CXX_FOR_HOST="$(HOSTCC)" \
+ LDFLAGS="$(HOSTLDFLAGS)" \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_HOST_NAME) \
@@ -59,11 +60,13 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
touch $(BINUTILS_DIR1)/.configured
$(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
- $(MAKE) $(JLEVEL) CC_FOR_HOST=$(HOSTCC) CXX_FOR_HOST=$(HOSTCC) \
+ $(MAKE) $(JLEVEL) CC_FOR_HOST="$(HOSTCC)" \
+ CXX_FOR_HOST="$(HOSTCC)" LDFLAGS="$(HOSTLDFLAGS)" \
-C $(BINUTILS_DIR1);
$(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump
- $(MAKE) $(JLEVEL) CC_FOR_HOST=$(HOSTCC) CXX_FOR_HOST=$(HOSTCC) \
+ $(MAKE) $(JLEVEL) CC_FOR_HOST="$(HOSTCC)" \
+ CXX_FOR_HOST="$(HOSTCC)" LDFLAGS="$(HOSTLDFLAGS)" \
-C $(BINUTILS_DIR1) install;
rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \
$(STAGING_DIR)/share/locale
@@ -86,7 +89,7 @@ $(STAGING_DIR)/lib/libg.a:
mkdir -p $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin
mkdir -p $(STAGING_DIR)/usr/include/
mkdir -p $(STAGING_DIR)/usr/lib/
- $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ar rv $(STAGING_DIR)/lib/libg.a;
+ $(TARGET_CROSS)ar rv $(STAGING_DIR)/lib/libg.a;
cp $(BINUTILS_DIR)/include/ansidecl.h $(STAGING_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/bfdlink.h $(STAGING_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/dis-asm.h $(STAGING_DIR)/usr/include/
@@ -123,8 +126,9 @@ $(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
(cd $(BINUTILS_DIR2); \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
- CC_FOR_BUILD=$(HOSTCC) \
- CXX_FOR_BUILD=$(HOSTCC) \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ CXX_FOR_BUILD="$(HOSTCC)" \
+ LDFLAGS="$(HOSTLDFLAGS)" \
AR_FOR_TARGET=$(TARGET_CROSS)ar \
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \
@@ -147,8 +151,9 @@ $(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
$(MAKE) $(JLEVEL) -C $(BINUTILS_DIR2) \
- CC_FOR_BUILD=$(HOSTCC) \
- CXX_FOR_BUILD=$(HOSTCC) \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ CXX_FOR_BUILD="$(HOSTCC)" \
+ LDFLAGS="$(HOSTLDFLAGS)" \
AR_FOR_TARGET=$(TARGET_CROSS)ar \
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \
@@ -161,8 +166,9 @@ $(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
$(MAKE) $(JLEVEL) -C $(BINUTILS_DIR2) \
- CC_FOR_BUILD=$(HOSTCC) \
- CXX_FOR_BUILD=$(HOSTCC) \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ CXX_FOR_BUILD="$(HOSTCC)" \
+ LDFLAGS="$(HOSTLDFLAGS)" \
AR_FOR_TARGET=$(TARGET_CROSS)ar \
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \