summaryrefslogtreecommitdiff
path: root/sys-devel/gcc-apple/files/gcc-apple-4.2.1-prefix-search-dirs-r1.patch
blob: 497248527d6df828491b068bdaeca1ace4af2034 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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