Skip to content

Commit 79345bb

Browse files
committed
8339783: Implement JEP 479: Remove the Windows 32-bit x86 Port
Reviewed-by: kbarrett, kvn, stuefe, shade, erikj
1 parent 2eeaa57 commit 79345bb

File tree

85 files changed

+349
-1840
lines changed

Some content is hidden

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

85 files changed

+349
-1840
lines changed

make/autoconf/basic.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
7676
fi
7777
7878
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
79+
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
80+
AC_MSG_ERROR([32-bit Windows builds are not supported])
81+
fi
7982
BASIC_SETUP_PATHS_WINDOWS
8083
fi
8184

make/autoconf/platform.m4

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, 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
@@ -666,14 +666,14 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
666666
[
667667
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
668668
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
669-
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$OPENJDK_TARGET_CPU" = xx86; then
670-
if test "x$enable_deprecated_ports" = "xyes"; then
671-
AC_MSG_WARN([The Windows 32-bit x86 port is deprecated and may be removed in a future release.])
672-
else
673-
AC_MSG_ERROR(m4_normalize([The Windows 32-bit x86 port is deprecated and may be removed in a future release.
674-
Use --enable-deprecated-ports=yes to suppress this error.]))
675-
fi
676-
fi
669+
# if test "x$OPENJDK_TARGET_CPU" = xx86; then
670+
# if test "x$enable_deprecated_ports" = "xyes"; then
671+
# AC_MSG_WARN([The x86 port is deprecated and may be removed in a future release.])
672+
# else
673+
# AC_MSG_ERROR(m4_normalize([The 32-bit x86 port is deprecated and may be removed in a future release.
674+
# Use --enable-deprecated-ports=yes to suppress this error.]))
675+
# fi
676+
# fi
677677
])
678678

679679
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],

