From b4810f62ee12fd66b1e731b35d670ceef79a2a02 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 7 Nov 2014 03:55:58 +0000 Subject: [PATCH] core/gcc to 4.9.2-1 --- core/gcc/PKGBUILD | 40 ++++++++++++++------------ core/gcc/gcc-4.8-filename-output.patch | 16 +++++------ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD index 2357c9946..359ab128c 100644 --- a/core/gcc/PKGBUILD +++ b/core/gcc/PKGBUILD @@ -14,24 +14,28 @@ noautobuild=1 pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-go') -pkgver=4.9.1 +pkgver=4.9.2 _pkgver=4.9 -pkgrel=2 -_snapshot=4.9-20140903 +_islver=0.12.2 +_cloogver=0.18.1 +pkgrel=1 +#_snapshot=4.9-20140903 pkgdesc="The GNU Compiler Collection" arch=('i686' 'x86_64') license=('GPL' 'LGPL' 'FDL' 'custom') url="http://gcc.gnu.org" -makedepends=('binutils>=2.24' 'libmpc' 'cloog' 'doxygen') +makedepends=('binutils>=2.24' 'libmpc' 'doxygen') checkdepends=('dejagnu' 'inetutils') options=('!emptydirs' '!distcc') -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.9-isl-0.13-hack.patch) -md5sums=('24dfd67139fda4746d2deff18182611d' - '40cb437805e2f7a006aa0d0c3098ab0f' - 'f26ae06b9cbc8abe86f5ee4dc5737da8') +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 + gcc-4.8-filename-output.patch) +md5sums=('4df8ee253b7f3863ad0b86359cd39c43' + 'e039bfcfb6c2ab039b8ee69bf883e824' + 'e34fca0540d840e5d0f6427e98c92252' + '6810bb9b2252f03e6c98d9a671d94589') if [ -n "${_snapshot}" ]; then _basedir=gcc-${_snapshot} @@ -44,6 +48,10 @@ _libdir="usr/lib/gcc/$CHOST/$pkgver" prepare() { cd ${srcdir}/${_basedir} + # link isl/cloog for in-tree builds + ln -s ../isl-${_islver} isl + ln -s ../cloog-${_cloogver} cloog + # Do not run fixincludes sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in @@ -53,11 +61,8 @@ prepare() { 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 - - # isl-0.13 support - mostly header includes and a function rename - # (which does not seem right but causes no testsuite failures...) - patch -p1 -i ${srcdir}/gcc-4.9-isl-0.13-hack.patch + # https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=9140d56f + patch -p1 -i ${srcdir}/gcc-4.8-filename-output.patch # ALARM: Specify build host types, triplet patch [[ $CARCH == "arm" ]] && CONFIGFLAG="--host=armv5tel-unknown-linux-gnueabi --build=armv5tel-unknown-linux-gnueabi" @@ -86,7 +91,6 @@ build() { --disable-libstdcxx-pch --disable-libssp \ --enable-gnu-unique-object --enable-linker-build-id \ --enable-cloog-backend=isl \ - --disable-isl-version-check --disable-cloog-version-check \ --enable-lto --enable-plugin --enable-install-libiberty \ --with-linker-hash-style=gnu \ --disable-multilib --disable-werror \ @@ -149,7 +153,7 @@ package_gcc-libs() package_gcc() { pkgdesc="The GNU Compiler Collection - C and C++ frontends" - depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.24' 'libmpc' 'cloog') + depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.24' 'libmpc') groups=('base-devel') options=('staticlibs') install=gcc.install diff --git a/core/gcc/gcc-4.8-filename-output.patch b/core/gcc/gcc-4.8-filename-output.patch index 6951eb239..7c2ee0aa5 100644 --- a/core/gcc/gcc-4.8-filename-output.patch +++ b/core/gcc/gcc-4.8-filename-output.patch @@ -1,17 +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. */ +diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c +index 968b703..3f8e6e6 100644 +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -1438,6 +1438,12 @@ c_finish_options (void) static void push_command_line_include (void) { -+ // This can happen if disabled by -imacros for example. ++ /* This can happen if disabled by -imacros for example. ++ Punt so that we don't set "" as the filename for ++ the header. */ + if (include_cursor > deferred_count) + return; + if (!done_preinclude) { done_preinclude = true; - if (flag_hosted && std_inc && !cpp_opts->preprocessed) - {