summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-12-21 13:28:47 -0800
committerZac Medico <zmedico@gentoo.org>2011-12-21 13:28:47 -0800
commit1de36ad91237651277b9e4b7e0db819efb5e6997 (patch)
treeb25c92e9efa06e46f2445aaaf996b3f6691b91d8
parent962f4d5387aa19b2a9a4cf41370000c849ff587d (diff)
downloadportage-1de36ad91237651277b9e4b7e0db819efb5e6997.tar.gz
portage-1de36ad91237651277b9e4b7e0db819efb5e6997.tar.bz2
portage-1de36ad91237651277b9e4b7e0db819efb5e6997.zip
Use *FLAGS for CFLAGS ignorance checks.
Current *FLAGS variables include CFLAGS, CXXFLAGS, FFLAGS, and FCFLAGS. Not that this check is only enabled if every one of these variables contains -frecord-gcc-switches, since otherwise the check could result in false positive results.
-rwxr-xr-xbin/misc-functions.sh7
-rw-r--r--cnf/make.conf7
-rw-r--r--man/ebuild.52
3 files changed, 12 insertions, 4 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 4cba51acc..c74b4a411 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -308,8 +308,13 @@ install_qa_check() {
sleep 1
fi
- # Check for files built without respecting CFLAGS
+ # Check for files built without respecting *FLAGS. Note that
+ # -frecord-gcc-switches must be in all *FLAGS variables, in
+ # order to avoid false positive results here.
if [[ "${CFLAGS}" == *-frecord-gcc-switches* ]] && \
+ [[ "${CXXFLAGS}" == *-frecord-gcc-switches* ]] && \
+ [[ "${FFLAGS}" == *-frecord-gcc-switches* ]] && \
+ [[ "${FCFLAGS}" == *-frecord-gcc-switches* ]] && \
! has binchecks ${RESTRICT} ; then
qa_var="QA_CFLAGS_IGNORED_${ARCH/-/_}"
eval "[[ -n \${!qa_var} ]] && QA_CFLAGS_IGNORED=(\"\${${qa_var}[@]}\")"
diff --git a/cnf/make.conf b/cnf/make.conf
index aecb6336f..5ee1cd32e 100644
--- a/cnf/make.conf
+++ b/cnf/make.conf
@@ -32,8 +32,11 @@
# package (and in some cases the libraries it uses) at default optimizations
# before reporting errors to developers.
#
-# If your gcc supports it, you can add -frecord-gcc-switches in order to enable
-# CFLAGS ignorance checking for ebuilds.
+# If your gcc supports it, you can add -frecord-gcc-switches to all of the
+# following *FLAGS in order to enable *FLAGS ignorance checking for ebuilds.
+# Note that this check is only enabled if every one of these variables contains
+# -frecord-gcc-switches, since otherwise the check could result in false
+# positive results.
#
# Please refer to the GCC manual for a list of possible values.
#
diff --git a/man/ebuild.5 b/man/ebuild.5
index a9a26a72d..4f2f3a80c 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -608,7 +608,7 @@ files that do not contain .GCC.command.line sections. The paths may contain
regular expressions with escape\-quoted special characters.
.br
This variable is intended to be used on files of binary packages which ignore
-CFLAGS variable.
+CFLAGS, CXXFLAGS, FFLAGS, and FCFLAGS variables.
.TP
.TP
\fBQA_DT_HASH\fR