1 |
Author: haubi |
2 |
Date: 2008-02-28 15:25:43 +0000 (Thu, 28 Feb 2008) |
3 |
New Revision: 1607 |
4 |
|
5 |
Modified: |
6 |
trunk/toolchain-prefix-wrapper/ld/ldwrapper.c |
7 |
Log: |
8 |
actually add_host_system_libdirs() when |
9 |
building natively, and ROOT is empty, and this is cross-EPREFIX |
10 |
|
11 |
Modified: trunk/toolchain-prefix-wrapper/ld/ldwrapper.c |
12 |
=================================================================== |
13 |
--- trunk/toolchain-prefix-wrapper/ld/ldwrapper.c 2008-02-26 09:10:50 UTC (rev 1606) |
14 |
+++ trunk/toolchain-prefix-wrapper/ld/ldwrapper.c 2008-02-28 15:25:43 UTC (rev 1607) |
15 |
@@ -732,9 +732,13 @@ |
16 |
/* Append the system libdirs from this host to libpath. |
17 |
* This only needs to be done when: |
18 |
* *) this is a native build, |
19 |
- * *) and ${ROOT} is not empty, |
20 |
- * or we would end up with duplicate libdirs in this case |
21 |
- * because of add_target_system_libdirs(). |
22 |
+ * (because only libs with target's binary format make sense) |
23 |
+ * *) and this is a cross-prefix build |
24 |
+ * (or we would end up with duplicate libdirs |
25 |
+ * because of add_target_system_libdirs() ) |
26 |
+ * *) and ${ROOT} is empty, |
27 |
+ * (because it's impossible to run binaries from within $ROOT, |
28 |
+ * so they do not require anything from outside $ROOT). |
29 |
*/ |
30 |
static void add_host_system_libdirs(LdWrapperData* data) |
31 |
{ |
32 |
@@ -749,17 +753,16 @@ |
33 |
{ NULL, -1 }, |
34 |
}; |
35 |
struct libdir const * l = libdirs; |
36 |
- if (data->isCrossTriplet || StringGetLength(data->root) == 0) { |
37 |
- return; |
38 |
+ if (!data->isCrossTriplet && StringGetLength(data->root) == 0 && data->isCrossEprefix) { |
39 |
+ while(l->path != NULL) { |
40 |
+ add_libpath(data, data->pluginIn.sysLibpath, TestAndAddLibpath, |
41 |
+ "append host's target-system-libdir to sys-libpath", |
42 |
+ StringGetBuffer(data->host.eprefix), StringGetLength(data->host.eprefix), |
43 |
+ l->path, l->len, |
44 |
+ NULL); |
45 |
+ l++; |
46 |
+ } |
47 |
} |
48 |
- while(l->path != NULL) { |
49 |
- add_libpath(data, data->pluginIn.sysLibpath, TestAndAddLibpath, |
50 |
- "append host's target-system-libdir to sys-libpath", |
51 |
- StringGetBuffer(data->host.eprefix), StringGetLength(data->host.eprefix), |
52 |
- l->path, l->len, |
53 |
- NULL); |
54 |
- l++; |
55 |
- } |
56 |
} |
57 |
|
58 |
static void callPlugin(LdWrapperData* data, LdPluginFct plugins) |
59 |
|
60 |
-- |
61 |
gentoo-commits@l.g.o mailing list |