RFR: 8255128: linux x86 build failure with libJNIPoint.c
Jorn Vernee
jvernee at openjdk.java.net
Tue Nov 3 18:56:00 UTC 2020
On Tue, 3 Nov 2020 18:46:29 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> Add 32-bit-safe version of jlong <-> casts to libJNIPoint.c
>>
>> This removes the reported warning.
>>
>> Note that the _LP64 macro was not being propagated to the benchmark native libraries on Windows. The comment says that this is due to pack200, but since this has been removed [1], it seemed safe to propagate the macro now (backed up by testing).
>>
>> CC'ing hotspot-runtime since I know some people there were looking forward to having this fixed.
>>
>> Testing: tier1-3
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8232022
>
> make/autoconf/flags-cflags.m4 line 667:
>
>> 665:
>> 666: if test "x$FLAGS_CPU_BITS" = x64; then
>> 667: if test "x$FLAGS_OS" = xlinux || test "x$FLAGS_OS" = xmacosx || test "x$FLAGS_OS" = xwindows; then
>
> At this point, you're almost testing for all supported OSes. :) I can only think of AIX that does not match this if clause. I think it would be better to just remove the if and always define _LP64=1 on 64-bit platforms.
>
> @simonis Would that be OK for AIX?
Thanks for the suggestion.
Note the code that adds _LP64 for the JVM (below):
if test "x$FLAGS_OS" != xaix; then
# xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
$1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
fi
So, it seems xlc/aix explicitly does _not_ want this macro defined?
I think we could reuse that if-block to add `-D_LP64=` to both `1_DEFINES_CPU_JDK`, and `1_DEFINES_CPU_JVM` though, and remove the first one that checks for linux/mac/windows.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1017
More information about the build-dev
mailing list