changeset 2851:1a7d5095cb45

PR3628: Install symlinks to tapsets in SystemTap directory 2018-09-23 Andrew John Hughes <gnu_andrew@member.fsf.org> PR3628: Install symlinks to tapsets in SystemTap directory * INSTALL: Updated and synched with IcedTea 2.x. * Makefile.am: (install-exec-local): Add symlinks to tapsets in system tapset directory. (uninstall-local): Remove symlinks now added by install stage. * NEWS: Updated. * acinclude.m4: (IT_SET_ARCH_SETTINGS): Set SYSTEMTAP_ARCH_DIR appropriately for each architecture. (IT_WITH_TAPSET_DIR): Add option --with-tapset-dir to allow SystemTap tapset directory to be specified (defaults to ${datadir}/systemtap/tapset) * configure.ac: Invoke IT_WITH_TAPSET_DIR.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Mon, 24 Sep 2018 17:13:44 +0100
parents 03cdd2506cad
children 1da3fd7fa32e
files ChangeLog INSTALL Makefile.am NEWS acinclude.m4 configure.ac
diffstat 6 files changed, 119 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Sep 17 19:35:08 2018 +0100
+++ b/ChangeLog	Mon Sep 24 17:13:44 2018 +0100
@@ -1,3 +1,22 @@
+2018-09-23  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	PR3628: Install symlinks to tapsets in SystemTap directory
+	* INSTALL: Updated and synched with IcedTea 2.x.
+	* Makefile.am:
+	(install-exec-local):
+	Add symlinks to tapsets in system tapset directory.
+	(uninstall-local): Remove symlinks now added by
+	install stage.
+	* NEWS: Updated.
+	* acinclude.m4:
+	(IT_SET_ARCH_SETTINGS): Set SYSTEMTAP_ARCH_DIR
+	appropriately for each architecture.
+	(IT_WITH_TAPSET_DIR): Add option --with-tapset-dir
+	to allow SystemTap tapset directory to be
+	specified (defaults to ${datadir}/systemtap/tapset)
+	* configure.ac:
+	Invoke IT_WITH_TAPSET_DIR.
+
 2018-09-13  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	PR3624: Sync desktop files with Fedora/RHEL
--- a/INSTALL	Mon Sep 17 19:35:08 2018 +0100
+++ b/INSTALL	Mon Sep 24 17:13:44 2018 +0100
@@ -23,6 +23,8 @@
 libpng-devel (for --enable-system-png)
 libjpeg-devel >= 6b (for --enable-system-jpeg)
 zlib-devel (for --enable-system-zlib)
+lcms2-devel (for --enable-system-lcms)
+fontconfig (for --enable-improved-font-rendering)
 libpcsclite (for --enable-system-pcsc)
 lksctp-tools (for --enable-system-sctp)
 libffi (for --enable-zero or on archs other than x86/x86_64/sparc/ppc64/ppc64le/aarch64)
@@ -93,10 +95,19 @@
   downloading and extracting a tarball.
 * --enable-system-lcms: Build using the system installation of LCMS2, not
   the version in-tree.
+* --enable-system-zlib: Build using the system installation of Zlib, not
+  the version in-tree.
+* --enable-system-png: Build using the system installation of libpng, not
+  the version in-tree.
+* --enable-system-gif: Build using the system installation of giflib, not
+  the version in-tree.
 * --enable-system-pcsc: Build and link against the system installation of
   libpcsclite instead of trying to dynamically open it at runtime.
 * --enable-system-sctp: Build and link against the system installation of
   libsctp instead of trying to dynamically open it at runtime.
+* --enable-system-kerberos: Link against the system Kerberos library and
+  query it at runtime to obtain the cache location, rather than using a
+  hardcoded value.
 * --with-parallel-jobs: Run the specified number of parallel jobs when
   building HotSpot and the JDK.  If this option is passed without an
   argument, the number of online processors plus one is used.
@@ -189,8 +200,14 @@
   --with-jamvm-src-zip at all. This option allows a locally modified version of the source
   tarball to be used instead of the standard versions.
 * --with-hg-revision: Specify a hg revision to use (as opposed to tip) with the --enable-hg option.
