1 |
flameeyes 08/07/31 08:45:48 |
2 |
|
3 |
Modified: asneeded.xml |
4 |
Log: |
5 |
Remove the "Binutils bugs" section as it's no longer relevant (Binutils 2.16 is no longer widely used). |
6 |
Replace the (wrong) filter example with the correct filter. |
7 |
|
8 |
Revision Changes Path |
9 |
1.15 xml/htdocs/proj/en/qa/asneeded.xml |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/qa/asneeded.xml?rev=1.15&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/qa/asneeded.xml?rev=1.15&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/qa/asneeded.xml?r1=1.14&r2=1.15 |
14 |
|
15 |
Index: asneeded.xml |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/qa/asneeded.xml,v |
18 |
retrieving revision 1.14 |
19 |
retrieving revision 1.15 |
20 |
diff -u -r1.14 -r1.15 |
21 |
--- asneeded.xml 25 Jan 2008 18:11:51 -0000 1.14 |
22 |
+++ asneeded.xml 31 Jul 2008 08:45:47 -0000 1.15 |
23 |
@@ -1,6 +1,6 @@ |
24 |
<?xml version="1.0" encoding="UTF-8"?> |
25 |
<!DOCTYPE guide SYSTEM "http://www.gentoo.org/dtd/guide.dtd"> |
26 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/qa/asneeded.xml,v 1.14 2008/01/25 18:11:51 flameeyes Exp $ --> |
27 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/qa/asneeded.xml,v 1.15 2008/07/31 08:45:47 flameeyes Exp $ --> |
28 |
|
29 |
<guide link="/proj/en/qa/asneeded.xml" lang="en"> |
30 |
<title>--as-needed introduction and fixing guide</title> |
31 |
@@ -18,8 +18,8 @@ |
32 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
33 |
<license/> |
34 |
|
35 |
-<version>0.8</version> |
36 |
-<date>2007-04-17</date> |
37 |
+<version>0.9</version> |
38 |
+<date>2008-07-31</date> |
39 |
|
40 |
<chapter> <!-- Introduction --> |
41 |
<title>Introduction</title> |
42 |
@@ -149,6 +149,48 @@ |
43 |
|
44 |
</body> |
45 |
</section> |
46 |
+ |
47 |
+<section> |
48 |
+<title>Properly filtering --as-needed</title> |
49 |
+ |
50 |
+<body> |
51 |
+ |
52 |
+<p> |
53 |
+Sometimes it is needed to filter <c>--as-needed</c> as the software is |
54 |
+designed in such a way that it is not fixable to make use of |
55 |
+it. Unfortunately just filtering the flag is often not the best choice |
56 |
+because <path>LDFLAGS</path> can be tricky (they can be concatenated |
57 |
+through commas, making it impossible to filter them out), and because |
58 |
+it is possible to set it as a default through GCC's spec files. |
59 |
+</p> |
60 |
+ |
61 |
+<p> |
62 |
+If you really need to disable the <c>--as-needed</c> behaviour, |
63 |
+because of design choices that conflicts with the way |
64 |
+<c>--as-needed</c> works (and thus not just because the package is |
65 |
+broken, and fixable, when building with <c>--as-needed</c>), what you |
66 |
+should be doing is something along these lines. |
67 |
+</p> |
68 |
+ |
69 |
+<pre caption="correct filter for --as-needed behaviour"> |
70 |
+inherit flag-o-matic |
71 |
+... |
72 |
+ |
73 |
+pkg_setup() { |
74 |
+ append-ldflags -Wl,--no-as-needed |
75 |
+} |
76 |
+</pre> |
77 |
+ |
78 |
+<warn> |
79 |
+Please consider using this filtering <e>only</e> if you know that the |
80 |
+design of the software conflicts with <c>--as-needed</c>. Do not use |
81 |
+this construct if your package simply fails to build after enabling |
82 |
+this behaviour. |
83 |
+</warn> |
84 |
+ |
85 |
+</body> |
86 |
+</section> |
87 |
+ |
88 |
</chapter> |
89 |
|
90 |
<chapter> |
91 |
@@ -174,47 +216,7 @@ |
92 |
|
93 |
</body> |
94 |
</section> |
95 |
-<section> |
96 |
-<title>Binutils bugs</title> |
97 |
-<body> |
98 |
- |
99 |
-<p> |
100 |
-As stated above, the 2.16 binutils series and the early 2.17 prereleases suffer |
101 |
-from problems when linking with <c>--as-needed</c>, which leads to <c>ld</c> |
102 |
-segfaulting when trying to link complex C++ libraries like <path>wxGTK</path>. |
103 |
-</p> |
104 |
|
105 |
-<p> |
106 |
-In this case the first thing to do is to use the latest prerelease available |
107 |
-from upstream. At the date of writing the last prerelease is 2.16.92 that is |
108 |
-said to solve most if not all the problems with <c>--as-needed</c> flag and |
109 |
-does not fail anymore with <path>wxGTK</path> for once. |
110 |
-</p> |
111 |
- |
112 |
-<p> |
113 |
-If the last snapshot doesn't work, you might consider filtering the flag with |
114 |
-the following code, after reporting the case upstream with as many details |
115 |
-possible. |
116 |
-</p> |
117 |
- |
118 |
-<pre caption="filtering the --as-needed flag in an ebuild"> |
119 |
-inherit flag-o-matic |
120 |
-... |
121 |
- |
122 |
-<stmt>pkg_setup()</stmt> { |
123 |
- <keyword>filter-ldflags</keyword> -Wl,--as-needed --as-needed |
124 |
-} |
125 |
-</pre> |
126 |
- |
127 |
-<impo> |
128 |
-These problems should be gone as of 2.16.92 and thus the filtering is |
129 |
-unnecessary, as anyone using <c>--as-needed</c> and finding segfaults should |
130 |
-simply update binutils. For this reason you might want to do this locally but |
131 |
-you should <e>not</e> commit flags filtering for this reason. |
132 |
-</impo> |
133 |
- |
134 |
-</body> |
135 |
-</section> |
136 |
<section> |
137 |
<title>Failure in compile, unrecognized option</title> |
138 |
<body> |