On Tue, 16 Apr 2024 09:15:19 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> That was kind of where the discussion started, and which Kim did not like. >> If I read him correctly, his suggestion was instead to place: >> >> #if defined(_AIX) >> #include <alloca.h> >> #endif >> >> in the files where `alloca` is needed on AIX. > > (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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1568650313