BSD variables not declared? (jdk8 & jdk 9 builds)
david.holmes at oracle.com
Tue Apr 14 07:42:53 UTC 2015
On 14/04/2015 5:24 PM, Magnus Ihse Bursie wrote:
> On 2015-04-12 17:01, Martijn Verburg wrote:
>> Hi all,
>> On Mac OS X 10.10.2 using gcc 4.8 run make clean images
>> When compiling either jdk8 or jdk9 from scratch I get the following BSD
>> undefined errors:
>> error: "__FreeBSD__" is not defined [-Werror=undef]
>> #elif __FreeBSD__
>> error: "__OpenBSD__" is not defined [-Werror=undef]
>> #elif __OpenBSD__
>> error: "__NetBSD__" is not defined [-Werror=undef]
>> #elif __NetBSD__
> That sounds strange. Why would an undefined preprocessor variable
> trigger an error? I have never heard about this before.
"-Wundef option causes GCC to warn whenever it encounters an identifier
which is not a macro in an ‘#if’. "
Hence we should be using
etc in this context. It may be the compiler normally doesn't look at the
erroneous else cases, but this compiler does (or else __APPLE__ is not
defined and so we hit these else cases where we don't normally.) ??
> Since it is in hotspot code, maybe you can get a better response by
> asking on a hotspot list.
Yes looks like a hotspot issue. I filed:
Follow ups on hotspot-runtime-dev please.
More information about the build-dev