On 04/10/2018 01:00 PM, John Paul Adrian Glaubitz wrote:
Trying to add the necessary source there now.
Hmm, I tried various ways of adding it now:
diff -r a47d1e21b3f1 make/hotspot/lib/CompileGtest.gmk
--- a/make/hotspot/lib/CompileGtest.gmk Thu Apr 05 10:54:53 2018 +0200
+++ b/make/hotspot/lib/CompileGtest.gmk Tue Apr 10 14:15:36 2018 +0300
@@ -52,6 +52,14 @@
$(call create-mapfile)
endif
+ifeq ($(call check-jvm-feature, zero), true)
+ JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP
-DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
+ JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
+ ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
+ BUILD_LIBJVM_EXTRA_FILES :=
$(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
+ endif
+endif
+
# Disabling undef, switch, format-nonliteral and
tautological-undefined-compare
# warnings for clang because of test source.
@@ -71,7 +79,8 @@
EXCLUDES := $(JVM_EXCLUDES), \
EXCLUDE_FILES := gtestLauncher.cpp, \
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
- EXTRA_FILES := $(GTEST_FRAMEWORK_SRC)/src/gtest-all.cc, \
+ EXTRA_FILES := $(GTEST_FRAMEWORK_SRC)/src/gtest-all.cc \
+
$(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp, \
EXTRA_OBJECT_FILES := $(filter-out %/operator_new$(OBJ_SUFFIX), \
$(BUILD_LIBJVM_ALL_OBJS)), \
CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \
@@ -109,7 +118,8 @@
NAME := gtestLauncher, \
TYPE := EXECUTABLE, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
- EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
+ EXTRA_FILES := $(GTEST_LAUNCHER_SRC) \
+
$(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp, \
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \
CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \
-I$(GTEST_FRAMEWORK_SRC)/include, \
diff -r a47d1e21b3f1 make/hotspot/lib/CompileJvm.gmk
--- a/make/hotspot/lib/CompileJvm.gmk Thu Apr 05 10:54:53 2018 +0200
+++ b/make/hotspot/lib/CompileJvm.gmk Tue Apr 10 14:15:36 2018 +0300
@@ -197,6 +197,14 @@
endif
endif
+ifeq ($(call check-jvm-feature, zero), true)
+ JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP
-DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
+ JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
+ ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
+ BUILD_LIBJVM_EXTRA_FILES :=
$(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
+ endif
+endif
+
ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
RC_DESC := 64-Bit$(SPACE)
It does build it, but the build system is unable to find the object files:
glaubitz@deb4g:/srv/glaubitz/hs$ find . -name
"memset_with_concurrent_readers_sparc.o"
./build/linux-sparcv9-normal-zero-release/hotspot/variant-zero/libjvm/gtest/objs/memset_with_concurrent_readers_sparc.o
./build/linux-sparcv9-normal-zero-release/hotspot/variant-zero/libjvm/gtest/launcher-objs/memset_with_concurrent_readers_sparc.o
glaubitz@deb4g:/srv/glaubitz/hs$
Adrian