From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0059E1386B2 for ; Sat, 26 Jan 2013 14:49:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A303121C002; Sat, 26 Jan 2013 14:49:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3E73921C002 for ; Sat, 26 Jan 2013 14:49:25 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 276FC33DB0A for ; Sat, 26 Jan 2013 14:49:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A3B35E4073 for ; Sat, 26 Jan 2013 14:49:22 +0000 (UTC) From: "Diego Elio Pettenò" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Diego Elio Pettenò" Message-ID: <1359211694.95b3f8b773f19dbd125cfd684d1617835d6c6cb0.flameeyes@gentoo> Subject: [gentoo-commits] proj/flameeyes-tinderbox:master commit in: / X-VCS-Repository: proj/flameeyes-tinderbox X-VCS-Files: tinderbox-restart.sh update-gcc-asneeded.sh X-VCS-Directories: / X-VCS-Committer: flameeyes X-VCS-Committer-Name: Diego Elio Pettenò X-VCS-Revision: 95b3f8b773f19dbd125cfd684d1617835d6c6cb0 X-VCS-Branch: master Date: Sat, 26 Jan 2013 14:49:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 477de6cc-3074-41b8-9638-9bc41235ee6f X-Archives-Hash: 41b7bd4c423d8b36c97493415ec515bb commit: 95b3f8b773f19dbd125cfd684d1617835d6c6cb0 Author: Diego Elio Pettenò flameeyes eu> AuthorDate: Sat Jan 26 14:48:14 2013 +0000 Commit: Diego Elio Pettenò gentoo org> CommitDate: Sat Jan 26 14:48:14 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/flameeyes-tinderbox.git;a=commit;h=95b3f8b7 Update the --as-needed specs hacking so that it works with hardened toolchain. Previously, this caused the --as-needed hack to be applied over and over and over again every time a GCC was to be rebuilt for whatever reason. Now it'll only be applied once. --- tinderbox-restart.sh | 2 +- update-gcc-asneeded.sh | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/tinderbox-restart.sh b/tinderbox-restart.sh index b2c89ad..2d555a9 100755 --- a/tinderbox-restart.sh +++ b/tinderbox-restart.sh @@ -49,7 +49,7 @@ reset_emergelog emerge -Nu1 sys-apps/portage emerge -Nu1 sys-devel/gcc -if fgrep -q '>>> emerge' /var/log/emerge.log && gcc-config -l | tail -n 1 | grep -v asneeded; then +if fgrep -q '>>> emerge' /var/log/emerge.log; then ${tboxdir}/update-gcc-asneeded.sh exit 0 fi diff --git a/update-gcc-asneeded.sh b/update-gcc-asneeded.sh index 38f5717..31c348c 100755 --- a/update-gcc-asneeded.sh +++ b/update-gcc-asneeded.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright © 2007-2010 Diego Elio Pettenò +# Copyright © 2007-2013 Diego Elio Pettenò # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -15,9 +15,15 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -export SPECSFILE=$(dirname "$(gcc -print-libgcc-file-name)")/asneeded.specs -export CURRPROFILE=/etc/env.d/gcc/$(gcc-config -c) -gcc -dumpspecs | sed -e '/link:/,+1 s:--eh-frame-hdr:\0 --as-needed:' > "$SPECSFILE" -sed "${CURRPROFILE}" -e '1i\GCC_SPECS='$SPECSFILE > "${CURRPROFILE}-asneeded" -gcc-config "$(basename "${CURRPROFILE}")-asneeded" -source /etc/profile +SPECSFILE=$(dirname "$(gcc -print-libgcc-file-name)")/asneeded.specs +CURRPROFILE=$(gcc-config -c) +PROFILEFILE=/etc/env.d/gcc/$(gcc-config -c) + +# only proceed with the changes if we're not already on an asneeded +# profile. +if [ ${CURRPROFILE/asneeded} = ${CURRPROFILE} ]; then + gcc -dumpspecs | sed -e '/link:/,+1 s:--eh-frame-hdr:\0 --as-needed:' > "$SPECSFILE" + sed "${PROFILEFILE}" -e '1i\GCC_SPECS='$SPECSFILE > "${PROFILEFILE}-asneeded" + gcc-config "${CURRPROFILE}-asneeded" + source /etc/profile +fi