From abcac7f79bc1e587ac683a08d4fb16ba070c1b7b Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 4 Jun 2003 21:39:44 +0000 Subject: [PATCH] Fixup a case where system libs could sneak into the link process due to collect2 making wrong assumptions. --- make/uclibc_toolchain.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/make/uclibc_toolchain.mk b/make/uclibc_toolchain.mk index 2341bd8d97..663c21eb77 100644 --- a/make/uclibc_toolchain.mk +++ b/make/uclibc_toolchain.mk @@ -235,6 +235,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\ -- 2.30.2