simplify things a little bit

This commit is contained in:
Eric Andersen 2003-10-15 07:04:19 +00:00
parent a9ea376897
commit 058f423237

View File

@ -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