changeset 2826:2c6a29c6d5c7

Merge
author prr
date Wed, 23 Aug 2017 12:05:36 -0700
parents b135df98eeb6 90cdfe56f154
children 6e6404f32f75
files
diffstat 9 files changed, 33 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/configure.ac	Fri Aug 18 11:27:27 2017 -0700
+++ b/common/autoconf/configure.ac	Wed Aug 23 12:05:36 2017 -0700
@@ -223,7 +223,7 @@
 LIB_DETERMINE_DEPENDENCIES
 LIB_SETUP_LIBRARIES
 
-# Hotspot setup depends on lib checks (AOT needs libelf).
+# Hotspot setup depends on lib checks.
 
 HOTSPOT_SETUP_JVM_FEATURES
 
--- a/common/autoconf/generated-configure.sh	Fri Aug 18 11:27:27 2017 -0700
+++ b/common/autoconf/generated-configure.sh	Wed Aug 23 12:05:36 2017 -0700
@@ -4213,8 +4213,6 @@
       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
     dtrace)
       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
-    elf)
-      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
   esac
 }
 
@@ -4234,8 +4232,6 @@
       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
     ccache)
       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
-    elf)
-      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
   esac
 }
 
@@ -5155,7 +5151,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1503074369
+DATE_WHEN_GENERATED=1503411624
 
 ###############################################################################
 #
@@ -62621,7 +62617,7 @@
             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 
   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
-  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
+  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
   METHOD="well-known location"
 
   # Let's start with an optimistic view of the world :-)
@@ -65605,7 +65601,7 @@
 
 
 
-# Hotspot setup depends on lib checks (AOT needs libelf).
+# Hotspot setup depends on lib checks.
 
 
   # The user can in some cases supply additional jvm features. For the custom
--- a/common/autoconf/help.m4	Fri Aug 18 11:27:27 2017 -0700
+++ b/common/autoconf/help.m4	Wed Aug 23 12:05:36 2017 -0700
@@ -123,8 +123,6 @@
       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
     dtrace)
       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
-    elf)
-      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
   esac
 }
 
@@ -144,8 +142,6 @@
       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
     ccache)
       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
-    elf)
-      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
   esac
 }
 
--- a/common/autoconf/lib-freetype.m4	Fri Aug 18 11:27:27 2017 -0700
+++ b/common/autoconf/lib-freetype.m4	Wed Aug 23 12:05:36 2017 -0700
@@ -366,7 +366,7 @@
           if test "x$FOUND_FREETYPE" != xyes; then
             FREETYPE_BASE_DIR="$SYSROOT/usr"
             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-              LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
+              LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
             else
               LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
               if test "x$FOUND_FREETYPE" != xyes; then
