summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Tilley <lv@gentoo.org>2004-07-13 18:47:57 +0000
committerTravis Tilley <lv@gentoo.org>2004-07-13 18:47:57 +0000
commit84954fbf662d004d21a46e8caa32cfd0c1dbf469 (patch)
treeafab1b42bccf9db38e43d351f63ac630c25edf13 /sys-devel
parentClosing #55560. (diff)
downloadhistorical-84954fbf662d004d21a46e8caa32cfd0c1dbf469.tar.gz
historical-84954fbf662d004d21a46e8caa32cfd0c1dbf469.tar.bz2
historical-84954fbf662d004d21a46e8caa32cfd0c1dbf469.zip
added Martin Schlemmer's new fixlafiles.awk with support for gcc 3.4 lib paths
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gcc/ChangeLog5
-rw-r--r--sys-devel/gcc/Manifest4
-rw-r--r--sys-devel/gcc/files/awk/fixlafiles.awk85
3 files changed, 72 insertions, 22 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog
index 50122c2557b5..f7beb9c790a0 100644
--- a/sys-devel/gcc/ChangeLog
+++ b/sys-devel/gcc/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-devel/gcc
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.284 2004/07/11 20:34:27 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.285 2004/07/13 18:47:57 lv Exp $
+
+ 13 Jul 2004; Travis Tilley <lv@gentoo.org> files/awk/fixlafiles.awk:
+ added Martin Schlemmer's new fixlafiles.awk with support for gcc 3.4 lib paths
11 Jul 2004; Travis Tilley <lv@gentoo.org> gcc-3.4.0-r6.ebuild,
gcc-3.4.1-r1.ebuild, gcc-3.4.1.ebuild:
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 8315f09749ff..8c3f83bffd38 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -25,7 +25,7 @@ MD5 85a0c8638cea68898c4a50919b13d547 gcc-2.95.3-r8.ebuild 9102
MD5 4001f2bfb30873af446cc09bcb04aff9 gcc-3.3.3-r3.ebuild 24572
MD5 f357f60ed2b1c343a0555b94de742cd1 gcc-3.3.2-r6.ebuild 21068
MD5 d30becfe989175c3d30ff19e941c3822 gcc-3.3.2-r1.ebuild 17813
-MD5 12336511a2977175d8e5caaaa89d7b42 ChangeLog 59252
+MD5 a06ec67809bf8698322db900bdf3b602 ChangeLog 59405
MD5 c2cdb224cdf888d8a95ae6c39804c893 gcc-3.3.2.ebuild 17760
MD5 5c7b94106c929033ea8cac50d7a36d71 gcc-3.3.3_pre20040426.ebuild 22484
MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
@@ -73,7 +73,7 @@ MD5 d047c78a9141b16915d8ec3f54d1e246 files/3.3/gcc33-coreutils-compat.patch.bz2
MD5 453122edf63d75cca3a6c56a6dac45b0 files/3.3/gcc33-propolice-version.patch 570
MD5 088e0807e677010cafe4e590e8711be1 files/3.3/gcc33-no-multilib-amd64.patch 343
MD5 d6ee829d1712436361f5f1daf7b14e83 files/3.3/gcc33-gentoo-branding.patch 890
-MD5 d622a08b045210fcb67eae879ede8cd2 files/awk/fixlafiles.awk 6284
+MD5 5adb32fa5b860e9afd415fc42c160aee files/awk/fixlafiles.awk 7755
MD5 c7e8f50ba67fce8f0c91d293e03ccf1b files/awk/scanforssp.awk 5836
MD5 51719a174883702ef1851fac4cc79398 files/3.2.1/gcc32-strip-dotdot.patch 2071
MD5 8ec9b0352d226e4693cabffe0fa5bba6 files/3.2.1/gcc31-loop-load-final-value.patch 3324
diff --git a/sys-devel/gcc/files/awk/fixlafiles.awk b/sys-devel/gcc/files/awk/fixlafiles.awk
index a4093e5b370f..e9e099522bf9 100644
--- a/sys-devel/gcc/files/awk/fixlafiles.awk
+++ b/sys-devel/gcc/files/awk/fixlafiles.awk
@@ -1,7 +1,7 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Author: Martin Schlemmer <azarah@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk,v 1.9 2003/12/28 21:54:56 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk,v 1.10 2004/07/13 18:47:57 lv Exp $
function printn(string)
{
@@ -70,6 +70,7 @@ BEGIN {
}
LIBCOUNT = 0
+ HAVE_GCC34 = 0
# Add the two default library paths
DIRLIST[1] = "/lib"
DIRLIST[2] = "/usr/lib"
@@ -129,18 +130,31 @@ BEGIN {
LIBCOUNT += 2
- # Get current gcc's CHOST
- pipe = "gcc -v 2>&1 | egrep '^Reading specs' \
- | sed -e 's:^.*/gcc-lib/\\([^/]*\\)/[0-9]\\+.*$:\\1:' 2>/dev/null"
+ # Get line from gcc's output containing CHOST
+ pipe = "gcc -v 2>&1 | egrep '^Reading specs' 2>/dev/null"
- # If we fail to get the CHOST, see if we can get the CHOST
- # portage thinks we are using ...
- if ((!((pipe) | getline CHOST)) || (CHOST == "")) {
+ if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) {
close(pipe)
+
+ # If we fail to get the CHOST, see if we can get the CHOST
+ # portage thinks we are using ...
pipe = "/usr/bin/portageq envvar 'CHOST'"
assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST")
+ } else {
+ # Check pre gcc-3.4.x versions
+ CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST)
+
+ if (CHOST == TMP_CHOST || CHOST == "") {
+ # Check gcc-3.4.x or later
+ CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST);
+
+ if (CHOST == TMP_CHOST || CHOST == "")
+ CHOST = ""
+ else
+ HAVE_GCC34 = 1
+ }
}
-
+
close(pipe)
if (CHOST == "") {
@@ -152,10 +166,20 @@ BEGIN {
if (OLDCHOST == CHOST)
OLDCHOST = ""
- GCCLIBPREFIX = "/usr/lib/gcc-lib/"
+ GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/"
+ GCCLIBPREFIX_NEW = "/usr/lib/gcc/"
+
+ if (HAVE_GCC34)
+ GCCLIBPREFIX = GCCLIBPREFIX_NEW
+ else
+ GCCLIBPREFIX = GCCLIBPREFIX_OLD
+
GCCLIB = GCCLIBPREFIX CHOST
- if (OLDCHOST != "")
- OLDGCCLIB = GCCLIBPREFIX OLDCHOST
+
+ if (OLDCHOST != "") {
+ OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST
+ OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST
+ }
# Get current gcc's version
pipe = "gcc -dumpversion"
@@ -174,7 +198,9 @@ BEGIN {
for (x = 1;x <= LIBCOUNT;x++) {
# Do nothing if the target dir is gcc's internal library path
- if (DIRLIST[x] ~ GCCLIBPREFIX) continue
+ if (DIRLIST[x] ~ GCCLIBPREFIX_OLD ||
+ DIRLIST[x] ~ GCCLIBPREFIX_NEW)
+ continue
einfo(" Scanning " DIRLIST[x] "...")
@@ -182,7 +208,9 @@ BEGIN {
while (((pipe) | getline la_files) > 0) {
# Do nothing if the .la file is located in gcc's internal lib path
- if (la_files ~ GCCLIBPREFIX) continue
+ if (la_files ~ GCCLIBPREFIX_OLD ||
+ la_files ~ GCCLIBPREFIX_NEW)
+ continue
CHANGED = 0
CHOST_CHANGED = 0
@@ -192,8 +220,10 @@ BEGIN {
if (OLDCHOST != "") {
- if (gsub(OLDGCCLIB "[/[:space:]]+",
- GCCLIB, la_data) > 0) {
+ if ((gsub(OLDGCCLIB1 "[/[:space:]]+",
+ GCCLIB, la_data) > 0) ||
+ (gsub(OLDGCCLIB2 "[/[:space:]]+",
+ GCCLIB, la_data) > 0)) {
CHANGED = 1
CHOST_CHANGED = 1
@@ -202,8 +232,10 @@ BEGIN {
if (OLDVER != NEWVER) {
- if (gsub(GCCLIB "/" OLDVER "[/[:space:]]+",
- GCCLIB "/" NEWVER, la_data) > 0)
+ if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*",
+ GCCLIB "/" NEWVER, la_data) > 0) ||
+ (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*",
+ GCCLIB "/" NEWVER, la_data) > 0))
CHANGED = 1
}
}
@@ -227,8 +259,10 @@ BEGIN {
if (OLDCHOST != "") {
- tmpstr = gensub(OLDGCCLIB "([/[:space:]]+)",
+ tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)",
GCCLIB "\\1", "g", la_data)
+ tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)",
+ GCCLIB "\\1", "g", tmpstr)
if (la_data != tmpstr) {
printn("c")
@@ -258,10 +292,23 @@ BEGIN {
if (OLDVER != NEWVER) {
- tmpstr = gensub(GCCLIB "/" OLDVER "([/[:space:]]+)",
+ tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]*)",
GCCLIB "/" NEWVER "\\1", "g", la_data)
+ tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]*)",
+ GCCLIB "/" NEWVER "\\1", "g", tmpstr)
+
if (la_data != tmpstr) {
+ # Catch:
+ #
+ # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib'
+ #
+ # in cases where we have gcc34
+ tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)",
+ GCCLIBPREFIX "\\1", "g", tmpstr)
+ tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)",
+ GCCLIBPREFIX "\\1", "g", tmpstr)
+
printn("v")
la_data = tmpstr
}