aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-08-18 13:49:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-18 13:49:32 +0000
commit081c531fecfa27b5c0e9f48a3ca1a96ea3ef553c (patch)
tree9e151374b53ad61b9c5407d4cc4f8e8fd8ec3c24 /main/gcc/APKBUILD
parentde7b37cbad5d595786fa1b78bed8dac552de1b27 (diff)
downloadaports-081c531fecfa27b5c0e9f48a3ca1a96ea3ef553c.tar.gz
aports-081c531fecfa27b5c0e9f48a3ca1a96ea3ef553c.tar.bz2
aports-081c531fecfa27b5c0e9f48a3ca1a96ea3ef553c.tar.xz
main/gcc: upgrade to 4.6.1
Diffstat (limited to 'main/gcc/APKBUILD')
-rw-r--r--main/gcc/APKBUILD120
1 files changed, 92 insertions, 28 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index 1c2c0d72f1..3d5ce070e9 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -1,48 +1,68 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gcc
-pkgver=4.5.3
+pkgver=4.6.1
_piepatchver=0.4.5
_specs_ver=0.2.0
_specs_gcc_ver=4.4.3
_uclibc_abiver=0.9.32
-pkgrel=0
+pkgrel=3
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
arch="all"
license="GPL LGPL"
depends="binutils libgcc libgomp libobjc"
-makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip"
-subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp"
+makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip
+ cloog-dev"
+subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp $pkgname-go
+ libgo"
replaces="libstdc++"
+if [ -n "$BOOTSTRAP" ]; then
+ LANG_OBJC=off
+ LANG_JAVA=off
+fi
+
if [ "$LANG_OBJC" != "off" ]; then
subpackages="$subpackages libobjc"
fi
if [ "$LANG_JAVA" != "off" ]; then
subpackages="$subpackages $pkgname-java libgcj"
+ makedepends="$makedepends paxctl"
fi
+if [ "$LANG_GO" != "off" ]; then
+ _languages="$_languages,go"
+ fi
+
+
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
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-objc-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-java-$pkgver.tar.bz2
- http://distfiles.gentoo.org/distfiles/gcc-4.5.1-piepatches-v${_piepatchver}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-go-$pkgver.tar.bz2
+ http://distfiles.gentoo.org/distfiles/gcc-4.6.1-piepatches-v${_piepatchver}.tar.bz2
http://distfiles.gentoo.org/distfiles/gcc-$_specs_gcc_ver-specs-$_specs_ver.tar.bz2
ftp://sourceware.org/pub/java/ecj-latest.jar
- 09_all_gcc-4.5-Wtrampolines.patch
- 15_all_gcc-libgomp-no-werror.patch
- 51_all_gcc-3.4-libiberty-pic.patch
+ 08_all_cross-compile.patch
+ 11_all_default-warn-format-security.patch
+ 12_all_default-warn-trampolines.patch
+ 15_all_libgomp-Werror.patch
+ 34_all_ia64_note.GNU-stack.patch
+ 51_all_libiberty-pic.patch
+ 74_all_gcc46_cloog-dl.patch
gcc-spec-env.patch
pt_gnu_eh_frame.patch
uclibc-getipinfo.patch
- gcc-4.5-dynamic-linker.patch
- PR32219.patch
+ gcc-4.6-dynamic-linker.patch
+ gcc-4.6-pr32219.patch
boehem-gc-uclibc.patch
gcc-pure64.patch
+ gcc-go.patch
+ gcc-libgcc-x86.get_pc_thunk.bx.patch
"
# we build out-of-tree
@@ -61,19 +81,28 @@ prepare() {
# thanks to Zorry for hard work on those patches
for i in "$srcdir"/piepatch/*.patch; do
msg "Applying $i"
- patch -p0 -i $i || return 1
+ patch -p0 -i $i || patch -p1 -i $i || return 1
done
# Gentoo and uclibc patches
+ _err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
- patch -p1 -i "$srcdir"/$i || return 1
+ patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
+ if [ -n "$_err" ]; then
+ error "The following patches failed:"
+ for i in $_err; do
+ echo " $i"
+ done
+ return 1
+ fi
+
#PR33200
sed -i 's/use_fixproto=yes/:/' gcc/config.gcc || return 1
@@ -123,6 +152,10 @@ build() {
_languages="$_languages,java"
fi
+ if [ "$LANG_GO" != "off" ]; then
+ _languages="$_languages,go"
+ fi
+
# --enable-target-optspace is broken on powerpc
if [ "$CARCH" != "powerpc" ]; then
_target_optspace="--enable-target-optspace"
@@ -146,7 +179,7 @@ build() {
--build=${CBUILD} \
--host=${CHOST} \
--target=${CTARGET} \
- --with-pkgversion='Alpine' \
+ --with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \
--disable-altivec \
--disable-checking \
--disable-fixed-point \
@@ -158,6 +191,7 @@ build() {
--enable-__cxa_atexit \
--enable-cld \
--enable-esp \
+ --enable-cloog-backend \
--enable-languages=$_languages \
--enable-shared \
$_target_optspace \
@@ -174,6 +208,8 @@ build() {
package() {
cd "$_builddir"
make -j1 DESTDIR="${pkgdir}" install || return 1
+ find "$pkgdir" -name '*.la' -delete || return 1
+
ln -s gcc "$pkgdir"/usr/bin/cc
# binutils provides libiberty.a
@@ -255,6 +291,7 @@ libgomp() {
java() {
pkgdesc="Java support for GCC"
+ paxctl -c -p -e -m "$pkgdir"/usr/libexec/gcc/*/*/ecj1 || return 1
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib
cd "$pkgdir"/usr/bin
mv gcj gcj-dbtool gjavah gcjh jcf-dump "$subpkgdir"/usr/bin/
@@ -265,9 +302,7 @@ java() {
done
mv \
"$pkgdir"/usr/lib/libgcj*.so \
- "$pkgdir"/usr/lib/libgcj*.la \
"$pkgdir"/usr/lib/libgij.so \
- "$pkgdir"/usr/lib/libgij.la \
"$pkgdir"/usr/lib/libgcj.spec \
"$subpkgdir"/usr/lib/
}
@@ -297,21 +332,50 @@ libgcj() {
mkdir -p "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/java "$subpkgdir"/usr/share/
}
-
-md5sums="98be5094b5b5a7b9087494291bc7f522 gcc-core-4.5.3.tar.bz2
-2c78bf1d5f08a0b116f280de88d3ffe7 gcc-g++-4.5.3.tar.bz2
-9bb53e37e589515ba55979a19be9c036 gcc-objc-4.5.3.tar.bz2
-08e045fdbdc22ac9af3aec3b8d16dbab gcc-java-4.5.3.tar.bz2
-1f86fe5dc7d506b7fc04fcd8b7d2693c gcc-4.5.1-piepatches-v0.4.5.tar.bz2
+
+libgo() {
+ pkgdesc="Go runtime library for GCC"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
+}
+
+go() {
+ pkgdesc="Go support for GCC"
+ depends="libgo"
+ local libexec=usr/libexec/gcc/${CHOST:-$_chost}/$pkgver
+ mkdir -p "$subpkgdir"/$libexec \
+ "$subpkgdir"/usr/lib \
+ "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/ || return 1
+ mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/ || return 1
+ mv "$pkgdir"/$libexec/go1 "$subpkgdir"/$libexec/ || return 1
+ mv "$pkgdir"/usr/lib/libgo.a \
+ "$pkgdir"/usr/lib/libgo.so \
+ "$pkgdir"/usr/lib/libgobegin.a \
+ "$subpkgdir"/usr/lib/ || return 1
+}
+
+md5sums="0c0e7e35d2215e19de9c97efba507553 gcc-core-4.6.1.tar.bz2
+0d75ca7ca35b1e7f252223f9d23a6ad1 gcc-g++-4.6.1.tar.bz2
+cbf0d4b701827922cf37ba6a4ace0079 gcc-objc-4.6.1.tar.bz2
+32431ba42c1d18e64f2abfdfc834ef94 gcc-java-4.6.1.tar.bz2
+a69f9f156172c2e1da5590faa70f4fc7 gcc-go-4.6.1.tar.bz2
+5dc7efd84b526801b94fed21462aea62 gcc-4.6.1-piepatches-v0.4.5.tar.bz2
441c76504e1d97170117c294e65c7a72 gcc-4.4.3-specs-0.2.0.tar.bz2
d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar
-ab090760506eb70aa4436a349c6bd788 09_all_gcc-4.5-Wtrampolines.patch
-1c00bd9d12891a3e2311b32b98deb6fa 15_all_gcc-libgomp-no-werror.patch
-45951dd3bbc979c9e043c7203745cf31 51_all_gcc-3.4-libiberty-pic.patch
-c4045bfa85d8be780affd465be9d8ca8 gcc-spec-env.patch
+b1b5987e7c53f2c8a0fa929444bd9129 08_all_cross-compile.patch
+34e4a0260e9dbd434ac84b9dda381240 11_all_default-warn-format-security.patch
+a78022925c0ecb1f13384238b81adbe7 12_all_default-warn-trampolines.patch
+6862cb5268fef68a4a1906e0c4ea0d46 15_all_libgomp-Werror.patch
+1a8ce6b7a0b9a115e37fdda311704451 34_all_ia64_note.GNU-stack.patch
+d8692c56f04b92667096f59d843e95c5 51_all_libiberty-pic.patch
+656565d2e2c30ea12a398ef6959a9391 74_all_gcc46_cloog-dl.patch
+a695d7648509b4f8e18b389a19e6037c gcc-spec-env.patch
2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch
6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch
-7f35da0f88f4d9c3d3839498bbda0eb3 gcc-4.5-dynamic-linker.patch
-6c866c7fb8d56deb8f6d652bee64e228 PR32219.patch
+3be85df859fa1d5c875bbfcc2dee8288 gcc-4.6-dynamic-linker.patch
+32e8e4c0e23ed8f5de95a591cb30f1da gcc-4.6-pr32219.patch
2c6cb49bb9bfd8b6e690222e66ccc901 boehem-gc-uclibc.patch
-d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch"
+d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch
+c94014ece84407a36d239417a2bad25d gcc-go.patch
+978e3fac97ad99902a86bafc6f283727 gcc-libgcc-x86.get_pc_thunk.bx.patch"