Fixup a case where system libs could sneak into the link process
authorEric Andersen <andersen@codepoet.org>
Thu, 5 Jun 2003 02:21:44 +0000 (02:21 -0000)
committerEric Andersen <andersen@codepoet.org>
Thu, 5 Jun 2003 02:21:44 +0000 (02:21 -0000)
due to collect2 making wrong assumptions.

make/uclibc_toolchain_2_95.mk

index 9878584684fe1a71407e797e4d201909118fac4f..488efbf7e5217374e2af68c1d4dca85d504e55ba 100644 (file)
@@ -243,6 +243,13 @@ $(GCC_DIR)/.gcc_build_hacks: $(GCC_DIR)/.patched
        perl -i -p -e "s,^#define.*STANDARD_INCLUDE_DIR.*,#define STANDARD_INCLUDE_DIR \
                \"$(STAGING_DIR)/include\",;" $(GCC_DIR)/gcc/cppdefault.h;
        #
+       # Prevent system glibc libraries from being found by collect2 
+       # when it calls locatelib() and rummages about the system looking 
+       # for libraries with the correct name...
+       #
+       perl -i -p -e "s,\"/lib/,\"$(STAGING_DIR)/lib,g;" $(GCC_DIR)/gcc/collect2.c
+       perl -i -p -e "s,\"/usr/,\"$(STAGING_DIR)/usr/,g;" $(GCC_DIR)/gcc/collect2.c
+       #
        # Prevent gcc from using the unwind-dw2-fde-glibc code
        #
        perl -i -p -e "s,^#ifndef inhibit_libc,#define inhibit_libc\n\