forked from kiss-community/repo
Mold fails to dynamically link GCC, static linking works fine. This should hopefully be fixed upstream soon.
23 lines
856 B
Diff
23 lines
856 B
Diff
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
|
|
|