aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
commit2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch)
treea63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /main/gcc/APKBUILD
parente374901731eb35599bd6735de4dd38560e3a79b8 (diff)
downloadaports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2
aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'main/gcc/APKBUILD')
-rw-r--r--main/gcc/APKBUILD120
1 files changed, 120 insertions, 0 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
new file mode 100644
index 0000000000..dbb656603a
--- /dev/null
+++ b/main/gcc/APKBUILD
@@ -0,0 +1,120 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=gcc
+pkgver=4.3.3
+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 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
+ 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
+ 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 ()
+{
+ 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 || 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
+
+ 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-libssp \
+ --disable-libstdcxx-pch \
+ --disable-multilib \
+ --disable-nls \
+ --disable-werror \
+ --enable-__cxa_atexit \
+ --enable-cld \
+ --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
+ ln -s gcc "$pkgdir"/usr/bin/cc
+
+ # 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 \
+ "$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/
+}
+
+libgcc() {
+ pkgdesc="GNU C compiler runtime library"
+ depends="uclibc"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libgcc_s.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
+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"