Skip to content

Commit cf4ca45

Browse files
committed
Merge remote-tracking branch 'upstream-bsd-port/master' into bsd-port
2 parents 050ffd6 + 262b31b commit cf4ca45

File tree

1,621 files changed

+44540
-28168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,621 files changed

+44540
-28168
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ NashornProfile.txt
1616
**/JTreport/**
1717
**/JTwork/**
1818
/src/utils/LogCompilation/target/
19+
/src/utils/LogCompilation/logc.jar
1920
/.project/
2021
/.settings/
2122
/compile_commands.json

make/CompileInterimLangtools.gmk

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2026, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -68,17 +68,19 @@ java.compiler.interim_EXTRA_FILES := \
6868
TARGETS += $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
6969

7070
################################################################################
71-
# Use the up-to-date PreviewFeature.java and NoPreview.java from the current
72-
# sources, instead of the versions from the boot JDK, as javac may be referring
73-
# to constants from the up-to-date versions.
74-
75-
$(eval $(call SetupCopyFiles, COPY_PREVIEW_FEATURES, \
76-
FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java \
77-
$(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/NoPreview.java, \
78-
DEST := $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim/jdk/internal/javac/, \
79-
))
71+
# Create a hybrid PreviewFeature.java that combines constants
72+
# from the current sources, as those can be used in javac APIs, and from the
73+
# bootstrap JDK, as those can be used from bootstrap JDK classfiles.
74+
75+
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim/jdk/internal/javac/PreviewFeature.java: \
76+
$(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java
77+
$(call LogInfo, Generating $@)
78+
$(JAVA) $(TOPDIR)/make/langtools/tools/previewfeature/SetupPreviewFeature.java \
79+
$(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java \
80+
$@
81+
8082

81-
TARGETS += $(COPY_PREVIEW_FEATURES)
83+
TARGETS += $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim/jdk/internal/javac/PreviewFeature.java
8284

8385
################################################################################
8486
# Setup the rules to build interim langtools, which is compiled by the boot
@@ -123,7 +125,8 @@ define SetupInterimModule
123125
$1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
124126
$$(INTERIM_LANGTOOLS_BASE_MODULES), $$(call FindTransitiveDepsForModule, $1)))
125127

126-
$$(BUILD_$1.interim): $$(foreach d, $$($1_DEPS_INTERIM), $$(BUILD_$$d)) $(COPY_PREVIEW_FEATURES)
128+
$$(BUILD_$1.interim): $$(foreach d, $$($1_DEPS_INTERIM), $$(BUILD_$$d)) \
129+
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim/jdk/internal/javac/PreviewFeature.java
127130

128131
TARGETS += $$(BUILD_$1.interim)
129132
endef

make/GenerateLinkOptData.gmk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,15 @@ CLASSLIST_FILE_VM_OPTS = \
7070

7171
# Save the stderr output of the command and print it along with stdout in case
7272
# something goes wrong.
73+
# The classlists must be generated with -Xint to avoid non-determinism
74+
# introduced by JIT compiled code
7375
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
7476
$(call MakeDir, $(LINK_OPT_DIR))
7577
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
7678
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
7779
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
7880
$(CLASSLIST_FILE_VM_OPTS) \
81+
-Xint \
7982
-Xlog:aot=off \
8083
-Xlog:cds=off \
8184
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
@@ -90,6 +93,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
9093
-XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \
9194
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
9295
$(CLASSLIST_FILE_VM_OPTS) \
96+
-Xint \
9397
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
9498
-Xlog:aot=off \
9599
-Xlog:cds=off \

make/PreInit.gmk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2012, 2026, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -66,7 +66,8 @@ CALLED_SPEC_TARGETS := $(filter-out $(ALL_GLOBAL_TARGETS), $(CALLED_TARGETS))
6666
ifeq ($(CALLED_SPEC_TARGETS), )
6767
SKIP_SPEC := true
6868
endif
69-
ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq)
69+
MFLAGS_SINGLE := $(filter-out --%, $(MFLAGS))
70+
ifeq ($(findstring p, $(MFLAGS_SINGLE))$(findstring q, $(MFLAGS_SINGLE)), pq)
7071
SKIP_SPEC := true
7172
endif
7273

make/autoconf/basic_tools.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -369,6 +369,10 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
369369
IS_GNU_DATE=yes
370370
else
371371
AC_MSG_RESULT([no])
372+
# Likely at the AIX provided version of the date utility here, which is not compatible
373+
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
374+
AC_MSG_ERROR([gnu date from AIX toolbox is required])
375+
fi
372376
IS_GNU_DATE=no
373377
fi
374378
AC_SUBST(IS_GNU_DATE)

make/autoconf/flags-cflags.m4

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
579579
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
580580
fi
581581
582+
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
583+
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -ffunction-sections -fdata-sections"
584+
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -fdata-sections"
585+
fi
586+
582587
if test "x$OPENJDK_TARGET_OS" = xaix; then
583588
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno"
584589
TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char"

make/autoconf/flags-ldflags.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
8080
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
8181
UTIL_REQUIRE_TOOLCHAIN_PROGS(LLD, lld)
8282
fi
83+
84+
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
85+
BASIC_LDFLAGS_JDK_ONLY="$BASIC_LDFLAGS_JDK_ONLY -Wl,--gc-sections"
86+
fi
8387
fi
8488
if test "x$OPENJDK_TARGET_OS" = xaix; then
8589
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-blibpath:/usr/lib:lib -Wl,-bnoexpall \

make/autoconf/jdk-options.m4

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,12 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
103103
AC_SUBST(ENABLE_HEADLESS_ONLY)
104104
105105
# should we linktime gc unused code sections in the JDK build ?
106-
if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = xs390x; then
107-
LINKTIME_GC_DEFAULT=true
106+
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
107+
if test "x$OPENJDK_TARGET_CPU" = "xs390x" || test "x$OPENJDK_TARGET_CPU" = "xppc64le"; then
108+
LINKTIME_GC_DEFAULT=true
109+
else
110+
LINKTIME_GC_DEFAULT=false
111+
fi
108112
else
109113
LINKTIME_GC_DEFAULT=false
110114
fi

make/common/modules/LauncherCommon.gmk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -35,8 +35,14 @@ include ProcessMarkdown.gmk
3535
include $(TOPDIR)/make/ToolsJdk.gmk
3636

3737
LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher
38+
39+
ifeq ($(call isTargetOs, aix), true)
40+
ADD_PLATFORM_INCLUDE_DIR := -I$(TOPDIR)/src/java.base/aix/native/include
41+
endif
42+
3843
LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \
3944
-I$(TOPDIR)/src/java.base/share/native/libjli \
45+
$(ADD_PLATFORM_INCLUDE_DIR) \
4046
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
4147
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
4248
#

make/hotspot/lib/CompileGtest.gmk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
6363
unused-result zero-as-null-pointer-constant, \
6464
DISABLED_WARNINGS_clang := format-nonliteral undef unused-result \
6565
zero-as-null-pointer-constant, \
66+
$(comment Disable deprecated-declarations warnings to workaround) \
67+
$(comment clang18+glibc12 bug https://github.com/llvm/llvm-project/issues/76515) \
68+
$(comment until the clang bug has been fixed) \
69+
DISABLED_WARNINGS_clang_gtest-all.cc := deprecated-declarations, \
6670
DISABLED_WARNINGS_microsoft := 4530, \
6771
DEFAULT_CFLAGS := false, \
6872
CFLAGS := $(JVM_CFLAGS) \

0 commit comments

Comments
 (0)