RFR: 8239001: Hotspot build broken on linux-sparc after 8238281
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Thu Feb 13 12:26:55 UTC 2020
Hello!
Hotspot fails to build on linux-sparc after 8238281 due to the redefinition
of offset_of() in src/hotspot/share/prims/jvm.cpp [1]:
/home/glaubitz/jdk/src/hotspot/cpu/sparc/macroAssembler_sparc.hpp: In static member function 'static int RegistersForDebugging::i_offset(int)':
/home/glaubitz/jdk/src/hotspot/cpu/sparc/macroAssembler_sparc.hpp:488:74: error: 'j' cannot appear in a constant-expression
488 | static int i_offset(int j) { return offset_of(RegistersForDebugging, i[j]); }
| ^
Since offsetof() can only be used with constant expressions, I have reused
the old definition of offset_of() in src/hotspot/cpu/sparc/macroAssembler_sparc.hpp
to fix the issue.
I couldn't come up with a more elegant solution, but I'm open for suggestions.
Please review my change in [2].
Thanks,
Adrian
> [1] https://bugs.openjdk.java.net/browse/JDK-8239001
> [2] http://cr.openjdk.java.net/~glaubitz/8239001/webrev.00/
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz at debian.org
`. `' Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
More information about the hotspot-dev
mailing list