+* --with-tzdata-dir: Specify the location of Java timezone data, defaulting to /usr/share/javazi.
+* --with-tapset-dir: Specify the location of system SystemTap tapsets, defaulting to ${datarootdir}/systemtap/tapset.
 * --with-llvm-config: Specify the location of the llvm-config binary.
 * --with-version-suffix: Appends the given text to the JDK version output.
+* --with-pax: The command used to PaX-mark built binaries.
+* --enable-Werror: Turn gcc & javac warnings into errors.
+* --disable-jar-compression: Don't compress the OpenJDK JAR files.
+* --disable-downloading: Don't download tarballs if not available; fail instead.
 * --with-cacerts-file: Specify the location of a cacerts file, defaulting to
   ${SYSTEM_JDK_DIR}/jre/lib/security/cacerts
 * --disable-precompiled-headers: Don't use pre-compiled headers.
@@ -210,9 +227,9 @@
 * --enable-jamvm: Replace HotSpot with JamVM.
 * --enable-shark: Build the Shark LLVM-based JIT.
 * --enable-zero: Build the zero assembler port on x86/x86_64/sparc platforms.
-* --with-hotspot-build: The HotSpot to use, defaulting to 'original' i.e. hs14 as bundled with OpenJDK.
 * --with-additional-vms=vm-list: Additional VMs to build using the system described
   below.
+* --with-hotspot-build: The HotSpot to use, as listed in hotspot.map.in.
 * --enable-sunec: Build the SunEC crypto provider against system NSS.
 * --enable-non-nss-curves: Define curves beyond the three specified by NSS (NIST P-{256,384,521})
 * --enable-improved-font-rendering: Use fontconfig for better font rendering
@@ -223,9 +240,6 @@
 * --enable-split-debuginfo: Strip debuginfo from binaries and libraries
   and install in .debug files under ${libdir}/debug instead.  objcopy
   from binutils must be available to perform the stripping.
-* --enable-system-kerberos: Link against the system Kerberos library and
-  query it at runtime to obtain the cache location, rather than using a
-  hardcoded value.
 
 Testing
 =======
@@ -241,7 +255,7 @@
 as a way of avoiding running the extensive JDK test suite which
 takes several hours.
 
-Xrender Support
+XRender Support
 ===============
 
 IcedTea7 includes support for an Xrender-based rendering pipeline
@@ -254,16 +268,16 @@
 SystemTap
 =========
 
-IcedTea7 includes work to allow the existing DTrace probes included in
+IcedTea includes work to allow the existing DTrace probes included in
 OpenJDK to be used with SystemTap.  This requires version 0.9.5 or later (0.9.9
 or later if you want Java method tracing).  The tapset needs to know
-the final install location of the JDK, so the --with-abs-install-dir option
+the final install location of the JDK, so the --prefix option
 should also be used to specify this.  If not set, it defaults to the
 in-tree location of openjdk.build/j2sdk-image and requires
 manual changes to tapset/hotspot.stp to work from elsewhere. For
 example, if you plan to install the resulting build in
-/usr/lib/jvm/java-1.6.0-openjdk, then you should specify
---with-abs-install-dir=/usr/lib/jvm/java-1.6.0-openjdk.
+/usr/lib/jvm/java-1.8.0-openjdk, then you should specify
+--prefix=/usr/lib/jvm/java-1.8.0-openjdk.
 
 The NSS PKCS11 Security Provider and Elliptic Curve Cryptography
 ================================================================
@@ -288,9 +302,9 @@
 CACAO
 =====
 
-IcedTea7 can use CACAO as the virtual machine, as opposed to HotSpot.
+IcedTea can use CACAO as the virtual machine, as opposed to HotSpot.
 One advantage of this is that CACAO has a JIT implementation for
-more platforms than HotSpot, including ppc, ppc64, arm and mips.
+more platforms than HotSpot, including ppc, arm and mips.
 When --enable-cacao is specified, CACAO will be downloaded and built,
 followed by the JDK portion of OpenJDK resulting in a CACAO+OpenJDK
 image in openjdk.build/j2sdk-image.  The --with-cacao-home
@@ -301,7 +315,7 @@
 JamVM
 =====
 
