diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 3587e645925..4f7438295ff 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -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"