diff options
Diffstat (limited to 'main/gcc/APKBUILD')
-rw-r--r-- | main/gcc/APKBUILD | 99 |
1 files changed, 52 insertions, 47 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index dbb656603a..0dd1f35bcd 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -1,51 +1,43 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=gcc -pkgver=4.3.3 -pkgrel=2 +pkgver=4.4.1 +_specsver=0.1.4 +_espfver=0.3.1 +pkgrel=1 pkgdesc="The GNU Compiler Collection" url="http://gcc.gnu.org" license="GPL LGPL" -depends="gmp mpfr libgcc binutils" +depends="binutils" makedepends="bison flex gmp-dev mpfr-dev texinfo" -subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc" +subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp" 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 - 01_all_gcc-4.0.2-v9.0.0-start_endfile-boundschecking-no.patch - 01_all_gcc-4.3.1-crtbeginTS-stuff.patch - 02_all_gcc-4.3.1-v10.0.1-start_endfile.patch - 03_all_gcc-4.3.2-hardened-default.patch + http://weaver.gentooenterprise.com/hardened/patches/gcc-$pkgver-espf-$_espfver.tar.bz2 + http://weaver.gentooenterprise.com/hardened/patches/gcc-$pkgver-specs-$_specsver.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 + uclibc-getipinfo.patch " +# ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-objc-$pkgver.tar.bz2 +build () +{ + cd ${srcdir}/gcc-${pkgver} -build () -{ - cd ${srcdir}/gcc-${pkgver}; + # uclibc patches for i in ../*.patch; do - if ! patch -p1 -i $i; then - error "$i failed" - return 1 - fi + msg "Applying $i" + patch -p1 -i $i || return 1 done - echo ${pkgver} > gcc/BASE-VER; - - # Don't build crtbegin/end with ssp - sed -e 's|^CRTSTUFF_CFLAGS = |CRTSTUFF_CFLAGS = -fno-stack-protector |' \ - -i gcc/Makefile.in || return 1 - - # Don't build libgcc with SSP - sed -e 's|^LIBGCC2_CFLAGS = |LIBGCC2_CFLAGS = -fno-stack-protector -U_FORTIFY_SOURCE |' \ - -i gcc/Makefile.in || return 1 - - # Use SSP from libc - msg "Enabling SSP from libc" - sed -e 's|^LIBGCC2_CFLAGS = |LIBGCC2_CFLAGS = -D_LIBC_PROVIDES_SSP_ |' \ - -i gcc/Makefile.in || return 1 + # ESPF patches. we dont use objc yet + rm -f ../espf-gcc-$pkgver/*_objc*lang-specs*.patch + # thanks to Zorry for hard work on those patches + for i in ../espf-gcc-$pkgver/*.patch; do + msg "Applying $i" + patch -p0 -i $i || return 1 + done + echo ${pkgver} > gcc/BASE-VER mkdir build cd build ../configure --prefix=/usr \ @@ -59,15 +51,18 @@ build () --disable-libstdcxx-pch \ --disable-multilib \ --disable-nls \ + --disable-threads \ + --disable-tls \ --disable-werror \ --enable-__cxa_atexit \ --enable-cld \ + --enable-espf \ --enable-languages=c,c++ \ --enable-shared \ --enable-target-optspace \ - --disable-threads \ --with-arch=i486 \ - --with-system-zlib + --with-system-zlib \ + --without-system-libunwind make || return 1 make -j1 DESTDIR="${pkgdir}" install || return 1 @@ -75,18 +70,25 @@ build () # binutils provides libiberty.a rm -f "$pkgdir"/usr/lib/libiberty.a + + # install the specs + cd "$srcdir"/specs + install -d "$pkgdir"/usr/share/gcc + for i in *.specs; do + install -m644 $i "$pkgdir"/usr/share/gcc/$i || return 1 + done } libcxx() { pkgdesc="GNU C++ standard runtime library" - depends="uclibc libgcc" + depends= 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++" + depends= local libexec=usr/libexec/gcc/${CHOST:-i486-alpine-linux-uclibc}/$pkgver mkdir -p "$subpkgdir/$libexec" \ "$subpkgdir"/usr/bin \ @@ -100,21 +102,24 @@ gpp() { } libgcc() { - pkgdesc="GNU C compiler runtime library" - depends="uclibc" + pkgdesc="GNU C compiler runtime libraries" + depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgcc_s.so* "$subpkgdir"/usr/lib/ } +libgomp() { + pkgdesc="GCC shared-memory parallel programming API library" + depends= + replaces="gcc" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libgomp.so* "$subpkgdir"/usr/lib/ +} -md5sums="1739288c2c7b1472796b33d641dbdbbd gcc-core-4.3.3.tar.bz2 -18428e313a9927d38b313e688c62219b gcc-g++-4.3.3.tar.bz2 -f0c6c419318537505ec2717a139a091b 00_all_gcc-4.0-cvs-incompat.patch -3cb2148075e818f09c34718725f335d9 01_all_gcc-4.0.2-v9.0.0-start_endfile-boundschecking-no.patch -1c6294b95f13a59ed7cbf7be2dde7804 01_all_gcc-4.3.1-crtbeginTS-stuff.patch -019522a38f2e25b6a820766402ff2ee4 02_all_gcc-4.3.1-v10.0.1-start_endfile.patch -ed3f5a947fed432fbef1dc0e71977ae7 03_all_gcc-4.3.2-hardened-default.patch +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 15e77082db0e1a131af98debd3016290 gcc4-stack-protector-uclibc-no_tls.patch -cff2e73a8455bfa844dcdd9c229b0875 gcc-4.2.0-cc1-no-stack-protector.patch 2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch -c4045bfa85d8be780affd465be9d8ca8 gcc-spec-env.patch" +6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch" |