diff options
author | Felix Schindler | 2015-06-20 13:47:39 +0200 |
---|---|---|
committer | Felix Schindler | 2015-06-20 13:49:04 +0200 |
commit | 2a2454342d837e35169de782bc393ab4d26497fd (patch) | |
tree | fe236cc6ae8091d0f69b7b1bdf6958c36e312e91 | |
download | aur-2a2454342d837e35169de782bc393ab4d26497fd.tar.gz |
add state of https://github.com/ftalbrecht/aur, rev. 84761b9
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | PKGBUILD | 127 | ||||
-rw-r--r-- | gcc-4.8-filename-output.patch | 17 |
3 files changed, 176 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dc7d9902c81f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +# Generated by makepkg 4.2.1 +# Sat Jun 20 11:48:33 UTC 2015 +pkgbase = gcc48 + pkgdesc = The GNU Compiler Collection - C and C++ frontends (4.8.x) + pkgver = 4.8.4 + pkgrel = 1 + url = http://gcc.gnu.org + arch = i686 + arch = x86_64 + license = GPL + license = LGPL + license = FDL + license = custom + checkdepends = dejagnu + checkdepends = inetutils + makedepends = binutils>=2.24 + makedepends = libmpc + makedepends = cloog + makedepends = doxygen + depends = binutils>=2.24 + depends = libmpc + depends = cloog + options = !emptydirs + options = staticlibs + options = !libtool + source = ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.8.4/gcc-4.8.4.tar.bz2 + source = gcc-4.8-filename-output.patch + md5sums = 5a84a30839b2aca22a2d723de2a626ec + md5sums = 40cb437805e2f7a006aa0d0c3098ab0f + +pkgname = gcc48 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ee5715848f39 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,127 @@ +# Maintainer: Felix Schindler <felix at schindlerfaimly dot de> +# Contributor: Allan McRae <allan@archlinux.org> +# +# This PKGBUILD is maintained at https://github.com/ftalbrecht/aur +# in the gcc48 branch + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc +# NOTE: libtool requires rebuilt with each new gcc version + +pkgname=gcc48 +_pkgver_minor=4.8 +pkgver=${_pkgver_minor}.4 +pkgrel=1 +pkgdesc="The GNU Compiler Collection - C and C++ frontends (4.8.x)" +arch=('i686' 'x86_64') +license=('GPL' 'LGPL' 'FDL' 'custom') +url="http://gcc.gnu.org" +depends=('binutils>=2.24' 'libmpc' 'cloog') +makedepends=('binutils>=2.24' 'libmpc' 'cloog' 'doxygen') +checkdepends=('dejagnu' 'inetutils') +options=('!emptydirs' 'staticlibs' '!libtool') +source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 + gcc-4.8-filename-output.patch) +md5sums=('5a84a30839b2aca22a2d723de2a626ec' + '40cb437805e2f7a006aa0d0c3098ab0f') + +_basedir=gcc-${pkgver} + +_libdir="usr/lib/gcc/$CHOST/$pkgver" + +build() { + # prepare + cd ${srcdir}/${_basedir} + + # Do not run fixincludes + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + # Arch Linux installs x86_64 libraries /lib + [[ $CARCH == "x86_64" ]] && sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64 + + 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 + + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653 + patch -p0 -i ${srcdir}/gcc-4.8-filename-output.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 + + # build + cd ${srcdir}/gcc-build + + # Doesn't like FORTIFY_SOURCE + CPPFLAGS=${CPPFLAGS//-D_FORTIFY_SOURCE=?/} + export CPPFLAGS + + # Doesn't like -fstack-protector-strong + CFLAGS=${CFLAGS//-fstack-protector-strong/-fstack-protector} + export CFLAGS + CXXFLAGS=${CXXFLAGS//-fstack-protector-strong/-fstack-protector} + export CXXFLAGS + + # using -pipe causes spurious test-suite failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565 + CFLAGS=${CFLAGS/-pipe/} + CXXFLAGS=${CXXFLAGS/-pipe/} + + ${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 \ + --enable-shared --enable-threads=posix \ + --with-system-zlib --enable-__cxa_atexit \ + --disable-libunwind-exceptions --enable-clocale=gnu \ + --disable-libstdcxx-pch \ + --enable-gnu-unique-object \ + --with-ppl \ + --disable-multilib --disable-werror \ + --enable-linker-build-id \ + --enable-cloog-backend=isl \ + --enable-lto --enable-gold --enable-ld=default \ + --enable-plugin --with-plugin-ld=ld.gold \ + --program-suffix=-${pkgver} --enable-version-specific-runtime-libs \ + --enable-checking=release + + # --disable-libssp \ + # --disable-cloog-version-check \ + # --with-linker-hash-style=gnu \ + + make + + # make documentation + make -C $CHOST/libstdc++-v3/doc doc-man-doxygen +} + +package() +{ + cd ${srcdir}/gcc-build + + make -j1 DESTDIR=${pkgdir} install + + ## Lazy way of dealing with conflicting man and info pages and locales... + rm -rf ${pkgdir}/usr/share/ + rm -rf ${pkgdir}/usr/include/ + find ${pkgdir}/ -name \*iberty\* | xargs rm + + # Move potentially conflicting stuff to version specific subdirectory + $(ls "$pkgdir"/usr/lib/gcc/$CHOST/lib* &> /dev/null) && mv "$pkgdir"/usr/lib/gcc/$CHOST/lib* "$pkgdir/usr/lib/gcc/$CHOST/$pkgver/" + + # Install Runtime Library Exception + install -Dm644 ${srcdir}/gcc-${pkgver}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION + + # create symlinks + cd ${pkgdir}/usr/bin + for ii in c++ cpp g++ gcc gcc-ar gcc-nm gcc-ranlib gfortran; do + ln -s ${ii}-${pkgver} ${ii}-${_pkgver_minor} + ln -s ${CHOST}-${ii}-${pkgver} ${CHOST}-${ii}-${_pkgver_minor} + done + ln -s gcov-${pkgver} gcov-${_pkgver_minor} +} diff --git a/gcc-4.8-filename-output.patch b/gcc-4.8-filename-output.patch new file mode 100644 index 000000000000..6951eb239b77 --- /dev/null +++ b/gcc-4.8-filename-output.patch @@ -0,0 +1,17 @@ +--- gcc/c-family/c-opts.c (revision 200330) ++++ gcc/c-family/c-opts.c (working copy) +@@ -1338,10 +1338,14 @@ c_finish_options (void) + + /* Give CPP the next file given by -include, if any. */ + static void + push_command_line_include (void) + { ++ // This can happen if disabled by -imacros for example. ++ if (include_cursor > deferred_count) ++ return; ++ + if (!done_preinclude) + { + done_preinclude = true; + if (flag_hosted && std_inc && !cpp_opts->preprocessed) + { |