Skip to content

Commit c243d76

Browse files
authored
openjdk17: fix build for clang 16 (macports#26099)
closes https://trac.macports.org/ticket/70918
1 parent 1d484e1 commit c243d76

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

java/openjdk17/Portfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name openjdk17
66
# See https://openjdk-sources.osci.io/openjdk17/ for the version and build number that matches the latest '-ga' version
77
version 17.0.12
88
set build 7
9-
revision 0
9+
revision 1
1010
categories java devel
1111
supported_archs x86_64 arm64
1212
license GPL-2+
@@ -36,6 +36,9 @@ pre-patch {
3636
reinplace "s|xmacosx|xwindows|g" ${worksrcpath}/make/autoconf/lib-freetype.m4
3737
}
3838

39+
# Temporary workaround for clang 16: https://trac.macports.org/ticket/70819
40+
patchfiles JDK-8340341-clang-16-workaround.patch
41+
3942
set tpath ${prefix}/Library/Java
4043
use_xcode yes
4144
use_configure yes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- make/hotspot/lib/JvmOverrideFiles.gmk.orig 2024-06-04 18:47:50
2+
+++ make/hotspot/lib/JvmOverrideFiles.gmk 2024-09-22 23:45:41
3+
@@ -89,6 +89,11 @@
4+
# for the clang bug was still needed.
5+
BUILD_LIBJVM_loopTransform.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
6+
7+
+ # See JDK-8340341
8+
+ ifeq "$(firstword $(subst ., ,$(CXX_VERSION_NUMBER)))" "16"
9+
+ BUILD_LIBJVM_stackMapTable.cpp_CXXFLAGS := "-O1"
10+
+ endif
11+
+
12+
# The following files are compiled at various optimization
13+
# levels due to optimization issues encountered at the
14+
# default level. The Clang compiler issues a compile

0 commit comments

Comments
 (0)