diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-12-24 02:13:32 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-12-24 02:13:32 -0800 |
commit | dfe2afc9549e596a438a322feb35240d52ca26b5 (patch) | |
tree | 91c7b5f42981dd50c27422095d3b6aa61bf360ae | |
parent | b91754cb94e3f3d2db50768ec7cad47314d806ce (diff) | |
download | portage-dfe2afc9549e596a438a322feb35240d52ca26b5.tar.gz portage-dfe2afc9549e596a438a322feb35240d52ca26b5.tar.bz2 portage-dfe2afc9549e596a438a322feb35240d52ca26b5.zip |
Don't check .GCC.command.line for kernel modules.
Linux kernel modules trigger the following warning when compiled with
-frecord-gcc-switches:
WARNING: mod.o (.GCC.command.line): unexpected non-allocatable section.
-rwxr-xr-x | bin/misc-functions.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 9d8244d65..bb674321e 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -201,7 +201,18 @@ install_qa_check() { [[ "${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 - echo "${f}" > "${T}"/scanelf-ignored-CFLAGS.log + # 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 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 |