1 |
Author: halcy0n |
2 |
Date: 2008-09-01 18:32:35 +0000 (Mon, 01 Sep 2008) |
3 |
New Revision: 131 |
4 |
|
5 |
Modified: |
6 |
trunk/ebuild-writing/functions/src_compile/build-environment/text.xml |
7 |
trunk/ebuild-writing/functions/src_compile/building/text.xml |
8 |
trunk/general-concepts/user-environment/text.xml |
9 |
Log: |
10 |
Update documentation for LDFLAGS, thanks to Arfrever Frehtes Taifersar Arahesis <Arfrever DOT FTA AT GMail DOT Com>; bug #236272 |
11 |
|
12 |
|
13 |
Modified: trunk/ebuild-writing/functions/src_compile/build-environment/text.xml |
14 |
=================================================================== |
15 |
--- trunk/ebuild-writing/functions/src_compile/build-environment/text.xml 2008-08-19 01:30:04 UTC (rev 130) |
16 |
+++ trunk/ebuild-writing/functions/src_compile/build-environment/text.xml 2008-09-01 18:32:35 UTC (rev 131) |
17 |
@@ -17,7 +17,7 @@ |
18 |
</note> |
19 |
|
20 |
<p> |
21 |
-Ebuilds must not simply ignore user CFLAGS <d/> see |
22 |
+Ebuilds must not simply ignore user CFLAGS, CXXFLAGS or LDFLAGS<d/> see |
23 |
<uri link="::general-concepts/user-environment#Not Filtering Variables"/>. |
24 |
</p> |
25 |
</body> |
26 |
|
27 |
Modified: trunk/ebuild-writing/functions/src_compile/building/text.xml |
28 |
=================================================================== |
29 |
--- trunk/ebuild-writing/functions/src_compile/building/text.xml 2008-08-19 01:30:04 UTC (rev 130) |
30 |
+++ trunk/ebuild-writing/functions/src_compile/building/text.xml 2008-09-01 18:32:35 UTC (rev 131) |
31 |
@@ -43,10 +43,10 @@ |
32 |
</note> |
33 |
|
34 |
<p> |
35 |
-Sometimes a package will not use the user's <c>${CFLAGS}</c>. This must be worked |
36 |
-around, as sometimes this variable is used for specifying critical ABI options. |
37 |
-In these cases, the build scripts should be modified (for example, with <c>sed</c>) |
38 |
-to use <c>${CFLAGS}</c> correctly. |
39 |
+Sometimes a package will not use the user's <c>${CFLAGS}</c> or <c>${LDFLAGS}</c>. |
40 |
+This must be worked around, as sometimes these variables are used for specifying |
41 |
+critical ABI options. In these cases, the build scripts should be modified (for |
42 |
+example, with <c>sed</c>) to use <c>${CFLAGS}</c> or <c>${LDFLAGS}</c> correctly. |
43 |
</p> |
44 |
|
45 |
<codesample lang="ebuild"> |
46 |
@@ -58,17 +58,24 @@ |
47 |
|
48 |
# We have a weird build.sh to work with which ignores our |
49 |
# compiler preferences. yay! |
50 |
- sed -i -e "s:cc -O2:$(tc-getCC) ${CFLAGS}:" build.sh \ |
51 |
+ sed -i -e "s:cc -O2:$(tc-getCC) ${CFLAGS} ${LDFLAGS}:" build.sh \ |
52 |
|| die "sed fix failed. Uh-oh..." |
53 |
./build.sh || die "Build failed!" |
54 |
} |
55 |
</codesample> |
56 |
|
57 |
<note> |
58 |
-When using <c>sed</c> with <c>CFLAGS</c>, it is not safe to use a comma or a |
59 |
-slash as a delimiter. The vapier-recommended character is a colon. |
60 |
+When using <c>sed</c> with <c>CFLAGS</c> or <c>LDFLAGS</c>, it is not safe to use |
61 |
+a comma or a slash as a delimiter. The recommended character is a colon. |
62 |
</note> |
63 |
|
64 |
+<p> |
65 |
+Portage performs a QA check which verifies if LDFLAGS are respected. This QA check |
66 |
+is enabled only when <c>LDFLAGS</c> variable contains <c>-Wl,--hash-style=gnu</c>. |
67 |
+(This flag can be used only on systems which use <c>sys-libs/glibc</c> except for |
68 |
+machines with a MIPS CPU.) |
69 |
+</p> |
70 |
+ |
71 |
</body> |
72 |
</section> |
73 |
</chapter> |
74 |
|
75 |
Modified: trunk/general-concepts/user-environment/text.xml |
76 |
=================================================================== |
77 |
--- trunk/general-concepts/user-environment/text.xml 2008-08-19 01:30:04 UTC (rev 130) |
78 |
+++ trunk/general-concepts/user-environment/text.xml 2008-09-01 18:32:35 UTC (rev 131) |
79 |
@@ -79,7 +79,7 @@ |
80 |
Some packages do this by accident. For example, one might see |
81 |
<c>CFLAGS=-Wall</c> in <c>Makefile.am</c>. To fix this, either <c>sed</c> in the user's |
82 |
<c>CFLAGS</c>, or (the better solution) change the variable to <c>AM_CFLAGS</c>, which |
83 |
-will automatically be merged with the user's settings. |
84 |
+will automatically be merged with the user's settings. LDFLAGS also should be respected. |
85 |
</p> |
86 |
</body> |
87 |
</section> |