1 |
loki_val 09/05/03 20:03:10 |
2 |
|
3 |
Added: 1.5 1.5.26 2.2.6 |
4 |
Log: |
5 |
Import patch from Debian http://bugs.debian.org/347650 which hacks around libtool deplib re-ordering, which inhibits -Wl,--as-needed. You have to set -Wl,--as-needed seperately in LDFLAGS for this to do any good, -Wl,--as-needed,--something-else will not do, but you can set -Wl,--something-else afterwards. Also make sure eclasses I 'own' run elibtoolize so they can reap the benefit. |
6 |
|
7 |
Revision Changes Path |
8 |
1.1 eclass/ELT-patches/as-needed/1.5 |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ELT-patches/as-needed/1.5?rev=1.1&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ELT-patches/as-needed/1.5?rev=1.1&content-type=text/plain |
12 |
|
13 |
Index: 1.5 |
14 |
=================================================================== |
15 |
--- ltmain.sh.orig 2006-03-29 15:45:36.000000000 +0200 |
16 |
+++ ltmain.sh 2006-03-29 16:39:30.000000000 +0200 |
17 |
@@ -1754,6 +1754,11 @@ |
18 |
arg=`$echo "X$arg" | $Xsed -e "s/^ //"` |
19 |
;; |
20 |
|
21 |
+ -Wl,--as-needed) |
22 |
+ deplibs="$deplibs $arg" |
23 |
+ continue |
24 |
+ ;; |
25 |
+ |
26 |
-Wl,*) |
27 |
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` |
28 |
arg= |
29 |
@@ -2094,6 +2099,15 @@ |
30 |
lib= |
31 |
found=no |
32 |
case $deplib in |
33 |
+ -Wl,--as-needed) |
34 |
+ if test "$linkmode,$pass" = "prog,link"; then |
35 |
+ compile_deplibs="$deplib $compile_deplibs" |
36 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
37 |
+ else |
38 |
+ deplibs="$deplib $deplibs" |
39 |
+ fi |
40 |
+ continue |
41 |
+ ;; |
42 |
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) |
43 |
if test "$linkmode,$pass" = "prog,link"; then |
44 |
compile_deplibs="$deplib $compile_deplibs" |
45 |
|
46 |
|
47 |
|
48 |
1.1 eclass/ELT-patches/as-needed/1.5.26 |
49 |
|
50 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ELT-patches/as-needed/1.5.26?rev=1.1&view=markup |
51 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ELT-patches/as-needed/1.5.26?rev=1.1&content-type=text/plain |
52 |
|
53 |
Index: 1.5.26 |
54 |
=================================================================== |
55 |
--- ltmain.sh.orig 2009-04-18 16:51:52.000000000 +0200 |
56 |
+++ ltmain.sh 2009-04-18 16:55:05.000000000 +0200 |
57 |
@@ -1812,10 +1812,15 @@ |
58 |
done |
59 |
IFS="$save_ifs" |
60 |
arg=`$echo "X$arg" | $Xsed -e "s/^ //"` |
61 |
;; |
62 |
|
63 |
+ -Wl,--as-needed) |
64 |
+ deplibs="$deplibs $arg" |
65 |
+ continue |
66 |
+ ;; |
67 |
+ |
68 |
-Wl,*) |
69 |
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` |
70 |
arg= |
71 |
save_ifs="$IFS"; IFS=',' |
72 |
for flag in $args; do |
73 |
@@ -2152,10 +2157,19 @@ |
74 |
fi |
75 |
for deplib in $libs; do |
76 |
lib= |
77 |
found=no |
78 |
case $deplib in |
79 |
+ -Wl,--as-needed) |
80 |
+ if test "$linkmode,$pass" = "prog,link"; then |
81 |
+ compile_deplibs="$deplib $compile_deplibs" |
82 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
83 |
+ else |
84 |
+ deplibs="$deplib $deplibs" |
85 |
+ fi |
86 |
+ continue |
87 |
+ ;; |
88 |
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) |
89 |
if test "$linkmode,$pass" = "prog,link"; then |
90 |
compile_deplibs="$deplib $compile_deplibs" |
91 |
finalize_deplibs="$deplib $finalize_deplibs" |
92 |
else |
93 |
|
94 |
|
95 |
|
96 |
1.1 eclass/ELT-patches/as-needed/2.2.6 |
97 |
|
98 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ELT-patches/as-needed/2.2.6?rev=1.1&view=markup |
99 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ELT-patches/as-needed/2.2.6?rev=1.1&content-type=text/plain |
100 |
|
101 |
Index: 2.2.6 |
102 |
=================================================================== |
103 |
--- ltmain.sh.orig 2009-04-18 14:37:16.000000000 +0200 |
104 |
+++ ltmain.sh 2009-04-18 14:40:08.000000000 +0200 |
105 |
@@ -4721,10 +4721,15 @@ |
106 |
IFS="$save_ifs" |
107 |
func_stripname ' ' '' "$arg" |
108 |
arg=$func_stripname_result |
109 |
;; |
110 |
|
111 |
+ -Wl,--as-needed) |
112 |
+ deplibs="$deplibs $arg" |
113 |
+ continue |
114 |
+ ;; |
115 |
+ |
116 |
-Wl,*) |
117 |
func_stripname '-Wl,' '' "$arg" |
118 |
args=$func_stripname_result |
119 |
arg= |
120 |
save_ifs="$IFS"; IFS=',' |
121 |
@@ -5075,10 +5080,19 @@ |
122 |
|
123 |
for deplib in $libs; do |
124 |
lib= |
125 |
found=no |
126 |
case $deplib in |
127 |
+ -Wl,--as-needed) |
128 |
+ if test "$linkmode,$pass" = "prog,link"; then |
129 |
+ compile_deplibs="$deplib $compile_deplibs" |
130 |
+ finalize_deplibs="$deplib $finalize_deplibs" |
131 |
+ else |
132 |
+ deplibs="$deplib $deplibs" |
133 |
+ fi |
134 |
+ continue |
135 |
+ ;; |
136 |
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) |
137 |
if test "$linkmode,$pass" = "prog,link"; then |
138 |
compile_deplibs="$deplib $compile_deplibs" |
139 |
finalize_deplibs="$deplib $finalize_deplibs" |
140 |
else |