diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-12-24 03:52:56 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-12-24 03:52:56 -0800 |
commit | 84260c2aadbe3fe416d0e2fb428cc1ea07404930 (patch) | |
tree | 49dbce64e137fa509c9d62838e22985c079844c1 | |
parent | 38fca9ab1960f9a38c5d29183224a77694337205 (diff) | |
download | portage-2.2.0_alpha83.tar.gz portage-2.2.0_alpha83.tar.bz2 portage-2.2.0_alpha83.zip |
Tweak CFLAGS scanelf loop.v2.2.0_alpha83
-rwxr-xr-x | bin/misc-functions.sh | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index bb674321e..5a726b36b 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -199,20 +199,22 @@ install_qa_check() { [[ "${CXXFLAGS}" == *-frecord-gcc-switches* ]] && \ [[ "${FFLAGS}" == *-frecord-gcc-switches* ]] && \ [[ "${FCFLAGS}" == *-frecord-gcc-switches* ]] ; then - f=$(scanelf -qyRF '%k %p' -k \!.GCC.command.line "${ED}" | sed -e "s:\!.GCC.command.line ::") - if [[ -n ${f} ]] ; then + rm -f "${T}"/scanelf-ignored-CFLAGS.log + for x in $(scanelf -qyRF '%k %p' -k \!.GCC.command.line "${ED}" | \ + sed -e "s:\!.GCC.command.line ::") ; do # Separate out file types that are known to support # .GCC.command.line sections, using the `file` command # similar to how prepstrip uses it. - > "${T}"/scanelf-ignored-CFLAGS.log - for x in $f ; do - f=$(file "${x}") || continue - [[ -z ${f} ]] && continue - if [[ ${f} == *"SB executable"* || - ${f} == *"SB shared object"* ]] ; then - echo "${x}" >> "${T}"/scanelf-ignored-CFLAGS.log - fi - done + f=$(file "${x}") || continue + [[ -z ${f} ]] && continue + if [[ ${f} == *"SB executable"* || + ${f} == *"SB shared object"* ]] ; then + echo "${x}" >> "${T}"/scanelf-ignored-CFLAGS.log + fi + done + + if [[ -f "${T}"/scanelf-ignored-CFLAGS.log ]] ; then + if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then for x in "${QA_FLAGS_IGNORED[@]}" ; do sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log |