diff options
Diffstat (limited to 'main/gcc/APKBUILD')
-rw-r--r-- | main/gcc/APKBUILD | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index 5dc287321..e4d64eca1 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -5,8 +5,16 @@ _pv=4.4.2 _specsver=0.1.7 _espfver=0.3.6 _uclibc_abiver=0.9.32 - -pkgrel=4 +if [ "$ALPINE_LIBC" = "eglibc" ]; then + _chost="i686-pc-linux-gnu" + _with_arch="i686" +else + _chost="i486-alpine-linux-uclibc" + _dynamic_linker="--with-dynamic-linker=ld-uClibc.so.$_uclibc_abiver" + _with_arch="i486" +fi + +pkgrel=5 pkgdesc="The GNU Compiler Collection" url="http://gcc.gnu.org" license="GPL LGPL" @@ -16,8 +24,8 @@ subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp objc" 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 - http://weaver.gentooenterprise.com/hardened/patches/gcc-$_pv-espf-$_espfver.tar.bz2 - http://weaver.gentooenterprise.com/hardened/patches/gcc-$_pv-specs-$_specsver.tar.bz2 + http://build.alpinelinux.org:8010/distfiles/gcc-$_pv-espf-$_espfver.tar.bz2 + http://build.alpinelinux.org:8010/distfiles/gcc-$_pv-specs-$_specsver.tar.bz2 gcc-spec-env.patch pt_gnu_eh_frame.patch uclibc-getipinfo.patch @@ -50,7 +58,9 @@ build () ../configure --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ - --build=${CHOST:-i486-alpine-linux-uclibc} \ + --build=${CHOST:-$_chost} \ + --host=${CHOST:-$_chost} \ + --target=${CHOST:-$_chost} \ --disable-altivec \ --disable-checking \ --disable-fixed-point \ @@ -68,10 +78,12 @@ build () --enable-tls \ --enable-threads \ --with-arch=i486 \ - --with-dynamic-linker=ld-uClibc.so.$_uclibc_abiver \ + $_with_arch \ + $_dynamic_linker \ --with-dynamic-linker-prefix=/lib \ --with-system-zlib \ - --without-system-libunwind + --without-system-libunwind + make || return 1 } @@ -102,7 +114,7 @@ libcxx() { gpp() { pkgdesc="GNU C++ standard library and compiler" depends="libstdc++" - local libexec=usr/libexec/gcc/${CHOST:-i486-alpine-linux-uclibc}/$pkgver + local libexec=usr/libexec/gcc/${CHOST:-$_chost}/$pkgver mkdir -p "$subpkgdir/$libexec" \ "$subpkgdir"/usr/bin \ "$subpkgdir"/usr/include \ |