From: Eric Andersen Date: Wed, 15 Oct 2003 07:04:19 +0000 (-0000) Subject: simplify things a little bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=058f42323798636c386c185f511b37e39d1f8b84;p=buildroot.git simplify things a little bit --- diff --git a/make/gcc-3.3.mk b/make/gcc-3.3.mk index 4f836df1bc..8609ab1b98 100644 --- a/make/gcc-3.3.mk +++ b/make/gcc-3.3.mk @@ -24,7 +24,7 @@ ifneq ($(GCC_2_95_TOOLCHAIN),true) #GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-3.3 #GCC_CAT:=zcat -# Shiney new stuff... +# Shiny new stuff... GCC_VERSION:=3.3.1 GCC_SITE:=http://gcc.get-software.com/releases/gcc-$(GCC_VERSION) GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2 @@ -276,7 +276,43 @@ gcc3_3-dirclean: GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-3.3-target ifeq ($(HOST_ARCH),$(ARCH)) -TARGET_GCC_ARGS=$(TARGET_CONFIGURE_OPTS) +TARGET_GCC_ARGS=$(TARGET_CONFIGURE_OPTS) \ + AR_FOR_BUILD=ar \ + AS_FOR_BUILD=as \ + LD_FOR_BUILD=ld \ + NM_FOR_BUILD=nm \ + 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 \ + NM_FOR_TARGET=$(TARGET_CROSS)nm \ + CC_FOR_TARGET=$(TARGET_CROSS)gcc \ + GCC_FOR_TARGET=$(TARGET_CROSS)gcc \ + CXX_FOR_TARGET=$(TARGET_CROSS)g++ \ + RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib +else +TARGET_GCC_ARGS=\ + AR_FOR_BUILD=ar \ + AS_FOR_BUILD=as \ + LD_FOR_BUILD=ld \ + NM_FOR_BUILD=nm \ + 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 \ + NM_FOR_TARGET=$(TARGET_CROSS)nm \ + CC_FOR_TARGET=$(TARGET_CROSS)gcc \ + GCC_FOR_TARGET=$(TARGET_CROSS)gcc \ + CXX_FOR_TARGET=$(TARGET_CROSS)g++ \ + RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib endif # We need to unpack a pristine source tree to avoid some of @@ -321,23 +357,6 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc3_3_build_hacks (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 \ - 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 \ - NM_FOR_TARGET=$(TARGET_CROSS)nm \ - CC_FOR_TARGET=$(TARGET_CROSS)gcc \ - GCC_FOR_TARGET=$(TARGET_CROSS)gcc \ - CXX_FOR_TARGET=$(TARGET_CROSS)g++ \ - RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \ ./configure \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ @@ -360,48 +379,12 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc3_3_build_hacks #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 \ - 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 \ - NM_FOR_TARGET=$(TARGET_CROSS)nm \ - CC_FOR_TARGET=$(TARGET_CROSS)gcc \ - GCC_FOR_TARGET=$(TARGET_CROSS)gcc \ - CXX_FOR_TARGET=$(TARGET_CROSS)g++ \ - RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib + $(MAKE) $(TARGET_GCC_ARGS) -C $(GCC_BUILD_DIR3) touch $(GCC_BUILD_DIR3)/.compiled $(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 \ - 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 \ - NM_FOR_TARGET=$(TARGET_CROSS)nm \ - CC_FOR_TARGET=$(TARGET_CROSS)gcc \ - GCC_FOR_TARGET=$(TARGET_CROSS)gcc \ - CXX_FOR_TARGET=$(TARGET_CROSS)g++ \ - RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \ - DESTDIR=$(TARGET_DIR) install + $(MAKE) $(TARGET_GCC_ARGS) DESTDIR=$(TARGET_DIR) \ + -C $(GCC_BUILD_DIR3) install (cd $(TARGET_DIR)/usr/bin; ln -fs gcc cc) (cd $(TARGET_DIR)/lib; ln -fs /usr/bin/cpp) rm -rf $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/include