With this, buildroot builds w/o needing the magic symlink,
authorEric Andersen <andersen@codepoet.org>
Tue, 30 Sep 2003 05:23:18 +0000 (05:23 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 30 Sep 2003 05:23:18 +0000 (05:23 -0000)
and properly cross compiles.  Wohoo, time to ship...
 -Erik

make/binutils.mk
make/gcc-3.3.mk

index 680cc66154a54ef927a566323149390a673d45e3..d7daeea981541aee776d589331f22e7c62aa38d7 100644 (file)
@@ -67,13 +67,11 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
        touch $(BINUTILS_DIR1)/.configured
 
 $(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
-       $(MAKE) CC_FOR_HOST=$(HOSTCC) \
-               CXX_FOR_HOST=$(HOSTCC) \
+       $(MAKE) CC_FOR_HOST=$(HOSTCC) CXX_FOR_HOST=$(HOSTCC) \
                -C $(BINUTILS_DIR1);
 
 $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump 
-       $(MAKE) CC_FOR_HOST=$(HOSTCC) \
-               CXX_FOR_HOST=$(HOSTCC) \
+       $(MAKE) CC_FOR_HOST=$(HOSTCC) CXX_FOR_HOST=$(HOSTCC) \
                -C $(BINUTILS_DIR1) install;
        rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \
                $(STAGING_DIR)/share/locale
@@ -94,7 +92,18 @@ $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump
 
 $(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;
+       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/
+       cp $(BINUTILS_DIR)/include/libiberty.h $(STAGING_DIR)/usr/include/
+       cp $(BINUTILS_DIR)/include/symcat.h $(STAGING_DIR)/usr/include/
+       cp $(BINUTILS_DIR1)/bfd/bfd.h $(STAGING_DIR)/usr/include/
+       cp -a $(BINUTILS_DIR1)/bfd/.libs/* $(STAGING_DIR)/usr/lib/
+       cp -a $(BINUTILS_DIR1)/opcodes/.libs/* $(STAGING_DIR)/usr/lib/
+       cp -a $(BINUTILS_DIR1)/libiberty/libiberty.a $(STAGING_DIR)/usr/lib/
 
 binutils: $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ld $(STAGING_DIR)/lib/libg.a
 
@@ -144,7 +153,7 @@ $(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
                --localstatedir=/var \
                --mandir=/usr/man \
                --infodir=/usr/info \
-               --enable-shared $(MULTILIB) \
+               $(MULTILIB) \
                --program-prefix="" \
        );
        touch $(BINUTILS_DIR2)/.configured
@@ -176,17 +185,8 @@ $(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
                CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
                RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
                prefix=/usr \
-               exec_prefix=/usr \
-               bindir=/usr/bin \
-               sbindir=/usr/sbin \
-               libexecdir=/usr/lib \
-               datadir=/usr/share \
-               sysconfdir=/etc \
-               localstatedir=/var \
-               libdir=/usr/lib \
                infodir=/usr/info \
                mandir=/usr/man \
-               includedir=/usr/include \
                DESTDIR=$(TARGET_DIR) install
        rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
                $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
index 8cfb1731145a0846db32276e72a15cad51e91949..4877460b46db86decf335bb177393a5f427a756d 100644 (file)
@@ -297,9 +297,15 @@ $(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_CONFIGURE_OPTS) \
+               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) \
-               CXX_FOR_BUILD=$(HOSTCC) \
+               GCC_FOR_BUILD=$(HOSTCC) \
                AR_FOR_TARGET=$(TARGET_CROSS)ar \
                AS_FOR_TARGET=$(TARGET_CROSS)as \
                LD_FOR_TARGET=$(TARGET_CROSS)ld \
@@ -340,8 +346,15 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc3_3_build_hacks
 
 $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
        $(MAKE) -C $(GCC_BUILD_DIR3) \
+               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) \
-               CXX_FOR_BUILD=$(HOSTCC) \
+               GCC_FOR_BUILD=$(HOSTCC) \
                AR_FOR_TARGET=$(TARGET_CROSS)ar \
                AS_FOR_TARGET=$(TARGET_CROSS)as \
                LD_FOR_TARGET=$(TARGET_CROSS)ld \
@@ -354,8 +367,16 @@ $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
 
 $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
        $(MAKE) -C $(GCC_BUILD_DIR3) \
+               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) \
-               CXX_FOR_BUILD=$(HOSTCC) \
+               GCC_FOR_BUILD=$(HOSTCC) \
                AR_FOR_TARGET=$(TARGET_CROSS)ar \
                AS_FOR_TARGET=$(TARGET_CROSS)as \
                LD_FOR_TARGET=$(TARGET_CROSS)ld \