core/gcc to 9.2.0-3

This commit is contained in:
Kevin Mihelich 2019-10-28 12:48:50 +00:00
parent e93996708d
commit 1b6917daef
2 changed files with 64 additions and 9 deletions

View file

@ -14,11 +14,11 @@
noautobuild=1
pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-go)
pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-go gcc-d)
pkgver=9.2.0
_majorver=${pkgver:0:1}
_islver=0.21
pkgrel=2
pkgrel=3
pkgdesc='The GNU Compiler Collection'
arch=(x86_64)
license=(GPL LGPL FDL custom)
@ -30,6 +30,7 @@ options=(!emptydirs !distcc)
source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
#source=(gcc::svn://gcc.gnu.org/svn/gcc/branches/gcc-${_majorver}-branch
http://isl.gforge.inria.fr/isl-${_islver}.tar.xz
phobos_path.patch
c89 c99
0001-ARMv5-disable-LDRD-STRD.patch)
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
@ -39,6 +40,7 @@ validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.
sha256sums=('ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206'
'SKIP'
'777058852a3db9500954361e294881214f6ecd4b594c00da5eee974cd6a54960'
'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308'
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
'31e24baa9eee826d7d77dbcf8f1a6a44c92f771e52d21677acb8d76fac7ae204')
@ -84,6 +86,10 @@ 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/phobos_path.patch"
#sed -i "/GDCFLAGSX=/s/-Wall/-shared-libphobos -Wall/" libphobos/configure
# ALARM: Specify build host types, triplet patch
[[ $CARCH == "arm" ]] && CONFIGFLAG="--host=armv5tel-unknown-linux-gnueabi --build=armv5tel-unknown-linux-gnueabi --with-arch=armv5te --with-float=soft"
[[ $CARCH == "armv6h" ]] && CONFIGFLAG="--host=armv6l-unknown-linux-gnueabihf --build=armv6l-unknown-linux-gnueabihf --with-arch=armv6 --with-float=hard --with-fpu=vfp"
@ -110,7 +116,7 @@ build() {
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-bugurl=https://github.com/archlinuxarm/PKGBUILDs/issues \
--enable-languages=c,c++,fortran,go,lto,objc,obj-c++ \
--enable-languages=c,c++,fortran,go,lto,objc,obj-c++,d \
--enable-shared \
--enable-threads=posix \
--with-system-zlib \
@ -132,7 +138,8 @@ build() {
--enable-checking=release \
--enable-default-pie \
--enable-default-ssp \
$CONFIGFLAG
$CONFIGFLAG \
gdc_include_dir=/usr/include/dlang/gdc
make
@ -143,6 +150,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"
@ -153,8 +163,9 @@ package_gcc-libs() {
groups=(base)
depends=('glibc>=2.27')
options+=(!strip)
provides=(libgo.so libgfortran.so libubsan.so libasan.so
liblsan.so)
provides=(libgo.so libgfortran.so libgphobos.so
libubsan.so libasan.so liblsan.so)
replaces=(libgphobos)
if [[ $CARCH == "aarch64" ]]; then
provides+=(libtsan.so)
fi
@ -182,6 +193,10 @@ package_gcc-libs() {
make -C $CHOST/libobjc DESTDIR="$pkgdir" install-libs
make -C $CHOST/libstdc++-v3/po DESTDIR="$pkgdir" install
make -C $CHOST/libphobos DESTDIR="$pkgdir" install
rm -rf "$pkgdir"/usr/lib/gcc/*/9.2.0/include/d/
rm -f "$pkgdir"/usr/lib/libgphobos.spec
for lib in libgomp \
libitm \
libquadmath; do
@ -243,8 +258,8 @@ package_gcc() {
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}.info
rm "$pkgdir"/usr/share/man/man1/{gccgo,gfortran,gdc}.1
rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gdc}.info
make -C libcpp DESTDIR="$pkgdir" install
make -C gcc DESTDIR="$pkgdir" install-po
@ -275,7 +290,7 @@ 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/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS
make -C gcc DESTDIR="$pkgdir" fortran.install-{common,man,info}
install -Dm755 gcc/f951 "$pkgdir/${_libdir}/f951"
@ -322,3 +337,29 @@ package_gcc-go() {
ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \
"$pkgdir/usr/share/licenses/$pkgname/"
}
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,a}*
rm -f "$pkgdir/usr/lib32/"lib{gphobos,gdruntime}.{so,a}*
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/"
}

View file

@ -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;