diff -Naur openjdk-7.271_p01/hotspot/make/linux/makefiles/defs.make openjdk-7.271_p01-copy/hotspot/make/linux/makefiles/defs.make --- openjdk-7.271_p01/hotspot/make/linux/makefiles/defs.make 2020-10-15 21:59:37.863954981 -0400 +++ openjdk-7.271_p01-copy/hotspot/make/linux/makefiles/defs.make 2020-10-15 22:23:07.511947672 -0400 @@ -298,6 +298,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) \ @@ -311,6 +314,10 @@ ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo endif endif +else +ADD_SA_BINARIES/x86 = +ADD_SA_BINARIES/sparc = +endif ADD_SA_BINARIES/ppc = ADD_SA_BINARIES/ppc64 = ADD_SA_BINARIES/ia64 = diff -Naur openjdk-7.271_p01/hotspot/make/linux/makefiles/sa.make openjdk-7.271_p01-copy/hotspot/make/linux/makefiles/sa.make --- openjdk-7.271_p01/hotspot/make/linux/makefiles/sa.make 2020-10-15 21:59:37.863954981 -0400 +++ openjdk-7.271_p01-copy/hotspot/make/linux/makefiles/sa.make 2020-10-15 22:24:00.083947400 -0400 @@ -59,9 +59,12 @@ # 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" \ + 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 diff -Naur openjdk-7.271_p01/hotspot/make/linux/makefiles/saproc.make openjdk-7.271_p01-copy/hotspot/make/linux/makefiles/saproc.make --- openjdk-7.271_p01/hotspot/make/linux/makefiles/saproc.make 2020-10-15 21:59:37.863954981 -0400 +++ openjdk-7.271_p01-copy/hotspot/make/linux/makefiles/saproc.make 2020-10-15 22:24:38.647947200 -0400 @@ -65,12 +65,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)