JDK-8288082 : Build failure due to __clang_major__ is not defined after JDK-8214976
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-06-08
  • Updated: 2022-06-10
  • Resolved: 2022-06-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 b26Fixed
Related Reports
Relates :  
Description
Build failure was observered when build on a machine without clang.
```
* For target hotspot_variant-server_libjvm_objs_precompiled_precompiled.hpp.gch:
In file included from /root/jdk/src/hotspot/share/utilities/compilerWarnings.hpp:32,
                 from /root/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:28,
                 from /root/jdk/src/hotspot/share/memory/allocation.hpp:29,
                 from /root/jdk/src/hotspot/share/classfile/classLoaderData.hpp:28,
                 from /root/jdk/src/hotspot/share/precompiled/precompiled.hpp:34:
/root/jdk/src/hotspot/share/utilities/compilerWarnings_gcc.hpp:66:25: error: "__clang_major__" is not defined, evaluates to 0 [-Werror=undef]
 #if (__GNUC__ >= 9) || (__clang_major__ >= 14)
                         ^~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
```
Comments
Changeset: a941bc2d Author: Jie Fu <jiefu@openjdk.org> Date: 2022-06-09 00:01:31 +0000 URL: https://git.openjdk.java.net/jdk/commit/a941bc2de674fdd77cdbbdf3641309fc39bfc0c4
09-06-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/9096 Date: 2022-06-08 23:36:59 +0000
08-06-2022