aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-08-30 09:18:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-08-30 09:18:54 +0000
commit81a0e21b890d05d0012d2c6a16e955bdca66da49 (patch)
treec2fb54e0bd26d051ce59dcc4e58d2cb34e529ff0 /main/gcc/APKBUILD
parent1ba0906ee38351701bf355f12b4e2ea0b36f34c2 (diff)
downloadaports-81a0e21b890d05d0012d2c6a16e955bdca66da49.tar.gz
aports-81a0e21b890d05d0012d2c6a16e955bdca66da49.tar.bz2
aports-81a0e21b890d05d0012d2c6a16e955bdca66da49.tar.xz
main/gcc: initial support for ada
For now we have ada off by default. To enable it you need a crosscompiled bootstrap ada in PATH (See http://dev.alpinelinux.org/~shafire/) and then LANG_ADA=true abuild -r
Diffstat (limited to 'main/gcc/APKBUILD')
-rw-r--r--main/gcc/APKBUILD76
1 files changed, 60 insertions, 16 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index 9275ad514c..105b4936ef 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -19,6 +19,14 @@ makedepends="bison flex gmp-dev mpfr-dev texinfo mpc1-dev gawk zlib-dev zip
subpackages="$pkgname-doc libgcc libgomp libstdc++:libcxx g++:gpp"
replaces="libstdc++"
+: ${LANG_OBJC:=true}
+: ${LANG_JAVA:=true}
+: ${LANG_GO:=true}
+: ${LANG_FORTRAN:=true}
+# to build ada you need a working bootstrap gnat in PATH
+# and then run: LANG_ADA=true abuild -r
+: ${LANG_ADA:=false}
+
if [ "$CBUILD" != "$CHOST" ]; then
# fixup flags. seems gcc treats CPPFLAGS as global without
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
@@ -33,30 +41,35 @@ if [ "$CBUILD" != "$CHOST" ]; then
export CXXFLAGS_FOR_BUILD=" "
export LDFLAGS_FOR_BUILD=" "
- LANG_OBJC=off
- LANG_JAVA=off
- LANG_GO=off
- LANG_FORTRAN=off
+ LANG_OBJC=false
+ LANG_JAVA=false
+ LANG_GO=false
+ LANG_FORTRAN=false
+ LANG_ADA=false
fi
_languages=c,c++
-if [ "$LANG_OBJC" != "off" ]; then
+if $LANG_OBJC; then
subpackages="$subpackages libobjc $pkgname-objc"
_languages="$_languages,objc"
fi
-if [ "$LANG_JAVA" != "off" ]; then
+if $LANG_JAVA; then
subpackages="$subpackages libgcj $pkgname-java"
makedepends="$makedepends paxctl"
_languages="$_languages,java"
fi
-if [ "$LANG_GO" != "off" ]; then
+if $LANG_GO; then
subpackages="$subpackages libgo $pkgname-go"
_languages="$_languages,go"
fi
-if [ "$LANG_FORTRAN" != "off" ]; then
+if $LANG_FORTRAN; then
subpackages="$subpackages libgfortran libquadmath gfortran"
_languages="$_languages,fortran"
fi
+if $LANG_ADA; then
+ subpackages="$subpackages libgnat $pkgname-gnat"
+ _languages="$_languages,ada"
+fi
source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
http://distfiles.gentoo.org/distfiles/gcc-$pkgver-piepatches-v${_piepatchver}.tar.bz2
@@ -84,6 +97,7 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
gcc-4.8-build-args.patch
fix-cxxflags-passing.patch
+ ada-no-pie.patch
"
# gcc-go.patch
@@ -119,7 +133,7 @@ prepare() {
;;
esac
done
-
+
if [ -n "$_err" ]; then
error "The following patches failed:"
for i in $_err; do
@@ -140,7 +154,7 @@ prepare() {
# see http://gcc.gnu.org/ml/java/2008-04/msg00027.html
mv "$srcdir"/ecj-latest.jar ecj.jar
-
+
echo ${pkgver} > gcc/BASE-VER
}
@@ -269,7 +283,7 @@ package() {
-o -name libjavamath.a \
| xargs rm -f \
|| return 1
-
+
# strip debug info from some statib libs
${CROSS_COMPILE}strip -g `find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \
-o -name libmudflap.a -o -name libmudflapth.a \
@@ -277,10 +291,11 @@ package() {
-o -name libitm.a -o -name libgo.a -o -name libcaf\*.a \
-o -name libatomic.a -o -name libasan.a -o -name libtsan.a \) \
-a -type f` || return 1
-
- [ "$LANG_JAVA" = "on" ] && \
+
+ if $LANG_JAVA; then
sed -i -e 's/lib: /&%{static:%eJava programs cannot be linked statically}/' \
"$pkdir"/usr/lib/libgcj.spec
+ fi
# remove ffi
rm -f "$pkgdir"/usr/lib/libffi* "$pkgdir"/usr/share/man/man3/ffi*
@@ -291,6 +306,14 @@ package() {
"$pkgdir"/usr/share/gdb/python/auto-load/usr/lib/
paxctl -c -pmrs "$pkgdir"/$_gcclibexec/cc1 || return 1
+
+ # move ada runtime libs
+ if $LANG_ADA; then
+ for i in "$pkgdir"/$_gcclibdir/adalib/libgna*.so; do
+ mv "$i" "$pkgdir"/usr/lib/ || return 1
+ ln -s ../../../../${i##*/} $i || return 1
+ done
+ fi
}
libcxx() {
@@ -464,6 +487,24 @@ gfortran() {
"$subpkgdir"/$_gcclibdir
}
+libgnat() {
+ pkgdesc="GNU Ada 95 runtime shared libraries"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
+}
+
+gnat() {
+ pkgdesc="Ada 95 support for GCC"
+ mkdir -p "$subpkgdir"/$_gcclibexec \
+ "$subpkgdir"/$_gcclibdir \
+ "$subpkgdir"/usr/bin \
+ || return 1
+ mv "$pkgdir"/$_gcclibexec/gnat* "$subpkgdir"/$_gcclibexec/ \
+ || return 1
+ mv "$pkgdir"/$_gcclibdir/ada* "$subpkgdir"/$_gcclibdir/ || return 1
+ mv "$pkgdir"/usr/bin/gnat* "$subpkgdir"/usr/bin/ || return 1
+}
+
md5sums="3b2386c114cd74185aa3754b58a79304 gcc-4.8.1.tar.bz2
f8ab875eee18868b319ad04dc19adcf6 gcc-4.8.1-piepatches-v0.5.6.tar.bz2
441c76504e1d97170117c294e65c7a72 gcc-4.4.3-specs-0.2.0.tar.bz2
@@ -486,7 +527,8 @@ ab83248e10b2bf4b3d9240de0fefb52b pt_gnu_eh_frame.patch
2c6cb49bb9bfd8b6e690222e66ccc901 boehem-gc-uclibc.patch
2e2b787bb988d9007c9f7ce42178dfe6 gcc-pure64.patch
0a2041bbf83648e6c4f6d3484f7249ca gcc-4.8-build-args.patch
-4aea37d334ab00bb6bba37cd8c481367 fix-cxxflags-passing.patch"
+4aea37d334ab00bb6bba37cd8c481367 fix-cxxflags-passing.patch
+ac802687c02ca78687c8e612277e566a ada-no-pie.patch"
sha256sums="545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813 gcc-4.8.1.tar.bz2
4aa0ab0f114b0ff8af5d0c19c18930e3fcd5e5b0956f56ca24e58e5a243964b1 gcc-4.8.1-piepatches-v0.5.6.tar.bz2
f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 gcc-4.4.3-specs-0.2.0.tar.bz2
@@ -509,7 +551,8 @@ f3863b997acf8fdf5ad1d3626b41a8a0670b896505e9b7afb517916c7599fb1c gcc-4.8-dynami
02751ccf223dcfc898c0ce2214cd0859d275e90b742f1a66e38db5c50f94b38c boehem-gc-uclibc.patch
f5473c6aea96d5137defd68898ba31042944a3f3ed26c05b964a40bd876c6f47 gcc-pure64.patch
bd7a6f514fcc457f29e5fda157203f3bcd013aeba5d53b3459196eef3ce752ab gcc-4.8-build-args.patch
-a395ba4cf047c48cac56985726fddf0948f4425c9f1a0c9ddba1812b2b3d8300 fix-cxxflags-passing.patch"
+a395ba4cf047c48cac56985726fddf0948f4425c9f1a0c9ddba1812b2b3d8300 fix-cxxflags-passing.patch
+a20f8ba10f6ee94c6af44752d9c43faf1c1ff3c631f18e3d85e2a7f2ca7f1e0d ada-no-pie.patch"
sha512sums="1becc874aad77a469069b6d9da4158aae9e013e24afa9364fe4feff9a5094d0673ee7694b3840e892c860f73a56b3ece6174338a8214438c42b9f86dd6c35ea7 gcc-4.8.1.tar.bz2
274e16ef5136348415898d4e5a3bc71763078de8ae7c18645e8b07f54d705609b08c0efadbdb55117fdfb5f6490529b446d09def448174c2747372829d029a9d gcc-4.8.1-piepatches-v0.5.6.tar.bz2
779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 gcc-4.4.3-specs-0.2.0.tar.bz2
@@ -532,4 +575,5 @@ db84b6582950378116723116be4f277881f7bdd05add216c58c2b86c0fb3a70abeb7798507a74a64
e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehem-gc-uclibc.patch
4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch
abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
-35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch"
+35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
+f00e0d57154fd7c0e121fa862b85b86943874edab8bc10e27a8b2bf363e55ea8690c091d8a07695493721a0185d52723e9f02279f7e618ece655e29b4e52b930 ada-no-pie.patch"