make/lib/Lib-jdk.crypto.ec.gmk
changeset 50471 f0aeede1b855
parent 49440 396ea30afbd5
child 51821 844cd8887372
child 56721 01b558efd286
--- a/make/lib/Lib-jdk.crypto.ec.gmk	Fri Jun 08 11:30:10 2018 +0200
+++ b/make/lib/Lib-jdk.crypto.ec.gmk	Fri Jun 08 18:11:32 2018 +0200
@@ -28,31 +28,23 @@
 ################################################################################
 
 ifeq ($(ENABLE_INTREE_EC), true)
-
-  LIBSUNEC_SRC := $(TOPDIR)/src/jdk.crypto.ec/share/native/libsunec
-  BUILD_LIBSUNEC_FLAGS := $(addprefix -I, $(SUNEC_SRC))
-
-  #
   # On sol-sparc...all libraries are compiled with -xregs=no%appl
-  # (set in CFLAGS_REQUIRED_sparc)
-  #
-  # except!!! libsunec.so
-  #
-  ECC_JNI_SOLSPARC_FILTER :=
+  # (set in CFLAGS_REQUIRED_sparc) except libsunec.so
   ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
-    ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
+    BUILD_LIBSUNEC_CFLAGS_JDKLIB := $(filter-out -xregs=no%appl, $(CFLAGS_JDKLIB))
+    BUILD_LIBSUNEC_CXXFLAGS_JDKLIB := $(filter-out -xregs=no%appl, $(CXXFLAGS_JDKLIB))
+  else
+    BUILD_LIBSUNEC_CFLAGS_JDKLIB := $(CFLAGS_JDKLIB)
+    BUILD_LIBSUNEC_CXXFLAGS_JDKLIB := $(CXXFLAGS_JDKLIB)
   endif
 
   $(eval $(call SetupJdkLibrary, BUILD_LIBSUNEC, \
       NAME := sunec, \
-      SRC := $(LIBSUNEC_SRC), \
       TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
       OPTIMIZATION := LOW, \
-      CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
-          $(BUILD_LIBSUNEC_FLAGS) \
+      CFLAGS := $(BUILD_LIBSUNEC_CFLAGS_JDKLIB) \
           -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
-      CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
-          $(BUILD_LIBSUNEC_FLAGS), \
+      CXXFLAGS := $(BUILD_LIBSUNEC_CXXFLAGS_JDKLIB), \
       DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \
       DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
       LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \