diff options
author | Mark Loeser <halcy0n@gentoo.org> | 2008-09-01 18:32:35 +0000 |
---|---|---|
committer | Mark Loeser <halcy0n@gentoo.org> | 2008-09-01 18:32:35 +0000 |
commit | 3225d63030e5992dd8f17ea43d993dbd612b69ff (patch) | |
tree | 39376f6363c834c6387bfd33fc4726c6b2083c82 | |
parent | Clarify that RDEPEND=DEPEND may go away in the future, thanks to Nelson Batal... (diff) | |
download | devmanual-3225d63030e5992dd8f17ea43d993dbd612b69ff.tar.gz devmanual-3225d63030e5992dd8f17ea43d993dbd612b69ff.tar.bz2 devmanual-3225d63030e5992dd8f17ea43d993dbd612b69ff.zip |
Update documentation for LDFLAGS, thanks to Arfrever Frehtes Taifersar Arahesis <Arfrever DOT FTA AT GMail DOT Com>; bug #236272
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/devmanual/trunk@131 176d3534-300d-0410-8db8-84e73ed771c3
-rw-r--r-- | ebuild-writing/functions/src_compile/build-environment/text.xml | 2 | ||||
-rw-r--r-- | ebuild-writing/functions/src_compile/building/text.xml | 21 | ||||
-rw-r--r-- | general-concepts/user-environment/text.xml | 2 |
3 files changed, 16 insertions, 9 deletions
diff --git a/ebuild-writing/functions/src_compile/build-environment/text.xml b/ebuild-writing/functions/src_compile/build-environment/text.xml index f520121..ff385f0 100644 --- a/ebuild-writing/functions/src_compile/build-environment/text.xml +++ b/ebuild-writing/functions/src_compile/build-environment/text.xml @@ -17,7 +17,7 @@ Except where otherwise specified, any function which operates on </note> <p> -Ebuilds must not simply ignore user CFLAGS <d/> see +Ebuilds must not simply ignore user CFLAGS, CXXFLAGS or LDFLAGS<d/> see <uri link="::general-concepts/user-environment#Not Filtering Variables"/>. </p> </body> diff --git a/ebuild-writing/functions/src_compile/building/text.xml b/ebuild-writing/functions/src_compile/building/text.xml index 621e51c..700f0f1 100644 --- a/ebuild-writing/functions/src_compile/building/text.xml +++ b/ebuild-writing/functions/src_compile/building/text.xml @@ -43,10 +43,10 @@ It is <e>not</e> correct to use the <c>${CC}</c> variable for this purpose. </note> <p> -Sometimes a package will not use the user's <c>${CFLAGS}</c>. This must be worked -around, as sometimes this variable is used for specifying critical ABI options. -In these cases, the build scripts should be modified (for example, with <c>sed</c>) -to use <c>${CFLAGS}</c> correctly. +Sometimes a package will not use the user's <c>${CFLAGS}</c> or <c>${LDFLAGS}</c>. +This must be worked around, as sometimes these variables are used for specifying +critical ABI options. In these cases, the build scripts should be modified (for +example, with <c>sed</c>) to use <c>${CFLAGS}</c> or <c>${LDFLAGS}</c> correctly. </p> <codesample lang="ebuild"> @@ -58,17 +58,24 @@ src_compile() { # We have a weird build.sh to work with which ignores our # compiler preferences. yay! - sed -i -e "s:cc -O2:$(tc-getCC) ${CFLAGS}:" build.sh \ + sed -i -e "s:cc -O2:$(tc-getCC) ${CFLAGS} ${LDFLAGS}:" build.sh \ || die "sed fix failed. Uh-oh..." ./build.sh || die "Build failed!" } </codesample> <note> -When using <c>sed</c> with <c>CFLAGS</c>, it is not safe to use a comma or a -slash as a delimiter. The vapier-recommended character is a colon. +When using <c>sed</c> with <c>CFLAGS</c> or <c>LDFLAGS</c>, it is not safe to use +a comma or a slash as a delimiter. The recommended character is a colon. </note> +<p> +Portage performs a QA check which verifies if LDFLAGS are respected. This QA check +is enabled only when <c>LDFLAGS</c> variable contains <c>-Wl,--hash-style=gnu</c>. +(This flag can be used only on systems which use <c>sys-libs/glibc</c> except for +machines with a MIPS CPU.) +</p> + </body> </section> </chapter> diff --git a/general-concepts/user-environment/text.xml b/general-concepts/user-environment/text.xml index 34f4055..b7a0926 100644 --- a/general-concepts/user-environment/text.xml +++ b/general-concepts/user-environment/text.xml @@ -79,7 +79,7 @@ respected (selective filtering is fine, but outright ignoring is not). Ignoring Some packages do this by accident. For example, one might see <c>CFLAGS=-Wall</c> in <c>Makefile.am</c>. To fix this, either <c>sed</c> in the user's <c>CFLAGS</c>, or (the better solution) change the variable to <c>AM_CFLAGS</c>, which -will automatically be merged with the user's settings. +will automatically be merged with the user's settings. LDFLAGS also should be respected. </p> </body> </section> |