RFR: JDK-8329257: AIX: Switch HOTSPOT_TOOLCHAIN_TYPE from xlc to gcc

Joachim Kern jkern at openjdk.org
Tue Apr 2 11:31:01 UTC 2024


On Fri, 29 Mar 2024 08:06:01 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> As of [JDK-8325880](https://bugs.openjdk.org/browse/JDK-8325880), building the JDK requires version 17 of IBM Open XL C/C++ (xlc). This is in effect clang by another name, and it uses the clang toolchain in the JDK build. Thus the old xlc toolchain was removed by [JDK-8327701](https://bugs.openjdk.org/browse/JDK-8327701).
>> Now we also switch the HOTSPOT_TOOLCHAIN_TYPE from xlc to gcc, removing the last xlc rudiment.
>> This means merging the AIX specific content of utilities/globalDefinitions_xlc.hpp and utilities/compilerWarnings_xlc.hpp into the corresponding gcc files on the on side and removing the defined(TARGET_COMPILER_xlc) blocks in the code, because the defined(TARGET_COMPILER_gcc) blocks work out of the box for the new AIX compiler.
>> The rest of the changes are needed because of using utilities/compilerWarnings_gcc.hpp the compiler is much more nagging about ill formatted printf
>
> src/hotspot/share/utilities/globalDefinitions_gcc.hpp line 83:
> 
>> 81:   #error "xlc version not supported, macro __open_xl_version__ not found"
>> 82: #endif
>> 83: #endif // AIX
> 
> Can probably be shortened like this:
> 
> Suggestion:
> 
> #ifdef _AIX
> #if !defined(__open_xl_version__) || (__open_xl_version__ < 17)
>   #error "this xlc version is not supported"
> #endif
> #endif // AIX

followed your proposal.

> src/hotspot/share/utilities/globalDefinitions_gcc.hpp line 103:
> 
>> 101: #endif
>> 102: 
>> 103: #if !defined(LINUX) && !defined(_ALLBSD_SOURCE) && !defined(_AIX)
> 
> I believe this whole section can be removed now.
> 
> At least I have no idea who this is for. What gcc versions does OpenJDK still support, then, beside these platforms. Also, any gcc platform not on linux or bsd would have hit the #error below at line 132.

linux macos and now Aix use this file.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1547677545
PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1547681162


More information about the build-dev mailing list