git » gcc.git » commit fdeea09

gcc 12.3.0

author Urja (ARMLFS builder)
2024-07-12 17:43:21 UTC
committer Urja (ARMLFS builder)
2024-07-12 17:43:21 UTC
parent ca17e5ffe60c5e294e2f2aa8c9fae2fb58f6864b

gcc 12.3.0

PKGBUILD +24 -8

diff --git a/PKGBUILD b/PKGBUILD
index 8e90a30..c2abd8a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,9 @@
 pkgname=(gcc gcc-libs lto-dump gcc-fortran gcc-go)
 pkgver=12.3.0
 _majorver=${pkgver%%.*}
-pkgrel=3
+pkgrel=4
 pkgdesc='The GNU Compiler Collection'
-arch=(armv7h)
+arch=(armv7h 'aarch64')
 license=(GPL-3.0-with-GCC-exception GFDL-1.3-or-later)
 url='https://gcc.gnu.org'
 options=(!emptydirs !lto !distcc)
@@ -21,6 +21,13 @@ prepare() {
   # Do not run fixincludes
   sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
 
+
+  # Arch Linux installs x86_64 libraries /lib
+  [[ $CARCH == "x86_64" ]] && sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
+
+  # ARMLFS installs aarch64 libraries /lib
+  [[ $CARCH == "aarch64" ]] && sed -i '/lp64=/s/lib64/lib/' gcc/config/aarch64/t-aarch64-linux
+
   mkdir -p "$srcdir/gcc-build"
 #  mkdir -p "$srcdir/libgccjit-build"
 }
@@ -29,7 +36,7 @@ build() {
   local _confflags=(
 	LD=ld
       --prefix=/usr
-      --with-bugurl=https://social.treehouse.systems/@urja
+      --with-bugurl=https://armlfs.urja.dev/
       --with-linker-hash-style=gnu
       --with-system-zlib
       --enable-__cxa_atexit
@@ -51,13 +58,13 @@ build() {
       --disable-libstdcxx-pch
       --disable-multilib
       --disable-werror
-      --host=armv7l-unknown-linux-gnueabihf
-      --build=armv7l-unknown-linux-gnueabihf
-      --with-arch=armv7-a
-      --with-float=hard
-      --with-fpu=vfpv3-d16
   )
 
+  # Specify build host types, triplet patch
+  [[ $CARCH == "armv7h" ]] && _confflags+=(--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf --with-arch=armv7ve --with-float=hard --with-fpu=neon-vfpv4)
+  [[ $CARCH == "aarch64" ]] && _confflags+=(--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --with-arch=armv8-a --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419)
+
+
   cd gcc-build
 
   # Credits @allanmcrae
@@ -83,6 +90,15 @@ build() {
 }
 
 check() {
+  # Disable for now - please do run if you suspect the setup.
+  # But since "some" cases always fail (like 200 out of 100000),
+  # the gcc testsuite has a pretty bad signal/noise for the time it takes to run.
+  # (Like, you'd need to be a gcc expert to know if your gcc is more
+  #  subtly broken than usual... which i'm not yet, quite. And since
+  #  we have no programmatic fail criterion, I might not even look 
+  #  at the results of any specific run.)
+  return 0
+
   cd gcc-build
 
   # disable libphobos test to avoid segfaults