public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] m2, build: Use LDLFAGS for mklink
@ 2023-07-13  9:07 Rainer Orth
  2023-07-13 18:09 ` Gaius Mulley
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2023-07-13  9:07 UTC (permalink / raw)
  To: gcc-patches; +Cc: Gaius Mulley, Iain Sandoe

[-- Attachment #1: Type: text/plain, Size: 964 bytes --]

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.

Ok for trunk?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2023-07-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/m2:
	* Make-lang.in (m2/boot-bin/mklink$(exeext)): Add $(LDFLAGS).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: m2-mklink-ldflags.patch --]
[-- Type: text/x-patch, Size: 766 bytes --]

# HG changeset patch
# Parent  b4327a00f1cdf8ce96f0483bbac09cc5f6108218
m2: Use LDLFAGS for mklink

diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
--- 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/
 
 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] m2, build: Use LDLFAGS for mklink
  2023-07-13  9:07 [PATCH] m2, build: Use LDLFAGS for mklink Rainer Orth
@ 2023-07-13 18:09 ` Gaius Mulley
  0 siblings, 0 replies; 2+ messages in thread
From: Gaius Mulley @ 2023-07-13 18:09 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, Iain Sandoe

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> 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.
>
> Ok for trunk?
>
> 	Rainer

sure yes - and thanks for the fix,

regards,
Gaius

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-13 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-13  9:07 [PATCH] m2, build: Use LDLFAGS for mklink Rainer Orth
2023-07-13 18:09 ` Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).