summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPellegrino Prevete2023-04-12 21:26:46 +0000
committerPellegrino Prevete2023-04-12 21:26:46 +0000
commit0c3b926685742b691db2f18a9fef7ab25287968b (patch)
tree23fa24d8c998d4cacc7bdb8a5009f17d3707db67
parent56ac0326229ff42d42a04e17a07b86ed4c29bdb9 (diff)
downloadaur-0c3b926685742b691db2f18a9fef7ab25287968b.tar.gz
fix build
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD164
2 files changed, 132 insertions, 56 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e389e0faecea..2e62142f1058 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gcc11
pkgdesc = The GNU Compiler Collection (11.x.x)
pkgver = 11.3.0
- pkgrel = 5
+ pkgrel = 6
url = https://gcc.gnu.org
arch = x86_64
license = GPL
@@ -12,14 +12,13 @@ pkgbase = gcc11
checkdepends = inetutils
makedepends = binutils
makedepends = doxygen
- makedepends = git
makedepends = libmpc
makedepends = python
- makedepends = libisl.so
options = !emptydirs
options = !lto
- source = https://sourceware.org/pub/gcc/releases/gcc-11.3.0/gcc-11.3.0.tar.xz
- source = https://sourceware.org/pub/gcc/releases/gcc-11.3.0/gcc-11.3.0.tar.xz.sig
+ source = https://ftp.gnu.org/gnu/gcc/gcc-11.3.0/gcc-11.3.0.tar.xz
+ source = https://ftp.gnu.org/gnu/gcc/gcc-11.3.0/gcc-11.3.0.tar.xz.sig
+ source = https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.24.tar.bz2
source = c89
source = c99
validpgpkeys = F3691687D867B81B51CE07D9BBE43771487328A9
@@ -28,26 +27,33 @@ pkgbase = gcc11
validpgpkeys = D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62
b2sums = 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469
b2sums = SKIP
+ b2sums = 88a178dad5fe9c33be5ec5fe4ac9abc0e075a86cff9184f75cedb7c47de67ce3be273bd0db72286ba0382f4016e9d74855ead798ad7bccb015b853931731828e
b2sums = 2c64090b879d6faea7f20095eff1b9bd6a09fe3b15b3890783d3715171678ab62d32c91af683b878746fb14441dbe09768474417840f96a561443415f76afb63
b2sums = 3cf318835b9833ac7c5d3a6026fff8b4f18b098e18c9649d00e32273688ff06ec3af41f0d0aee9d2261725e0ff08f47a224ccfe5ebb06646aaf318ff8ac9a0d1
pkgname = gcc11
pkgdesc = The GNU Compiler Collection - C and C++ frontends (11.x.x)
- depends = gcc11-libs=11.3.0-5
+ depends = gcc11-libs=11.3.0-6
depends = binutils>=2.28
depends = libmpc
depends = zstd
- depends = libisl.so
+ provides = gcc
options = !emptydirs
options = staticlibs
pkgname = gcc11-libs
pkgdesc = Runtime libraries shipped by GCC (11.x.x)
depends = glibc>=2.27
+ provides = gcc-libs
+ provides = libgfortran.so
+ provides = libubsan.so
+ provides = libasan.so
+ provides = libtsan.so
+ provides = liblsan.so
options = !emptydirs
options = !strip
pkgname = gcc11-fortran
pkgdesc = Fortran front-end for GCC (11.x.x)
- depends = gcc11=11.3.0-5
- depends = libisl.so
+ depends = gcc11=11.3.0-6
+ provides = gcc-fortran
diff --git a/PKGBUILD b/PKGBUILD
index 301940e408e3..82c11549585d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,20 +9,29 @@
_pkgbase="gcc"
pkgbase="${_pkgbase}11"
pkgname=("${pkgbase}"
- "${pkgbase}-libs"
+ "${pkgbase}-libs"
"${pkgbase}-fortran")
pkgver=11.3.0
_majorver=${pkgver%%.*}
-pkgrel=5
+_islver=0.24
+pkgrel=6
pkgdesc='The GNU Compiler Collection (11.x.x)'
arch=(x86_64)
license=(GPL LGPL FDL custom)
url='https://gcc.gnu.org'
-makedepends=(binutils doxygen git libmpc python libisl.so)
+makedepends=(
+ binutils
+ doxygen
+ # git
+ libmpc
+ python
+ # libisl.so
+)
checkdepends=(dejagnu inetutils)
options=(!emptydirs !lto)
_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*}
-source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig}
+source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
+ https://gcc.gnu.org/pub/gcc/infrastructure/isl-${_islver}.tar.bz2
c89 c99
)
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
@@ -31,78 +40,122 @@ validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
b2sums=('7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469'
'SKIP'
+ '88a178dad5fe9c33be5ec5fe4ac9abc0e075a86cff9184f75cedb7c47de67ce3be273bd0db72286ba0382f4016e9d74855ead798ad7bccb015b853931731828e'
'2c64090b879d6faea7f20095eff1b9bd6a09fe3b15b3890783d3715171678ab62d32c91af683b878746fb14441dbe09768474417840f96a561443415f76afb63'
'3cf318835b9833ac7c5d3a6026fff8b4f18b098e18c9649d00e32273688ff06ec3af41f0d0aee9d2261725e0ff08f47a224ccfe5ebb06646aaf318ff8ac9a0d1')
prepare() {
+ echo "${_libdir}"
[[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc
cd gcc
+ # link isl for in-tree build
+ ln -s ../isl-${_islver} isl || true
+
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
# Arch Linux installs x86_64 libraries /lib
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
+ # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" gcc/configure
+
mkdir -p "$srcdir/gcc-build"
}
build() {
- local _confflags=(
- --prefix=/usr
- --libdir=/usr/lib
- --libexecdir=/usr/lib
- --mandir=/usr/share/man
- --infodir=/usr/share/info
- --with-bugurl=https://bugs.archlinux.org/
- --with-linker-hash-style=gnu
- --with-system-zlib
- --enable-__cxa_atexit
- --enable-cet=auto
- --enable-checking=release
- --enable-clocale=gnu
- --enable-default-pie
- --enable-default-ssp
- --enable-gnu-indirect-function
- --enable-gnu-unique-object
- --enable-linker-build-id
- --enable-lto
- --enable-plugin
- --enable-shared
- --enable-threads=posix
- --disable-libssp
- --disable-libstdcxx-pch
- --disable-werror
- --with-build-config=bootstrap-lto
- --enable-link-serialization=1
- --program-suffix=-${_majorver}
- --enable-version-specific-runtime-libs
- --disable-multilib
-)
+ local _opts=(
+ --prefix=/usr
+ --build=$CHOST
+ --host=$CHOST
+ --target=$CHOST
+ --libdir=/usr/lib
+ --libexecdir=/usr/lib
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
+ --with-pkgversion="Arch Linux ${pkgver}-${pkgrel}"
+ --with-bugurl=https://bugs.archlinux.org/
+ # --enable-bootstrap
+ --enable-languages=c,c++,fortran,lto
+ --enable-shared
+ --enable-threads=posix
+ --with-system-zlib
+ --with-isl
+ --with-linker-hash-style=gnu
+ --enable-__cxa_atexit
+ --enable-cet=auto
+ --enable-checking=release
+ --enable-clocale=gnu
+ --enable-default-pie
+ --enable-default-ssp
+ --enable-gnu-indirect-function
+ --enable-gnu-unique-object
+ --enable-linker-build-id
+ --enable-lto
+ --enable-plugin
+ --disable-libstdcxx-pch
+ --enable-install-libiberty
+ --disable-libssp
+ --disable-libunwind-exceptions
+ --disable-werror
+ # --with-build-config=bootstrap-lto
+ # --enable-link-serialization=1
+ --program-suffix=-${_majorver}
+ --enable-version-specific-runtime-libs
+ --disable-multilib
+ )
cd gcc-build
+ export CPPFLAGS=""
+ export CFLAGS=""
+ export CXXFLAGS=""
+ export LDFLAGS=""
+
# Credits @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD
# TODO: properly deal with the build issues resulting from this
CFLAGS=${CFLAGS/-Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
- "$srcdir/gcc/configure" \
- --enable-languages=c,c++,fortran,lto \
- --enable-bootstrap \
- "${_confflags[@]:?_confflags unset}"
+ local _cflags=(
+ -I/usr/include
+ )
+
+ local _ldflags=(
+ # /${_libdir}/libstdc++.so
+ )
# Work-around `msgfmt: /build/gcc11/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libicuuc.so.72)`
# The trick is borrowed from https://aur.archlinux.org/packages/gcc49
- export LD_PRELOAD=/usr/lib/libstdc++.so
+ export LD_PRELOAD="/usr/lib/libstdc++.so"
# see https://bugs.archlinux.org/task/71777 for rationale re *FLAGS handling
- make -O STAGE1_CFLAGS="-O2" \
- BOOT_CFLAGS="$CFLAGS" \
- BOOT_LDFLAGS="$LDFLAGS" \
- LDFLAGS_FOR_TARGET="$LDFLAGS" \
- profiledbootstrap
+
+ local _make_opts=(
+ STAGE1_CFLAGS='-O2'
+ BOOT_CFLAGS="${_cflags[*]}"
+ BOOT_LDFLAGS="${_ldflags[*]}"
+ LDFLAGS_FOR_TARGET="${_ldflags[*]}"
+ )
+
+ # CC="gcc-9" \
+ # CXX="g++-9" \
+ CPPFLAGS="${_cflags[*]}" \
+ CFLAGS="${_cflags[*]}" \
+ CXXFLAGS="${_cflags[*]}" \
+ LDFLAGS="${_ldflags[*]}" \
+ "$srcdir/gcc/configure" ${_opts[*]}
+
+ # CC="gcc-9" \
+ # CXX="g++-9" \
+ CPPFLAGS="${_cflags[*]}" \
+ CFLAGS="${_cflags[*]}" \
+ CXXFLAGS="${_cflags[*]}" \
+ LDFLAGS="${_ldflags[*]}" \
+ LD_PRELOAD="/usr/lib/libstdc++.so" \
+ make
# make documentation
make -O -C $CHOST/libstdc++-v3/doc doc-man-doxygen
@@ -123,6 +176,12 @@ package_gcc11-libs() {
pkgdesc="Runtime libraries shipped by GCC (11.x.x)"
depends=('glibc>=2.27')
options=(!emptydirs !strip)
+ provides=("${_pkgbase}-libs"
+ "libgfortran.so"
+ "libubsan.so"
+ "libasan.so"
+ "libtsan.so"
+ "liblsan.so")
cd gcc-build
make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared
@@ -155,8 +214,15 @@ package_gcc11-libs() {
package_gcc11() {
pkgdesc="The GNU Compiler Collection - C and C++ frontends (11.x.x)"
- depends=("${pkgbase}-libs=$pkgver-$pkgrel" 'binutils>=2.28' libmpc zstd libisl.so)
+ depends=(
+ "${pkgbase}-libs=${pkgver}-${pkgrel}"
+ 'binutils>=2.28'
+ # libisl.so
+ libmpc
+ zstd
+ )
options=(!emptydirs staticlibs)
+ provides=("${_pkgbase}")
cd gcc-build
@@ -215,7 +281,11 @@ package_gcc11() {
package_gcc11-fortran() {
pkgdesc='Fortran front-end for GCC (11.x.x)'
- depends=("${pkgbase}=$pkgver-$pkgrel" libisl.so)
+ depends=(
+ "${pkgbase}=$pkgver-$pkgrel"
+ # libisl.so
+ )
+ provides=("${_pkgbase}-fortran")
cd gcc-build
make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \