jdk/make/lib/Awt2dLibraries.gmk
changeset 24547 1b3cb0c1ac87
parent 24540 41aa84a568f3
parent 24198 41b2f3e923b8
child 24552 deacebd7905a
--- a/jdk/make/lib/Awt2dLibraries.gmk	Mon May 05 09:41:41 2014 -0700
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Mon May 05 12:49:13 2014 -0700
@@ -815,6 +815,10 @@
   BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
 endif
 
+# Libfontmanager doesn't actually need X_LIBS to link, but if building
+# on a Solaris machine without X installed, using a devkit, linking
+# to libawt_xawt will fail without the -L parameters from X_LIBS. Filter
+# out the -R parameters since they aren't needed.
 $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
     LIBRARY := fontmanager, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
@@ -833,7 +837,8 @@
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
     LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
-    LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
+    LDFLAGS_SUFFIX_solaris := $(filter-out -R%, $(X_LIBS)) \
+        -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
     LDFLAGS_SUFFIX_aix := -lawt -lawt_xawt $(LIBM) $(LIBCXX) -ljava -ljvm,\
     LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
         -ljava -ljvm, \