On Fri, 20 Dec 2024 13:26:33 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> The flag is different for the build JVM and the JVM. >> If I just set in configure time it seem like both OPENJDK_BUILD_JVM_CFLAGS >> and JVM_CFLAGS have the flag. >> Which is incorrect, as only OPENJDK_BUILD_JVM_CFLAGS in this case should >> have it. >> >> Am I doing something wrong? I mirrored SVE_FLAGS which do this... > > `SVE_CFLAGS` is used to compile a separate library, libsleef. They do not > have an already prepared set of flags to use, as Hotspot do. (Hotspot is the > only library which has this, since it is magnitutes more complex than other > libraries.) Having different flags for the build and the target JVM is a bit more tricky, but not impossible. You just need to "hålla tungan rätt i mun". :-) In `FLAGS_SETUP_CFLAGS_CPU_DEP`, you need to add something like: if test "x$FLAGS_CPU" = xriscv64; then $1_DEFINES_CPU_JVM="$1_DEFINES_CPU_JVM $2RVV_DEFINES" fi ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22845#discussion_r1893953547