summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2015-02-21 02:50:38 +0200
committerBlackNoxis <steven.darklight@gmail.com>2015-02-21 02:50:38 +0200
commitd7532fdd66be6867da992a9981ddb2cb7f0e84e3 (patch)
tree1c5e2b7d2372d129bce3f4bfbf9b0bff6a59afe3
parentcbbf0c20e52b4c1ef486127e553261c06712f802 (diff)
Making 4.6.4 compile finally. there should be no 4.6.2 patch to it
-rw-r--r--sys-devel/gcc/files/gcc-4.6.4-spec-env.patch43
-rw-r--r--sys-devel/gcc/files/gcc-spec-env.patch4
-rw-r--r--sys-devel/gcc/gcc-4.6.4.ebuild1
3 files changed, 45 insertions, 3 deletions
diff --git a/sys-devel/gcc/files/gcc-4.6.4-spec-env.patch b/sys-devel/gcc/files/gcc-4.6.4-spec-env.patch
new file mode 100644
index 00000000..fff1221e
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-4.6.4-spec-env.patch
@@ -0,0 +1,43 @@
+ Add support for external spec file via the GCC_SPECS env var. This
+ allows us to easily control pie/ssp defaults with gcc-config profiles.
+
+ Original patch by Rob Holland
+ Modified for Gentoo-based distros 'cuz of archive name by Stefan Cristian B.
+ Extended to support multiple entries separated by ':' by Kevin F. Quinn
+ Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
+
+--- gcc-4.6.4/gcc/gcc.c
++++ gcc-4.6.4/gcc/gcc.c
+@@ -6482,6 +6482,32 @@
+
+ /* Process any user specified specs in the order given on the command
+ line. */
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
++ /* Add specs listed in GCC_SPECS. Note; in the process of separating
++ * each spec listed, the string is overwritten at token boundaries
++ * (':') with '\0', an effect of strtok_r().
++ */
++ specs_file = getenv ("GCC_SPECS");
++ if (specs_file && (strlen(specs_file) > 0))
++ {
++ char *spec, *saveptr;
++ for (spec=strtok_r(specs_file,":",&saveptr);
++ spec!=NULL;
++ spec=strtok_r(NULL,":",&saveptr))
++ {
++ struct user_specs *user = (struct user_specs *)
++ xmalloc (sizeof (struct user_specs));
++
++ user->next = (struct user_specs *) 0;
++ user->filename = spec;
++ if (user_specs_tail)
++ user_specs_tail->next = user;
++ else
++ user_specs_head = user;
++ user_specs_tail = user;
++ }
++ }
++#endif
+ for (uptr = user_specs_head; uptr; uptr = uptr->next)
+ {
+ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
diff --git a/sys-devel/gcc/files/gcc-spec-env.patch b/sys-devel/gcc/files/gcc-spec-env.patch
index fff1221e..5fa61a91 100644
--- a/sys-devel/gcc/files/gcc-spec-env.patch
+++ b/sys-devel/gcc/files/gcc-spec-env.patch
@@ -6,8 +6,8 @@
Extended to support multiple entries separated by ':' by Kevin F. Quinn
Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
---- gcc-4.6.4/gcc/gcc.c
-+++ gcc-4.6.4/gcc/gcc.c
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
@@ -6482,6 +6482,32 @@
/* Process any user specified specs in the order given on the command
diff --git a/sys-devel/gcc/gcc-4.6.4.ebuild b/sys-devel/gcc/gcc-4.6.4.ebuild
index 9000754d..c699177e 100644
--- a/sys-devel/gcc/gcc-4.6.4.ebuild
+++ b/sys-devel/gcc/gcc-4.6.4.ebuild
@@ -107,7 +107,6 @@ src_unpack() {
[[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch
# Fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47719
- epatch "${FILESDIR}/${PN}-4.6.2-fix-ICE-on-arm.patch"
}
## Remove lto conditional