Skip to content

Commit 1313573

Browse files
committed
Merge commit '139e4f6c2ae' into jdk25u-freebsd-1
Merges BSD related changes done after jdk-25-freebsd-ga
2 parents f9bbb01 + 139e4f6 commit 1313573

File tree

17 files changed

+69
-71
lines changed

17 files changed

+69
-71
lines changed

.github/workflows/build-openbsd.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ jobs:
8080
- name: 'Checkout the JDK source'
8181
uses: actions/checkout@v4
8282

83-
- name: 'Get the BootJDK'
83+
- name: 'Set the BootJDK path'
8484
id: bootjdk
85-
uses: ./.github/actions/get-bootjdk
86-
with:
87-
platform: ${{ inputs.platform }}
85+
run: echo 'path=/usr/local/jdk-25' >> $GITHUB_OUTPUT
8886

8987
- name: 'Get JTReg'
9088
id: jtreg
@@ -112,7 +110,7 @@ jobs:
112110
- name: 'Install toolchain and dependencies in VM'
113111
shell: openbsd {0}
114112
run: |
115-
until pkg_add metaauto autoconf%2.69 gtar-- zip unzip-- cups-libs bash ggrep gmake dwz libiconv harfbuzz jpeg lcms2 png giflib; do
113+
until pkg_add jdk%25 metaauto autoconf%2.69 gtar-- zip unzip-- cups-libs bash ggrep gmake dwz libiconv harfbuzz jpeg lcms2 png giflib; do
116114
echo Retrying in 10 seconds; sleep 10;
117115
done
118116

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ jobs:
349349
platform: openbsd-x64
350350
runs-on: ubuntu-24.04
351351
vm-arch: 'x86_64'
352-
vm-release: "7.7"
352+
vm-release: "7.8"
353353
configure-arguments: ${{ github.event.inputs.configure-arguments }}
354354
make-arguments: ${{ github.event.inputs.make-arguments }}
355355
if: needs.prepare.outputs.openbsd-x64 == 'true'
@@ -362,7 +362,7 @@ jobs:
362362
platform: openbsd-aarch64
363363
runs-on: ubuntu-24.04
364364
vm-arch: 'aarch64'
365-
vm-release: "7.7"
365+
vm-release: "7.8"
366366
configure-arguments: ${{ github.event.inputs.configure-arguments }}
367367
make-arguments: ${{ github.event.inputs.make-arguments }}
368368
if: needs.prepare.outputs.openbsd-aarch64 == 'true'
@@ -457,7 +457,7 @@ jobs:
457457
with:
458458
platform: openbsd-x64
459459
runs-on: ubuntu-24.04
460-
vm-release: 7.7
460+
vm-release: 7.8
461461
vm-arch: x86_64
462462
debug-suffix: -debug
463463

@@ -470,7 +470,7 @@ jobs:
470470
with:
471471
platform: openbsd-aarch64
472472
runs-on: ubuntu-24.04
473-
vm-release: 7.7
473+
vm-release: 7.8
474474
vm-arch: aarch64
475475
debug-suffix: -debug
476476

.github/workflows/test-openbsd.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
include:
7979
- test-name: 'jdk/tier1 part 1'
8080
test-suite: 'test/jdk/:tier1_part1'
81+
test-timeout-factor: 'TIMEOUT_FACTOR=4'
8182

8283
- test-name: 'jdk/tier1 part 2'
8384
test-suite: 'test/jdk/:tier1_part2'
@@ -114,6 +115,7 @@ jobs:
114115

115116
- test-name: 'hs/tier1 serviceability'
116117
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
118+
test-timeout-factor: 'TIMEOUT_FACTOR=2'
117119
debug-suffix: ${{ inputs.debug-suffix }}
118120

119121
- test-name: 'lib-test/tier1'
@@ -124,11 +126,9 @@ jobs:
124126
- name: 'Checkout the JDK source'
125127
uses: actions/checkout@v4
126128

127-
- name: 'Get the BootJDK'
129+
- name: 'Set the BootJDK path'
128130
id: bootjdk
129-
uses: ./.github/actions/get-bootjdk
130-
with:
131-
platform: ${{ inputs.platform }}
131+
run: echo 'path=/usr/local/jdk-25' >> $GITHUB_OUTPUT
132132

