if type -P scanelf > /dev/null && ! hasq binchecks ${RESTRICT}; then
local qa_var insecure_rpath=0 tmp_quiet=${PORTAGE_QUIET}
+ local f x
# display warnings when using stricter because we die afterwards
if has stricter ${FEATURES} ; then
sleep 1
fi
+ # Check for files built without respecting LDFLAGS
+ if [[ "${LDFLAGS}" == *--hash-style=gnu* ]] && [[ "${PN}" != *-bin ]] ; then
+ f=$(scanelf -qyRF '%k %p' -k .hash "${D}" | sed -e "s:\.hash ::")
+ if [[ -n ${f} ]] ; then
+ echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log
+ if [ "${QA_STRICT_DT_HASH-unset}" == unset ] ; then
+ if [[ ${#QA_DT_HASH[@]} -gt 1 ]] ; then
+ for x in "${QA_DT_HASH[@]}" ; do
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-LDFLAGS.log
+ done
+ else
+ for x in ${QA_DT_HASH} ; do
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-LDFLAGS.log
+ done
+ fi
+ fi
+ sed -e "/^\$/d" -e "s#^#/#" -i "${T}"/scanelf-ignored-LDFLAGS.log
+ f=$(<"${T}"/scanelf-ignored-LDFLAGS.log)
+ if [[ -n ${f} ]] ; then
+ vecho -ne '\a\n'
+ eqawarn "QA Notice: Files built without respecting LDFLAGS have been detected"
+ eqawarn " Please include this file in your report:"
+ eqawarn " ${T}/scanelf-ignored-LDFLAGS.log"
+ eqawarn "${f}"
+ vecho -ne '\a\n'
+ sleep 1
+ fi
+ fi
+ fi
+
# Save NEEDED information after removing self-contained providers
scanelf -qyRF '%a;%p;%S;%r;%n' "${D}" | { while IFS= read l; do
arch=${l%%;*}; l=${l#*;}
This should contain a list of file paths, relative to the image directory, of
files that contain writable and executable segments. These are rare.
The paths may contain regular expressions.
+.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
+with escape\-quoted special characters.
.SH "PORTAGE DECLARATIONS"
.TP
.B inherit
Set this to cause portage to ignore any \fIQA_TEXTREL\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).
+.TP
.B RESUMECOMMAND
This variable contains the command used for resuming package sources that
have been partially downloaded. It should be defined using the same format