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

Joachim Kern jkern at openjdk.org
Tue Apr 2 10:49:02 UTC 2024


On Fri, 29 Mar 2024 07:25:30 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/os/aix/os_aix.cpp line 1212:
> 
>> 1210:     st->print_cr("physical free  : " SIZE_FORMAT, (unsigned long)mi.real_free);
>> 1211:     st->print_cr("swap total     : " SIZE_FORMAT, (unsigned long)mi.pgsp_total);
>> 1212:     st->print_cr("swap free      : " SIZE_FORMAT, (unsigned long)mi.pgsp_free);
> 
> A better way to do this would be to change AIX::meminfo to use size_t. We should have done this when introducing that API.

Done. modified `os::Aix::meminfo_t` to use `size_t` instead of `long long`

> src/hotspot/os/aix/os_aix.cpp line 1399:
> 
>> 1397:     os->print("[" PTR_FORMAT " - " PTR_FORMAT "] (" UINTX_FORMAT
>> 1398:       " bytes, %ld %s pages), %s",
>> 1399:       (uintptr_t)addr, (uintptr_t)addr + size - 1, size, size / pagesize, describe_pagesize(pagesize),
> 
> p2i

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1547603744
PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1547606275


More information about the build-dev mailing list