133133
- name: 'Get JTReg'
134134
id: jtreg
@@ -175,12 +175,13 @@ jobs:
175175
prepare: |
176176
mount -u -o wxallowed /home
177177
usermod -L pbuild root
178-
until pkg_add gtar-- zip unzip-- cups-libs bash ggrep gmake dwz libiconv harfbuzz jpeg lcms2 png giflib; do
178+
until pkg_add jdk%25 gtar-- zip unzip-- cups-libs bash ggrep gmake dwz libiconv harfbuzz jpeg lcms2 png giflib; do
179179
echo Retrying in 10 seconds; sleep 10;
180180
done
181181
run: >
182182
ulimit -Sd $(ulimit -dH) &&
183183
gmake test-prebuilt
184+
TEST_JOBS=1
184185
TEST='${{ matrix.test-suite }}'
185186
BOOT_JDK=${{ steps.bootjdk.outputs.path }}
186187
JT_HOME=${{ steps.jtreg.outputs.path }}
@@ -189,7 +190,7 @@ jobs:
189190
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
190191
${{ steps.extra-options.outputs.test-jdk }}
191192
${{ steps.extra-options.outputs.compile-jdk }}
192-
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful;${{ steps.extra-options.outputs.extra-problem-lists }}'
193+
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful;${{ steps.extra-options.outputs.extra-problem-lists }};${{ matrix.test-timeout-factor }}'
193194
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
194195
195196
# This is a separate step, since if the markdown from a step gets bigger than

make/autoconf/flags-cflags.m4

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
555555
# works for all platforms.
556556
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
557557
558-
if test "x$OPENJDK_TARGET_OS" = xlinux; then
558+
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xbsd; then
559559
if test "x$DEBUG_LEVEL" = xrelease; then
560560
# Clang does not inline as much as GCC does for functions with "inline" keyword by default.
561561
# This causes noticeable slowdown in pause time for G1, and possibly in other areas.
@@ -564,23 +564,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
564564
fi
565565
TOOLCHAIN_CFLAGS_JDK="-pipe"
566566
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
567-
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
568-
TOOLCHAIN_CFLAGS_JDK="-pipe"
569-
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
570-
571-
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CXXSTD_CXXFLAG -Werror],
572-
IF_FALSE: [CXXSTD_CXXFLAG=""])
573-
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$CXXSTD_CXXFLAG"
574-
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $CXXSTD_CXXFLAG"
575-
ADLC_CXXFLAG="$CXXSTD_CXXFLAG"
576567
fi
577568
578569
if test "x$OPENJDK_TARGET_OS" = xaix; then
579570
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno"
580571
TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char"
581572
fi
582573
583-
if test "x$OPENJDK_TARGET_OS_ENV" != xbsd.freebsd; then
574+
if test "x$OPENJDK_TARGET_OS" != xbsd; then
584575
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fvisibility=hidden"
585576
fi
586577
@@ -764,7 +755,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
764755
fi
765756
766757
elif test "x$TOOLCHAIN_TYPE" = xclang; then
767-
if test "x$FLAGS_OS" = xlinux; then
758+
if test "x$FLAGS_OS" = xlinux || test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd; then
768759
# ppc test not really needed for clang
769760
if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
770761
# for all archs except arm and ppc, prevent gcc to omit frame pointer
@@ -775,14 +766,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
775766
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
776767
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power10"
777768
fi
778-
elif test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd; then
779-
if test "x$FLAGS_CPU" = xppc64; then
780-
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=powerpc64 -mtune=power5"
781-
elif test "x$FLAGS_CPU" = xppc64le; then
782-
# Little endian machine uses ELFv2 ABI.
783-
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
784-
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power10"
785-
fi
786769
fi
787770
if test "x$OPENJDK_TARGET_OS" = xaix; then
788771
$1_CFLAGS_CPU="-mcpu=pwr8"
@@ -797,10 +780,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
797780
# non-release builds.
798781
$1_CFLAGS_CPU_JVM="-homeparams"
799782
fi
800-
elif test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd; then
801-
if test "x$FLAGS_CPU" = xppc64; then
802-
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=powerpc64 -mtune=power5"
803-
fi
804783
fi
805784
fi
806785

make/autoconf/libraries.m4

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
7575
fi
7676
7777
# Check if alsa is needed
78-
if test "x$OPENJDK_TARGET_OS" = xlinux -o "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd -o "x$OPENJDK_TARGET_OS_ENV" = xbsd.netbsd; then
78+
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd || test "x$OPENJDK_TARGET_OS_ENV" = xbsd.netbsd; then
7979
NEEDS_LIB_ALSA=true
8080
else
8181
NEEDS_LIB_ALSA=false
@@ -132,9 +132,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
132132
fi
133133
134134
# Threading library
135-
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
136-
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBPTHREAD"
137-
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
135+
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix || test "x$OPENJDK_TARGET_OS" = xbsd; then
138136
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBPTHREAD"
139137
fi
140138

