RFR: 8345744: Use C++ LINK_TYPE with SetupBuildLauncher in StaticLibs.gmk

Magnus Ihse Bursie ihse at openjdk.org
Mon Dec 9 18:53:38 UTC 2024


On Sat, 7 Dec 2024 01:55:07 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

> Please review following fix for linking static JDK launcher, thanks.
> 
> - Set LINK_TYPE to C++ when building the static launcher to make sure LDCXX instead of LD is used for linking.
> 
> - Remove -l:libstdc++. For linux, -static-libstdc++ is already set in STATIC_STDCXX_FLAGS. See https://github.com/openjdk/jdk/blob/e0d639878346946d0627a57b0eeb0cac8ca533fc/make/autoconf/lib-std.m4#L50.
> 
> See more details in https://bugs.openjdk.org/browse/JDK-8345744.

I verified locally that removing -lstdc++ works fine. 

In fact, you are already changing macOS, since the LINK_TYPE affects all platforms.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22624#issuecomment-2529091952


More information about the build-dev mailing list