diff options
Diffstat (limited to 'sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch')
-rw-r--r-- | sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch new file mode 100644 index 000000000000..497248527d6d --- /dev/null +++ b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch @@ -0,0 +1,39 @@ +In Prefix we are really self-providing, so don't look back! +Original patch by Heiko Przybyl + +/usr/lib and /lib are not valid locations to search for startfiles, +especially as they come BEFORE the prefix locations. + +--- gcc/gcc.c ++++ gcc/gcc.c +@@ -1525,8 +1525,8 @@ static const char *gcc_libexec_prefix; + #endif + + static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; +-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/"; +-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/"; ++static const char *const standard_exec_prefix_1 = "@GENTOO_PORTAGE_EPREFIX@/usr/libexec/gcc/"; ++static const char *const standard_exec_prefix_2 = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/"; + static const char *md_exec_prefix = MD_EXEC_PREFIX; + + static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; +diff --git a/a/gcc/config/darwin.h b/b/gcc/config/darwin.h +index 482cd4c..b971c64 100644 +--- gcc/config/darwin.h ++++ gcc/config/darwin.h +@@ -24,6 +24,15 @@ Boston, MA 02110-1301, USA. */ + #ifndef CONFIG_DARWIN_H + #define CONFIG_DARWIN_H + ++#undef STANDARD_STARTFILE_PREFIX ++#define STANDARD_STARTFILE_PREFIX "@GENTOO_PORTAGE_TPREFIX@/usr/lib" ++ ++#undef STANDARD_STARTFILE_PREFIX_1 ++#define STANDARD_STARTFILE_PREFIX_1 "@GENTOO_PORTAGE_TPREFIX@/lib" ++ ++#undef STANDARD_STARTFILE_PREFIX_2 ++#define STANDARD_STARTFILE_PREFIX_2 STANDARD_STARTFILE_PREFIX_1 ++ + /* The definitions in this file are common to all processor types + running Darwin, which is the kernel for Mac OS X. Darwin is + basically a BSD user layer laid over a Mach kernel, then evolved |