Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc: Update to v14.2.1+git.c6b1b62f #683

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified g/gcc/manifest.x86_64.bin
Binary file not shown.
1,902 changes: 991 additions & 911 deletions g/gcc/manifest.x86_64.jsonc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Reilly Brogan <[email protected]>
Date: Mon, 10 Mar 2025 23:47:25 -0500
Subject: [PATCH] Downstream: Don't run fixincludes during install

Fixincludes attempts to "fix" various headers and installs them into an embedded `include-fixed` directory.

Headers in this directory override whatever the system equivalent is, which can cause build failures if the system equivalent is updated.

For instance, upstream changes to pthread.h in glibc 2.41 broke the gcc build with the very-difficult-to-diagnose error:
```
/usr/include/c++/14.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h:35,
from
/usr/include/c++/14.2.0/x86_64-pc-linux-gnu/bits/gthr.h:157,
from /usr/include/c++/14.2.0/bits/std_thread.h:46,
from /usr/include/c++/14.2.0/thread:45,
from t.cc:1:
/usr/include/c++/14.2.0/bits/std_mutex.h:206:32: error: cannot convert
‘<brace-enclosed initializer list>’ to ‘unsigned int’ in initialization
206 | __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14.2.0/ext/concurrence.h:252:32: error: cannot convert
‘<brace-enclosed initializer list>’ to ‘unsigned int’ in initialization
252 | __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
| ^~~~~~~~~~~~~~~~~~~
```

We can avoid all of this nonsense by just not running fixincludes and trusting that the headers don't need to be "fixed".

---
gcc/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index d475bf1c32e..17e47f45afe 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3435,7 +3435,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
gcc_dir=`${PWD_COMMAND}` ; \
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
cd $(build_objdir)/fixincludes && \
- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
+ $(SHELL) -c true "$${gcc_dir}/$${fix_dir}" \
$(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
done; \
fi
108 changes: 69 additions & 39 deletions g/gcc/stone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,49 @@
# SPDX-License-Identifier: MPL-2.0
#
name : gcc
version : 14.2.0
release : 7
version : 14.2.1+git.5b4e3622
release : 8
summary : GNU C++ standard library and compiler
license : GPL-3.0-or-later
homepage : https://gcc.gnu.org/
description : |
GNU C++ standard library and compiler
upstreams :
- https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz:
hash: a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
unpackdir: "gcc"
- https://libisl.sourceforge.io/isl-0.24.tar.xz:
hash: 043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad
stripdirs: 1
unpackdir: "gcc/isl"
# Use the github mirror since the official git hosting is unreliable and slow
- git|https://github.com/gcc-mirror/gcc:
# Should be the latest commit on the releases/gcc-14 branch that isn't a bump to the date
ref: 5b4e362239131967698328f3648efd7b9eea862e
builddeps :
- binary(bison)
- binary(flex)
- binary(m4)
- binary(makeinfo)
- binary(msgfmt)
- binary(python3)
- gcc-32bit
- gcc-32bit-devel
- glibc-32bit
- glibc-32bit-devel
- mpc-devel
- pkgconfig(gmp)
- pkgconfig(isl)
- pkgconfig(libxcrypt)
- pkgconfig(libzstd)
- pkgconfig(mpfr)
- pkgconfig(zlib)
- gcc-32bit-devel
- glibc-32bit-devel
- mpc-devel
toolchain : gnu
tuning :
- fortify: false
- harden: false
- lto: false
- nosemantic
# - optimize: speed
- symbolic
setup : |
%patch %(pkgdir)/perf/increase-vectorize-cost-model-to-cheap.patch
%patch %(pkgdir)/perf/use-highest-optimize-value.patch
%patch %(pkgdir)/serpent/0001-Use-modern-linker-locations-for-Serpent-OS.patch
%patch %(pkgdir)/serpent/0001-Install-libraries-into-lib-rather-than-lib64.patch
%patch %(pkgdir)/serpent/disable-rpath.patch
%patch %(pkgdir)/aeryn/0001-Use-modern-linker-locations-for-Serpent-OS.patch
%patch %(pkgdir)/aeryn/0001-Install-libraries-into-lib-rather-than-lib64.patch
%patch %(pkgdir)/aeryn/0001-Downstream-Don-t-run-fixincludes-during-install.patch
%patch %(pkgdir)/aeryn/disable-rpath.patch

mkdir build && cd build
../configure \
Expand All @@ -73,9 +72,10 @@ setup : |
--enable-threads=yes \
--with-arch=%(march) \
--with-arch_32=%(march) \
--with-bugurl='https://github.com/serpent-os/recipes/issues' \
--with-bugurl='https://github.com/AerynOS/recipes/issues' \
--with-build-config=bootstrap-O1 \
--with-gcc-major-version-only \
--with-gxx-libcxx-include-dir=/usr/include/c++/v1 \
--with-isl \
--with-linker-hash-style=gnu \
--with-multilib-list=m32,m64 \
Expand All @@ -102,9 +102,20 @@ install : |
rm -rv %(installroot)%(datadir)/info
rm -v %(installroot)/usr/lib*/*.la

# Temporary, make x86_64-aeryn-linux a target alias of x86_64-serpent-linux
# The next step after this (after all toolchain packages are similarly updated)
# is to rebuild with the new triple and create compat aliases the other way
pushd %(installroot)/%(bindir)
for i in c++ g++ gcc gcc-${major_version} gcc-ar gcc-nm gcc-ranlib gfortran ; do
ln -sv x86_64-serpent-linux-${i} x86_64-aeryn-linux-${i}
done
popd
ln -srv %(installroot)/usr/include/c++/14/x86_64-serpent-linux %(installroot)/usr/include/c++/14/x86_64-aeryn-linux
ln -srv %(installroot)/usr/lib/gcc/x86_64-serpent-linux %(installroot)/usr/lib/gcc/x86_64-aeryn-linux

# TODO: Remove once we can remove gcc-devel and gcc-32bit-devel from the index
mkdir %(installroot)/usr/share/tmp/
touch %(installroot)/usr/share/tmp/gcc{,-32bit}-devel
mkdir -p %(installroot)/usr/share/doc/replace/
touch %(installroot)/usr/share/doc/replace/gcc{,-32bit}-devel %(installroot)/usr/share/doc/replace/g++-32bit
packages :
- "libgcc":
paths:
Expand All @@ -130,15 +141,6 @@ packages :
- "libgomp-32bit":
paths:
- /usr/lib32/libgomp*.so*
- "libstdc++":
paths:
- /usr/lib/lib*++*.so*
- /usr/share/gcc-*/python/libstdcxx/*
- /usr/share/gdb/auto-load/usr/lib
- "libstdc++-32bit":
paths:
- /usr/lib32/lib*++*.so*
- /usr/share/gdb/auto-load/usr/lib32
- "libgfortran":
paths:
- /usr/lib/*fortran*.so*
Expand Down Expand Up @@ -175,30 +177,58 @@ packages :
- libquadmath-32bit
- libgomp-32bit
- libgfortran-32bit
- "libstdc++":
paths:
- /usr/lib/lib*++*.so*
- /usr/share/gcc-*/python/libstdcxx/*
- /usr/share/gdb/auto-load/usr/lib
- /usr/share/locale/*/LC_MESSAGES/libstdc++.mo
- "libstdc++-devel":
paths:
- /usr/lib/lib*++*.a
- /usr/lib/lib*++*.so
- /usr/include/c++
rundeps:
- libstdc++
- glibc-devel
# LLVM checks for a "valid" GCC installation in order to determine where the libstdc++ headers
# live. It's probably possible to patch around that but for now let's just pull in GCC
- binary(gcc)
- "libstdc++-32bit":
paths:
- /usr/lib32/lib*++*.so*
- /usr/share/gdb/auto-load/usr/lib32
rundeps:
- libstdc++
- "libstdc++-32bit-devel":
paths:
- /usr/lib32/lib*++*.a
- /usr/lib32/lib*++*.so
- /usr/include/c++/*-serpent-linux/32/*
rundeps:
- libstdc++-32bit
- libstdc++-devel
- glibc-32bit-devel
- "g++":
paths:
- /usr/bin/*c++
- /usr/bin/*g++
- /usr/bin/cpp
- /usr/lib/gcc/*-serpent-linux/*/cc1plus
- /usr/lib/gcc/*-serpent-linux/*/g++-mapper-server
- /usr/lib/lib*++*.a
- /usr/lib/lib*++*.so
- /usr/include/c++
- /usr/share/locale/*/LC_MESSAGES/cpplib.mo
- /usr/share/man/*/cpp*
- /usr/share/man/*/g++*
rundeps:
- binary(gcc)
- libstdc++
- libcxx-devel
- libstdc++-devel
- "g++-32bit":
paths:
- /usr/lib32/lib*++*.a
- /usr/lib32/lib*++*.so
- /usr/include/c++/*-serpent-linux/32/*
- /usr/share/doc/replace/g++-32bit
rundeps:
- g++
- libstdc++-32bit
- libstdc++-32bit-devel
- "gfortran":
paths:
- /usr/bin/*fortran*
Expand All @@ -224,11 +254,11 @@ packages :
# TODO: Delete once moss can handle package removals
- "gcc-devel":
paths:
- /usr/share/tmp/gcc-devel
- /usr/share/doc/replace/gcc-devel
rundeps:
- binary(gcc)
- "gcc-32bit-devel":
paths:
- /usr/share/tmp/gcc-32bit-devel
- /usr/share/doc/replace/gcc-32bit-devel
rundeps:
- gcc-32bit
Binary file modified g/gmp/manifest.x86_64.bin
Binary file not shown.
13 changes: 8 additions & 5 deletions g/gmp/manifest.x86_64.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** Human readable report. This is not consumed by boulder */
{
"manifest-version": "0.1",
"manifest-version": "0.2",
"packages": {
"gmp": {
"depends": [
Expand All @@ -11,9 +11,9 @@
],
"files": [
"/usr/lib/libgmp.so.10",
"/usr/lib/libgmp.so.10.4.1",
"/usr/lib/libgmp.so.10.5.0",
"/usr/lib/libgmpxx.so.4",
"/usr/lib/libgmpxx.so.4.6.1",
"/usr/lib/libgmpxx.so.4.7.0",
"/usr/share/info/gmp.info",
"/usr/share/info/gmp.info-1",
"/usr/share/info/gmp.info-2"
Expand All @@ -25,6 +25,9 @@
]
},
"gmp-devel": {
"depends": [
"gmp"
],
"files": [
"/usr/include/gmp.h",
"/usr/include/gmpxx.h",
Expand All @@ -43,6 +46,6 @@
}
},
"source-name": "gmp",
"source-release": "2",
"source-version": "6.2.1"
"source-release": "3",
"source-version": "6.3.0"
}
14 changes: 8 additions & 6 deletions g/gmp/stone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# SPDX-License-Identifier: MPL-2.0
#
name : gmp
version : 6.2.1
release : 2
version : 6.3.0
release : 3
summary : Library for arbitrary precision arithmetic
license :
- GPL-2.0-or-later
Expand All @@ -14,13 +14,15 @@ homepage : https://www.gmplib.org/
description : |
Library for arbitrary precision arithmetic.
upstreams :
- https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz: fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2
builddeps :
- binary(file)
- binary(m4)
- https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz: a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
setup : |
%configure --enable-cxx
build : |
%make
install : |
%make_install
check : |
%make check
tuning :
- lto: full
- optimize: speed
Binary file added i/isl/manifest.x86_64.bin
Binary file not shown.
Loading