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

Thomas Stuefe stuefe at openjdk.org
Fri Mar 29 08:14:36 UTC 2024


On Fri, 29 Mar 2024 07:18:47 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_xlc.hpp the compiler is much more nagging about ill formatted printf
>
> src/hotspot/os/aix/loadlib_aix.cpp line 120:
> 
>> 118:       (lm->is_in_vm ? '*' : ' '),
>> 119:       (uintptr_t)lm->text, (uintptr_t)lm->text + lm->text_len,
>> 120:       (uintptr_t)lm->data, (uintptr_t)lm->data + lm->data_len,
> 
> Please don't cast, use `p2i()`.

Check copyrights in this file and all others. Adapt SAP and Oracle copyrights.

> src/hotspot/os/aix/os_aix.cpp line 651:
> 
>> 649:     lt.print("Thread is alive (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT
>> 650:              ", stack [" PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "k using %luk pages)).",
>> 651:              os::current_thread_id(), (uintx) kernel_thread_id, (uintptr_t)low_address, (uintptr_t)high_address,
> 
> Use p2i, not cast

Here, and in other places too where you cast a pointer to fit into PTR_FORMAT or INTPTR_FORMAT

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1544172412
PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1544181011


More information about the build-dev mailing list