-IcedTea6 can use JamVM as the virtual machine, as opposed to HotSpot.
+IcedTea can use JamVM as the virtual machine, as opposed to HotSpot.
 When --enable-jamvm is specified, JamVM will be downloaded and built,
 followed by the JDK portion of OpenJDK resulting in a JamVM+OpenJDK
 image in openjdk.build/j2sdk-image.  The --with-jamvm-src-zip option
@@ -310,19 +324,22 @@
 Zero & Shark
 ============
 
-IcedTea7 includes a zero assembler port of HotSpot, which avoids
+IcedTea includes a zero assembler port of HotSpot, which avoids
 architecture-specific code as much as possible, allowing an
 interpreter to be built and run on most platforms (albeit very
-slowly).  As HotSpot only includes JITs for x86, x86_64 and SPARC, the
-zero assembler port is automatically enabled on all other
-architectures.  On x86, x86_64 and SPARC, it may be built using
---enable-zero.
+slowly).  As HotSpot only includes JITs for aarch64, ppc64, ppc64le,
+x86, x86_64 and SPARC, the zero assembler port is automatically enabled
+on all other architectures.  On HotSpot-supported architectures, it may
+be built using --enable-zero.
 
 To overcome the performance issues inherent in zero, a LLVM-based JIT
 called Shark has been developed.  This performs Just-In-Time compilation
 on any architecture supported by LLVM.  To enable it, pass the option
---enable-shark to configure.  Please note that Shark is still in
-development and builds are still likely to fail at present.
+--enable-shark to configure.  Please note that work on Shark is now
+abandoned and builds may fail.
+
+On ARM32, there is also a native JIT port within the 'aarch32' HotSpot
+build, which is built on this platform by default.
 
 Support for Different Versions of HotSpot
 =========================================
@@ -388,6 +405,11 @@
 
 http://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/hotspot
 
+The 'aarch32' HotSpot tree is also provided and enabled by default
+on 32-bit ARM platforms. This is taken from:
+
+http://hg.openjdk.java.net/aarch32-port/jdk8u/hotspot
+
 Building Additional Virtual Machines
 ====================================
 
--- a/Makefile.am	Mon Sep 17 19:35:08 2018 +0100
+++ b/Makefile.am	Mon Sep 24 17:13:44 2018 +0100
@@ -3108,10 +3108,17 @@
 	  $(INSTALL_DATA) $${files} $(DESTDIR)${prefix}/jre/lib/ext; \
 	done
 if ENABLE_SYSTEMTAP
