aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openjdk8/build-demo-ldflags.patch
blob: ded0f11c8b70107ce64f42895691dcb1e4e50a1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
our LDFLAGS has -Wl,-z,relro but the commas are expanded too early in makefile.

--- ./jdk/make/CompileDemos.gmk.orig
+++ ./jdk/make/CompileDemos.gmk
@@ -245,13 +245,15 @@
   BUILD_DEMO_JVMTI_$1_CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \
       -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
 
+  BUILD_DEMO_JVMTI_$1_LDFLAGS := $(filter-out -incremental:no -opt:ref,$(LDFLAGS_JDKLIB))
+
   # Remove the -incremental:no setting to get .ilk-files like in the old build.
   $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \
       SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
       LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
       OPTIMIZATION := LOW, \
       CXXFLAGS := $$($1_CXXFLAGS), \
-      LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \
+      LDFLAGS := $$(BUILD_DEMO_JVMTI_$1_LDFLAGS), \
       LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \
       LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \
       LDFLAGS_SUFFIX_posix := $5, \