jdk/make/launcher/LauncherCommon.gmk
changeset 33406 4680f7495292
parent 32515 b6277cad1488
child 33661 ad7c7378a002
child 33523 eb067bcd9414
child 34012 b8b34f35e2ee
--- a/jdk/make/launcher/LauncherCommon.gmk	Wed Oct 28 23:31:01 2015 +0100
+++ b/jdk/make/launcher/LauncherCommon.gmk	Thu Oct 29 16:31:00 2015 +0100
@@ -75,8 +75,8 @@
   # Parameter 1 is the name of the launcher (java, javac, jar...)
   # Parameter 2 is extra CFLAGS
   # Parameter 3 is extra LDFLAGS
-  # Parameter 4 is extra LDFLAGS_SUFFIX_unix
-  # Parameter 5 is extra LDFLAGS_SUFFIX_windows
+  # Parameter 4 is extra LIBS_unix
+  # Parameter 5 is extra LIBS_windows
   # Parameter 6 is optional Windows JLI library (full path)
   # Parameter 7 is optional Windows resource (RC) flags
   # Parameter 8 is optional Windows version resource file (.rc)
@@ -96,7 +96,7 @@
   endif
 
   $1_LDFLAGS := $3
-  $1_LDFLAGS_SUFFIX :=
+  $1_LIBS :=
   ifeq ($(OPENJDK_TARGET_OS), macosx)
     $1_PLIST_FILE := Info-cmdline.plist
     ifneq ($(11), )
@@ -107,17 +107,18 @@
     endif
 
     $1_LDFLAGS += -Wl,-all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a \
-        -framework Cocoa -framework Security -framework ApplicationServices \
         -sectcreate __TEXT __info_plist $(MACOSX_PLIST_DIR)/$$($1_PLIST_FILE)
-        $1_LDFLAGS_SUFFIX += -pthread
+    $1_LIBS += -framework Cocoa -framework Security \
+        -framework ApplicationServices
   endif
 
   ifeq ($(OPENJDK_TARGET_OS), aix)
-    $1_LDFLAGS_SUFFIX += -L$(SUPPORT_OUTPUTDIR)/native/java.base -ljli_static
+    $1_LDFLAGS += -L$(SUPPORT_OUTPUTDIR)/native/java.base
+    $1_LIBS += -ljli_static
   endif
 
   ifeq ($(USE_EXTERNAL_LIBZ), true)
-    $1_LDFLAGS_SUFFIX += -lz
+    $1_LIBS += -lz
   endif
 
   $1_OUTPUT_DIR_ARG := $9
@@ -130,7 +131,7 @@
     $1_OPTIMIZATION_ARG := HIGH
     $1_LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
   else
-  $1_OPTIMIZATION_ARG := LOW
+    $1_OPTIMIZATION_ARG := LOW
   endif
 
   $1_CFLAGS := $(CFLAGS_JDKEXE)
@@ -172,18 +173,20 @@
       LDFLAGS := $(LDFLAGS_JDKEXE) \
           $(ORIGIN_ARG) \
           $$($1_LDFLAGS), \
+      LDFLAGS_linux := \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)) \
+          -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \
       LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \
-      LDFLAGS_linux := -lpthread \
-          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
       LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
-          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+          $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)) \
+          -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \
       MAPFILE := $$($1_MAPFILE), \
-      LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \
-      LDFLAGS_SUFFIX_unix := $4, \
-      LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
+      LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \
+      LIBS_unix := $4, \
+      LIBS_linux := -lpthread -ljli $(LIBDL) -lc, \
+      LIBS_solaris := -ljli -lthread $(LIBDL) -lc, \
+      LIBS_windows := $$($1_WINDOWS_JLI_LIB) \
           $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib advapi32.lib $5, \
-      LDFLAGS_SUFFIX_linux := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
-      LDFLAGS_SUFFIX_solaris := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs$(OUTPUT_SUBDIR), \
       OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
       PROGRAM := $1, \