RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]

Magnus Ihse Bursie ihse at openjdk.org
Fri Feb 2 15:57:07 UTC 2024


On Fri, 2 Feb 2024 07:01:33 GMT, Sam James <duke at openjdk.org> wrote:

>> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add kludge to BufferedRenderPipe.c for AIX
>
> make/modules/jdk.hotspot.agent/Lib.gmk line 31:
> 
>> 29: 
>> 30: ifeq ($(call isTargetOs, linux), true)
>> 31:   SA_CFLAGS := -D_FILE_OFFSET_BITS=64
> 
> We have two choices to feel a bit more comfortable:
> 1) We unconditionally `static_assert` in a few places for large `off_t`, or
> 2) We only do it for platforms we know definitely support F_O_B and aren't AIX (which we've handled separately).
> 
> Not sure that's strictly necessary though. Also, if something understands LARGEFILE*_SOURCE, then it probably understood F_O_B, or at least has some macro to control it. Just thinking aloud.

I'm guessing your comment was really more general, and just happened to be placed here? The reason I am removing `-D_FILE_OFFSET_BITS=64` here is that it is always set for all JDK compilations.

1. I don't know why you would not trust that compiler flags in the build system would work, but if you really want to add a static_assert, let me know where you want it.

2. No, AIX is not handled separately. It is handled as part of this PR. You are probably thinking about JDK-8324834, but that was only about Hotspot. This PR is about all the other JDK native libraries.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1476236956


More information about the serviceability-dev mailing list