diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-08-12 12:51:44 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-08-12 12:51:44 +0000 |
commit | be9bc29b4ec785ab1da8c53557802de550de2639 (patch) | |
tree | 4209a51861cb095862abb2982bb57fd4ed889dde /main/gcc | |
parent | 5d95e0fa2be5b2e14d5f2ae37a3610a85eac6dec (diff) | |
download | aports-be9bc29b4ec785ab1da8c53557802de550de2639.tar.bz2 aports-be9bc29b4ec785ab1da8c53557802de550de2639.tar.xz |
main/gcc: added patch for GCC_SPECS environment variable
Diffstat (limited to 'main/gcc')
-rw-r--r-- | main/gcc/APKBUILD | 4 | ||||
-rw-r--r-- | main/gcc/gcc-spec-env.patch | 41 |
2 files changed, 44 insertions, 1 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index 0dd1f35bcd..fff88ea06b 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -3,7 +3,7 @@ pkgname=gcc pkgver=4.4.1 _specsver=0.1.4 _espfver=0.3.1 -pkgrel=1 +pkgrel=2 pkgdesc="The GNU Compiler Collection" url="http://gcc.gnu.org" license="GPL LGPL" @@ -14,6 +14,7 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-core-$pkgver.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-g++-$pkgver.tar.bz2 http://weaver.gentooenterprise.com/hardened/patches/gcc-$pkgver-espf-$_espfver.tar.bz2 http://weaver.gentooenterprise.com/hardened/patches/gcc-$pkgver-specs-$_specsver.tar.bz2 + gcc-spec-env.patch gcc4-stack-protector-uclibc-no_tls.patch pt_gnu_eh_frame.patch uclibc-getipinfo.patch @@ -120,6 +121,7 @@ md5sums="d19693308aa6b2052e14c071111df59f gcc-core-4.4.1.tar.bz2 d449047b5761348ceec23739f5553e0b gcc-g++-4.4.1.tar.bz2 43d0bbd676bbb2acd67ddabd0ea1bc2b gcc-4.4.1-espf-0.3.1.tar.bz2 da8d9165e828bbb9809ef86f1c72886f gcc-4.4.1-specs-0.1.4.tar.bz2 +c4045bfa85d8be780affd465be9d8ca8 gcc-spec-env.patch 15e77082db0e1a131af98debd3016290 gcc4-stack-protector-uclibc-no_tls.patch 2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch 6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch" diff --git a/main/gcc/gcc-spec-env.patch b/main/gcc/gcc-spec-env.patch new file mode 100644 index 0000000000..9d5e666a54 --- /dev/null +++ b/main/gcc/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, |