LIBMANAGEMENT_OPTIMIZATION special settings on Linux with debug symbols

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Mon Mar 10 13:42:37 UTC 2025


On 2025-03-10 13:02, Baesken, Matthias wrote:

> Hello, while looking at the JDK native lib optimization levels, I 
> noticed this special setting :
>
> make/modules/java.management/Lib.gmk
>
> ifeq ($(call isTargetOs, linux)+$(COMPILE_WITH_DEBUG_SYMBOLS), true+true)
>
> LIBMANAGEMENT_OPTIMIZATION := LOW
>
> endif
>
> Why is it there ?
>
> I removed it  in out internal tests and saw no issues.
>
> Do we still need it these days ? Was it maybe done for very old  gcc 
> versions ?
>
That's a good question. As I've stated over and over again, I believe 
the overwhelming majority of the optimization flags are there for no 
good reason; at least for no reason that can be assumed to apply today.

In this particular case I did some git archaeology. It goes way back to 
JDK-8054834: Modular Source Code, the jigsaw reshuffling in 2014, and I 
did not manage to trace it roots from before that.

/Magnus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20250310/b876d464/attachment.htm>


More information about the build-dev mailing list