git: 08cc50220f1d - main - java/openjdk11: remove custom LLVM - build with LLVM from base

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sun, 14 Jul 2024 14:00:38 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=08cc50220f1d71f12d13d7e2c957a5679b02914d

commit 08cc50220f1d71f12d13d7e2c957a5679b02914d
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-07-14 13:44:52 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-14 13:44:52 +0000

    java/openjdk11: remove custom LLVM - build with LLVM from base
    
    Segfaults are no longer observed with current versions of LLVM 17 and 18
    in base 13.3 and 14.1, so there is no need to pull such an old version
    from ports to build.
    For example build java/openjdk11 with LLVM from base and then build
    java/eclipse and java/openjfx14 using java/openjdk11: build and run
    without errors.
    
    PR:             280056 260319
    Approved by:    java (maintainer, timeout 14 days)
---
 java/openjdk11/Makefile                              |  6 +-----
 .../files/patch-make_hotspot_lib_JvmMapfile.gmk      | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile
index a891d0f62d90..06cc294c82c6 100644
--- a/java/openjdk11/Makefile
+++ b/java/openjdk11/Makefile
@@ -152,13 +152,9 @@ CONFIGURE_ARGS+=	--with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA
 			--with-extra-cxxflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}"
 .else
 MAKE_ENV+=	USE_CLANG=true
-LLVM_VER=	12
-BUILD_DEPENDS+=	clang${LLVM_VER}:devel/llvm${LLVM_VER}
-CC=		${LOCALBASE}/bin/clang${LLVM_VER}
-CXX=		${LOCALBASE}/bin/clang++${LLVM_VER}
 .endif
 
-.if ${ARCH} == aarch64 || ${ARCH:Marmv*} || ${ARCH:Mpowerpc64*}
+.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marmv*} || ${ARCH:Mpowerpc64*}
 CONFIGURE_ARGS+=	--disable-warnings-as-errors
 .endif
 .if ${ARCH} == aarch64 || ${ARCH:Marmv*}
diff --git a/java/openjdk11/files/patch-make_hotspot_lib_JvmMapfile.gmk b/java/openjdk11/files/patch-make_hotspot_lib_JvmMapfile.gmk
new file mode 100644
index 000000000000..b7380c2a0b76
--- /dev/null
+++ b/java/openjdk11/files/patch-make_hotspot_lib_JvmMapfile.gmk
@@ -0,0 +1,20 @@
+--- make/hotspot/lib/JvmMapfile.gmk.orig	2024-04-18 01:56:50 UTC
++++ make/hotspot/lib/JvmMapfile.gmk
+@@ -65,7 +65,7 @@ ifeq ($(call isTargetOs, linux), true)
+ # platform dependent.
+ 
+ ifeq ($(call isTargetOs, linux), true)
+-  DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o
++  DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *.o
+   ifneq ($(FILTER_SYMBOLS_PATTERN), )
+     FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
+   endif
+@@ -143,7 +143,7 @@ else ifeq ($(OPENJDK_TARGET_OS), bsd)
+           if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
+         }'
+   else
+-    DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o
++    DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *.o
+     FILTER_SYMBOLS_AWK_SCRIPT := \
+         '{ \
+           if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \