diff options
Diffstat (limited to 'core/gcc/APKBUILD')
-rw-r--r-- | core/gcc/APKBUILD | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/core/gcc/APKBUILD b/core/gcc/APKBUILD new file mode 100644 index 00000000000..b257fcf21b9 --- /dev/null +++ b/core/gcc/APKBUILD @@ -0,0 +1,79 @@ +pkgname=gcc +pkgver=4.3.2 +pkgrel=0 +pkgdesc="The GNU Compiler Collection" +url="http://gcc.gnu.org" +license="GPL LGPL" +depends="gmp mpfr" +makedepends="bison flex texinfo" +subpackages="$pkgname-doc g++:gpp" +source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.3.2/gcc-core-4.3.2.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.3.2/gcc-g++-4.3.2.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 + gcc-4.2.0-cc1-no-stack-protector.patch + " + +build () +{ + cd ${srcdir}/gcc-${pkgver}; + for i in ../*.patch; do + if ! patch -p1 -i $i; then + error "$i failed" + return 1 + fi + 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 || die "Failed to update crtstuff!" + + mkdir build; + cd build; + ../configure --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --build=${CHOST:-i486-alpine-linux-uclibc} \ + --disable-altivec \ + --disable-checking \ + --disable-fixed-point \ + --disable-libstdcxx-pch \ + --disable-multilib \ + --disable-nls \ + --disable-werror \ + --enable-__cxa_atexit \ + --enable-languages=c,c++ \ + --enable-shared \ + --enable-target-optspace \ + --disable-threads \ + --with-arch=i486 \ + --with-system-zlib + + make || return 1; + make -j1 DESTDIR="${pkgdir}" install || return 1; +} + +gpp() { + local libexec=usr/libexec/gcc/${CHOST:-i486-alpine-linux-uclibc}/$pkgver + mkdir -p "$subpkgdir/$libexec" \ + "$subpkgdir"/usr/bin \ + "$subpkgdir"/usr/include \ + "$subpkgdir"/usr/lib \ + + mv "$pkgdir/$libexec/cc1plus" "$subpkgdir/$libexec/" + mv "$pkgdir"/usr/lib/*++* "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/include/c++ "$subpkgdir"/usr/include/ + mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/ +} + +md5sums="dd8048b43d3d4e5595bcade47b9144c6 gcc-core-4.3.2.tar.bz2 +bfdf8d19e1b85f522f8b8d48d25e7aaa gcc-g++-4.3.2.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 +cff2e73a8455bfa844dcdd9c229b0875 gcc-4.2.0-cc1-no-stack-protector.patch" |