--- a/common/conf/jib-profiles.js	Fri Aug 18 11:27:27 2017 -0700
+++ b/common/conf/jib-profiles.js	Wed Aug 23 12:05:36 2017 -0700
@@ -974,7 +974,7 @@
         jtreg: {
             server: "javare",
             revision: "4.2",
-            build_number: "b07",
+            build_number: "b08",
             checksum_file: "MD5_VALUES",
             file: "jtreg_bin-4.2.zip",
             environment_name: "JT_HOME",
--- a/common/doc/building.html	Fri Aug 18 11:27:27 2017 -0700
+++ b/common/doc/building.html	Wed Aug 23 12:05:36 2017 -0700
@@ -58,7 +58,6 @@
 <li><a href="#x11">X11</a></li>
 <li><a href="#alsa">ALSA</a></li>
 <li><a href="#libffi">libffi</a></li>
-<li><a href="#libelf">libelf</a></li>
 </ul></li>
 <li><a href="#other-tooling-requirements">Other Tooling Requirements</a><ul>
 <li><a href="#gnu-make">GNU Make</a></li>
@@ -469,13 +468,6 @@
 <li>To install on an rpm-based Linux, try running <code>sudo yum install libffi-devel</code>.</li>
 </ul>
 <p>Use <code>--with-libffi=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libffi files.</p>
-<h3 id="libelf">libelf</h3>
-<p>libelf from the <a href="http://sourceware.org/elfutils">elfutils project</a> is required when building the AOT feature of Hotspot.</p>
-<ul>
-<li>To install on an apt-based Linux, try running <code>sudo apt-get install libelf-dev</code>.</li>
-<li>To install on an rpm-based Linux, try running <code>sudo yum install elfutils-libelf-devel</code>.</li>
-</ul>
-<p>Use <code>--with-libelf=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libelf files.</p>
 <h2 id="other-tooling-requirements">Other Tooling Requirements</h2>
 <h3 id="gnu-make">GNU Make</h3>
 <p>OpenJDK requires <a href="http://www.gnu.org/software/make">GNU Make</a>. No other flavors of make are supported.</p>
@@ -537,7 +529,6 @@
 <li><code>--with-x=&lt;path&gt;</code> - Set the path to <a href="#x11">X11</a></li>
 <li><code>--with-alsa=&lt;path&gt;</code> - Set the path to <a href="#alsa">ALSA</a></li>
 <li><code>--with-libffi=&lt;path&gt;</code> - Set the path to <a href="#libffi">libffi</a></li>
-<li><code>--with-libelf=&lt;path&gt;</code> - Set the path to <a href="#libelf">libelf</a></li>
 <li><code>--with-jtreg=&lt;path&gt;</code> - Set the path to JTReg. See <a href="#running-tests">Running Tests</a></li>
 </ul>
 <p>Certain third-party libraries used by OpenJDK (libjpeg, giflib, libpng, lcms and zlib) are included in the OpenJDK repository. The default behavior of the OpenJDK build is to use this version of these libraries, but they might be replaced by an external version. To do so, specify <code>system</code> as the <code>&lt;source&gt;</code> option in these arguments. (The default is <code>bundled</code>).</p>
--- a/common/doc/building.md	Fri Aug 18 11:27:27 2017 -0700
+++ b/common/doc/building.md	Wed Aug 23 12:05:36 2017 -0700
@@ -648,19 +648,6 @@
 Use `--with-libffi=<path>` if `configure` does not properly locate your libffi
 files.
 
-### libelf
-
-libelf from the [elfutils project](http://sourceware.org/elfutils) is required
-when building the AOT feature of Hotspot.
-
-  * To install on an apt-based Linux, try running `sudo apt-get install
-    libelf-dev`.
-  * To install on an rpm-based Linux, try running `sudo yum install
-    elfutils-libelf-devel`.
-
-Use `--with-libelf=<path>` if `configure` does not properly locate your libelf
-files.
-
 ## Other Tooling Requirements
 
 ### GNU Make
@@ -813,7 +800,6 @@
   * `--with-x=<path>` - Set the path to [X11](#x11)
   * `--with-alsa=<path>` - Set the path to [ALSA](#alsa)
   * `--with-libffi=<path>` - Set the path to [libffi](#libffi)
-  * `--with-libelf=<path>` - Set the path to [libelf](#libelf)
   * `--with-jtreg=<path>` - Set the path to JTReg. See [Running Tests](
     #running-tests)
 
--- a/make/common/NativeCompilation.gmk	Fri Aug 18 11:27:27 2017 -0700
+++ b/make/common/NativeCompilation.gmk	Wed Aug 23 12:05:36 2017 -0700
@@ -932,10 +932,35 @@
       endif
     endif
 
+    # Unfortunately the @-file trick does not work reliably when using clang.
+    # Clang does not propagate the @-file parameter to the ld sub process, but
+    # instead puts the full content on the command line. At least the llvm ld
+    # does not even support an @-file.
+    #
+    # When linking a large amount of object files, we risk hitting the limit
+    # of the command line length even on posix systems if the path length of
+    # the output dir is very long due to our use of absolute paths. To
+    # mitigate this, use paths relative to the output dir when linking over
+    # 500 files with clang and the output dir path is deep.
+    ifneq ($$(word 500, $$($1_ALL_OBJS)), )
+      ifeq ($$(TOOLCHAIN_TYPE), clang)
+        # There is no strlen function in make, but checking path depth is a
+        # reasonable approximation.
+        ifneq ($$(word 10, $$(subst /, ,$$(OUTPUT_ROOT))), )
+          $1_LINK_OBJS_RELATIVE := true
+          $1_ALL_OBJS_RELATIVE := $$(patsubst $$(OUTPUT_ROOT)/%, %, $$($1_ALL_OBJS))
+        endif
+      endif
+    endif
+
     $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
         $$($1_VARDEPS_FILE)
                 ifneq ($$($1_OBJ_FILE_LIST), )
-		  $$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
+                  ifeq ($$($1_LINK_OBJS_RELATIVE), true)
+		    $$(eval $$(call ListPathsSafely, $1_ALL_OBJS_RELATIVE, $$($1_OBJ_FILE_LIST)))
+                  else
+		    $$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
+                  endif
                 endif
                 # Keep as much as possible on one execution line for best performance
                 # on Windows
@@ -951,6 +976,7 @@
 		  $$($1_STRIP_CMD)
                 else
 		  $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
+		      $$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUT_ROOT) ; ) \
 		      $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
 		      $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \
 		      $$($1_EXTRA_LIBS)) ; \
--- a/make/devkit/Tools.gmk	Fri Aug 18 11:27:27 2017 -0700
+++ b/make/devkit/Tools.gmk	Wed Aug 23 12:05:36 2017 -0700
@@ -83,8 +83,6 @@
     libXdmcp libXdmcp-devel \
     libXau libXau-devel \
     libgcc \
-    elfutils elfutils-libs elfutils-devel \
-    elfutils-libelf elfutils-libelf-devel \
     zlib zlib-devel \
     libffi libffi-devel