aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2023-07-13 21:44:52 +0200
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2023-07-13 21:44:52 +0200
commitae862e0e47cb2d62d7c624ab999a3bd8bd2914ef (patch)
treec74c261a73a57c3acde9c31f02f556f37fcd3fa4
parent616a101848bfd5b61ffdd87ae9b1153139d916ca (diff)
downloadgcc-ae862e0e47cb2d62d7c624ab999a3bd8bd2914ef.zip
gcc-ae862e0e47cb2d62d7c624ab999a3bd8bd2914ef.tar.gz
gcc-ae862e0e47cb2d62d7c624ab999a3bd8bd2914ef.tar.bz2
m2, build: Use LDLFAGS for mklink
When trying to bootstrap current trunk on macOS 14.0 beta 3 with Xcode 15 beta 4, the build failed running mklink in stage 2: unset CC ; m2/boot-bin/mklink -s --langc++ --exit --name m2/mc-boot/main.cc /vol/gcc/src/hg/master/darwin/gcc/m2/init/mcinit dyld[55825]: Library not loaded: /vol/gcc/lib/libstdc++.6.dylib While it's unclear to me why this only happens on macOS 14, the problem is clear: unlike other C++ executables, mklink isn't linked with -static-libstdc++ which is passed in from toplevel in LDFLAGS. This patch fixes that and allows the build to continue. Bootstrapped on x86_64-apple-darwin23.0.0, i386-pc-solaris2.11, and sparc-sun-solaris2.11. 2023-07-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc/m2: * Make-lang.in (m2/boot-bin/mklink$(exeext)): Add $(LDFLAGS).
-rw-r--r--gcc/m2/Make-lang.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index 6fb551f..0fe671e 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -1653,7 +1653,7 @@ m2/gm2-compiler-boot/gm2.a: m2/boot-bin/mc$(exeext)
m2/boot-bin/mklink$(exeext): $(srcdir)/m2/tools-src/mklink.c
-test -d $(@D) || $(mkinstalldirs) $(@D)
- $(CXX) $(CFLAGS) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-compiler-boot -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) $< -o $@
+ $(CXX) $(CFLAGS) $(LDFLAGS) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-compiler-boot -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) $< -o $@
m2/gm2-compiler-boot/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-compiler-boot/%.def $(MCDEPS)
-test -d $(@D) || $(mkinstalldirs) $(@D)