On Mon, 11 Mar 2024 13:45:46 GMT, Joachim Kern <jk...@openjdk.org> wrote:

>> OK this was a flaw in my introduction of clang toolchain for AIX. The 
>> intention was to keep the xlc options in form of their clang counterparts. I 
>> will try with a corrected version for clang on AIX and will come back to you.
>
> OK, the `-Wl,-bbigtoc` is not a compiler option but a linker option and it is 
> already set in the linker options.
> But the `-fpic -mcmodel=large` should be set to avoid creating a jump to 
> out-of-order code.
> 
> So we can replace the
> 
>   JVM_PICFLAG="$PICFLAG"
>   JDK_PICFLAG="$PICFLAG"
> 
> 
> code some lines below by
> 
> 
>   if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; 
> then
>     JVM_PICFLAG="-fpic -mcmodel=large"
>   else
>     JVM_PICFLAG="$PICFLAG"
>   fi
>   JDK_PICFLAG="$PICFLAG"

I'm not entirely happy to do this here, as it is a bug fix, and it will change 
behavior, in contrast to the rest of the patch which is just about removing 
unused code.

But it's a small fix, and I'm messing with the part of the code anyway, so if 
you are sure that this is the right thing to do I'll sneak it in here. Please 
make sure it works.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18172#discussion_r1521652510

Reply via email to