summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-09-30 20:32:37 +0000
committerEric Andersen <andersen@codepoet.org>2003-09-30 20:32:37 +0000
commita008b1700283b7b8fc813c412e7e2ea2721e0b0b (patch)
tree643fb3a75c7ab322a1f85799c120bdac74d421e6
parentc2ea490757f342de04a7806e7f68753ae2566f4b (diff)
downloadbuildroot-novena-a008b1700283b7b8fc813c412e7e2ea2721e0b0b.tar.gz
buildroot-novena-a008b1700283b7b8fc813c412e7e2ea2721e0b0b.zip
Fix the build when host arch == target arch
-rw-r--r--make/gcc-3.3.mk17
1 files changed, 11 insertions, 6 deletions
diff --git a/make/gcc-3.3.mk b/make/gcc-3.3.mk
index 4877460b4..6d120b5eb 100644
--- a/make/gcc-3.3.mk
+++ b/make/gcc-3.3.mk
@@ -273,6 +273,11 @@ gcc3_3-dirclean:
#
#############################################################
GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-3.3-target
+
+ifeq ($(HOST_ARCH),$(ARCH))
+TARGET_GCC_ARGS=$(TARGET_CONFIGURE_OPTS)
+endif
+
$(GCC_BUILD_DIR3)/.gcc3_3_build_hacks: $(GCC_DIR3_DEPENDS)
#
# Make certain the uClibc start files are found
@@ -297,15 +302,16 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc3_3_build_hacks
mkdir -p $(GCC_BUILD_DIR3)
(cd $(GCC_BUILD_DIR3); ln -fs $(ARCH)-linux build-$(GNU_TARGET_NAME))
(cd $(GCC_BUILD_DIR3); \
+ $(TARGET_GCC_ARGS) \
AR_FOR_BUILD=ar \
AS_FOR_BUILD=as \
LD_FOR_BUILD=ld \
NM_FOR_BUILD=nm \
- CXX_FOR_BUILD=g++ \
RANLIB_FOR_BUILD=ranlib \
HOST_CC=$(HOSTCC) \
CC_FOR_BUILD=$(HOSTCC) \
GCC_FOR_BUILD=$(HOSTCC) \
+ CXX_FOR_BUILD=$(HOSTCC) \
AR_FOR_TARGET=$(TARGET_CROSS)ar \
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \
@@ -342,19 +348,18 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc3_3_build_hacks
# --enable-clocale=gnu \
#endif
-
-
$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
$(MAKE) -C $(GCC_BUILD_DIR3) \
+ $(TARGET_GCC_ARGS) \
AR_FOR_BUILD=ar \
AS_FOR_BUILD=as \
LD_FOR_BUILD=ld \
NM_FOR_BUILD=nm \
- CXX_FOR_BUILD=g++ \
RANLIB_FOR_BUILD=ranlib \
HOST_CC=$(HOSTCC) \
CC_FOR_BUILD=$(HOSTCC) \
GCC_FOR_BUILD=$(HOSTCC) \
+ CXX_FOR_BUILD=$(HOSTCC) \
AR_FOR_TARGET=$(TARGET_CROSS)ar \
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \
@@ -367,16 +372,16 @@ $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
$(MAKE) -C $(GCC_BUILD_DIR3) \
+ $(TARGET_GCC_ARGS) \
AR_FOR_BUILD=ar \
AS_FOR_BUILD=as \
LD_FOR_BUILD=ld \
NM_FOR_BUILD=nm \
- CXX_FOR_BUILD=g++ \
RANLIB_FOR_BUILD=ranlib \
HOST_CC=$(HOSTCC) \
- GCC_FOR_BUILD=$(HOSTCC) \
CC_FOR_BUILD=$(HOSTCC) \
GCC_FOR_BUILD=$(HOSTCC) \
+ CXX_FOR_BUILD=$(HOSTCC) \
AR_FOR_TARGET=$(TARGET_CROSS)ar \
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \