RFR: JDK-8081471 Allow SetupTestFilesCompilation to set LDFLAGS for individual tests

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Fri May 29 09:15:11 UTC 2015


A request have been made to be able to set specific LDFLAGS for 
individual tests/libraries in SetupTestFilesCompilation, similar to the 
CFLAGS_filename construct in SetupNativeCompilation,
e.g.
LDFLAGS_libFooBar := -lfooflag

It is trivial to also add CFLAGS functionality in a similar manner.

This functionality will be used to resolve a test problem in hotspot, so 
it is possible that I will push this fix to a hotspot forest instead of 
jdk9/dev.

Bug: https://bugs.openjdk.java.net/browse/JDK-8081471
WebRev inline:

diff --git a/make/common/TestFilesCompilation.gmk 
b/make/common/TestFilesCompilation.gmk
--- a/make/common/TestFilesCompilation.gmk
+++ b/make/common/TestFilesCompilation.gmk
@@ -86,8 +86,8 @@
          OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$($1_PREFIX)$$(name), \
          OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
          LANG := C, \
-        CFLAGS := $$($1_CFLAGS), \
-        LDFLAGS := $$($1_LDFLAGS), \
+        CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$($1_PREFIX)$$(name)), \
+        LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$($1_PREFIX)$$(name)), \
          OPTIMIZATION := LOW, \
          DEBUG_SYMBOLS := true)) \
      $$(eval $1 += $$(BUILD_TEST_$$(name)) )  \

/Magnus




More information about the build-dev mailing list