7033957: Library built without a mapfile: libxinerama.so
authorohair
Tue, 12 Apr 2011 14:23:37 -0700
changeset 9048 8217c7421bca
parent 9036 bb5e161d5bb3
child 9049 70b342493c76
7033957: Library built without a mapfile: libxinerama.so Reviewed-by: ksrini
jdk/make/common/shared/Defs-solaris.gmk
--- a/jdk/make/common/shared/Defs-solaris.gmk	Thu Apr 07 19:59:28 2011 -0700
+++ b/jdk/make/common/shared/Defs-solaris.gmk	Tue Apr 12 14:23:37 2011 -0700
@@ -194,13 +194,30 @@
 MAPFILE_WARNING-=WARNING
 MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
 
+# Some libraries do not have mapfiles for multiple reasons.
+#   These libraries for sparc and sparcv9 are exceptions to the mapfile rule:
+#     libjdgaSUNWafb.so
+#     libjdgaSUNWcg6.so
+#     libjdgaSUNWffb.so
+#     libjdgaSUNWm64.so
+#     libxinerama.so
+#   The library libJdbcOdbc.so has also been given an exception.
+#   The JNI/JVMTI demo libraries are also missing mapfiles, no exceptions yet.
+ifeq ($(ARCH_FAMILY),sparc)
+  MAPFILE_EXCEPTIONS = \
+    (libJdbcOdbc|libjdgaSUNWafb|libjdgaSUNWcg6|libjdgaSUNWffb|libjdgaSUNWm64|libxinerama)
+else
+  MAPFILE_EXCEPTIONS = (libJdbcOdbc)
+endif
+
 # Macro to check it's input file for banned dependencies and verify the
 #   binary built properly. Relies on process exit code.
 ifndef CROSS_COMPILE_ARCH
 define binary_file_verification # binary_file
 ( \
   $(ECHO) "Checking for mapfile use in: $1" && \
-  if [ "`$(NM) -g -D $1 | $(EGREP) -v 'UNDEF' | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
+  if [ "`$(ECHO) $(basename $(notdir $1)) | $(EGREP) '$(MAPFILE_EXCEPTIONS)'`" = "" \
+       -a "`$(NM) -g -D $1 | $(EGREP) -v 'UNDEF' | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
     $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
   fi && \
   $(ECHO) "Library loads for: $1" && \