Skip to content

Commit

Permalink
make: autoconf: define ARM for arm build with clang
Browse files Browse the repository at this point in the history
Fixes error like

ad_arm.cpp:19849:4: error: "ARM must be defined"
   ^
1 warning and 1 error generated.
gmake[3]: *** [lib/CompileJvm.gmk:143: /home/builder/.termux-build/openjdk-17/src/build/linux-arm-server-release/hotspot/variant-server/libjvm/objs/ad_arm.o] Error 1
gmake[2]: *** [make/Main.gmk:252: hotspot-server-libs] Error 2
  • Loading branch information
Grimler91 committed Mar 31, 2024
1 parent fe79545 commit 8b9710f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
fi
fi
if test "x$FLAGS_CPU" = xarm; then
# For whatever reason arm build with clang fails with:
# ad_arm.cpp:19849:4: error: "ARM must be defined"
# Fix by defining arm here as well.
$1_CFLAGS_CPU_JVM="-DARM"
fi
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
if test "x$FLAGS_CPU" = xppc64; then
$1_CFLAGS_CPU_JVM="-qarch=ppc64"
Expand Down

0 comments on commit 8b9710f

Please sign in to comment.