RFR: 8329257: AIX: Switch HOTSPOT_TOOLCHAIN_TYPE from xlc to gcc [v3]
Julian Waters
jwaters at openjdk.org
Wed Apr 17 11:55:48 UTC 2024
On Wed, 17 Apr 2024 10:54:25 GMT, Joachim Kern <jkern at openjdk.org> wrote:
>> (If some of these files happen to be files which are not compiled on Windows, I assume it will not hurt to drop the ifdef guard, but then again, it can certainly be kept as well for consistency.)
>
> @magicus @TheShermanTanker @TheRealMDoerr @kimbarrett
> Let me summarize the choices we have and ask for your vote.
> Julian dislikes the `-Dalloca'(size)'=__builtin_alloca'(size)'` in `flags-cflags.m4` I introduced to get rid of
>
> #if defined(_AIX)
> #include <alloca.h>
> #endif
>
> in `globalDefinitions_gcc.hpp`.
>
> We have three possible solutions
>
> 1. Reintroduce
>
> #if defined(_AIX)
> #include <alloca.h>
> #endif
>
> in `globalDefinitions_gcc.hpp`.
>
> 2. Unconditionally introduce only `#include <alloca.h>` in `globalDefinitions_gcc.hpp`. This should work for all platforms using this header including the unofficial Windows/gcc Port, although only AIX needs it.
>
> 3. Add
>
> #if defined(_AIX)
> #include <alloca.h>
> #endif
>
> to the sources using alloca(). These are
> /hotspot/share/runtime/os.cpp
> /hotspot/share/runtime/javaThread.cpp
> /hotspot/share/utilities/vmError.cpp
> Here we need the AIX condition, because otherwise the classic Windows Build (NTAMD64) fails.
>
> I will implement the solution with the most likes and having no dislike.
I don't mind all 3, though I certainly prefer 1 and 3 over 2 (The way I see it, the AIX macro check is more of a message to the programmer than it is important to the compiler, so I prefer the options that have it. However, I also don't mind if we were to go the way of option 2, this is more of a preference thing). The fact that only 3 files need it is also surprising to me, and makes option 3 seem like a good fit (Again, personal preference)
Magnus and Kim, what do you guys think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1568718288
More information about the build-dev
mailing list