binutils,gcc: use correct --prefix
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 22 Jul 2010 13:42:27 +0000 (15:42 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 27 Jul 2010 20:56:36 +0000 (22:56 +0200)
The cross binutils and cross gcc are actually going to be executed
from $(STAGING_DIR)/usr, so the correct prefix is $(STAGING_DIR)/usr
and not /usr.

This also fixes what is known as the "AVR32 toolchain build failure",
which was due to the fact that the prefix directory wasn't writable
(since it was /usr).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
toolchain/binutils/binutils.mk
toolchain/gcc/gcc-uclibc-4.x.mk

index 68ac3e98e1b83bf8503d698f9935305254d0e002..93dbbb0079a8ab4dc68f6525c43aefc66d49d4e3 100644 (file)
@@ -67,12 +67,10 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
        (cd $(BINUTILS_DIR1); rm -rf config.cache; \
                $(HOST_CONFIGURE_OPTS) \
                $(BINUTILS_DIR)/configure $(QUIET) \
-               --prefix=/usr \
+               --prefix=$(STAGING_DIR)/usr \
                --build=$(GNU_HOST_NAME) \
                --host=$(GNU_HOST_NAME) \
                --target=$(REAL_GNU_TARGET_NAME) \
-               --mandir=/usr/share/man \
-               --infodir=/usr/share/info \
                $(BR2_CONFIGURE_DEVEL_SYSROOT) \
                $(BR2_CONFIGURE_STAGING_SYSROOT) \
                $(DISABLE_NLS) \
@@ -90,7 +88,7 @@ $(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
 # Make install will put gettext data in staging_dir/share/locale.
 # Unfortunatey, it isn't configureable.
 $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ld: $(BINUTILS_DIR1)/binutils/objdump
-       $(MAKE) -C $(BINUTILS_DIR1) $(BR2_SYSROOT_STAGING_DESTDIR) install
+       $(MAKE) -C $(BINUTILS_DIR1) install
        #       tooldir=/usr build_tooldir=/usr install
        #rm -f $(STAGING_DIR)/usr/bin/{ar,as,ld,nm,objdump,ranlib,strip}
 
index 6e767ac77554f74f194beef5a9b152b6c66517d0..0a538dec0516a559ebfa6c720b67e42dafc0389e 100644 (file)
@@ -266,7 +266,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
        (cd $(GCC_BUILD_DIR2); rm -rf config.cache; \
                $(HOST_CONFIGURE_OPTS) \
                $(GCC_SRC_DIR)/configure $(QUIET) \
-               --prefix=/usr \
+               --prefix=$(STAGING_DIR)/usr \
                --build=$(GNU_HOST_NAME) \
                --host=$(GNU_HOST_NAME) \
                --target=$(REAL_GNU_TARGET_NAME) \
@@ -299,7 +299,7 @@ $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
        touch $@
 
 $(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
-       PATH=$(TARGET_PATH) $(MAKE) $(BR2_SYSROOT_STAGING_DESTDIR) \
+       PATH=$(TARGET_PATH) $(MAKE) \
                -C $(GCC_BUILD_DIR2) install
        if [ -d "$(STAGING_DIR)/lib64" ]; then \
                if [ ! -e "$(STAGING_DIR)/lib" ]; then \