sleep 1
fi
+ # Check for files built without respecting CFLAGS
+ if [[ "${CFLAGS}" == *-frecord-gcc-switches* ]] && [[ "${PN}" != *-bin ]] ; then
+ qa_var="QA_DT_SWITCHES_${ARCH/-/_}"
+ eval "[[ -n \${!qa_var} ]] && QA_DT_SWITCHES=(\"\${${qa_var}[@]}\")"
+ f=$(scanelf -qyRF '%k %p' -k \!.GCC.command.line "${ED}" | sed -e "s:\!.GCC.command.line ::")
+ if [[ -n ${f} ]] ; then
+ echo "${f}" > "${T}"/scanelf-ignored-CFLAGS.log
+ if [ "${QA_STRICT_DT_SWITCHES-unset}" == unset ] ; then
+ if [[ ${#QA_DT_SWITCHES[@]} -gt 1 ]] ; then
+ for x in "${QA_DT_SWITCHES[@]}" ; do
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log
+ done
+ else
+ local shopts=$-
+ set -o noglob
+ for x in ${QA_DT_SWITCHES} ; do
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log
+ done
+ set +o noglob
+ set -${shopts}
+ fi
+ fi
+ # Filter anything under /usr/lib/debug/ in order to avoid
+ # duplicate warnings for splitdebug files.
+ sed -e "s#^usr/lib/debug/.*##" -e "/^\$/d" -e "s#^#/#" \
+ -i "${T}"/scanelf-ignored-CFLAGS.log
+ f=$(<"${T}"/scanelf-ignored-CFLAGS.log)
+ if [[ -n ${f} ]] ; then
+ vecho -ne '\n'
+ eqawarn "${BAD}QA Notice: Files built without respecting CFLAGS have been detected${NORMAL}"
+ eqawarn " Please include the following list of files in your report:"
+ eqawarn "${f}"
+ vecho -ne '\n'
+ sleep 1
+ else
+ rm -f "${T}"/scanelf-ignored-CFLAGS.log
+ fi
+ fi
+ fi
+
# Check for files built without respecting LDFLAGS
if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && [[ "${PN}" != *-bin ]] ; then
qa_var="QA_DT_HASH_${ARCH/-/_}"
# 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.
+#
# Please refer to the GCC manual for a list of possible values.
#
#CFLAGS="-O2 -pipe"
files that contain writable and executable segments. These are rare.
The paths may contain fnmatch patterns.
.TP
+\fBQA_DT_SWITCHES\fR
+This should contain a list of file paths, relative to the image directory, of
+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.
+.TP
+.TP
\fBQA_DT_HASH\fR
This should contain a list of file paths, relative to the image directory, of
files that contain .hash sections. The paths may contain regular expressions
Set this to cause portage to ignore any \fIQA_TEXTREL\fR override
settings from ebuilds. See also \fBebuild\fR(5).
.TP
+\fBQA_STRICT_DT_SWITCHES = \fI"set"\fR
+Set this to cause portage to ignore any \fIQA_DT_SWITCHES\fR override
+settings from ebuilds. See also \fBebuild\fR(5).
+.TP
\fBQA_STRICT_DT_HASH = \fI"set"\fR
Set this to cause portage to ignore any \fIQA_DT_HASH\fR override
settings from ebuilds. See also \fBebuild\fR(5).