diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2021-06-04 09:49:49 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2021-06-04 09:49:49 +0200 |
commit | f2ce59c8811ea4e4d896e3fe29d73b42c96c0c26 (patch) | |
tree | 92eea19e46a086d702eb39e65ebd199bb75f075d /community | |
parent | b6e84d446ab76ff54905aeb647d1873b80532ac7 (diff) | |
download | packages-f2ce59c8811ea4e4d896e3fe29d73b42c96c0c26.tar.xz |
community/gcc10: tentative build of gcc10 with patches from gcc (will most likely fail)
Diffstat (limited to 'community')
-rw-r--r-- | community/gcc10/PKGBUILD | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/community/gcc10/PKGBUILD b/community/gcc10/PKGBUILD new file mode 100644 index 00000000..b2d6ed81 --- /dev/null +++ b/community/gcc10/PKGBUILD @@ -0,0 +1,110 @@ +# remove tsan (thread sanitizer) plugin, not available for i686 +pkgname=( + $( + printf '%s\n' "${pkgname[@]}" | \ + grep -vFx 'lib32-gcc-libs' + ) +) +unset -f 'package_lib32-gcc-libs' +eval "$( + declare -f prepare | \ + sed ' + \,/s/lib64/lib/, d + ' + declare -f build | \ + sed ' + /configure/ s/--enable-multilib/--disable-multilib/ + /configure/ s,--with-bugurl=https://bugs\.archlinux\.org/,--with-bugurl=https://bugs.archlinux32.org/, + /configure/ s/;$/ --build=$CHOST;/ + ' + declare -f package_gcc-libs | \ + sed ' + s/\$pkgname-multilib// + s@libsanitizer/{a,l,ub,t}san@libsanitizer/{a,l,ub}san@ + /provides=/s/libtsan.so// + \@/usr/lib32/@ d + ' + declare -f package_gcc | \ + sed ' + s/"lib32-gcc-libs[^"]*"//g + s@make.*tsan.*install@#\0@ + ' + declare -f package_gcc-ada | \ + sed ' + \,cd .*/32/libada,{ + N + d + } + ' +)" +eval "$( + for name in "${pkgname[@]}"; do + declare -f package_${name} | \ + sed ' + s/$pkgname-multilib// + s/{,32}// + \,/lib32/,d + \,/32/,d + ' + done +)" + +# i486-specific + +# no ADA +makedepends=(${makedepends[@]//gcc-ada/}) +makedepends_i686+=('gcc-ada') + +if [ "${CARCH}" = "i486" ]; then + package_gcc-ada() { + touch "$pkgdir/this-is-a-dummy-package" + } + + eval "$( + declare -f build | \ + sed ' + /enable-languages/ s/,ada// + ' + )" + + eval "$( + declare -f package_gcc | \ + sed ' + s/,gnat-style,gnat_rm,gnat_ugn// + ' + )" + + # building toolchain (gcc): again, lobtool problems + # /usr/lib/gcc/i486-pc-linux-gnu/7.3.0/ld: cannot find -lquadmath + # collect2: error: ld returned 1 exit status + # libtool: install: error: relink `libgfortran.la' with the above command before installing it + # make: Leaving directory '/build/gcc/src/gcc-build/i486-pc-linux-gnu/libgfortran' + # => wrong link order: libgfortran requires libquadmath + eval "$( + declare -f package_gcc-libs | \ + sed ' + /for lib in / s/libgfortran/libquadmath libgfortran/ + ' + )" + + # disable CET (Control Flow instructions endbr32/enbr64) + eval "$( + declare -f build | \ + sed ' + s/--enable-cet=auto/--disable-cet/ + ' + )" + +else + + # force enable CET (Control Flow instructions endbr32/enbr64) + eval "$( + declare -f build | \ + sed ' + s/--enable-cet=auto/--enable-cet/ + ' + )" + +fi + +makedepends_pentium4=("${makedepends_i686[@]}") |