--- openjdk/common/autoconf/configure 2022-01-08 15:04:00.298867992 +0000 +++ openjdk/common/autoconf/configure 2022-01-08 15:04:15.944830341 +0000 @@ -103,7 +103,7 @@ } # Check for local changes -check_hg_updates +run_autogen_or_fail if test -e $conf_custom_script_dir/generated-configure.sh; then # Test if open configure is newer than custom configure, if so, custom needs to --- openjdk/common/autoconf/jdk-options.m4 2022-01-08 15:01:06.578286090 +0000 +++ openjdk/common/autoconf/jdk-options.m4 2022-01-08 15:02:07.122140367 +0000 @@ -155,7 +155,7 @@ AC_SUBST(JVM_VARIANT_ZEROSHARK) AC_SUBST(JVM_VARIANT_CORE) - INCLUDE_SA=true + AC_CHECK_HEADER(thread_db.h,INCLUDE_SA=true,INCLUDE_SA=false) if test "x$JVM_VARIANT_ZERO" = xtrue ; then INCLUDE_SA=false fi --- openjdk/hotspot/make/linux/makefiles/defs.make 2021-10-23 22:41:58.000000000 +0000 +++ openjdk/hotspot/make/linux/makefiles/defs.make 2022-01-08 15:18:40.869481619 +0000 @@ -305,6 +305,9 @@ # Serviceability Binaries # No SA Support for PPC, IA64, ARM or zero +# or if thread_db.h missing (musl) + +ifneq ($(wildcard /usr/include/thread_db.h),) ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ $(EXPORT_LIB_DIR)/sa-jdi.jar ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ @@ -324,6 +327,11 @@ endif endif endif +else +ADD_SA_BINARIES/x86 = +ADD_SA_BINARIES/sparc = +ADD_SA_BINARIES/aarch64 = +endif ADD_SA_BINARIES/ppc = ADD_SA_BINARIES/ia64 = ADD_SA_BINARIES/arm = --- openjdk/hotspot/make/linux/makefiles/sa.make 2022-01-08 15:19:19.720308035 +0000 +++ openjdk/hotspot/make/linux/makefiles/sa.make 2022-01-08 15:20:10.736087700 +0000 @@ -59,9 +59,11 @@ # if $(AGENT_DIR) does not exist, we don't build SA # also, we don't build SA on Itanium or zero. +# check for thread_db.h too (musl does not have it). -all: - if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" \ +all: + if [ -d $(AGENT_DIR) -a -f /usr/include/thread_db.h \ + -a "$(SRCARCH)" != "ia64" \ -a "$(SRCARCH)" != "zero" ] ; then \ $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ fi --- openjdk/hotspot/make/linux/makefiles/saproc.make 2022-01-08 15:05:35.089639891 +0000 +++ openjdk/hotspot/make/linux/makefiles/saproc.make 2022-01-08 15:06:30.619506275 +0000 @@ -66,12 +66,15 @@ # if $(AGENT_DIR) does not exist, we don't build SA # also, we don't build SA on Itanium or zero. +# check for thread_db.h too (musl does not have it) +ifneq ($(wildcard /usr/include/thread_db.h),) ifneq ($(wildcard $(AGENT_DIR)),) ifneq ($(filter-out ia64 zero,$(SRCARCH)),) BUILDLIBSAPROC = $(LIBSAPROC) endif endif +endif ifneq ($(ALT_SASRCDIR),) ALT_SAINCDIR=-I$(ALT_SASRCDIR) -DALT_SASRCDIR --- openjdk/common/autoconf/toolchain.m4 2022-01-08 15:41:07.744979588 +0000 +++ openjdk/common/autoconf/toolchain.m4 2022-01-08 15:41:36.256899139 +0000 @@ -443,7 +443,7 @@ # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1` # Check that this is likely to be GCC. - $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP -E "^(gcc|g\+\+|distcc)" >&AS_MESSAGE_LOG_FD 2>&1 + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP -E "^(.*gcc|.*g\+\+|distcc)" >&AS_MESSAGE_LOG_FD 2>&1 if test $? -ne 0; then AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler.]) AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION"])