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-411986-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1ReQAA-0000B5-CZ
	for garchives@archives.gentoo.org; Sat, 24 Dec 2011 11:53:18 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id F142D21C03C;
	Sat, 24 Dec 2011 11:53:09 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id C402621C041
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2011 11:53:09 +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 44A221B4037
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2011 11:53:09 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 6B56980042
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2011 11:53:08 +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: <84260c2aadbe3fe416d0e2fb428cc1ea07404930.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: 84260c2aadbe3fe416d0e2fb428cc1ea07404930
Date: Sat, 24 Dec 2011 11:53:08 +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: 270ff982-1c7b-4051-bde8-8d2dbcfb570a
X-Archives-Hash: b6d31a0119a2af63270ee7d9662988a6

commit:     84260c2aadbe3fe416d0e2fb428cc1ea07404930
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 11:52:56 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 11:52:56 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3D84260c2a

Tweak CFLAGS scanelf loop.

---
 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 bb67432..5a726b3 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -199,20 +199,22 @@ install_qa_check() {
 		[[ "${CXXFLAGS}" =3D=3D *-frecord-gcc-switches* ]] && \
 		[[ "${FFLAGS}" =3D=3D *-frecord-gcc-switches* ]] && \
 		[[ "${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
+		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=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
+			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 [[ -f "${T}"/scanelf-ignored-CFLAGS.log ]] ; then
+
 			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