diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-13 15:31:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-13 15:31:54 +0000 |
commit | 96cb3b82ba075f0abb881c4949e2845d82e64021 (patch) | |
tree | cab38e8e3601b7dd0847094e91808b83111f8499 /core/gcc | |
parent | a7a709545a9b9ce42da3b20969ffe065fc5e74e2 (diff) | |
download | aports-96cb3b82ba075f0abb881c4949e2845d82e64021.tar.bz2 aports-96cb3b82ba075f0abb881c4949e2845d82e64021.tar.xz |
core/gcc: split out libstdc++. added support for GCC_SPECS
Diffstat (limited to 'core/gcc')
-rw-r--r-- | core/gcc/APKBUILD | 17 | ||||
-rw-r--r-- | core/gcc/gcc-spec-env.patch | 41 |
2 files changed, 55 insertions, 3 deletions
diff --git a/core/gcc/APKBUILD b/core/gcc/APKBUILD index 49c9194171..dbb656603a 100644 --- a/core/gcc/APKBUILD +++ b/core/gcc/APKBUILD @@ -1,13 +1,13 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=gcc pkgver=4.3.3 -pkgrel=1 +pkgrel=2 pkgdesc="The GNU Compiler Collection" url="http://gcc.gnu.org" license="GPL LGPL" depends="gmp mpfr libgcc binutils" makedepends="bison flex gmp-dev mpfr-dev texinfo" -subpackages="$pkgname-doc g++:gpp libgcc" +subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc" 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 00_all_gcc-4.0-cvs-incompat.patch @@ -18,6 +18,7 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-core-$pkgver.tar.bz2 gcc4-stack-protector-uclibc-no_tls.patch gcc-4.2.0-cc1-no-stack-protector.patch pt_gnu_eh_frame.patch + gcc-spec-env.patch " build () @@ -74,10 +75,18 @@ build () # binutils provides libiberty.a rm -f "$pkgdir"/usr/lib/libiberty.a +} +libcxx() { + pkgdesc="GNU C++ standard runtime library" + depends="uclibc libgcc" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libstdc++.so* "$subpkgdir"/usr/lib/ } gpp() { + pkgdesc="GNU C++ standard library and compiler" + depends="uclibc libstdc++" local libexec=usr/libexec/gcc/${CHOST:-i486-alpine-linux-uclibc}/$pkgver mkdir -p "$subpkgdir/$libexec" \ "$subpkgdir"/usr/bin \ @@ -91,6 +100,7 @@ gpp() { } libgcc() { + pkgdesc="GNU C compiler runtime library" depends="uclibc" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgcc_s.so* "$subpkgdir"/usr/lib/ @@ -106,4 +116,5 @@ f0c6c419318537505ec2717a139a091b 00_all_gcc-4.0-cvs-incompat.patch ed3f5a947fed432fbef1dc0e71977ae7 03_all_gcc-4.3.2-hardened-default.patch 15e77082db0e1a131af98debd3016290 gcc4-stack-protector-uclibc-no_tls.patch cff2e73a8455bfa844dcdd9c229b0875 gcc-4.2.0-cc1-no-stack-protector.patch -2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch" +2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch +c4045bfa85d8be780affd465be9d8ca8 gcc-spec-env.patch" diff --git a/core/gcc/gcc-spec-env.patch b/core/gcc/gcc-spec-env.patch new file mode 100644 index 0000000000..9d5e666a54 --- /dev/null +++ b/core/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, |