diff options
author | Christian Heim <phreak@gentoo.org> | 2008-01-01 16:20:33 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2008-01-01 16:20:33 +0000 |
commit | 8e34f111eb42557fa825184ec73544ded7c3c4f7 (patch) | |
tree | 4d400ccbc777c81110c5866f848b2666bde12f12 /catalyst/portage_overlay/glibc/sys-devel/gcc/files/gcc-spec-env.patch | |
parent | uClibc needs some "convincing", as the current stable sys-apps/setarch-2.0 is... (diff) | |
download | phreak-8e34f111eb42557fa825184ec73544ded7c3c4f7.tar.gz phreak-8e34f111eb42557fa825184ec73544ded7c3c4f7.tar.bz2 phreak-8e34f111eb42557fa825184ec73544ded7c3c4f7.zip |
Adding a local copy of sys-devel/gcc-3.4.6-r2, as we need the -fno-stack-protector to build a stage1.
svn path=/; revision=372
Diffstat (limited to 'catalyst/portage_overlay/glibc/sys-devel/gcc/files/gcc-spec-env.patch')
-rw-r--r-- | catalyst/portage_overlay/glibc/sys-devel/gcc/files/gcc-spec-env.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/catalyst/portage_overlay/glibc/sys-devel/gcc/files/gcc-spec-env.patch b/catalyst/portage_overlay/glibc/sys-devel/gcc/files/gcc-spec-env.patch new file mode 100644 index 0000000..9d5e666 --- /dev/null +++ b/catalyst/portage_overlay/glibc/sys-devel/gcc/files/gcc-spec-env.patch @@ -0,0 +1,41 @@ + 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. Extended to support multiple + entries separated by ':' by Kevin F. Quinn + +--- gcc-4/gcc/gcc.c ++++ gcc-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(). ++ */ ++ GET_ENVIRONMENT (specs_file, "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, |