summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2017-07-30 03:14:17 -0400
committerChris Severance2017-07-30 03:14:17 -0400
commit70ff134d1f08a0ec29dde751ec1e57864b2f0fdc (patch)
treeef67c46a7e06cbc7080bf426bd610f1ddec708f3
parentf87b0f98bfd70f78a56667dd195c0e56332b26f1 (diff)
downloadaur-70ff134d1f08a0ec29dde751ec1e57864b2f0fdc.tar.gz
Update for gcc 7.1
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD90
2 files changed, 58 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5af89b988a2a..8e858382fe1b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sat Mar 18 23:32:42 UTC 2017
+# Sun Jul 30 07:14:05 UTC 2017
pkgbase = gcc43
pkgdesc = The GNU Compiler Collection (4.3.x)
pkgver = 4.3.6
@@ -21,7 +21,6 @@ pkgbase = gcc43
depends = zlib
depends = elfutils
conflicts = gcc43-multilib
- options = !buildflags
options = staticlibs
options = !libtool
source = ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.3.6/gcc-core-4.3.6.tar.bz2
diff --git a/PKGBUILD b/PKGBUILD
index c0f906adb5e2..ab413c0ad32b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,7 +17,7 @@ depends=('glibc' 'gmp' 'binutils' 'mpfr' 'cloog' 'zlib' 'elfutils')
makedepends=('flex' 'bison' 'setconf')
makedepends+=('gcc49')
conflicts=("gcc${_pkgver//\./}-multilib")
-options=('!buildflags' 'staticlibs' '!libtool') # libiberty builds with all flags removed
+options=('staticlibs' '!libtool') # libiberty builds with all flags removed
source=(
"ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}"/gcc-{core,g++,fortran,objc,java}-"${pkgver}.tar.bz2"
'gcc_pure64.patch'
@@ -39,15 +39,16 @@ prepare() {
cd "${_basedir}"
# Do not install libiberty
- sed -i -e 's:install_to_$(INSTALL_DEST) ::' 'libiberty/Makefile.in'
+ sed -e 's/install_to_$(INSTALL_DEST) //' -i 'libiberty/Makefile.in'
# Disables generating documentation (new texinfo does not like the old .texi files)
echo 'MAKEINFO = :' >> 'Makefile.in'
# Do not run fixincludes
- sed -i -e 's@\./fixinc\.sh@-c true@' 'gcc/Makefile.in'
+ sed -e 's@\./fixinc\.sh@-c true@' -i 'gcc/Makefile.in'
patch -Np1 -i "${srcdir}/siginfo_t_fix.patch"
+
case "${CARCH}" in
'x86_64') patch -Np1 -i '../gcc_pure64.patch';;
esac
@@ -56,33 +57,7 @@ prepare() {
rm -rf 'gcc-build'
mkdir 'gcc-build'
- cd 'gcc-build'
-
- # The following options are one per line, mostly sorted so they are easy to diff compare to other gcc packages.
- ../configure \
- --build="${CHOST}" \
- --enable-libgomp \
- --disable-libmudflap \
- --disable-libssp \
- --disable-libstdcxx-pch \
- --disable-multilib \
- --disable-werror \
- --enable-__cxa_atexit \
- --enable-clocale='gnu' \
- --enable-languages='c,c++' \
- --enable-shared \
- --infodir='/usr/share/info' \
- --libdir='/usr/lib' \
- --libexecdir='/usr/lib' \
- --mandir='/usr/share/man' \
- --program-suffix="-${_pkgver}" \
- --with-cloog \
- --with-ppl \
- --with-system-zlib \
- --with-tune='generic' \
- --prefix='/usr' \
- CXX='g++-4.9' CC='gcc-4.9'
- # --enable-checking=release \
+
set +u
}
@@ -90,9 +65,58 @@ build() {
set -u
cd "${_basedir}/gcc-build"
+ if [ ! -s 'Makefile' ]; then
+ # Doesn't like FORTIFY_SOURCE
+ CPPFLAGS="${CPPFLAGS//-D_FORTIFY_SOURCE=?/}"
+
+ # Doesn't like -fstack-protector-strong
+ CFLAGS="${CFLAGS//-fstack-protector-strong/-fstack-protector}"
+ 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/}"
+
+ # Flags from new compilers that old compilers don't recognize
+ CFLAGS="${CFLAGS/-fno-plt/}"
+ CXXFLAGS="${CXXFLAGS/-fno-plt/}"
+
+ CFLAGS="${CFLAGS/-Wformat-overflow=[0-9]/}"
+ CXXFLAGS="${CXXFLAGS/-Wformat-overflow=[0-9]/}"
+
+ # The following options are one per line, mostly sorted so they are easy to diff compare to other gcc packages.
+ ../configure \
+ --build="${CHOST}" \
+ --enable-libgomp \
+ --disable-libmudflap \
+ --disable-libssp \
+ --disable-libstdcxx-pch \
+ --disable-multilib \
+ --disable-werror \
+ --enable-__cxa_atexit \
+ --enable-clocale='gnu' \
+ --enable-languages='c,c++' \
+ --enable-shared \
+ --enable-threads='posix' \
+ --enable-version-specific-runtime-libs \
+ --infodir='/usr/share/info' \
+ --libdir='/usr/lib' \
+ --libexecdir='/usr/lib' \
+ --mandir='/usr/share/man' \
+ --program-suffix="-${_pkgver}" \
+ --with-cloog \
+ --with-ppl \
+ --with-system-zlib \
+ --with-tune='generic' \
+ --prefix='/usr' \
+ CXX='g++-4.9' CC='gcc-4.9'
+# --enable-checking=release \
+ fi
+
local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
#LD_PRELOAD='/usr/lib/libstdc++.so' \\
- make -s -j "${_nproc}"
+ nice make -s -j "${_nproc}"
set +u
}
@@ -111,9 +135,9 @@ package() {
#case "${CARCH}" in
#'x86_64') mv "${pkgdir}/usr/lib/gcc/${CHOST}"/lib*/ "${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/" ;;
#esac
- mv "${pkgdir}/usr/lib"/lib* "${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/"
+ mv "${pkgdir}/usr/lib/gcc/${CHOST}"/lib* "${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/"
- # Create links for gcc- build environment (useful for CUDA)
+ # Create links for gcc build environment (useful for CUDA)
mkdir -p "${pkgdir}/opt/gcc-${_pkgver}"
ln -s "/usr/bin/gcc-${_pkgver}" "${pkgdir}/opt/gcc-${_pkgver}/gcc"
ln -s "/usr/bin/g++-${_pkgver}" "${pkgdir}/opt/gcc-${_pkgver}/g++"