changeset 1639:b45c22d42940

Merge
author amurillo
date Tue, 15 Sep 2015 07:47:44 -0700
parents 29cf60874856 (current diff) 42b56d1f4185 (diff)
children c6862c043f76
files common/autoconf/generated-configure.sh
diffstat 5 files changed, 84 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Sep 10 14:55:18 2015 -0700
+++ b/.hgtags	Tue Sep 15 07:47:44 2015 -0700
@@ -323,3 +323,4 @@
 8c40d4143ee13bdf8170c68cc384c36ab1e9fadb jdk9-b78
 ba08a9f79b9849716bae1f39f71333d47f604012 jdk9-b79
 f7c5ae2933c0b8510a420d1713a955e4ffc7ad0b jdk9-b80
+b8afcf91331d78626a583ec1b63164468d6f4181 jdk9-b81
--- a/common/autoconf/generated-configure.sh	Thu Sep 10 14:55:18 2015 -0700
+++ b/common/autoconf/generated-configure.sh	Tue Sep 15 07:47:44 2015 -0700
@@ -4359,7 +4359,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1439979411
+DATE_WHEN_GENERATED=1441958217
 
 ###############################################################################
 #
@@ -38286,6 +38286,48 @@
     fi
   fi
 
+      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
+        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
+        # - version number is last blank separate word on first line
+        # - version number formats that have been seen:
+        #   - <major>.<minor>
+        #   - <major>.<minor>.<micro>
+        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
+        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
+         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
+              -e 's/.* //' \
+              -e '/^[01]\./b bad' \
+              -e '/^2\./{' \
+              -e '  s/^2\.//' \
+              -e '  /^[0-9]$/b bad' \
+              -e '  /^[0-9]\./b bad' \
+              -e '  /^1[0-9]$/b bad' \
+              -e '  /^1[0-9]\./b bad' \
+              -e '  /^20\./b bad' \
+              -e '  /^21\.0$/b bad' \
+              -e '  /^21\.0\./b bad' \
+              -e '}' \
+              -e ':good' \
+              -e 's/.*/VALID_VERSION/p' \
+              -e 'q' \
+              -e ':bad' \
+              -e 's/.*/BAD_VERSION/p' \
+              -e 'q'`
+        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
+          OBJCOPY=
+          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
+$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
+$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
+$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
+$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
+$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
+        fi
+      fi
     fi
   fi
 
--- a/common/autoconf/toolchain.m4	Thu Sep 10 14:55:18 2015 -0700
+++ b/common/autoconf/toolchain.m4	Tue Sep 15 07:47:44 2015 -0700
@@ -586,6 +586,43 @@
     # Only call fixup if objcopy was found.
     if test -n "$OBJCOPY"; then
       BASIC_FIXUP_EXECUTABLE(OBJCOPY)
+      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
+        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
+        # - version number is last blank separate word on first line
+        # - version number formats that have been seen:
+        #   - <major>.<minor>
+        #   - <major>.<minor>.<micro>
+        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
+        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
+        [ OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
+              -e 's/.* //' \
+              -e '/^[01]\./b bad' \
+              -e '/^2\./{' \
+              -e '  s/^2\.//' \
+              -e '  /^[0-9]$/b bad' \
+              -e '  /^[0-9]\./b bad' \
+              -e '  /^1[0-9]$/b bad' \
+              -e '  /^1[0-9]\./b bad' \
+              -e '  /^20\./b bad' \
+              -e '  /^21\.0$/b bad' \
+              -e '  /^21\.0\./b bad' \
+              -e '}' \
+              -e ':good' \
+              -e 's/.*/VALID_VERSION/p' \
+              -e 'q' \
+              -e ':bad' \
+              -e 's/.*/BAD_VERSION/p' \
+              -e 'q'` ]
+        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
+          OBJCOPY=
+          AC_MSG_WARN([Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated.])
+          AC_MSG_NOTICE([objcopy reports version $OBJCOPY_VERSION])
+          AC_MSG_NOTICE([Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version])
+          AC_MSG_NOTICE([Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version])
+          AC_MSG_NOTICE([Note: Solaris 11 Update 1 contains the correct version])
+        fi
+      fi
     fi
   fi
 
--- a/make/common/NativeCompilation.gmk	Thu Sep 10 14:55:18 2015 -0700
+++ b/make/common/NativeCompilation.gmk	Tue Sep 15 07:47:44 2015 -0700
@@ -624,28 +624,7 @@
             $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \
                 $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map
 
-          else ifeq ($(OPENJDK_TARGET_OS), solaris)
-            $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).debuginfo
-            # Setup the command line creating debuginfo files, to be run after linking.
-            # It cannot be run separately since it updates the original target file
-            #
-            # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
-            # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
-            # empty section headers until a fixed $(OBJCOPY) is available.
-            # An empty section header has sh_addr == 0 and sh_size == 0.
-            # This problem has only been seen on Solaris X64, but we call this tool
-            # on all Solaris builds just in case.
-            #
-            # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
-            # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
-            $1_CREATE_DEBUGINFO_CMDS := \
-                $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$($1_TARGET) $$(NEWLINE) \
-                $(OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
-                $(CD) $$($1_OUTPUT_DIR) && \
-                    $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$($1_DEBUGINFO_FILES) $$($1_TARGET)
-            $1_DEBUGINFO_EXTRA_DEPS := $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
-
-          else ifeq ($(OPENJDK_TARGET_OS), linux)
+          else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
             $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).debuginfo
             # Setup the command line creating debuginfo files, to be run after linking.
             # It cannot be run separately since it updates the original target file
@@ -653,7 +632,6 @@
                 $(OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
                 $(CD) $$($1_OUTPUT_DIR) && \
                     $(OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
-
           endif # No MacOS X support
 
           # This dependency dance ensures that debug info files get rebuilt
@@ -694,7 +672,7 @@
         $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
 
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
-        $$($1_DEBUGINFO_EXTRA_DEPS) $$($1_VARDEPS_FILE)
+        $$($1_VARDEPS_FILE)
 		$(ECHO) $(LOG_INFO) "Linking $$($1_BASENAME)"
 		$(call LogFailures, $$($1_OBJECT_DIR)/$1_link.log, $1_link, \
 		    $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
@@ -735,7 +713,7 @@
         $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
 
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_MANIFEST) \
-        $$($1_DEBUGINFO_EXTRA_DEPS) $$($1_VARDEPS_FILE)
+        $$($1_VARDEPS_FILE)
 		$(ECHO) $(LOG_INFO) "Linking executable $$($1_BASENAME)"
 		$(call LogFailures, $$($1_OBJECT_DIR)/$1_link.log, $1_link, \
 		    $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
--- a/make/common/TestFilesCompilation.gmk	Thu Sep 10 14:55:18 2015 -0700
+++ b/make/common/TestFilesCompilation.gmk	Tue Sep 15 07:47:44 2015 -0700
@@ -32,8 +32,6 @@
 
 
 include NativeCompilation.gmk
-# FIXME: This is a bad fix currently needed due to JDK-8064808 not being resolved.
-include $(JDK_TOPDIR)/make/Tools.gmk
 
 # Setup make rules for creating a set of native test files (libraries or
 # executables). This will locate native files matching a certain pattern,