summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2016-06-12 04:11:07 -0400
committerChris Severance2016-06-12 04:11:07 -0400
commit441c8261bd81570463694d4b1db7fabb03793158 (patch)
treec9df3a185ac4dc2244926a252a2f2c3ae3d617c5
parent9a75480c828ee24913200746dc35340211a2f214 (diff)
downloadaur-441c8261bd81570463694d4b1db7fabb03793158.tar.gz
Update to secondary compiler
-rw-r--r--.SRCINFO63
-rw-r--r--PKGBUILD413
-rw-r--r--gcc-4.9-fix-build-with-gcc-6.patch126
-rw-r--r--gcc49-fortran.install16
-rw-r--r--gcc49-go.install20
-rw-r--r--gcc49-libs.install16
-rw-r--r--gcc49.install20
7 files changed, 255 insertions, 419 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 318eceaf11d5..c2c7cf52c259 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Sun Jun 12 08:10:09 UTC 2016
pkgbase = gcc49-multilib
- pkgdesc = The GNU Compiler Collection for multilib
+ pkgdesc = The GNU Compiler Collection for multilib (4.9.x)
pkgver = 4.9.3
- pkgrel = 2
+ pkgrel = 3
url = http://gcc.gnu.org
arch = x86_64
license = GPL
@@ -14,60 +16,17 @@ pkgbase = gcc49-multilib
makedepends = libmpc
makedepends = doxygen
makedepends = lib32-glibc>=2.20
+ provides = gcc49
+ conflicts = gcc49
options = !emptydirs
source = ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2
source = http://isl.gforge.inria.fr/isl-0.12.2.tar.bz2
source = http://www.bastoul.net/cloog/pages/download/cloog-0.18.1.tar.gz
- md5sums = 6f831b4d251872736e8e9cc09746f327
- md5sums = e039bfcfb6c2ab039b8ee69bf883e824
- md5sums = e34fca0540d840e5d0f6427e98c92252
+ source = gcc-4.9-fix-build-with-gcc-6.patch
+ sha256sums = 2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e
+ sha256sums = f4b3dbee9712850006e44f0db2103441ab3d13b406f77996d1df19ee89d11fb4
+ sha256sums = 02500a4edd14875f94fe84cbeda4290425cb0c1c2474c6f75d75a303d64b4196
+ sha256sums = d775a053fad367f5490111038fde7c875b4e842919d2d197f95b915e1ae562a9
pkgname = gcc49-multilib
- pkgdesc = The GNU Compiler Collection - C and C++ frontends for multilib
- install = gcc49.install
- groups = multilib-devel
- depends = gcc-libs-multilib=4.9.3-2
- depends = binutils>=2.25
- depends = libmpc
- provides = gcc=4.9.3-2
- conflicts = gcc
- options = staticlibs
-
-pkgname = gcc49-libs-multilib
- pkgdesc = Runtime libraries shipped by GCC for multilib
- install = gcc49-libs.install
- depends = glibc>=2.20
- depends = lib32-gcc-libs=4.9.3-2
- provides = gcc-libs=4.9.3-2
- conflicts = gcc-libs
- options = !emptydirs
- options = !strip
-
-pkgname = lib32-gcc49-libs
- pkgdesc = Runtime libraries shipped by GCC (32-bit)
- depends = lib32-glibc>=2.20
- options = !emptydirs
- options = !strip
-
-pkgname = gcc49-fortran-multilib
- pkgdesc = Fortran front-end for GCC for multilib
- install = gcc49-fortran.install
- depends = gcc-multilib=4.9.3-2
- provides = gcc-fortran=4.9.3-2
- conflicts = gcc-fortran
- options = !emptydirs
-
-pkgname = gcc49-objc-multilib
- pkgdesc = Objective-C front-end for GCC for multilib
- depends = gcc-multilib=4.9.3-2
- provides = gcc-objc=4.9.3-2
- conflicts = gcc-objc
-
-pkgname = gcc49-go-multilib
- pkgdesc = Go front-end for GCC for multilib
- install = gcc49-go.install
- depends = gcc-multilib=4.9.3-2
- provides = gcc-go=4.9.3-2
- conflicts = gcc-go
- options = !emptydirs
diff --git a/PKGBUILD b/PKGBUILD
index 95eab63a955f..da68ad5bcab5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,346 +1,169 @@
# $Id$
-# Maintainer: Yurii Kolesnykov (yurikooles) <yurikoles@gmail.com>
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
+# Contributor: Felix Schindler <felix at schindlerfaimly dot de>
+# Contributor: Ruben Van Boxem <vanboxem.ruben@gmail.com>
+# Contributor: Yurii Kolesnykov (yurikooles) <yurikoles@gmail.com>
+# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
-pkgname=('gcc49-multilib' 'gcc49-libs-multilib' 'lib32-gcc49-libs' 'gcc49-fortran-multilib' 'gcc49-objc-multilib' 'gcc49-go-multilib')
-pkgver=4.9.3
-_pkgver=4.9
-_islver=0.12.2
-_cloogver=0.18.1
-pkgrel=2
+pkgname='gcc49-multilib'
+_pkgver='4.9'
+_pkgver_minor='3'
+pkgver="${_pkgver}.${_pkgver_minor}"
+_islver='0.12.2'
+_cloogver='0.18.1'
+pkgrel='3'
#_snapshot=4.9-20150304
-pkgdesc="The GNU Compiler Collection for multilib"
+pkgdesc="The GNU Compiler Collection for multilib (${_pkgver}.x)"
arch=('x86_64')
-license=('GPL' 'LGPL' 'FDL' 'custom')
url="http://gcc.gnu.org"
-makedepends=('binutils>=2.25' 'libmpc' 'doxygen'
- 'lib32-glibc>=2.20')
+license=('GPL' 'LGPL' 'FDL' 'custom')
+makedepends=('binutils>=2.25' 'libmpc' 'doxygen')
+makedepends+=('lib32-glibc>=2.20')
checkdepends=('dejagnu' 'inetutils')
+provides=('gcc49')
+conflicts=('gcc49')
options=('!emptydirs')
-source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
+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
- http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
- http://www.bastoul.net/cloog/pages/download/cloog-${_cloogver}.tar.gz)
-md5sums=('6f831b4d251872736e8e9cc09746f327'
- 'e039bfcfb6c2ab039b8ee69bf883e824'
- 'e34fca0540d840e5d0f6427e98c92252')
-
-if [ -n "${_snapshot}" ]; then
- _basedir=gcc-${_snapshot}
+ "http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2"
+ "http://www.bastoul.net/cloog/pages/download/cloog-${_cloogver}.tar.gz"
+ "gcc-4.9-fix-build-with-gcc-6.patch")
+sha256sums=('2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e'
+ 'f4b3dbee9712850006e44f0db2103441ab3d13b406f77996d1df19ee89d11fb4'
+ '02500a4edd14875f94fe84cbeda4290425cb0c1c2474c6f75d75a303d64b4196'
+ 'd775a053fad367f5490111038fde7c875b4e842919d2d197f95b915e1ae562a9')
+PKGEXT='.pkg.tar.gz'
+
+if [ -n "${_snapshot:-}" ]; then
+ _basedir="gcc-${_snapshot}"
else
- _basedir=gcc-${pkgver}
+ _basedir="gcc-${pkgver}"
fi
-_libdir="usr/lib/gcc/$CHOST/$pkgver"
+#_libdir="usr/lib/gcc/${CHOST}/${pkgver}"
prepare() {
- cd ${srcdir}/${_basedir}
+ cd "${_basedir}"
# link isl/cloog for in-tree builds
- ln -s ../isl-${_islver} isl
- ln -s ../cloog-${_cloogver} cloog
+ ln -s "../isl-${_islver}" 'isl'
+ ln -s "../cloog-${_cloogver}" 'cloog'
# Do not run fixincludes
- sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+ sed -i -e 's@\./fixinc\.sh@-c true@' 'gcc/Makefile.in'
+
+ # fix build with GCC 6
+ patch -p1 < "${srcdir}/gcc-4.9-fix-build-with-gcc-6.patch"
# Arch Linux installs x86_64 libraries /lib
- [[ $CARCH == "x86_64" ]] && sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
+ case "${CARCH}" in
+ 'x86_64') sed -i -e '/m64=/s/lib64/lib/' 'gcc/config/i386/t-linux64' ;;
+ esac
- echo ${pkgver} > gcc/BASE-VER
+ echo "${pkgver}" > 'gcc/BASE-VER'
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
- sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+ sed -i -e '/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/' {libiberty,gcc}/configure
- mkdir ${srcdir}/gcc-build
-}
+ mkdir "${srcdir}/gcc-build"
-build() {
- cd ${srcdir}/gcc-build
+ # build
+ cd "${srcdir}/gcc-build"
+
+ # Doesn't like FORTIFY_SOURCE
+ export CPPFLAGS="${CPPFLAGS//-D_FORTIFY_SOURCE=?/}"
+
+ # Doesn't like -fstack-protector-strong
+ export CFLAGS="${CFLAGS//-fstack-protector-strong/-fstack-protector}"
+ export CXXFLAGS="${CXXFLAGS//-fstack-protector-strong/-fstack-protector}"
# using -pipe causes spurious test-suite failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
- CFLAGS=${CFLAGS/-pipe/}
- CXXFLAGS=${CXXFLAGS/-pipe/}
+ export CFLAGS="${CFLAGS/-pipe/}"
+ export CXXFLAGS="${CXXFLAGS/-pipe/}"
+
+ # The following options are one per line, sorted so they are easy to diff compare to other gcc packages.
+ "${srcdir}/${_basedir}/configure" \
+ --build="${CHOST}" \
+ --disable-libssp \
+ --disable-libstdcxx-pch \
+ --disable-libunwind-exceptions \
+ --disable-werror \
+ --enable-__cxa_atexit \
+ --enable-checking=release \
+ --enable-clocale='gnu' \
+ --enable-cloog-backend='isl' \
+ --enable-gnu-unique-object \
+ --enable-install-libiberty \
+ --enable-languages='c,c++,fortran,go,lto,objc,obj-c++' \
+ --enable-linker-build-id \
+ --enable-lto \
+ --enable-multilib \
+ --enable-plugin \
+ --enable-shared \
+ --enable-threads='posix' \
+ --enable-version-specific-runtime-libs \
+ --infodir='/usr/share/info' \
+ --libdir='/usr/lib' \
+ --libexecdir='/usr/lib' \
+ --mandir='/usr/share/man' \
+ --prefix='/usr' \
+ --program-suffix="-${_pkgver}" \
+ --with-bugurl='https://bugs.archlinux.org/' \
+ --with-linker-hash-style='gnu' \
+ --with-system-zlib
+# CXX='g++-4.9' CC='gcc-4.9'
+
+# gcc-5.0 changes
+# --with-default-libstdcxx-abi=c++98 - before gcc-5.0 c++ rebuild
+# --enable-gnu-indirect-function
+# --with-isl - cloog no longer needed
+
+}
+
+build() {
+ cd "${srcdir}/gcc-build"
+
+ export LD_PRELOAD='/usr/lib/libstdc++.so'
+ local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
+ make -s -j "${_nproc}"
- ${srcdir}/${_basedir}/configure --prefix=/usr \
- --libdir=/usr/lib --libexecdir=/usr/lib \
- --mandir=/usr/share/man --infodir=/usr/share/info \
- --with-bugurl=https://bugs.archlinux.org/ \
- --enable-languages=c,c++,fortran,go,lto,objc,obj-c++ \
- --enable-shared --enable-threads=posix \
- --with-system-zlib --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 \
- --enable-multilib --disable-werror \
- --enable-checking=release
- make
-
# make documentation
- make -C $CHOST/libstdc++-v3/doc doc-man-doxygen
+ make -s -j1 -C "${CHOST}/libstdc++-v3/doc" 'doc-man-doxygen'
}
-check() {
- cd ${srcdir}/gcc-build
+_fn_check() {
+ cd "${srcdir}/gcc-build"
# increase stack size to prevent test failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827
ulimit -s 32768
# do not abort on error as some are "expected"
- make -k check || true
- ${srcdir}/${_basedir}/contrib/test_summary
-}
-
-package_lib32-gcc49-libs()
-{
- pkgdesc="Runtime libraries shipped by GCC (32-bit)"
- depends=('lib32-glibc>=2.20')
- options=('!emptydirs' '!strip')
-
- cd ${srcdir}/gcc-build
-
- make -C $CHOST/32/libgcc DESTDIR=${pkgdir} install-shared
- rm ${pkgdir}/${_libdir}/32/libgcc_eh.a
-
- for lib in libatomic \
- libcilkrts \
- libgfortran \
- libgomp \
- libitm \
- libquadmath \
- libsanitizer/{a,l,ub}san \
- libstdc++-v3/src \
- libvtv; do
- make -C $CHOST/32/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
- done
-
- make -C $CHOST/32/libobjc DESTDIR=${pkgdir} install-libs
-
- # remove stuff in gcc-libs-multilib
- rm -r ${pkgdir}/usr/lib
-
- # Install Runtime Library Exception
- install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
- ${pkgdir}/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION
-}
-
-package_gcc49-libs-multilib()
-{
- pkgdesc="Runtime libraries shipped by GCC for multilib"
- depends=('glibc>=2.20' "lib32-gcc-libs=$pkgver-$pkgrel")
- provides=("gcc-libs=$pkgver-$pkgrel")
- conflicts=('gcc-libs')
- options=('!emptydirs' '!strip')
- install=gcc49-libs.install
-
- cd ${srcdir}/gcc-build
-
- make -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
- rm ${pkgdir}/${_libdir}/libgcc_eh.a
-
- for lib in libatomic \
- libcilkrts \
- libgfortran \
- libgomp \
- libitm \
- libquadmath \
- libsanitizer/{a,l,ub}san \
- libstdc++-v3/src \
- libvtv; do
- make -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
- done
-
- [[ $CARCH == "x86_64" ]] && \
- make -C $CHOST/libsanitizer/tsan DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
-
- make -C $CHOST/libobjc DESTDIR=${pkgdir} install-libs
-
- make -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
-
- for lib in libgomp \
- libitm \
- libquadmath; do
- make -C $CHOST/$lib DESTDIR=${pkgdir} install-info
- done
-
- # remove stuff in lib32-gcc-libs
- rm -r ${pkgdir}/usr/lib32
-
- # Install Runtime Library Exception
- install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
- ${pkgdir}/usr/share/licenses/gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION
+ make -k check || :
+ "${srcdir}/${_basedir}/contrib/test_summary"
}
-package_gcc49-multilib()
+package()
{
- pkgdesc="The GNU Compiler Collection - C and C++ frontends for multilib"
- depends=("gcc-libs-multilib=$pkgver-$pkgrel" 'binutils>=2.25' 'libmpc')
- groups=('multilib-devel')
- options=('staticlibs')
- provides=("gcc=$pkgver-$pkgrel")
- conflicts=('gcc')
- install=gcc49.install
+ cd "${srcdir}/gcc-build"
- cd ${srcdir}/gcc-build
+ make -s -j1 DESTDIR="${pkgdir}" install
- make -C gcc DESTDIR=${pkgdir} install-driver install-cpp install-gcc-ar \
- c++.install-common install-headers install-plugin install-lto-wrapper
+ ## Lazy way of dealing with conflicting man and info pages and locales...
+ rm -rf "${pkgdir}/usr"/{share,include}/
+ find "${pkgdir}/" -name '*iberty*' | xargs rm
- install -m755 gcc/gcov $pkgdir/usr/bin/
- install -m755 -t $pkgdir/${_libdir}/ gcc/{cc1,cc1plus,collect2,lto1}
-
- make -C $CHOST/libgcc DESTDIR=${pkgdir} install
- make -C $CHOST/32/libgcc DESTDIR=${pkgdir} install
- rm ${pkgdir}/usr/lib{,32}/libgcc_s.so*
-
- 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
- make -C $CHOST/32/libstdc++-v3/src DESTDIR=${pkgdir} install
- make -C $CHOST/32/libstdc++-v3/include DESTDIR=${pkgdir} install
- make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR=${pkgdir} install
-
- install -d $pkgdir/usr/share/gdb/auto-load/usr/lib
- mv $pkgdir/usr/lib/libstdc++.so.6.*-gdb.py \
- $pkgdir/usr/share/gdb/auto-load/usr/lib/
- rm ${pkgdir}/usr/lib{,32}/libstdc++.so*
-
- make DESTDIR=${pkgdir} install-fixincludes
- make -C gcc DESTDIR=${pkgdir} install-mkheaders
- make -C lto-plugin DESTDIR=${pkgdir} install
-
- make -C $CHOST/libcilkrts DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \
- install-nodist_cilkincludeHEADERS
- make -C $CHOST/libgomp DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \
- install-nodist_libsubincludeHEADERS
- make -C $CHOST/libitm DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
- make -C $CHOST/libquadmath DESTDIR=${pkgdir} install-nodist_libsubincludeHEADERS
- make -C $CHOST/libsanitizer DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
- make -C $CHOST/libsanitizer/asan DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
- make -C $CHOST/32/libcilkrts DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
- make -C $CHOST/32/libgomp DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
- make -C $CHOST/32/libitm DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
- make -C $CHOST/32/libsanitizer DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
- make -C $CHOST/32/libsanitizer/asan DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
-
- make -C libiberty DESTDIR=${pkgdir} install
- # install PIC version of libiberty
- install -m644 ${srcdir}/gcc-build/libiberty/pic/libiberty.a ${pkgdir}/usr/lib
-
-
- 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 symlink
- ln -s gcc ${pkgdir}/usr/bin/cc
-
- # POSIX conformance launcher scripts for c89 and c99
- cat > $pkgdir/usr/bin/c89 <<"EOF"
-#!/bin/sh
-fl="-std=c89"
-for opt; do
- case "$opt" in
- -ansi|-std=c89|-std=iso9899:1990) fl="";;
- -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
- exit 1;;
- esac
-done
-exec gcc $fl ${1+"$@"}
-EOF
-
- cat > $pkgdir/usr/bin/c99 <<"EOF"
-#!/bin/sh
-fl="-std=c99"
-for opt; do
- case "$opt" in
- -std=c99|-std=iso9899:1999) fl="";;
- -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
- exit 1;;
- esac
-done
-exec gcc $fl ${1+"$@"}
-EOF
-
- chmod 755 $pkgdir/usr/bin/c{8,9}9
-
- # install the libstdc++ man pages
- make -C $CHOST/libstdc++-v3/doc DESTDIR=$pkgdir doc-install-man
-
- # Install Runtime Library Exception
- install -d ${pkgdir}/usr/share/licenses/gcc-multilib/
- ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-multilib/
-}
-
-package_gcc49-fortran-multilib()
-{
- pkgdesc="Fortran front-end for GCC for multilib"
- depends=("gcc-multilib=$pkgver-$pkgrel")
- provides=("gcc-fortran=$pkgver-$pkgrel")
- conflicts=('gcc-fortran')
- options=('!emptydirs')
- install=gcc49-fortran.install
-
- cd ${srcdir}/gcc-build
- make -C $CHOST/libgfortran DESTDIR=$pkgdir install-{{caf,my}execlibLTLIBRARIES,toolexeclibDATA}
- make -C $CHOST/32/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
+ # Move potentially conflicting stuff to version specific subdirectory
+ mv "${pkgdir}/usr/lib/gcc/${CHOST}"/lib*/ "${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/"
# Install Runtime Library Exception
- install -d ${pkgdir}/usr/share/licenses/gcc-fortran-multilib/
- ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-fortran-multilib/
-}
-
-package_gcc49-objc-multilib()
-{
- pkgdesc="Objective-C front-end for GCC for multilib"
- depends=("gcc-multilib=$pkgver-$pkgrel")
- provides=("gcc-objc=$pkgver-$pkgrel")
- conflicts=('gcc-objc')
-
- cd ${srcdir}/gcc-build
- make DESTDIR=$pkgdir -C $CHOST/libobjc install-headers
- install -dm755 $pkgdir/${_libdir}
- install -m755 gcc/cc1obj{,plus} $pkgdir/${_libdir}/
+ install -Dm644 "${srcdir}/gcc-${pkgver}/COPYING.RUNTIME" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/RUNTIME.LIBRARY.EXCEPTION"
- # Install Runtime Library Exception
- install -d ${pkgdir}/usr/share/licenses/gcc-objc-multilib/
- ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-objc-multilib/
-}
-
-
-package_gcc49-go-multilib()
-{
- pkgdesc="Go front-end for GCC for multilib"
- depends=("gcc-multilib=$pkgver-$pkgrel")
- provides=("gcc-go=$pkgver-$pkgrel")
- conflicts=('gcc-go')
- options=('!emptydirs')
- install=gcc49-go.install
-
- cd ${srcdir}/gcc-build
- make -C $CHOST/libgo DESTDIR=$pkgdir install-exec-am
- make -C $CHOST/32/libgo DESTDIR=$pkgdir install-exec-am
- make -C gcc DESTDIR=$pkgdir go.install-{common,man,info}
- install -Dm755 gcc/go1 $pkgdir/${_libdir}/go1
-
- # Install Runtime Library Exception
- install -d ${pkgdir}/usr/share/licenses/gcc-go-multilib/
- ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-go-multilib/
+ # We don't want symlinks. There's no point in installing gcc-4.9.{0..infinity}. One x.x version will be fine!
}
diff --git a/gcc-4.9-fix-build-with-gcc-6.patch b/gcc-4.9-fix-build-with-gcc-6.patch
new file mode 100644
index 000000000000..e158c9d6d932
--- /dev/null
+++ b/gcc-4.9-fix-build-with-gcc-6.patch
@@ -0,0 +1,126 @@
+--- a/gcc/cp/Make-lang.in
+++++ b/gcc/cp/Make-lang.in
+@@ -111,7 +111,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+
+ #
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 05ca753..d9b16b8 100644
+--- a/gcc/cp/cfns.gperf
++++ b/gcc/cp/cfns.gperf
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+
+@@ -16,14 +18,6 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index c845ddf..65801d1 100644
+--- a/gcc/cp/cfns.h
++++ b/gcc/cp/cfns.h
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ -output-file cfns.h cfns.gperf */
+
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+ #endif
+
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+
+ /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+
+@@ -47,25 +47,18 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
++{
++private:
++ static inline unsigned int hash (const char *str, unsigned int len);
++public:
++ static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
+ {
+ static const unsigned short asso_values[] =
+ {
+@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
+ return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+
+-#ifdef __GNUC__
+-__inline
+-#ifdef __GNUC_STDC_INLINE__
+-__attribute__ ((__gnu_inline__))
+-#endif
+-#endif
+ const char *
+-libc_name_p (register const char *str, register unsigned int len)
++libc_name::libc_name_p (register const char *str, register unsigned int len)
+ {
+ enum
+ {
+diff --git a/gcc/cp/except.c b/gcc/cp/except.c
+index 221971a..32340f5 100644
+--- a/gcc/cp/except.c
++++ b/gcc/cp/except.c
+@@ -1030,7 +1030,8 @@ nothrow_libfn_p (const_tree fn)
+ unless the system headers are playing rename tricks, and if
+ they are, we don't want to be confused by them. */
+ id = DECL_NAME (fn);
+- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
++ IDENTIFIER_LENGTH (id));
+ }
+
+ /* Returns nonzero if an exception of type FROM will be caught by a
+--
+2.8.2
+
diff --git a/gcc49-fortran.install b/gcc49-fortran.install
deleted file mode 100644
index b15d89a97668..000000000000
--- a/gcc49-fortran.install
+++ /dev/null
@@ -1,16 +0,0 @@
-infodir=usr/share/info
-file="gfortran.info"
-
-post_install() {
- [ -x usr/bin/install-info ] || return 0
- install-info $infodir/$file.gz $infodir/dir 2> /dev/null
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- [ -x usr/bin/install-info ] || return 0
- install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
-}
diff --git a/gcc49-go.install b/gcc49-go.install
deleted file mode 100644
index 7dc50dee5a92..000000000000
--- a/gcc49-go.install
+++ /dev/null
@@ -1,20 +0,0 @@
-infodir=usr/share/info
-filelist=(gccgo.info)
-
-post_install() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
diff --git a/gcc49-libs.install b/gcc49-libs.install
deleted file mode 100644
index 23553b8f0b10..000000000000
--- a/gcc49-libs.install
+++ /dev/null
@@ -1,16 +0,0 @@
-infodir=usr/share/info
-filelist=(libgomp.info libquadmath.info)
-
-post_upgrade() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
-
-pre_remove() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
diff --git a/gcc49.install b/gcc49.install
deleted file mode 100644
index 3407a5e1f37c..000000000000
--- a/gcc49.install
+++ /dev/null
@@ -1,20 +0,0 @@
-infodir=usr/share/info
-filelist=(cpp.info cppinternals.info gcc.info gccinstall.info gccint.info)
-
-post_install() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}