summaryrefslogtreecommitdiff
path: root/core/gcc/PKGBUILD
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-12-27 23:55:53 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-12-27 23:55:53 +0000
commit65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 (patch)
treefbfdff322b28d9a3c37e6e31c94caf1d8e48dac1 /core/gcc/PKGBUILD
parentd53c44f055929b18d7d1b25f8367ee5836c435fc (diff)
Fri Dec 27 23:54:04 UTC 2013
Diffstat (limited to 'core/gcc/PKGBUILD')
-rw-r--r--core/gcc/PKGBUILD204
1 files changed, 115 insertions, 89 deletions
diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD
index 6ed0ff9e7..412cd95bd 100644
--- a/core/gcc/PKGBUILD
+++ b/core/gcc/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 197286 2013-10-25 01:09:21Z allan $
+# $Id: PKGBUILD 202694 2013-12-25 03:04:31Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
@@ -6,8 +6,9 @@
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
pkgver=4.8.2
-pkgrel=3
-#_snapshot=4.8-20130725
+_pkgver=4.8
+pkgrel=7
+_snapshot=4.8-20131219
pkgdesc="The GNU Compiler Collection"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL' 'custom')
@@ -15,11 +16,13 @@ url="http://gcc.gnu.org"
makedepends=('binutils>=2.23' 'libmpc' 'cloog' 'gcc-ada' 'doxygen')
checkdepends=('dejagnu' 'inetutils')
options=('!emptydirs')
-source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
- #ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
- gcc-4.8-filename-output.patch)
-md5sums=('a3d7d63b9cb6b6ea049469a0c4a43c9d'
- '40cb437805e2f7a006aa0d0c3098ab0f')
+source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
+ gcc-4.8-filename-output.patch
+ gcc-4.8-lambda-ICE.patch)
+md5sums=('666ef08f87649f941bc5512e13a88fdc'
+ '40cb437805e2f7a006aa0d0c3098ab0f'
+ '6eb6e080dbf7bc6825f53a0aaa6c4ef9')
if [ -n "${_snapshot}" ]; then
@@ -28,6 +31,8 @@ else
_basedir=gcc-${pkgver}
fi
+_libdir="usr/lib/gcc/$CHOST/$pkgver"
+
prepare() {
cd ${srcdir}/${_basedir}
@@ -44,6 +49,13 @@ prepare() {
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653
patch -p0 -i ${srcdir}/gcc-4.8-filename-output.patch
+
+ # http://gcc.gnu.org/bugzilla//show_bug.cgi?id=56710 - commit 3d1f8279
+ patch -p1 -i ${srcdir}/gcc-4.8-lambda-ICE.patch
+
+ # installing libiberty headers is broken
+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56780#c6
+ sed -i 's#@target_header_dir@#libiberty#' libiberty/Makefile.in
mkdir ${srcdir}/gcc-build
}
@@ -64,19 +76,17 @@ build() {
--enable-shared --enable-threads=posix \
--with-system-zlib --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-clocale=gnu \
- --disable-libstdcxx-pch \
+ --disable-libstdcxx-pch --disable-libssp \
--enable-gnu-unique-object --enable-linker-build-id \
--enable-cloog-backend=isl --disable-cloog-version-check \
- --enable-lto --enable-gold --enable-ld=default \
- --enable-plugin --with-plugin-ld=ld.gold \
- --with-linker-hash-style=gnu --disable-install-libiberty \
- --disable-multilib --disable-libssp --disable-werror \
+ --enable-lto --enable-plugin --enable-install-libiberty \
+ --with-linker-hash-style=gnu \
+ --disable-multilib --disable-werror \
--enable-checking=release
make
# make documentation
- cd $CHOST/libstdc++-v3
- make doc-man-doxygen
+ make -C $CHOST/libstdc++-v3/doc doc-man-doxygen
}
check() {
@@ -96,31 +106,38 @@ package_gcc-libs()
pkgdesc="Runtime libraries shipped by GCC"
groups=('base')
depends=('glibc>=2.17')
+ options=('!emptydirs')
install=gcc-libs.install
cd ${srcdir}/gcc-build
- make -j1 -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
- for lib in libmudflap libgomp libstdc++-v3/src libitm libsanitizer/asan; do
- make -j1 -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
+
+ make -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
+ rm ${pkgdir}/${_libdir}/libgcc_eh.a
+
+ for lib in libmudflap \
+ libgomp \
+ libitm \
+ libatomic \
+ libstdc++-v3/src \
+ libquadmath \
+ libgfortran \
+ libsanitizer/asan; do
+ make -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
done
[[ $CARCH == "x86_64" ]] && \
- make -j1 -C $CHOST/libsanitizer/tsan DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
-
- make -j1 -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
- make -j1 -C $CHOST/libgomp DESTDIR=${pkgdir} install-info
- make -j1 -C $CHOST/libitm DESTDIR=${pkgdir} install-info
+ make -C $CHOST/libsanitizer/tsan DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
- make -j1 DESTDIR=${pkgdir} install-target-libquadmath
- make -j1 DESTDIR=${pkgdir} install-target-libgfortran
- make -j1 DESTDIR=${pkgdir} install-target-libobjc
+ make -C $CHOST/libobjc DESTDIR=${pkgdir} install-libs
+
+ make -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
- # remove unnecessary files installed by install-target-{libquadmath,libgfortran,libobjc}
- rm -r ${pkgdir}/usr/lib/{gcc/,libgfortran.spec}
+ for lib in libgomp \
+ libitm \
+ libquadmath; do
+ make -C $CHOST/$lib DESTDIR=${pkgdir} install-info
+ done
- # remove static libraries
- find ${pkgdir} -name *.a -delete
-
# Install Runtime Library Exception
install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
${pkgdir}/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION
@@ -135,28 +152,45 @@ package_gcc()
install=gcc.install
cd ${srcdir}/gcc-build
+
+ make -C gcc DESTDIR=${pkgdir} install-driver install-cpp install-gcc-ar \
+ c++.install-common install-headers install-plugin install-lto-wrapper
+
+ install -m755 gcc/gcov $pkgdir/usr/bin/
+ install -m755 -t $pkgdir/${_libdir}/ gcc/{cc1,cc1plus,collect2,lto1}
+
+ make -C $CHOST/libgcc DESTDIR=${pkgdir} install
+ rm ${pkgdir}/usr/lib/libgcc_s.so*
- make -j1 DESTDIR=${pkgdir} install
+ make -C $CHOST/libstdc++-v3/src DESTDIR=${pkgdir} install
+ make -C $CHOST/libstdc++-v3/include DESTDIR=${pkgdir} install
+ make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR=${pkgdir} install
+ make -C $CHOST/libstdc++-v3/python DESTDIR=${pkgdir} install
install -d $pkgdir/usr/share/gdb/auto-load/usr/lib
- mv $pkgdir{,/usr/share/gdb/auto-load}/usr/lib/libstdc++.so.6.0.18-gdb.py
-
- # unfortunately it is much, much easier to install the lot and clean-up the mess...
- rm $pkgdir/usr/bin/{{$CHOST-,}gfortran,{$CHOST-,}gccgo,gnat*}
- rm $pkgdir/usr/lib/*.so*
- rm $pkgdir/usr/lib/lib{atomic,gfortran,go{,begin},iberty,objc}.a
- rm $pkgdir/usr/lib/libgfortran.spec
- rm -r $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{ada{include,lib},finclude,include/objc}
- rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1}
- rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{libcaf_single,libgfortranbegin}.a
- rm -r $pkgdir/usr/lib/go
- rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath,libitm}.info
- rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
- rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1
-
- # remove static libraries - note libstdc++.a is needed for the binutils and glibc testsuite
- rm $pkgdir/usr/lib/lib{asan,gomp,itm,mudflap{,th},quadmath}.a
- [[ $CARCH = "x86_64" ]] && rm $pkgdir/usr/lib/libtsan.a
+ mv $pkgdir/usr/lib/libstdc++.so.6.*-gdb.py \
+ $pkgdir/usr/share/gdb/auto-load/usr/lib/
+ rm ${pkgdir}/usr/lib/libstdc++.so*
+
+ make DESTDIR=${pkgdir} install-fixincludes
+ make -C gcc DESTDIR=${pkgdir} install-mkheaders
+ make -C lto-plugin DESTDIR=${pkgdir} install
+
+ make -C $CHOST/libgomp DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \
+ install-nodist_libsubincludeHEADERS
+ make -C $CHOST/libitm DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
+ make -C $CHOST/libmudflap DESTDIR=${pkgdir} install-nobase_libsubincludeHEADERS
+ make -C $CHOST/libquadmath DESTDIR=${pkgdir} install-nodist_libsubincludeHEADERS
+ make -C $CHOST/libsanitizer/asan DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
+
+ make -C libiberty DESTDIR=${pkgdir} install
+
+ make -C gcc DESTDIR=${pkgdir} install-man install-info
+ rm ${pkgdir}/usr/share/man/man1/{gccgo,gfortran}.1
+ rm ${pkgdir}/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn}.info
+
+ make -C libcpp DESTDIR=${pkgdir} install
+ make -C gcc DESTDIR=${pkgdir} install-po
# many packages expect this symlinks
ln -s gcc ${pkgdir}/usr/bin/cc
@@ -191,13 +225,11 @@ EOF
chmod 755 $pkgdir/usr/bin/c{8,9}9
# install the libstdc++ man pages
- install -dm755 ${pkgdir}/usr/share/man/man3
- install -m644 -t ${pkgdir}/usr/share/man/man3 \
- ${CHOST}/libstdc++-v3/doc/doxygen/man/man3/*.3
+ make -C $CHOST/libstdc++-v3/doc DESTDIR=$pkgdir doc-install-man
# Install Runtime Library Exception
- install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
- ${pkgdir}/usr/share/licenses/gcc/RUNTIME.LIBRARY.EXCEPTION
+ install -d ${pkgdir}/usr/share/licenses/gcc/
+ ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc/
}
package_gcc-fortran()
@@ -208,24 +240,16 @@ package_gcc-fortran()
install=gcc-fortran.install
cd ${srcdir}/gcc-build
- make -j1 DESTDIR=$pkgdir install-target-libgfortran
- make -j1 -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
- make -j1 -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
- install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/f951
+ make -C $CHOST/libgfortran DESTDIR=$pkgdir install-{{caf,my}execlibLTLIBRARIES,toolexeclibDATA}
+ make -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
+ make -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
+ install -Dm755 gcc/f951 $pkgdir/${_libdir}/f951
ln -s gfortran ${pkgdir}/usr/bin/f95
- # remove files included in gcc-libs or gcc and unnneeded static lib
- rm ${pkgdir}/usr/lib/lib{gfortran,gcc_s}.so*
- rm ${pkgdir}/usr/lib/libquadmath.{a,so*}
- rm ${pkgdir}/usr/lib/gcc/$CHOST/${pkgver}/{*.o,libgc*}
- rm ${pkgdir}/usr/share/info/libquadmath.info
- rm -r ${pkgdir}/usr/lib/gcc/$CHOST/${pkgver}/include
- rm ${pkgdir}/usr/lib/libgfortran.a
-
# Install Runtime Library Exception
- install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
- ${pkgdir}/usr/share/licenses/gcc-fortran/RUNTIME.LIBRARY.EXCEPTION
+ install -d ${pkgdir}/usr/share/licenses/gcc-fortran/
+ ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-fortran/
}
package_gcc-objc()
@@ -234,18 +258,13 @@ package_gcc-objc()
depends=("gcc=$pkgver-$pkgrel")
cd ${srcdir}/gcc-build
- make -j1 DESTDIR=$pkgdir install-target-libobjc
- install -dm755 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
- install -m755 gcc/cc1obj{,plus} $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
-
- # remove files included in gcc-libs or gcc
- rm ${pkgdir}/usr/lib/lib{gcc_s,objc}.so*
- rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{*.o,lib*}
- rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/unwind.h
+ make DESTDIR=$pkgdir -C $CHOST/libobjc install-headers
+ install -dm755 $pkgdir/${_libdir}
+ install -m755 gcc/cc1obj{,plus} $pkgdir/${_libdir}/
# Install Runtime Library Exception
- install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
- ${pkgdir}/usr/share/licenses/gcc-objc/RUNTIME.LIBRARY.EXCEPTION
+ install -d ${pkgdir}/usr/share/licenses/gcc-objc/
+ ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-objc/
}
package_gcc-ada()
@@ -256,14 +275,20 @@ package_gcc-ada()
install=gcc-ada.install
cd ${srcdir}/gcc-build/gcc
- make -j1 DESTDIR=$pkgdir ada.install-{common,info}
- install -m755 gnat1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver
+ make DESTDIR=$pkgdir ada.install-{common,info}
+ install -m755 gnat1 $pkgdir/${_libdir}
ln -s gcc ${pkgdir}/usr/bin/gnatgcc
+ # insist on dynamic linking
+ mv ${pkgdir}/${_libdir}/adalib/libgna{rl,t}-${_pkgver}.so ${pkgdir}/usr/lib
+ ln -s libgnarl-${_pkgver}.so ${pkgdir}/usr/lib/libgnarl.so
+ ln -s libgnat-${_pkgver}.so ${pkgdir}/usr/lib/libgnat.so
+ rm ${pkgdir}/${_libdir}/adalib/libgna{rl,t}.*
+
# Install Runtime Library Exception
- install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
- ${pkgdir}/usr/share/licenses/gcc-ada/RUNTIME.LIBRARY.EXCEPTION
+ install -d ${pkgdir}/usr/share/licenses/gcc-ada/
+ ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-ada/
}
package_gcc-go()
@@ -274,12 +299,13 @@ package_gcc-go()
install=gcc-go.install
cd ${srcdir}/gcc-build
- make -j1 DESTDIR=$pkgdir install-target-libgo
- make -j1 -C gcc DESTDIR=$pkgdir go.install-{common,man,info}
- install -Dm755 gcc/go1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/go1
- rm $pkgdir/usr/lib/lib{atomic,go}.a
+ make -C $CHOST/libgo DESTDIR=$pkgdir install-exec-am
+ make -C gcc DESTDIR=$pkgdir go.install-{common,man,info}
+ install -Dm755 gcc/go1 $pkgdir/${_libdir}/go1
+
+ rm $pkgdir/usr/lib/libgo.a
# Install Runtime Library Exception
- install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
- ${pkgdir}/usr/share/licenses/gcc-go/RUNTIME.LIBRARY.EXCEPTION
+ install -d ${pkgdir}/usr/share/licenses/gcc-go/
+ ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-go/
}