make/autoconf/toolchain_microsoft.m4

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, 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
@@ -82,9 +82,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
8282
fi
8383
8484
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
85-
if test "x$TARGET_CPU" = xx86; then
86-
VCVARSFILES="vcvars32.bat vcvarsamd64_x86.bat"
87-
elif test "x$TARGET_CPU" = xx86_64; then
85+
if test "x$TARGET_CPU" = xx86_64; then
8886
VCVARSFILES="vcvars64.bat vcvarsx86_amd64.bat"
8987
elif test "x$TARGET_CPU" = xaarch64; then
9088
# for host x86-64, target aarch64
@@ -132,9 +130,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
132130
elif test -f "$WIN_SDK_BASE/bin/setenv.cmd"; then
133131
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
134132
VS_ENV_CMD="$WIN_SDK_BASE/bin/setenv.cmd"
135-
if test "x$TARGET_CPU" = xx86; then
136-
VS_ENV_ARGS="/x86"
137-
elif test "x$TARGET_CPU" = xx86_64; then
133+
if test "x$TARGET_CPU" = xx86_64; then
138134
VS_ENV_ARGS="/x64"
139135
elif test "x$TARGET_CPU" = xaarch64; then
140136
VS_ENV_ARGS="/arm64"
@@ -438,9 +434,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
438434
# Need to check if the found msvcr is correct architecture
439435
AC_MSG_CHECKING([found $DLL_NAME architecture])
440436
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
441-
if test "x$OPENJDK_TARGET_CPU" = xx86; then
442-
CORRECT_MSVCR_ARCH=386
443-
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
437+
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
444438
CORRECT_MSVCR_ARCH=x86-64
445439
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
446440
# The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
@@ -466,9 +460,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
466460
DLL_HELP="$2"
467461
MSVC_DLL=
468462
469-
if test "x$OPENJDK_TARGET_CPU" = xx86; then
470-
vs_target_cpu=x86
471-
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
463+
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
472464
vs_target_cpu=x64
473465
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
474466
vs_target_cpu=arm64
@@ -522,18 +514,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
522514
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
523515
# (This was the original behaviour; kept since it might turn something up)
524516
if test "x$VCINSTALLDIR" != x; then
525-
if test "x$OPENJDK_TARGET_CPU" = xx86; then
526-
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
527-
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
528-
if test "x$POSSIBLE_MSVC_DLL" = x; then
529-
# We're grasping at straws now...
530-
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
531-
| $HEAD --lines 1`
532-
fi
533-
else
534-
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
535-
| $GREP x64 | $HEAD --lines 1`
536-
fi
517+
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
518+
| $GREP x64 | $HEAD --lines 1`
537519
538520
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
539521
[search of VCINSTALLDIR])

make/hotspot/gensrc/GensrcAdlc.gmk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
109109
ADLCFLAGS += -DR18_RESERVED
110110
endif
111111
else ifeq ($(call isTargetOs, windows), true)
112-
ifeq ($(call isTargetCpuBits, 64), true)
113-
ADLCFLAGS += -D_WIN64=1
114-
endif
112+
ADLCFLAGS += -D_WIN64=1
115113
ifeq ($(HOTSPOT_TARGET_CPU_ARCH), aarch64)
116114
ADLCFLAGS += -DR18_RESERVED
117115
endif

make/modules/java.desktop/lib/AwtLibraries.gmk

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ LIBAWT_EXTRA_HEADER_DIRS := \
8585
LIBAWT_CFLAGS := -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES -DMLIB_NO_LIBSUNMATH
8686

8787
ifeq ($(call isTargetOs, windows), true)
88-
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
89-
ifeq ($(call isTargetCpuBits, 64), true)
90-
LIBAWT_CFLAGS += -DMLIB_OS64BIT
91-
endif
92-
88+
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE -DMLIB_OS64BIT
9389
LIBAWT_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
9490
LIBAWT_VERSIONINFO_RESOURCE := \
9591
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc

make/modules/jdk.accessibility/Launcher.gmk

Lines changed: 33 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -48,63 +48,44 @@ ifeq ($(call isTargetOs, windows), true)
4848
TARGETS += $(BUILD_JABSWITCH)
4949

5050
##############################################################################
51-
# Setup rules to create 32/64 bit version of jaccessinspector
52-
#
53-
# Parameter 1 File name suffix
54-
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
51+
# Build jaccessinspector
5552
##############################################################################
56-
define SetupInspector
57-
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR$1, \
58-
NAME := jaccessinspector$1, \
59-
SRC := jaccessinspector, \
60-
EXTRA_SRC := \
61-
bridge \
62-
common \
63-
toolscommon, \
64-
EXTRA_HEADER_DIRS := include/bridge, \
65-
CFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
66-
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
67-
LDFLAGS_windows := -stack:655360, \
68-
LIBS_windows := advapi32.lib user32.lib, \
69-
VERSIONINFO_RESOURCE := \
70-
$(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
71-
))
7253

73-
TARGETS += $$(BUILD_JACCESSINSPECTOR$1)
74-
endef
54+
$(eval $(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR, \
55+
NAME := jaccessinspector, \
56+
EXTRA_SRC := \
57+
bridge \
58+
common \
59+
toolscommon, \
60+
EXTRA_HEADER_DIRS := include/bridge, \
61+
CFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
62+
CXXFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
63+
LDFLAGS_windows := -stack:655360, \
64+
LIBS_windows := advapi32.lib user32.lib, \
65+
VERSIONINFO_RESOURCE := \
66+
$(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
67+
))
68+
69+
TARGETS += $(BUILD_JACCESSINSPECTOR)
7570

7671
##############################################################################
77-
# Setup rules to create 32/64 bit version of jaccesswalker
78-
# Parameter 1 File name suffix
79-
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
72+
# Build jaccesswalker
8073
##############################################################################
81-
define SetupWalker
82-
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSWALKER$1, \
83-
NAME := jaccesswalker$1, \
84-
SRC := jaccesswalker, \
85-
EXTRA_SRC := \
86-
bridge \
87-
common \
88-
toolscommon, \
89-
EXTRA_HEADER_DIRS := include/bridge, \
90-
CFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
91-
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
92-
LDFLAGS_windows := -stack:655360, \
93-
LIBS_windows := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
94-
VERSIONINFO_RESOURCE := \
95-
$(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
96-
))
9774

98-
TARGETS += $$(BUILD_JACCESSWALKER$1)
99-
endef
75+
$(eval $(call SetupJdkExecutable, BUILD_JACCESSWALKER, \
76+
NAME := jaccesswalker, \
77+
EXTRA_SRC := \
78+
bridge \
79+
common \
80+
toolscommon, \
81+
EXTRA_HEADER_DIRS := include/bridge, \
82+
CFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
83+
CXXFLAGS := -DACCESSBRIDGE_ARCH_64 -EHsc, \
84+
LDFLAGS_windows := -stack:655360, \
85+
LIBS_windows := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
86+
VERSIONINFO_RESOURCE := \
87+
$(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
88+
))
10089

101-
ifeq ($(call isTargetCpuBits, 32), true)
102-
$(eval $(call SetupInspector,-32,32))
103-
$(eval $(call SetupWalker,-32,32))
104-
$(eval $(call SetupInspector,,LEGACY))
105-
$(eval $(call SetupWalker,,LEGACY))
106-
else
107-
$(eval $(call SetupInspector,,64))
108-
$(eval $(call SetupWalker,,64))
109-
endif
90+
TARGETS += $(BUILD_JACCESSWALKER)
11091
endif

make/modules/jdk.accessibility/Lib.gmk

Lines changed: 39 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -31,84 +31,50 @@ ifeq ($(call isTargetOs, windows), true)
3131
ACCESSIBILITY_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
3232

3333
##############################################################################
34-
# Setup rules to create 32/64 bit version of javaaccessbridge
35-
#
36-
# Parameter 1 Suffix
37-
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
34+
## Build libjavaaccessbridge
3835
##############################################################################
39-
define SetupJavaDLL
40-
$(call SetupJdkLibrary, BUILD_LIBJAVAACCESSBRIDGE$1, \
41-
NAME := javaaccessbridge$1, \
42-
SRC := libjavaaccessbridge, \
43-
EXTRA_SRC := common, \
44-
OPTIMIZATION := LOW, \
45-
DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
46-
CXXFLAGS_FILTER_OUT := -MD, \
47-
CXXFLAGS := -MT -DACCESSBRIDGE_ARCH_$2, \
48-
EXTRA_HEADER_DIRS := \
49-
include/bridge \
50-
java.desktop:include, \
51-
JDK_LIBS := java.desktop:libjawt, \
52-
LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
53-
odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
54-
user32.lib uuid.lib winspool.lib, \
55-
VERSIONINFO_RESOURCE := \
56-
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
57-
)
5836

59-
TARGETS += $$(BUILD_LIBJAVAACCESSBRIDGE$1)
60-
endef
37+
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVAACCESSBRIDGE, \
38+
NAME := javaaccessbridge, \
39+
EXTRA_SRC := common, \
40+
OPTIMIZATION := LOW, \
41+
DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
42+
CXXFLAGS_FILTER_OUT := -MD, \
43+
CXXFLAGS := -MT -DACCESSBRIDGE_ARCH_64, \
44+
EXTRA_HEADER_DIRS := \
45+
include/bridge \
46+
java.desktop:include, \
47+
JDK_LIBS := java.desktop:libjawt, \
48+
LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
49+
odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
50+
user32.lib uuid.lib winspool.lib, \
51+
VERSIONINFO_RESOURCE := \
52+
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
53+
))
54+
55+
TARGETS += $(BUILD_LIBJAVAACCESSBRIDGE)
6156

6257
##############################################################################
63-
# Setup rules to create 32/64 bit version of windowsaccessbridge
64-
#
65-
# Parameter 1 Suffix
66-
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
58+
## Build libwindowsaccessbridge
6759
##############################################################################
68-
define SetupWinDLL
69-
$(call SetupJdkLibrary, BUILD_LIBWINDOWSACCESSBRIDGE$1, \
70-
NAME := windowsaccessbridge$1, \
71-
SRC := libwindowsaccessbridge, \
72-
EXTRA_SRC := common, \
73-
OPTIMIZATION := LOW, \
74-
DISABLED_WARNINGS_microsoft_WinAccessBridge.cpp := 4302 4311, \
75-
CXXFLAGS := -DACCESSBRIDGE_ARCH_$2, \
76-
EXTRA_HEADER_DIRS := \
77-
include/bridge, \
78-
LDFLAGS := \
79-
-def:$(ACCESSIBILITY_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
80-
LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
81-
odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
82-
user32.lib uuid.lib winspool.lib, \
83-
VERSIONINFO_RESOURCE := \
84-
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
85-
)
86-
87-
TARGETS += $$(BUILD_LIBWINDOWSACCESSBRIDGE$1)
88-
endef
89-
90-
ifeq ($(call isTargetCpuBits, 32), true)
91-
############################################################################
92-
# Build libjabsysinfo
93-
############################################################################
94-
95-
$(eval $(call SetupJdkLibrary, BUILD_LIBJABSYSINFO, \
96-
NAME := jabsysinfo, \
97-
OPTIMIZATION := LOW, \
98-
VERSIONINFO_RESOURCE := \
99-
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
100-
)
10160

102-
TARGETS += $(BUILD_LIBJABSYSINFO)
103-
endif
61+
$(eval $(call SetupJdkLibrary, BUILD_LIBWINDOWSACCESSBRIDGE, \
62+
NAME := windowsaccessbridge-64, \
63+
SRC := libwindowsaccessbridge, \
64+
EXTRA_SRC := common, \
65+
OPTIMIZATION := LOW, \
66+
DISABLED_WARNINGS_microsoft_WinAccessBridge.cpp := 4302 4311, \
67+
CXXFLAGS := -DACCESSBRIDGE_ARCH_64, \
68+
EXTRA_HEADER_DIRS := \
69+
include/bridge, \
70+
LDFLAGS := \
71+
-def:$(ACCESSIBILITY_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
72+
LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
73+
odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
74+
user32.lib uuid.lib winspool.lib, \
75+
VERSIONINFO_RESOURCE := \
76+
$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
77+
))
10478

105-
ifeq ($(call isTargetCpuBits, 32), true)
106-
$(eval $(call SetupJavaDLL,-32,32))
107-
$(eval $(call SetupJavaDLL,,LEGACY))
108-
$(eval $(call SetupWinDLL,-32,32))
109-
$(eval $(call SetupWinDLL,,LEGACY))
110-
else
111-
$(eval $(call SetupJavaDLL,,64))
112-
$(eval $(call SetupWinDLL,-64,64))
113-
endif
79+
TARGETS += $(BUILD_LIBWINDOWSACCESSBRIDGE)
11480
endif

0 commit comments

Comments
 (0)