RFR: 8343698: Linux x86_64 lto build gives a lot of warnings and fails lto-wrapper: fatal error: make returned 2 exit status [v2]

Kim Barrett kbarrett at openjdk.org
Fri Nov 15 22:52:30 UTC 2024


On Fri, 15 Nov 2024 18:19:51 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use -DINCLUDE_LINK_TIME_OPTIMIZATION=1 in lto build
>
> make/hotspot/lib/JvmFeatures.gmk line 173:
> 
>> 171:   JVM_OPTIMIZATION := HIGHEST_JVM
>> 172:   ifeq ($(call isCompiler, gcc), true)
>> 173:     JVM_CFLAGS_FEATURES += -DINCLUDE_LINK_TIME_OPTIMIZATION=1 -flto=auto -fuse-linker-plugin -fno-strict-aliasing \
> 
> I don't get this. I find no pre-existing INCLUDE_LINK_TIME_OPTIMIZATION ifdefs, and you are not adding any. What is the purpose of this?

I asked the same question.  But as further discussion has indicated, we might need this define for
disabling the poisoning of selected C library functions when building with LTO, because LTO doesn't
support the mechanism used for that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22069#discussion_r1844609721


More information about the build-dev mailing list