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 06:24:31 UTC 2024
On Fri, 15 Nov 2024 05:33:57 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> I switched from my standard gcc 11.3.0 devkit to 13.2.1; build works nicely with it and jtreg HS :tier1 results look similar to what I get with gcc 11.3.0.
>> I still get 90 of those ugly `warning: call to ‘vsnprintf’ declared with attribute warning: use os::vsnprintf` [-Wattribute-warning] ; maybe we should disable the attribute warnings for the lto build ?
>>
>> One thing I maybe have to add - I currently do not build the lto build with gtest (--with-gtest was removed from my script).
>
> Yes, I think it's an acceptable workaround to disable attribute-warning (It's one of the solutions I mentioned earlier, but I'm guessing you mean more aggressively). LTO is not the typical way of compiling HotSpot, so this shouldn't be a problem, until LTO becomes viable enough that it becomes the standard, but that's probably going to be a long time in the future
As mentioned in the JBS issue, some of my problems are a result of the devkit I'm using not putting
the lto-plugin in the necessary spot. So I think I'm now where @MBaesken is at.
I worry that LTO could become the default fairly quickly if it really does show good results, once the
kinds of issues @TheShermanTanker mentioned are fixed. That would make the poisoning of various
functions effectively cease to work if we disable that feature in LTO builds.
Also, does disabling of LTO for that one file actually work? The gcc docs say that mixing LTO and
non-LTO objects isn't possible with GNU binutils, and it just falls back to nolto-rel:
https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Link-Options.html#:~:text=During%20the%20incremental,link%2Dtime%20optimization
Maybe it works with the gold linker? Which seems to be the default in the devkit I'm using.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22069#discussion_r1843241421
More information about the build-dev
mailing list