[OpenJDK 2D-Dev] RFR: JDK-8042208: Build fails on Solaris using devkit when X isn't installed

Erik Joelsson erik.joelsson at oracle.com
Wed Apr 30 11:33:40 UTC 2014


Hello,

Please review this small fix to the build when linking libfontmanager.so 
on Solaris. Further explanation in the bug.

Bug:  https://bugs.openjdk.java.net/browse/JDK-8042208
Patch inline:

diff -r 830cc367f41b make/lib/Awt2dLibraries.gmk
--- a/make/lib/Awt2dLibraries.gmk
+++ b/make/lib/Awt2dLibraries.gmk
@@ -798,6 +798,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), \
@@ -816,7 +820,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, \

/Erik



More information about the 2d-dev mailing list