summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-09-30 05:23:18 +0000
committerEric Andersen <andersen@codepoet.org>2003-09-30 05:23:18 +0000
commitc2ea490757f342de04a7806e7f68753ae2566f4b (patch)
tree611b1e292916168dd05d336d56ab8ec102a84302 /make
parent626312a2784cb573f0a69938f898dd38303fca46 (diff)
downloadbuildroot-novena-c2ea490757f342de04a7806e7f68753ae2566f4b.tar.gz
buildroot-novena-c2ea490757f342de04a7806e7f68753ae2566f4b.zip
With this, buildroot builds w/o needing the magic symlink,
and properly cross compiles. Wohoo, time to ship... -Erik
Diffstat (limited to 'make')
-rw-r--r--make/binutils.mk28
-rw-r--r--make/gcc-3.3.mk29
2 files changed, 39 insertions, 18 deletions
diff --git a/make/binutils.mk b/make/binutils.mk
index 680cc6615..d7daeea98 100644
--- a/make/binutils.mk
+++ b/make/binutils.mk
@@ -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
diff --git a/make/gcc-3.3.mk b/make/gcc-3.3.mk
index 8cfb17311..4877460b4 100644
--- a/make/gcc-3.3.mk
+++ b/make/gcc-3.3.mk
@@ -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 \