diff --git a/runtime/gc_glue_java/configure_includes/configure_common.mk.ftl b/runtime/gc_glue_java/configure_includes/configure_common.mk.ftl index a7db6319d73..0eb5417b853 100644 --- a/runtime/gc_glue_java/configure_includes/configure_common.mk.ftl +++ b/runtime/gc_glue_java/configure_includes/configure_common.mk.ftl @@ -61,6 +61,11 @@ CONFIGURE_ARGS += 'exe_output_dir=$$(top_srcdir)/..' # J9 needs include to compile Windows .rc files generated by UMA, because the .rc file references include/j9cfg.h CONFIGURE_ARGS += 'GLOBAL_INCLUDES=$$(top_srcdir)/../include' +# OMR source files include j9cfg.h and so compiles must define JAVA_SPEC_VERSION. +CONFIGURE_ARGS += 'GLOBAL_CFLAGS=-DJAVA_SPEC_VERSION=$(VERSION_MAJOR)' +CONFIGURE_ARGS += 'GLOBAL_CPPFLAGS=-DJAVA_SPEC_VERSION=$(VERSION_MAJOR)' +CONFIGURE_ARGS += 'GLOBAL_CXXFLAGS=-DJAVA_SPEC_VERSION=$(VERSION_MAJOR)' + # This flag indicates that the J9 VMFarm build runs configure on a machine # that is not capable of compiling the source code. ifeq (yes,$(CALLED_BY_SOURCE_ZIP))