summaryrefslogtreecommitdiff
path: root/cross/cross-gcc/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'cross/cross-gcc/PKGBUILD')
-rw-r--r--cross/cross-gcc/PKGBUILD91
1 files changed, 44 insertions, 47 deletions
diff --git a/cross/cross-gcc/PKGBUILD b/cross/cross-gcc/PKGBUILD
index 051cd64b3..3b9e5c4d3 100644
--- a/cross/cross-gcc/PKGBUILD
+++ b/cross/cross-gcc/PKGBUILD
@@ -1,5 +1,5 @@
-# Maintainer (Arch): Allan McRae <allan@archlinux.org>
# Maintainer: Márcio Silva (Parabola) <coadde@parabola.nu>
+# Maintainer (Arch): Allan McRae <allan@archlinux.org>
# toolchain build order: {kernel}-api-headers->glibc->binutils->gcc->binutils->glibc
@@ -122,30 +122,29 @@ fi
_pkgname=gcc
pkgname=$_target-$_pkgname
-pkgver=4.9.2
-_pkgver=4.9
-_islver=0.12.2
-_cloogver=0.18.1
-pkgrel=1
-#_snapshot=4.9-20140903
+pkgver=5.1.0
+_pkgver=5
+_islver=0.14.1
+pkgrel=4
+_snapshot=5-20150519
pkgdesc="The GNU Compiler Collection"
-arch=('i686' 'x86_64' 'mips64el')
+arch=('i686' 'x86_64' 'armv7h' 'aarch64' 'mips64el')
license=('GPL' 'LGPL' 'FDL' 'custom')
url="http://$_pkgname.gnu.org"
-makedepends=('binutils>=2.24' 'libmpc' 'doxygen')
+makedepends=('binutils>=2.25' 'libmpc' 'doxygen')
checkdepends=('dejagnu' 'inetutils')
options=('!emptydirs')
-source=(ftp://$_pkgname.gnu.org/pub/$_pkgname/releases/$_pkgname-${pkgver}/$_pkgname-${pkgver}.tar.bz2
- #ftp://$_pkgname.gnu.org/pub/$_pkgname/snapshots/${_snapshot}/$_pkgname-${_snapshot}.tar.bz2
+source=(#ftp://$_pkgname.gnu.org/pub/$_pkgname/releases/$_pkgname-${pkgver}/$_pkgname-${pkgver}.tar.bz2
+ ftp://$_pkgname.gnu.org/pub/$_pkgname/snapshots/${_snapshot}/$_pkgname-${_snapshot}.tar.bz2
http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
- http://www.bastoul.net/cloog/pages/download/cloog-${_cloogver}.tar.gz
- $_pkgname-4.8-filename-output.patch
+ pr65882.patch
+ pr66035.patch
$_pkgname-xtensa.patch::https://raw.githubusercontent.com/qca/open-ath9k-htc-firmware/1.3.2/local/patches/$_pkgname.patch
mips-kfreebsd-gnu.patch)
-md5sums=('4df8ee253b7f3863ad0b86359cd39c43'
- 'e039bfcfb6c2ab039b8ee69bf883e824'
- 'e34fca0540d840e5d0f6427e98c92252'
- '6810bb9b2252f03e6c98d9a671d94589'
+md5sums=('84f261b2f23e154ec6d9bd4149851a21'
+ '118d1a379abf7606a3334c98a8411c79'
+ '9a9cc98e916fd37c7b3dad50f29d2f48'
+ '5b980076cd5fcbc3aff6014f306282dd'
'81372ee980289a9f6df01dad31c64a63'
'43282cddb2080b1180f7b76d3a8a832c')
@@ -160,9 +159,8 @@ _libdir="usr/lib/$_pkgname/$_target/$pkgver"
prepare() {
cd ${srcdir}/${_basedir}
- # link isl/cloog for in-tree builds
+ # link isl for in-tree build
ln -s ../isl-${_islver} isl
- ln -s ../cloog-${_cloogver} cloog
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' $_pkgname/Makefile.in
@@ -175,9 +173,11 @@ prepare() {
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,$_pkgname}/configure
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653
- # https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=9140d56f
- patch -p1 -i ${srcdir}/$_pkgname-4.8-filename-output.patch
+ # https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01558.html
+ patch -p1 -i ${srcdir}/pr65882.patch
+
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66035
+ patch -p1 -i ${srcdir}/pr66035.patch
# open-ath9k-htc-firmware patch on xtensa-unknown-elf
[[ $_target == xtensa-unknown-elf ]] && patch -p1 -i ${srcdir}/$_pkgname-xtensa.patch
@@ -199,29 +199,28 @@ build() {
${srcdir}/${_basedir}/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
- --mandir=/usr/share/man --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
--with-bugurl=https://labs.parabola.nu/ \
- --enable-languages=c,c++,lto --disable-static \
- --enable-shared --enable-threads=posix \
- --with-system-zlib --enable-__cxa_atexit \
+ --enable-languages=c,c++,lto \
+ --enable-shared --enable-threads=posix --enable-libmpx \
+ --with-system-zlib --with-isl --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-clocale=gnu \
--disable-libstdcxx-pch --disable-libssp \
--enable-gnu-unique-object --enable-linker-build-id \
- --enable-cloog-backend=isl \
--enable-lto --enable-plugin --enable-install-libiberty \
- --with-linker-hash-style=gnu \
+ --with-linker-hash-style=gnu --enable-gnu-indirect-function \
--disable-multilib --disable-werror \
- --enable-checking=release --target=$_target --program-prefix=$_target-
+ --enable-checking=release \
+ --with-default-libstdcxx-abi=c++98 --disable-nls \
+ --target=$_target
make all-$_pkgname
}
package() {
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
- depends=("$_target-binutils>=2.24" 'libmpc')
+ depends=("$_target-binutils>=2.25" 'libmpc')
groups=('cross-devel')
options=('staticlibs')
- provides=("$_pkgname=$pkgver")
- conflicts=("$_pkgname" "$_pkgname-ada" "$_pkgname-fortran" "$_pkgname-go" "$_pkgname-objc")
install=$_pkgname.install
cd ${srcdir}/$_pkgname-build
@@ -229,27 +228,23 @@ package() {
make -C $_pkgname DESTDIR=${pkgdir} install-driver install-cpp install-$_pkgname-ar \
c++.install-common install-headers install-plugin install-lto-wrapper
- install -m755 $_pkgname/gcov $pkgdir/usr/bin/
+ install -m755 $_pkgname/gcov $pkgdir/usr/bin/$_target-gcov
install -m755 -t $pkgdir/${_libdir}/ $_pkgname/{cc1,cc1plus,collect2,lto1}
make DESTDIR=${pkgdir} install-fixincludes
make -C $_pkgname DESTDIR=${pkgdir} install-mkheaders
make -C lto-plugin DESTDIR=${pkgdir} install
- make -C libiberty DESTDIR=${pkgdir} install
- # install PIC version of libiberty
- install -m644 ${srcdir}/$_pkgname-build/libiberty/pic/libiberty.a ${pkgdir}/usr/lib
-
- make -C $_pkgname DESTDIR=${pkgdir} install-man install-info
+ make -C $_pkgname DESTDIR=${pkgdir} install-man
make -C libcpp DESTDIR=${pkgdir} install
make -C $_pkgname DESTDIR=${pkgdir} install-po
# many packages expect this symlink
- ln -s $_pkgname ${pkgdir}/usr/bin/cc
+ ln -s $_target-$_pkgname ${pkgdir}/usr/bin/$_target-cc
# POSIX conformance launcher scripts for c89 and c99
- cat > $pkgdir/usr/bin/c89 <<"EOF"
+ cat > $pkgdir/usr/bin/$_target-c89 <<"EOF"
#!/bin/sh
fl="-std=c89"
for opt; do
@@ -261,8 +256,9 @@ for opt; do
done
exec gcc $fl ${1+"$@"}
EOF
+sed -i "s|exec gcc|exec $_target-gcc|" $pkgdir/usr/bin/$_target-c89
- cat > $pkgdir/usr/bin/c99 <<"EOF"
+ cat > $pkgdir/usr/bin/$_target-c99 <<"EOF"
#!/bin/sh
fl="-std=c99"
for opt; do
@@ -274,12 +270,13 @@ for opt; do
done
exec gcc $fl ${1+"$@"}
EOF
+sed -i "s|exec gcc|exec $_target-gcc|" $pkgdir/usr/bin/$_target-c99
+
+ chmod 755 $pkgdir/usr/bin/$_target-c{8,9}9
- chmod 755 $pkgdir/usr/bin/c{8,9}9
+ # Remove man documents that conflict with host version
+ rm -rf ${pkgdir}/usr/share/man/man7
- # link files
- for bin2 in c++ cpp g++ gcc gcc-ar gcc-nm gcc-ranlib; do
- ln -s $_target-$bin2 $pkgdir/usr/bin/$bin2; done
- for man in $(ls -1 $pkgdir/usr/share/man/man1); do
- ln -s $man $pkgdir/usr/share/man/man1/${man#$_target-}; done
+ # Remove unused dirs
+ rmdir ${pkgdir}/usr/{include,share/info}
}