1 |
commit: dfe2afc9549e596a438a322feb35240d52ca26b5 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 24 10:13:32 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 24 10:13:32 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dfe2afc9 |
7 |
|
8 |
Don't check .GCC.command.line for kernel modules. |
9 |
|
10 |
Linux kernel modules trigger the following warning when compiled with |
11 |
-frecord-gcc-switches: |
12 |
|
13 |
WARNING: mod.o (.GCC.command.line): unexpected non-allocatable section. |
14 |
|
15 |
--- |
16 |
bin/misc-functions.sh | 13 ++++++++++++- |
17 |
1 files changed, 12 insertions(+), 1 deletions(-) |
18 |
|
19 |
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh |
20 |
index 9d8244d..bb67432 100755 |
21 |
--- a/bin/misc-functions.sh |
22 |
+++ b/bin/misc-functions.sh |
23 |
@@ -201,7 +201,18 @@ install_qa_check() { |
24 |
[[ "${FCFLAGS}" == *-frecord-gcc-switches* ]] ; then |
25 |
f=$(scanelf -qyRF '%k %p' -k \!.GCC.command.line "${ED}" | sed -e "s:\!.GCC.command.line ::") |
26 |
if [[ -n ${f} ]] ; then |
27 |
- echo "${f}" > "${T}"/scanelf-ignored-CFLAGS.log |
28 |
+ # Separate out file types that are known to support |
29 |
+ # .GCC.command.line sections, using the `file` command |
30 |
+ # similar to how prepstrip uses it. |
31 |
+ > "${T}"/scanelf-ignored-CFLAGS.log |
32 |
+ for x in $f ; do |
33 |
+ f=$(file "${x}") || continue |
34 |
+ [[ -z ${f} ]] && continue |
35 |
+ if [[ ${f} == *"SB executable"* || |
36 |
+ ${f} == *"SB shared object"* ]] ; then |
37 |
+ echo "${x}" >> "${T}"/scanelf-ignored-CFLAGS.log |
38 |
+ fi |
39 |
+ done |
40 |
if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then |
41 |
for x in "${QA_FLAGS_IGNORED[@]}" ; do |
42 |
sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log |