mirror of
https://codeberg.org/kiss-community/repo
synced 2025-01-22 10:24:48 -07:00
gcc: fix build with mold
Mold fails to dynamically link GCC, static linking works fine. This should hopefully be fixed upstream soon.
This commit is contained in:
parent
1814fddf56
commit
e4e4d460b9
@ -24,9 +24,15 @@ case $2 in "$gcc_version"*)
|
||||
bootstrap=--disable-bootstrap
|
||||
esac
|
||||
|
||||
export libat_cv_have_ifunc=no
|
||||
# Mold fails to dynamically link GCC, static linking works fine and does not
|
||||
# result in a large size increase (quite resonable). This will hopefully be
|
||||
# fixed upstream soon.
|
||||
case $CFLAGS$CXXFLAGS$(ld --version) in *mold*)
|
||||
patch -p1 < static-bin.patch
|
||||
esac
|
||||
|
||||
../gcc/configure \
|
||||
libat_cv_have_ifunc=no \
|
||||
--prefix=/usr \
|
||||
--libexecdir=/usr/lib \
|
||||
--mandir=/usr/share/man \
|
||||
|
@ -3,3 +3,4 @@ fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2
|
||||
0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
|
||||
17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459
|
||||
765614b3396d70bca3fa0ae4a813632486c6dca320e2bd13c8c39dca52be4a4c
|
||||
8ed32145f35344c58f365fa337a1db2eac147a7647847093ab34a44ca4ccdc34
|
||||
|
22
core/gcc/patches/static-bin.patch
Normal file
22
core/gcc/patches/static-bin.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/gcc/gcc/Makefile.in b/gcc/gcc/Makefile.in
|
||||
index 8a5fb3f..9b12f75 100644
|
||||
--- a/gcc/gcc/Makefile.in
|
||||
+++ b/gcc/gcc/Makefile.in
|
||||
@@ -1060,7 +1060,7 @@ ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
|
||||
ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
|
||||
|
||||
# This is the variable to use when using $(LINKER).
|
||||
-ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
|
||||
+ALL_LINKERFLAGS = $(ALL_CXXFLAGS) -static
|
||||
|
||||
# Build and host support libraries.
|
||||
|
||||
@@ -2967,7 +2967,7 @@ gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \
|
||||
# Rule for the generator programs:
|
||||
$(genprog:%=build/gen%$(build_exeext)): build/gen%$(build_exeext): build/gen%.o $(BUILD_LIBDEPS)
|
||||
+$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \
|
||||
- $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS)
|
||||
+ $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS) -static
|
||||
|
||||
omp-general.o: omp-device-properties.h
|
||||
|
@ -3,3 +3,4 @@ https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz gcc/gmp
|
||||
https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.xz gcc/mpfr
|
||||
https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz gcc/mpc
|
||||
files/c99
|
||||
patches/static-bin.patch
|
||||
|
Loading…
Reference in New Issue
Block a user