From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-411961-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1ReObx-0004UZ-L8
	for garchives@archives.gentoo.org; Sat, 24 Dec 2011 10:13:53 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 792C721C0C9;
	Sat, 24 Dec 2011 10:13:46 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 4A25B21C0C9
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2011 10:13:46 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C2B23646CC
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2011 10:13:45 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 145A580042
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2011 10:13:45 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <dfe2afc9549e596a438a322feb35240d52ca26b5.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/misc-functions.sh
X-VCS-Directories: bin/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: dfe2afc9549e596a438a322feb35240d52ca26b5
Date: Sat, 24 Dec 2011 10:13:45 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 1dccbf57-41c7-47c7-beb6-9872b376af1b
X-Archives-Hash: 6e5dbf2a2e542a0703515d3b45a42d03

commit:     dfe2afc9549e596a438a322feb35240d52ca26b5
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 10:13:32 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 10:13:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3Ddfe2afc9

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.

---
 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 9d8244d..bb67432 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -201,7 +201,18 @@ install_qa_check() {
 		[[ "${FCFLAGS}" =3D=3D *-frecord-gcc-switches* ]] ; then
 		f=3D$(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=3D$(file "${x}") || continue
+				[[ -z ${f} ]] && continue
+				if [[ ${f} =3D=3D *"SB executable"* ||
+					${f} =3D=3D *"SB shared object"* ]] ; then
+					echo "${x}" >> "${T}"/scanelf-ignored-CFLAGS.log
+				fi
+			done
 			if [ "${QA_STRICT_FLAGS_IGNORED-unset}" =3D unset ] ; then
 				for x in "${QA_FLAGS_IGNORED[@]}" ; do
 					sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log