make/conf/github-actions.conf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,3 @@ MACOS_X64_BOOT_JDK_SHA256=6bbfb1d01741cbe55ab90299cb91464b695de9a3ace85c15131aa2
4747
WINDOWS_X64_BOOT_JDK_EXT=zip
4848
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_windows-x64_bin.zip
4949
WINDOWS_X64_BOOT_JDK_SHA256=11d1d9f6ac272d5361c8a0bef01894364081c7fb1a6914c2ad2fc312ae83d63b
50-
51-
OPENBSD_AARCH64_BOOT_JDK_EXT=tar.gz
52-
OPENBSD_AARCH64_BOOT_JDK_URL=http://www.intricatesoftware.com/distfiles/openjdk-jdk25u-bootjdk-aarch64-20250930.tar.gz
53-
OPENBSD_AARCH64_BOOT_JDK_SHA256=c183011e3bdcaac5245b82556576dce0c807ace84f1551d3738225b07eec0be5
54-
55-
OPENBSD_X64_BOOT_JDK_EXT=tar.gz
56-
OPENBSD_X64_BOOT_JDK_URL=http://www.intricatesoftware.com/distfiles/openjdk-jdk25u-bootjdk-amd64-20250930.tar.gz
57-
OPENBSD_X64_BOOT_JDK_SHA256=3951781035fa0d2622b4a397af5fced614c9d0783cefb76b39b1f5f8d604c800

make/hotspot/lib/JvmOverrideFiles.gmk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,16 @@ else ifeq ($(call isTargetOs, bsd), true)
195195
#
196196
BUILD_LIBJVM_memnode.cpp_CXXFLAGS := -O0
197197
endif
198+
199+
# retguard interferes with these files leading to SIGTRAP
200+
ifeq ($(call isTargetOsEnv, bsd.openbsd), true)
201+
JVM_PRECOMPILED_HEADER_EXCLUDE += \
202+
c1_Runtime1.cpp \
203+
sharedRuntime.cpp \
204+
#
205+
BUILD_LIBJVM_c1_Runtime1.cpp_CXXFLAGS := -fno-ret-protector
206+
BUILD_LIBJVM_sharedRuntime.cpp_CXXFLAGS := -fno-ret-protector
207+
endif
198208
endif
199209

200210
endif

make/modules/java.base/Lib.gmk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,14 @@ endif
157157

158158
################################################################################
159159
## Build libsyslookup
160+
## The BSDLIBC depenency on OpenBSD is needed to access libc symbols. On OpenBSD
161+
## libc is not added by default to shared libraries.
160162
################################################################################
161163

164+
ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.openbsd)
165+
BSDLIBC= -lc
166+
endif
167+
162168
$(eval $(call SetupJdkLibrary, BUILD_LIBSYSLOOKUP, \
163169
NAME := syslookup, \
164170
EXTRA_HEADER_DIRS := java.base:libjava, \
@@ -168,7 +174,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSYSLOOKUP, \
168174
LDFLAGS_aix := -brtl -bexpfull, \
169175
LIBS_linux := $(LIBDL) $(LIBM), \
170176
LIBS_aix := -ldecNumber $(LIBM), \
171-
LIBS_bsd := $(LIBDL) $(LIBM), \
177+
LIBS_bsd := $(LIBDL) $(LIBM) $(BSDLIBC), \
172178
))
173179

174180
TARGETS += $(BUILD_LIBSYSLOOKUP)

src/hotspot/share/opto/type.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,9 +933,6 @@ void Type::assert_type_verify_empty() const {
933933
assert(Compile::current()->_type_verify == nullptr || Compile::current()->_type_verify->empty_cache(), "cache should have been discarded");
934934
}
935935

936-
// _C is a define on OpenBSD
937-
#undef _C
938-
939936
class VerifyMeet {
940937
private:
941938
Compile* _C;

src/hotspot/share/utilities/elfFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ bool DwarfFile::DebugAranges::find_compilation_unit_offset(const uint32_t offset
739739
}
740740
}
741741

742-
assert(false, "No address descriptor found containing offset_in_library.");
742+
DWARF_LOG_INFO("No address descriptor found containing offset_in_library.");
743743
return false;
744744
}
745745

0 commit comments

Comments
 (0)