diff options
author | Britney Fransen <brfransen@gmail.com> | 2020-06-15 11:30:08 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2020-06-15 11:30:08 (GMT) |
commit | dd5b1df2b2d9ccc73c22afcbd4cf6a3bf4e4752b (patch) | |
tree | e5ed420ea0124e3f8dbe20812fe01dc1fa3ed390 /abs/core/gcc | |
parent | 0add23ef8f69c7bfe1df6c614d2f48864362fdef (diff) | |
download | linhes_pkgbuild-dd5b1df2b2d9ccc73c22afcbd4cf6a3bf4e4752b.zip linhes_pkgbuild-dd5b1df2b2d9ccc73c22afcbd4cf6a3bf4e4752b.tar.gz linhes_pkgbuild-dd5b1df2b2d9ccc73c22afcbd4cf6a3bf4e4752b.tar.bz2 |
gcc: update to 10.1.0
Diffstat (limited to 'abs/core/gcc')
-rw-r--r-- | abs/core/gcc/PKGBUILD | 181 | ||||
-rw-r--r-- | abs/core/gcc/fs64270.patch | 26 | ||||
-rw-r--r-- | abs/core/gcc/gdc_phobos_path.patch | 14 |
3 files changed, 147 insertions, 74 deletions
diff --git a/abs/core/gcc/PKGBUILD b/abs/core/gcc/PKGBUILD index 66aed86..4debfa7 100644 --- a/abs/core/gcc/PKGBUILD +++ b/abs/core/gcc/PKGBUILD @@ -1,57 +1,45 @@ -# $Id$ # Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> # Contributor: Allan McRae <allan@archlinux.org> +# Contributor: Daniel Kozak <kozzi11@gmail.com> # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc # NOTE: libtool requires rebuilt with each new gcc version -pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go lib32-gcc-libs) -pkgver=7.3.0 -_majorver=${pkgver:0:1} -_islver=0.18 -pkgrel=1 +pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go lib32-gcc-libs gcc-d) +pkgver=10.1.0 +_majorver=${pkgver%%.*} +_islver=0.21 +pkgrel=2 pkgdesc='The GNU Compiler Collection' arch=(x86_64) license=(GPL LGPL FDL custom) -url='http://gcc.gnu.org' -makedepends=(binutils libmpc gcc-ada doxygen lib32-glibc lib32-gcc-libs) +url='https://gcc.gnu.org' +makedepends=(binutils libmpc gcc-ada doxygen lib32-glibc lib32-gcc-libs python git) checkdepends=(dejagnu inetutils) options=(!emptydirs) -#source=(https://sources.archlinux.org/other/gcc/gcc-${pkgver/+/-}.tar.xz{,.sig} -source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig} - http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2 - c89 c99) +_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*} +# _commit=6957d3e4eef1f4243eb23ff62aea06139ef4415a +# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit +source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig} + http://isl.gforge.inria.fr/isl-${_islver}.tar.xz + c89 c99 + gdc_phobos_path.patch + fs64270.patch +) validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org - 13975A70E63C361C73AE69EF6EEB81F8981C74C7) # richard.guenther@gmail.com -sha256sums=('832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c' + 86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com + 13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com + 33C235A34C46AA3FFB293709A328C3A2C3C45C06) # Jakub Jelinek <jakub@redhat.com> +sha256sums=('b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2' 'SKIP' - '6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b' + '777058852a3db9500954361e294881214f6ecd4b594c00da5eee974cd6a54960' 'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931' - '2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a') - -_svnrev=256757 -_svnurl=svn://gcc.gnu.org/svn/gcc/branches/gcc-${_majorver}-branch -_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*} - -snapshot() { - svn export -r${_svnrev} ${_svnurl} gcc-r${_svnrev} - - local datestamp basever _pkgver - basever=$(< gcc-r${_svnrev}/gcc/BASE-VER) - datestamp=$(< gcc-r${_svnrev}/gcc/DATESTAMP) - _pkgver=${basever}-${datestamp} - - mv gcc-r${_svnrev} gcc-${_pkgver} - tar cf - gcc-${_pkgver} | xz > gcc-${_pkgver}.tar.xz - gpg -b gcc-${_pkgver}.tar.xz - scp gcc-${_pkgver}.tar.xz{,.sig} sources.archlinux.org:/srv/ftp/other/gcc/ - - echo - echo "pkgver=${_pkgver/-/+}" -} + '2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a' + 'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308' + '1ef190ed4562c4db8c1196952616cd201cfdd788b65f302ac2cc4dabb4d72cee') prepare() { - ln -s gcc-${pkgver/+/-} gcc + [[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc cd gcc # link isl for in-tree build @@ -66,6 +54,13 @@ prepare() { # hack! - some configure tests for header files using "$CPP $CPPFLAGS" sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure + # D hacks + patch -p1 -i "$srcdir/gdc_phobos_path.patch" + + # Turn off SSP for nostdlib|nodefaultlibs|ffreestanding + # https://bugs.archlinux.org/task/64270 + patch -p1 -i "$srcdir/fs64270.patch" + mkdir -p "$srcdir/gcc-build" } @@ -83,29 +78,30 @@ build() { --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-bugurl=https://bugs.archlinux.org/ \ - --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \ - --enable-shared \ - --enable-threads=posix \ - --enable-libmpx \ - --with-system-zlib \ + --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d \ --with-isl \ + --with-linker-hash-style=gnu \ + --with-system-zlib \ --enable-__cxa_atexit \ - --disable-libunwind-exceptions \ + --enable-cet=auto \ + --enable-checking=release \ --enable-clocale=gnu \ - --disable-libstdcxx-pch \ - --disable-libssp \ + --enable-default-pie \ + --enable-default-ssp \ + --enable-gnu-indirect-function \ --enable-gnu-unique-object \ + --enable-install-libiberty \ --enable-linker-build-id \ --enable-lto \ - --enable-plugin \ - --enable-install-libiberty \ - --with-linker-hash-style=gnu \ - --enable-gnu-indirect-function \ --enable-multilib \ + --enable-plugin \ + --enable-shared \ + --enable-threads=posix \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-libunwind-exceptions \ --disable-werror \ - --enable-checking=release \ - --enable-default-pie \ - --enable-default-ssp + gdc_include_dir=/usr/include/dlang/gdc make @@ -116,6 +112,9 @@ build() { check() { cd gcc-build + # disable libphobos test to avoid segfaults and other unfunny ways to waste my time + sed -i '/maybe-check-target-libphobos \\/d' Makefile + # do not abort on error as some are "expected" make -k check || true "$srcdir/gcc/contrib/test_summary" @@ -123,18 +122,17 @@ check() { package_gcc-libs() { pkgdesc='Runtime libraries shipped by GCC' - groups=(base) - depends=('glibc>=2.26') + depends=('glibc>=2.27') options+=(!strip) - provides=($pkgname-multilib) - replaces=($pkgname-multilib) + provides=($pkgname-multilib libgo.so libgfortran.so libgphobos.so + libubsan.so libasan.so libtsan.so liblsan.so) + replaces=($pkgname-multilib libgphobos) cd gcc-build make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared rm -f "$pkgdir/$_libdir/libgcc_eh.a" for lib in libatomic \ - libcilkrts \ libgfortran \ libgo \ libgomp \ @@ -148,8 +146,10 @@ package_gcc-libs() { make -C $CHOST/libobjc DESTDIR="$pkgdir" install-libs make -C $CHOST/libstdc++-v3/po DESTDIR="$pkgdir" install - make -C $CHOST/libmpx DESTDIR="$pkgdir" install - rm -f "$pkgdir/usr/lib/libmpx.spec" + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -rf "$pkgdir"/$_libdir/include/d/ + rm -f "$pkgdir"/usr/lib/libgphobos.spec for lib in libgomp \ libitm \ @@ -208,26 +208,24 @@ package_gcc() { ln -s /${_libdir}/liblto_plugin.so \ "$pkgdir/usr/lib/bfd-plugins/" - make -C $CHOST/libcilkrts DESTDIR="$pkgdir" install-nodist_{toolexeclib,cilkinclude}HEADERS make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_{libsubinclude,toolexeclib}HEADERS 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_{saninclude,toolexeclib}HEADERS make -C $CHOST/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS - make -C $CHOST/libmpx DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS - make -C $CHOST/32/libcilkrts DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/libsanitizer/tsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS + make -C $CHOST/libsanitizer/lsan 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_{saninclude,toolexeclib}HEADERS make -C $CHOST/32/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS - make -C $CHOST/32/libmpx DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS make -C libiberty DESTDIR="$pkgdir" install install -m644 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 + rm "$pkgdir"/usr/share/man/man1/{gccgo,gfortran,gdc}.1 + rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn,gdc}.info make -C libcpp DESTDIR="$pkgdir" install make -C gcc DESTDIR="$pkgdir" install-po @@ -245,6 +243,10 @@ package_gcc() { # remove files provided by lib32-gcc-libs rm -f "$pkgdir"/usr/lib32/lib{stdc++,gcc_s}.so + # byte-compile python libraries + python -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/" + python -O -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/" + # Install Runtime Library Exception install -d "$pkgdir/usr/share/licenses/$pkgname/" ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ @@ -259,9 +261,9 @@ package_gcc-fortran() { cd gcc-build make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \ - install-{toolexeclibDATA,nodist_fincludeHEADERS} + install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS} make -C $CHOST/32/libgfortran DESTDIR=$pkgdir install-cafexeclibLTLIBRARIES \ - install-{toolexeclibDATA,nodist_fincludeHEADERS} + install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS} 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" @@ -302,9 +304,13 @@ package_gcc-ada() { make DESTDIR="$pkgdir" ada.install-{common,info} install -m755 gnat1 "$pkgdir/${_libdir}" + cd "$srcdir"/gcc-build/$CHOST/libada + make DESTDIR=${pkgdir} INSTALL="install" \ + INSTALL_DATA="install -m644" install-libada + cd "$srcdir"/gcc-build/$CHOST/32/libada make DESTDIR=${pkgdir} INSTALL="install" \ - INSTALL_DATA="install -m644" install-gnatlib + INSTALL_DATA="install -m644" install-libada ln -s gcc "$pkgdir/usr/bin/gnatgcc" @@ -329,7 +335,7 @@ package_gcc-ada() { package_gcc-go() { pkgdesc='Go front-end for GCC' depends=("gcc=$pkgver-$pkgrel") - provides=("go=1.8.1" $pkgname-multilib) + provides=("go=1.12.2" $pkgname-multilib) replaces=($pkgname-multilib) conflicts=(go) @@ -350,7 +356,8 @@ package_gcc-go() { package_lib32-gcc-libs() { pkgdesc='32-bit runtime libraries shipped by GCC' - depends=('lib32-glibc>=2.26') + depends=('lib32-glibc>=2.27') + provides=(libgo.so libgfortran.so libubsan.so libasan.so) groups=(multilib-devel) options=(!emptydirs !strip) @@ -360,7 +367,6 @@ package_lib32-gcc-libs() { rm -f "$pkgdir/$_libdir/32/libgcc_eh.a" for lib in libatomic \ - libcilkrts \ libgfortran \ libgo \ libgomp \ @@ -373,8 +379,9 @@ package_lib32-gcc-libs() { done make -C $CHOST/32/libobjc DESTDIR="$pkgdir" install-libs - make -C $CHOST/32/libmpx DESTDIR="$pkgdir" install - rm -f "$pkgdir/usr/lib32/libmpx.spec" + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -f "$pkgdir"/usr/lib32/libgphobos.spec # remove files provided by gcc-libs rm -rf "$pkgdir"/usr/lib @@ -383,3 +390,29 @@ package_lib32-gcc-libs() { install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \ "$pkgdir/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION" } + +package_gcc-d() { + pkgdesc="D frontend for GCC" + depends=("gcc=$pkgver-$pkgrel") + provides=(gdc) + replaces=(gdc) + options=('staticlibs') + + cd gcc-build + make -C gcc DESTDIR="$pkgdir" d.install-{common,man,info} + + install -Dm755 gcc/gdc "$pkgdir"/usr/bin/gdc + install -Dm755 gcc/d21 "$pkgdir"/"$_libdir"/d21 + + make -C $CHOST/libphobos DESTDIR="$pkgdir" install + rm -f "$pkgdir/usr/lib/"lib{gphobos,gdruntime}.so* + rm -f "$pkgdir/usr/lib32/"lib{gphobos,gdruntime}.so* + + install -d "$pkgdir"/usr/include/dlang + ln -s /"${_libdir}"/include/d "$pkgdir"/usr/include/dlang/gdc + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} diff --git a/abs/core/gcc/fs64270.patch b/abs/core/gcc/fs64270.patch new file mode 100644 index 0000000..7b9e142 --- /dev/null +++ b/abs/core/gcc/fs64270.patch @@ -0,0 +1,26 @@ +Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding + +--- a/gcc/gcc.c 2017-07-04 09:15:57.740793000 +0200 ++++ b/gcc/gcc.c 2018-03-02 13:58:44.387741114 +0100 +@@ -857,6 +857,12 @@ proper position among the other output f + #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G" + #endif + ++#ifdef ENABLE_DEFAULT_SSP ++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} " ++#else ++#define NO_SSP_SPEC "" ++#endif ++ + #ifndef LINK_SSP_SPEC + #ifdef TARGET_LIBC_PROVIDES_SSP + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ +@@ -1131,7 +1148,7 @@ static const char *cc1_options = + %{-version:--version}\ + %{-help=*:--help=%*}\ + %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\ +- %{fsyntax-only:-o %j} %{-param*}\ ++ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\ + %{coverage:-fprofile-arcs -ftest-coverage}\ + %{fprofile-arcs|fprofile-generate*|coverage:\ + %{!fprofile-update=singel:\ diff --git a/abs/core/gcc/gdc_phobos_path.patch b/abs/core/gcc/gdc_phobos_path.patch new file mode 100644 index 0000000..6f43b6e --- /dev/null +++ b/abs/core/gcc/gdc_phobos_path.patch @@ -0,0 +1,14 @@ +diff -Naur a/gcc/d/d-incpath.cc b/gcc/d/d-incpath.cc +--- a/gcc/d/d-incpath.cc 2019-01-01 13:31:55.000000000 +0100 ++++ b/gcc/d/d-incpath.cc 2019-06-28 08:32:00.326241502 +0200 +@@ -140,7 +140,7 @@ + path = xstrdup (p->fname); + + /* Add D-specific suffix. */ +- path = concat (path, "/d", NULL); ++ path = concat (path, "/dlang/gdc", NULL); + + /* Ignore duplicate entries. */ + bool found = false; + + |