public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Diego Elio Pettenò" <flameeyes@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/flameeyes-tinderbox:master commit in: /
Date: Sat, 26 Jan 2013 14:49:22 +0000 (UTC)	[thread overview]
Message-ID: <1359211694.95b3f8b773f19dbd125cfd684d1617835d6c6cb0.flameeyes@gentoo> (raw)

commit:     95b3f8b773f19dbd125cfd684d1617835d6c6cb0
Author:     Diego Elio Pettenò <flameeyes <AT> flameeyes <DOT> eu>
AuthorDate: Sat Jan 26 14:48:14 2013 +0000
Commit:     Diego Elio Pettenò <flameeyes <AT> gentoo <DOT> 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ò <flameeyes@gentoo.org>
+# Copyright © 2007-2013 Diego Elio Pettenò <flameeyes@gentoo.org>
 #
 # 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


             reply	other threads:[~2013-01-26 14:49 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26 14:49 Diego Elio Pettenò [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-03-05 13:42 [gentoo-commits] proj/flameeyes-tinderbox:master commit in: / Diego Elio Pettenò
2013-02-19 20:39 Diego Elio Pettenò
2013-01-26  1:15 Diego Elio Pettenò
2013-01-26  0:23 Diego Elio Pettenò
2013-01-26  0:23 Diego Elio Pettenò
2013-01-26  0:23 Diego Elio Pettenò
2012-11-01 18:51 Diego Elio Pettenò
2012-11-01 16:54 Diego Elio Pettenò
2012-07-15 10:31 Diego Elio Pettenò
2012-07-15 10:28 Diego Elio Pettenò
2012-06-22 19:49 Diego Elio Pettenò
2012-06-22 19:49 Diego Elio Pettenò
2012-06-22 19:46 Diego Elio Pettenò
2012-06-21 10:48 Diego Elio Pettenò
2012-06-19 18:59 Diego Elio Pettenò
2012-06-16 14:57 Diego Elio Pettenò
2012-06-16 14:51 Diego Elio Pettenò
2012-06-16 14:48 Diego Elio Pettenò
2012-06-16 14:45 Diego Elio Pettenò
2012-06-16 14:39 Diego Elio Pettenò
2012-06-16 14:39 Diego Elio Pettenò
2012-06-15 15:09 Diego Elio Pettenò
2012-06-15 15:09 Diego Elio Pettenò
2012-06-15 15:09 Diego Elio Pettenò
2012-05-18 16:03 Diego Elio Pettenò
2012-05-18 15:56 Diego Elio Pettenò
2012-05-18 15:56 Diego Elio Pettenò
2012-05-18 15:56 Diego Elio Pettenò
2012-05-18  4:32 Diego Elio Pettenò
2012-05-18  4:07 Diego Elio Pettenò
2012-05-18  4:07 Diego Elio Pettenò
2011-08-07 12:23 Diego Elio Pettenò
2011-05-28  9:09 Diego Elio Pettenò
2011-05-03 14:54 Diego Elio Pettenò
2011-05-03 14:54 Diego Elio Pettenò
2011-04-13 12:50 Diego Elio Pettenò
2011-03-22 17:09 Jeremy Olexa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359211694.95b3f8b773f19dbd125cfd684d1617835d6c6cb0.flameeyes@gentoo \
    --to=flameeyes@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox