Skip to content

Commit 1b44eac

Browse files
committed
gcc: Update to v14.2.0+git.5cb69a5e
Changes: - Update to latest in 14 series - Fix build failure caused by updating glibc to v2.41 while gcc still ships an outdated pthread.h - Various changes to update to AerynOS - Add compatibility symlinks in preparation for renaming the target triple to x86_64-aeryn-linux - Split out libstdc++ devel packages so that it can be used with Clang without having to pull in g++ (and deps) Signed-off-by: Reilly Brogan <[email protected]>
1 parent 877a59b commit 1b44eac

7 files changed

+1076
-902
lines changed

g/gcc/manifest.x86_64.bin

1.15 KB
Binary file not shown.

g/gcc/manifest.x86_64.jsonc

+968-871
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Reilly Brogan <[email protected]>
3+
Date: Mon, 10 Mar 2025 23:47:25 -0500
4+
Subject: [PATCH] Downstream: Don't run fixincludes during install
5+
6+
Fixincludes attempts to "fix" various headers and installs them into an embedded `include-fixed` directory.
7+
8+
Headers in this directory override whatever the system equivalent is, which can cause build failures if the system equivalent is updated.
9+
10+
For instance, upstream changes to pthread.h in glibc 2.41 broke the gcc build with the very-difficult-to-diagnose error:
11+
```
12+
/usr/include/c++/14.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h:35,
13+
from
14+
/usr/include/c++/14.2.0/x86_64-pc-linux-gnu/bits/gthr.h:157,
15+
from /usr/include/c++/14.2.0/bits/std_thread.h:46,
16+
from /usr/include/c++/14.2.0/thread:45,
17+
from t.cc:1:
18+
/usr/include/c++/14.2.0/bits/std_mutex.h:206:32: error: cannot convert
19+
‘<brace-enclosed initializer list>’ to ‘unsigned int’ in initialization
20+
206 | __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
21+
| ^~~~~~~~~~~~~~~~~~~
22+
/usr/include/c++/14.2.0/ext/concurrence.h:252:32: error: cannot convert
23+
‘<brace-enclosed initializer list>’ to ‘unsigned int’ in initialization
24+
252 | __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
25+
| ^~~~~~~~~~~~~~~~~~~
26+
```
27+
28+
We can avoid all of this nonsense by just not running fixincludes and trusting that the headers don't need to be "fixed".
29+
30+
---
31+
gcc/Makefile.in | 2 +-
32+
1 file changed, 1 insertion(+), 1 deletion(-)
33+
34+
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
35+
index d475bf1c32e..17e47f45afe 100644
36+
--- a/gcc/Makefile.in
37+
+++ b/gcc/Makefile.in
38+
@@ -3435,7 +3435,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
39+
gcc_dir=`${PWD_COMMAND}` ; \
40+
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
41+
cd $(build_objdir)/fixincludes && \
42+
- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
43+
+ $(SHELL) -c true "$${gcc_dir}/$${fix_dir}" \
44+
$(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
45+
done; \
46+
fi
File renamed without changes.

g/gcc/stone.yaml

+62-31
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,29 @@
44
# SPDX-License-Identifier: MPL-2.0
55
#
66
name : gcc
7-
version : 14.2.0
8-
release : 7
7+
version : 14.2.0+git.5cb69a5e
8+
release : 8
99
summary : GNU C++ standard library and compiler
1010
license : GPL-3.0-or-later
1111
homepage : https://gcc.gnu.org/
1212
description : |
1313
GNU C++ standard library and compiler
1414
upstreams :
15-
- https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz:
16-
hash: a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
17-
unpackdir: "gcc"
15+
# - https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz:
16+
# hash: a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
17+
# unpackdir: "gcc"
18+
- git|https://gcc.gnu.org/git/gcc.git:
19+
ref: 5cb69a5e4f136dd92c2182d6744aff2c12291a4f
1820
- https://libisl.sourceforge.io/isl-0.24.tar.xz:
1921
hash: 043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad
2022
stripdirs: 1
21-
unpackdir: "gcc/isl"
23+
unpackdir: "gcc.git/isl"
2224
builddeps :
2325
- binary(bison)
2426
- binary(flex)
2527
- binary(m4)
2628
- binary(makeinfo)
29+
- binary(msgfmt)
2730
- binary(python3)
2831
- gcc-32bit
2932
- gcc-32bit-devel
@@ -39,15 +42,17 @@ toolchain : gnu
3942
tuning :
4043
- fortify: false
4144
- harden: false
45+
- lto: false
4246
- nosemantic
4347
# - optimize: speed
4448
- symbolic
4549
setup : |
4650
%patch %(pkgdir)/perf/increase-vectorize-cost-model-to-cheap.patch
4751
%patch %(pkgdir)/perf/use-highest-optimize-value.patch
48-
%patch %(pkgdir)/serpent/0001-Use-modern-linker-locations-for-Serpent-OS.patch
49-
%patch %(pkgdir)/serpent/0001-Install-libraries-into-lib-rather-than-lib64.patch
50-
%patch %(pkgdir)/serpent/disable-rpath.patch
52+
%patch %(pkgdir)/aeryn/0001-Use-modern-linker-locations-for-Serpent-OS.patch
53+
%patch %(pkgdir)/aeryn/0001-Install-libraries-into-lib-rather-than-lib64.patch
54+
%patch %(pkgdir)/aeryn/0001-Downstream-Don-t-run-fixincludes-during-install.patch
55+
%patch %(pkgdir)/aeryn/disable-rpath.patch
5156
5257
mkdir build && cd build
5358
../configure \
@@ -73,7 +78,7 @@ setup : |
7378
--enable-threads=yes \
7479
--with-arch=%(march) \
7580
--with-arch_32=%(march) \
76-
--with-bugurl='https://github.com/serpent-os/recipes/issues' \
81+
--with-bugurl='https://github.com/AerynOS/recipes/issues' \
7782
--with-build-config=bootstrap-O1 \
7883
--with-gcc-major-version-only \
7984
--with-isl \
@@ -102,9 +107,20 @@ install : |
102107
rm -rv %(installroot)%(datadir)/info
103108
rm -v %(installroot)/usr/lib*/*.la
104109
110+
# Temporary, make x86_64-aeryn-linux a target alias of x86_64-serpent-linux
111+
# The next step after this (after all toolchain packages are similarly updated)
112+
# is to rebuild with the new triple and create compat aliases the other way
113+
pushd %(installroot)/%(bindir)
114+
for i in c++ g++ gcc gcc-${major_version} gcc-ar gcc-nm gcc-ranlib gfortran ; do
115+
ln -sv x86_64-serpent-linux-${i} x86_64-aeryn-linux-${i}
116+
done
117+
popd
118+
ln -srv %(installroot)/usr/include/c++/14/x86_64-serpent-linux %(installroot)/usr/include/c++/14/x86_64-aeryn-linux
119+
ln -srv %(installroot)/usr/lib/gcc/x86_64-serpent-linux %(installroot)/usr/lib/gcc/x86_64-aeryn-linux
120+
105121
# TODO: Remove once we can remove gcc-devel and gcc-32bit-devel from the index
106-
mkdir %(installroot)/usr/share/tmp/
107-
touch %(installroot)/usr/share/tmp/gcc{,-32bit}-devel
122+
mkdir -p %(installroot)/usr/share/doc/replace/
123+
touch %(installroot)/usr/share/doc/replace/gcc{,-32bit}-devel %(installroot)/usr/share/doc/replace/g++-32bit
108124
packages :
109125
- "libgcc":
110126
paths:
@@ -130,15 +146,6 @@ packages :
130146
- "libgomp-32bit":
131147
paths:
132148
- /usr/lib32/libgomp*.so*
133-
- "libstdc++":
134-
paths:
135-
- /usr/lib/lib*++*.so*
136-
- /usr/share/gcc-*/python/libstdcxx/*
137-
- /usr/share/gdb/auto-load/usr/lib
138-
- "libstdc++-32bit":
139-
paths:
140-
- /usr/lib32/lib*++*.so*
141-
- /usr/share/gdb/auto-load/usr/lib32
142149
- "libgfortran":
143150
paths:
144151
- /usr/lib/*fortran*.so*
@@ -175,30 +182,54 @@ packages :
175182
- libquadmath-32bit
176183
- libgomp-32bit
177184
- libgfortran-32bit
185+
- "libstdc++":
186+
paths:
187+
- /usr/lib/lib*++*.so*
188+
- /usr/share/gcc-*/python/libstdcxx/*
189+
- /usr/share/gdb/auto-load/usr/lib
190+
- /usr/share/locale/*/LC_MESSAGES/libstdc++.mo
191+
- "libstdc++-devel":
192+
paths:
193+
- /usr/lib/lib*++*.a
194+
- /usr/lib/lib*++*.so
195+
- /usr/include/c++
196+
rundeps:
197+
- libstdc++
198+
- glibc-devel
199+
- "libstdc++-32bit":
200+
paths:
201+
- /usr/lib32/lib*++*.so*
202+
- /usr/share/gdb/auto-load/usr/lib32
203+
rundeps:
204+
- libstdc++
205+
- "libstdc++-32bit-devel":
206+
paths:
207+
- /usr/lib32/lib*++*.a
208+
- /usr/lib32/lib*++*.so
209+
- /usr/include/c++/*-serpent-linux/32/*
210+
rundeps:
211+
- libstdc++-32bit
212+
- libstdc++-devel
213+
- glibc-32bit-devel
178214
- "g++":
179215
paths:
180216
- /usr/bin/*c++
181217
- /usr/bin/*g++
182218
- /usr/bin/cpp
183219
- /usr/lib/gcc/*-serpent-linux/*/cc1plus
184220
- /usr/lib/gcc/*-serpent-linux/*/g++-mapper-server
185-
- /usr/lib/lib*++*.a
186-
- /usr/lib/lib*++*.so
187-
- /usr/include/c++
188221
- /usr/share/locale/*/LC_MESSAGES/cpplib.mo
189222
- /usr/share/man/*/cpp*
190223
- /usr/share/man/*/g++*
191224
rundeps:
192225
- binary(gcc)
193-
- libstdc++
226+
- libstdc++-devel
194227
- "g++-32bit":
195228
paths:
196-
- /usr/lib32/lib*++*.a
197-
- /usr/lib32/lib*++*.so
198-
- /usr/include/c++/*-serpent-linux/32/*
229+
- /usr/share/doc/replace/g++-32bit
199230
rundeps:
200231
- g++
201-
- libstdc++-32bit
232+
- libstdc++-32bit-devel
202233
- "gfortran":
203234
paths:
204235
- /usr/bin/*fortran*
@@ -224,11 +255,11 @@ packages :
224255
# TODO: Delete once moss can handle package removals
225256
- "gcc-devel":
226257
paths:
227-
- /usr/share/tmp/gcc-devel
258+
- /usr/share/doc/replace/gcc-devel
228259
rundeps:
229260
- binary(gcc)
230261
- "gcc-32bit-devel":
231262
paths:
232-
- /usr/share/tmp/gcc-32bit-devel
263+
- /usr/share/doc/replace/gcc-32bit-devel
233264
rundeps:
234265
- gcc-32bit

0 commit comments

Comments
 (0)