+if WITH_TAPSET_DIR
+	stapdest="$(DESTDIR)$(TAPSET_DIR)/$(SYSTEMTAP_ARCH_DIR)" ; \
 	for files in $(BUILD_SDK_DIR)/tapset/*.stp; do \
 	  $(INSTALL_DATA) $${files} $(DESTDIR)${prefix}/tapset; \
+	  ${mkinstalldirs} $${stapdest} ; \
+	  tapname=$$(basename $${files}); \
+	  destname=$${tapname/./-@JAVA_VER@.} ; \
+	  ln -s ${prefix}/tapset/${tapname} $${stapdest}/$${destname} ; \
 	done
 endif
+endif
 	if [ -e $(DESTDIR)${exec_prefix}/lib/aarch32 ] ; then \
 	  ln -s aarch32 $(DESTDIR)${exec_prefix}/lib/arm; \
 	fi
@@ -3289,7 +3296,10 @@
 	  rm -vf $(DESTDIR)${prefix}/jre/lib/ext/$$(basename $${files}); \
 	done
 	for files in $(BUILD_SDK_DIR)/tapset/*.stp; do \
-	  rm -vf $(DESTDIR)${prefix}/tapset/$$(basename $${files}); \
+	  tapname=$$(basename $${files}); \
+	  destname=$${tapname/./-@JAVA_VER@.} ; \
+	  rm -vf $(DESTDIR)${prefix}/tapset/$${tapname}; \
+	  rm -vf $(DESTDIR)$(TAPSET_DIR)/$(SYSTEMTAP_ARCH_DIR)/$${destname} ; \
 	done
 	for files in $(BUILD_SDK_DIR)/jre/lib/*.properties; do \
 	  rm -vf $(DESTDIR)${prefix}/jre/lib/$$(basename $${files}); \
@@ -3393,6 +3403,8 @@
 	$(RMDIR) $(DESTDIR)${prefix}/sample
 	$(RMDIR) $(DESTDIR)$(docdir)
 	$(RMDIR) $(DESTDIR)$(datadir)/applications
+	$(RMDIR) $(DESTDIR)$(TAPSET_DIR)/$(SYSTEMTAP_ARCH_DIR)
+	$(RMDIR) $(DESTDIR)$(TAPSET_DIR)
 	$(RMDIR) $(DESTDIR)$(sysconfdir)/.java/.systemPrefs
 	$(RMDIR) $(DESTDIR)$(mandir)/{man1,ja_JP.UTF-8/man1}
 	for sizes in 16 24 32 48 ; do \
--- a/NEWS	Mon Sep 17 19:35:08 2018 +0100
+++ b/NEWS	Mon Sep 24 17:13:44 2018 +0100
@@ -23,6 +23,7 @@
 * New features
   - PR3623: Allow Shenandoah to be used on all architectures
   - PR3624: Sync desktop files with Fedora/RHEL versions again
+  - PR3628: Install symlinks to tapsets in SystemTap directory
 * Import of OpenJDK 8 u172 build 11
   - S8031304: Add dcmd to print all loaded dynamic libraries.
   - S8044107: Add Diagnostic Command to list all ClassLoaders
--- a/acinclude.m4	Mon Sep 17 19:35:08 2018 +0100
+++ b/acinclude.m4	Mon Sep 24 17:13:44 2018 +0100
@@ -6,6 +6,7 @@
       INSTALL_ARCH_DIR=amd64
       JRE_ARCH_DIR=amd64
       RPM_ARCH=x86_64
+      SYSTEMTAP_ARCH_DIR=x86_64
       ARCHFLAG="-m64"
       ;;
     i?86)
@@ -13,6 +14,7 @@
       INSTALL_ARCH_DIR=i386
       JRE_ARCH_DIR=i386
       RPM_ARCH=i686
+      SYSTEMTAP_ARCH_DIR=i386
       ARCH_PREFIX=${LINUX32}
       ARCHFLAG="-m32"
       ;;
@@ -20,12 +22,14 @@
       BUILD_ARCH_DIR=alpha
       INSTALL_ARCH_DIR=alpha
       JRE_ARCH_DIR=alpha
+      SYSTEMTAP_ARCH_DIR=alpha
       ;;
     arm64|aarch64)
       BUILD_ARCH_DIR=aarch64
       INSTALL_ARCH_DIR=aarch64
       JRE_ARCH_DIR=aarch64
       RPM_ARCH=aarch64
+      SYSTEMTAP_ARCH_DIR=arm64
       ARCHFLAG="-D_LITTLE_ENDIAN"
       ;;
     arm*)
@@ -33,23 +37,27 @@
       INSTALL_ARCH_DIR=aarch32
       JRE_ARCH_DIR=aarch32
       RPM_ARCH=armv7hl
+      SYSTEMTAP_ARCH_DIR=arm
       ARCHFLAG="-D_LITTLE_ENDIAN"
       ;;
     mips)
       BUILD_ARCH_DIR=mips
       INSTALL_ARCH_DIR=mips
       JRE_ARCH_DIR=mips
+      SYSTEMTAP_ARCH_DIR=mips
        ;;
     mipsel)
       BUILD_ARCH_DIR=mipsel
       INSTALL_ARCH_DIR=mipsel
       JRE_ARCH_DIR=mipsel
+      SYSTEMTAP_ARCH_DIR=mips
        ;;
     powerpc)
       BUILD_ARCH_DIR=ppc
       INSTALL_ARCH_DIR=ppc
       JRE_ARCH_DIR=ppc
       RPM_ARCH=ppc
+      SYSTEMTAP_ARCH_DIR=powerpc
       ARCH_PREFIX=${LINUX32}
       ARCHFLAG="-m32"
       ;;
@@ -58,6 +66,7 @@
       INSTALL_ARCH_DIR=ppc64
       JRE_ARCH_DIR=ppc64
       RPM_ARCH=ppc64
+      SYSTEMTAP_ARCH_DIR=powerpc
       ARCHFLAG="-m64"
        ;;
     powerpc64le)
@@ -65,12 +74,14 @@
       INSTALL_ARCH_DIR=ppc64le
       JRE_ARCH_DIR=ppc64le
       RPM_ARCH=ppc64le
+      SYSTEMTAP_ARCH_DIR=powerpc
       ARCHFLAG="-m64"
        ;;
     sparc)
       BUILD_ARCH_DIR=sparc
       INSTALL_ARCH_DIR=sparc
       JRE_ARCH_DIR=sparc
+      SYSTEMTAP_ARCH_DIR=sparc
       ARCH_PREFIX=${LINUX32}
       ARCHFLAG="-m32"
        ;;
@@ -78,6 +89,7 @@
       BUILD_ARCH_DIR=sparcv9
       INSTALL_ARCH_DIR=sparcv9
       JRE_ARCH_DIR=sparc64
+      SYSTEMTAP_ARCH_DIR=sparc
       ARCHFLAG="-m64"
        ;;
     s390)
@@ -85,6 +97,7 @@
       INSTALL_ARCH_DIR=s390
       JRE_ARCH_DIR=s390
       RPM_ARCH=s390
+      SYSTEMTAP_ARCH_DIR=s390
       ARCH_PREFIX=${LINUX32}
       ARCHFLAG="-m31"
        ;;
@@ -93,22 +106,26 @@
       INSTALL_ARCH_DIR=s390x
       JRE_ARCH_DIR=s390x
       RPM_ARCH=s390x
+      SYSTEMTAP_ARCH_DIR=s390
       ARCHFLAG="-m64"
       ;;
     sh*)
       BUILD_ARCH_DIR=sh
       INSTALL_ARCH_DIR=sh
       JRE_ARCH_DIR=sh
+      SYSTEMTAP_ARCH_DIR=sh
       ;;
     *)
       BUILD_ARCH_DIR=`uname -m`
       INSTALL_ARCH_DIR=$BUILD_ARCH_DIR
       JRE_ARCH_DIR=$INSTALL_ARCH_DIR
+      SYSTEMTAP_ARCH_DIR=$INSTALL_ARCH_DIR
       ;;
   esac
   AC_SUBST(BUILD_ARCH_DIR)
   AC_SUBST(INSTALL_ARCH_DIR)
   AC_SUBST(JRE_ARCH_DIR)
+  AC_SUBST(SYSTEMTAP_ARCH_DIR)
   AC_SUBST(ARCH_PREFIX)
   AC_SUBST(ARCHFLAG)
 ])
@@ -2698,3 +2715,30 @@
     AC_MSG_ERROR([${HSBUILD} is not supported on this platform.])
   fi
 ])
+
+AC_DEFUN([IT_WITH_TAPSET_DIR],
+[
+  TAPSET_DEFAULT="${datadir}/systemtap/tapset"
+  AC_MSG_CHECKING([which SystemTap tapset directory to use])
+  AC_ARG_WITH([tapset-dir],
+	      [AS_HELP_STRING(--with-tapset-dir,set the SystemTap tapset directory [[default=DATAROOTDIR/systemtap/tapset]])],
+  [
+    if test "x${withval}" = x || test "x${withval}" = xyes; then
+      TAPSET_DIR="${TAPSET_DEFAULT}"
+    else
+      TAPSET_DIR="${withval}"
+    fi
+  ],
+  [
+    TAPSET_DIR="${TAPSET_DEFAULT}"
+  ])
+  if test "x${TAPSET_DIR}" = "xno"; then
+    TAPSET_DIR=none
+    TAPSET_DIR_SET=no
+  else
+    TAPSET_DIR_SET=yes
+  fi
+  AC_MSG_RESULT([${TAPSET_DIR}])
+  AC_SUBST([TAPSET_DIR])
+  AM_CONDITIONAL(WITH_TAPSET_DIR, test "x${TAPSET_DIR_SET}" = "xyes")
+])
--- a/configure.ac	Mon Sep 17 19:35:08 2018 +0100
+++ b/configure.ac	Mon Sep 24 17:13:44 2018 +0100
@@ -131,6 +131,7 @@
 IT_ENABLE_ZERO_BUILD
 IT_CHECK_ADDITIONAL_VMS
 IT_WITH_TZDATA_DIR
+IT_WITH_TAPSET_DIR
 IT_ENABLE_NON_NSS_CURVES
 IT_ENABLE_HEADLESS
 IT_ENABLE_CCACHE