LIBMANAGEMENT_OPTIMIZATION special settings on Linux with debug symbols
Erik Joelsson
erik.joelsson at oracle.com
Mon Mar 10 13:41:58 UTC 2025
On 3/10/25 5:02 AM, 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've traced this back to [1]. In that change they lowered the
optimization level to that of fastdebug for the libraries that had full
debug symbols configured, at least for Linux. See code here [2]. The
only explanation I can give is that they tried to be very conservative
with the debug symbols change.
> 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 ?
>
I very much doubt it's needed, but it does mean that this lib has been
compiled at "LOW" for most, if not all, relevant builds of OpenJDK since
then.
/Erik
[1] https://bugs.openjdk.org/browse/JDK-7071907
[2]
https://github.com/openjdk/jdk7u/blob/6f892a5354bd5063418d74e32ded9653d24a768d/jdk/make/common/Defs-linux.gmk#L286
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20250310/ae63523d/attachment-0001.htm>
More information about the build-dev
mailing list