Skip to content

Commit

Permalink
Initial Support for using gcc to compile a Windows JDK
Browse files Browse the repository at this point in the history
  • Loading branch information
TheShermanTanker committed Jan 14, 2025
1 parent c1d322f commit 469c364
Show file tree
Hide file tree
Showing 186 changed files with 1,803 additions and 1,146 deletions.
120 changes: 62 additions & 58 deletions make/Hsdis.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis
REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)

HSDIS_LINK_TYPE := C
HSDIS_LANG := C

ifeq ($(HSDIS_BACKEND), capstone)
ifeq ($(call isTargetCpuArch, x86), true)
Expand All @@ -57,7 +57,7 @@ endif

ifeq ($(HSDIS_BACKEND), llvm)
# Use C++ instead of C
HSDIS_LINK_TYPE := C++
HSDIS_LANG := C++

ifeq ($(call isTargetOs, linux), true)
LLVM_OS := pc-linux-gnu
Expand All @@ -74,63 +74,67 @@ endif

ifeq ($(HSDIS_BACKEND), binutils)
ifeq ($(call isTargetOs, windows), true)
# On windows, we need to "fake" a completely different toolchain using gcc
# instead of the normal microsoft toolchain. This is quite hacky...

MINGW_BASE := x86_64-w64-mingw32

MINGW_SYSROOT = $(shell $(MINGW_BASE)-gcc -print-sysroot)
ifeq ($(wildcard $(MINGW_SYSROOT)), )
# Use fallback path
MINGW_SYSROOT := /usr/$(MINGW_BASE)
ifeq ($(wildcard $(MINGW_SYSROOT)), )
$(error mingw sysroot not found)
endif
endif

BUILD_HSDIS_CC := $(MINGW_BASE)-gcc
BUILD_HSDIS_LD := $(MINGW_BASE)-ld
BUILD_HSDIS_OBJCOPY := $(MINGW_BASE)-objcopy
BUILD_HSDIS_SYSROOT_CFLAGS := --sysroot=$(MINGW_SYSROOT)
BUILD_HSDIS_SYSROOT_LDFLAGS := --sysroot=$(MINGW_SYSROOT)

MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/mingw/lib
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
# Try without mingw
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/lib
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
$(error mingw sysroot lib path not found)
endif
endif

MINGW_VERSION = $(shell $(MINGW_BASE)-gcc -v 2>&1 | $(GREP) "gcc version" | $(CUT) -d " " -f 3)
MINGW_GCC_LIB_PATH := /usr/lib/gcc/$(MINGW_BASE)/$(MINGW_VERSION)
ifeq ($(wildcard $(MINGW_GCC_LIB_PATH)), )
# Try using only major version number
MINGW_VERSION_MAJOR := $(firstword $(subst ., , $(MINGW_VERSION)))
MINGW_GCC_LIB_PATH := /usr/lib/gcc/$(MINGW_BASE)/$(MINGW_VERSION_MAJOR)
ifeq ($(wildcard $(MINGW_GCC_LIB_PATH)), )
$(error mingw gcc lib path not found)
ifeq ($(OPENJDK_TARGET_OS_ENV), windows.cygwin)
ifeq ($(TOOLCHAIN_TYPE), microsoft)
# On windows, we need to "fake" a completely different toolchain using gcc
# instead of the normal microsoft toolchain. This is quite hacky...

MINGW_BASE := x86_64-w64-mingw32

MINGW_SYSROOT = $(shell $(MINGW_BASE)-gcc -print-sysroot)
ifeq ($(wildcard $(MINGW_SYSROOT)), )
# Use fallback path
MINGW_SYSROOT := /usr/$(MINGW_BASE)
ifeq ($(wildcard $(MINGW_SYSROOT)), )
$(error mingw sysroot not found)
endif
endif

BUILD_HSDIS_CC := $(MINGW_BASE)-gcc
BUILD_HSDIS_LD := $(MINGW_BASE)-ld
BUILD_HSDIS_OBJCOPY := $(MINGW_BASE)-objcopy
BUILD_HSDIS_SYSROOT_CFLAGS := --sysroot=$(MINGW_SYSROOT)
BUILD_HSDIS_SYSROOT_LDFLAGS := --sysroot=$(MINGW_SYSROOT)

MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/mingw/lib
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
# Try without mingw
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/lib
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
$(error mingw sysroot lib path not found)
endif
endif

MINGW_VERSION = $(shell $(MINGW_BASE)-gcc -v 2>&1 | $(GREP) "gcc version" | $(CUT) -d " " -f 3)
MINGW_GCC_LIB_PATH := /usr/lib/gcc/$(MINGW_BASE)/$(MINGW_VERSION)
ifeq ($(wildcard $(MINGW_GCC_LIB_PATH)), )
# Try using only major version number
MINGW_VERSION_MAJOR := $(firstword $(subst ., , $(MINGW_VERSION)))
MINGW_GCC_LIB_PATH := /usr/lib/gcc/$(MINGW_BASE)/$(MINGW_VERSION_MAJOR)
ifeq ($(wildcard $(MINGW_GCC_LIB_PATH)), )
$(error mingw gcc lib path not found)
endif
endif

TOOLCHAIN_TYPE := gcc
OPENJDK_TARGET_OS := linux
OPENJDK_TARGET_OS_TYPE := unix
CC_OUT_OPTION := -o$(SPACE)
GENDEPS_FLAGS := -MMD -MF
CFLAGS_DEBUG_SYMBOLS := -g
DISABLED_WARNINGS :=
DISABLE_WARNING_PREFIX := -Wno-
CFLAGS_WARNINGS_ARE_ERRORS := -Werror
SHARED_LIBRARY_FLAGS := -shared

HSDIS_TOOLCHAIN_DEFAULT_CFLAGS := false
HSDIS_TOOLCHAIN_DEFAULT_LDFLAGS := false
HSDIS_LDFLAGS += -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
HSDIS_TOOLCHAIN_LIBS := $(MINGW_DLLCRT) -lmingw32 -lgcc -lgcc_eh -lmoldname \
-lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32
endif
endif

TOOLCHAIN_TYPE := gcc
OPENJDK_TARGET_OS := linux
OPENJDK_TARGET_OS_TYPE := unix
CC_OUT_OPTION := -o$(SPACE)
GENDEPS_FLAGS := -MMD -MF
CFLAGS_DEBUG_SYMBOLS := -g
DISABLED_WARNINGS :=
DISABLE_WARNING_PREFIX := -Wno-
CFLAGS_WARNINGS_ARE_ERRORS := -Werror
SHARED_LIBRARY_FLAGS := -shared

HSDIS_TOOLCHAIN_DEFAULT_CFLAGS := false
HSDIS_TOOLCHAIN_DEFAULT_LDFLAGS := false
HSDIS_LDFLAGS += -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
HSDIS_TOOLCHAIN_LIBS := $(MINGW_DLLCRT) -lmingw32 -lgcc -lgcc_eh -lmoldname \
-lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32
else
HSDIS_TOOLCHAIN_LIBS := -ldl
endif
Expand All @@ -142,7 +146,7 @@ endif

$(eval $(call SetupJdkLibrary, BUILD_HSDIS, \
NAME := hsdis, \
LINK_TYPE := $(HSDIS_LINK_TYPE), \
LANG := $(HSDIS_LANG), \
SRC := $(TOPDIR)/src/utils/hsdis/$(HSDIS_BACKEND), \
EXTRA_HEADER_DIRS := \
java.base:include \
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/build-performance.m4
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
if test "x$TOOLCHAIN_PATH" != x; then
PATH=$TOOLCHAIN_PATH:$PATH
fi
UTIL_LOOKUP_PROGS(CCACHE, ccache)
UTIL_LOOKUP_PROGS(CCACHE, ccache, , NOFIXPATH)
PATH="$OLD_PATH"
AC_MSG_CHECKING([if ccache is available])
Expand Down
88 changes: 58 additions & 30 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,24 @@
AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
[
if test "x$TOOLCHAIN_TYPE" = xgcc; then
# Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared'
# --disable-new-dtags forces use of RPATH instead of RUNPATH for rpaths.
# This protects internal library dependencies within the JDK from being
# overridden using LD_LIBRARY_PATH. See JDK-8326891 for more information.
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1 -Wl,--disable-new-dtags'
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# Linking is different on Windows
SHARED_LIBRARY_FLAGS='-shared'
SET_EXECUTABLE_ORIGIN=''
SET_SHARED_LIBRARY_ORIGIN=""
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
elif test "x$OPENJDK_TARGET_OS" = xlinux; then
# Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared'
# --disable-new-dtags forces use of RPATH instead of RUNPATH for rpaths.
# This protects internal library dependencies within the JDK from being
# overridden using LD_LIBRARY_PATH. See JDK-8326891 for more information.
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1 -Wl,--disable-new-dtags'
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
fi
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
Expand Down Expand Up @@ -124,7 +134,11 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
)
fi
CFLAGS_DEBUG_SYMBOLS="-g -gdwarf-4"
GDWARF_FLAGS="-gcodeview"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${GDWARF_FLAGS}],
IF_FALSE: [GDWARF_FLAGS="-gdwarf-4"])
CFLAGS_DEBUG_SYMBOLS="-g ${GDWARF_FLAGS}"
ASFLAGS_DEBUG_SYMBOLS="-g"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
Expand Down Expand Up @@ -449,7 +463,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
[
#### OS DEFINES, these should be independent on toolchain
if test "x$OPENJDK_TARGET_OS" = xlinux; then
CFLAGS_OS_DEF_JVM="-DLINUX -D_FILE_OFFSET_BITS=64"
CFLAGS_OS_DEF_JVM="-DLINUX -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT"
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
Expand All @@ -460,7 +474,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_ \
-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602"
# _WIN32_WINNT=0x0602 means access APIs for Windows 8 and above. See
# https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
CFLAGS_OS_DEF_JDK="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
-DWIN32 -DIAL"
fi
CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
Expand Down Expand Up @@ -493,27 +512,26 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
#### TOOLCHAIN DEFINES
if test "x$TOOLCHAIN_TYPE" = xgcc; then
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$TOOLCHAIN_TYPE" = xclang; then
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# _WIN32_WINNT=0x0602 means access APIs for Windows 8 and above. See
# https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
ALWAYS_DEFINES="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
-D_CRT_DECLARE_NONSTDC_NAMES -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS"
ALWAYS_DEFINES_JDK="$ALWAYS_DEFINES -DWIN32 -DIAL"
ALWAYS_DEFINES_JVM="$ALWAYS_DEFINES -DNOMINMAX"
ALWAYS_DEFINES_JDK="-D_CRT_DECLARE_NONSTDC_NAMES -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS"
ALWAYS_DEFINES_JVM="-D_CRT_DECLARE_NONSTDC_NAMES -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS"
fi
##############################################################################
#
#
# CFLAGS BASIC
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
# COMMON to gcc and clang
TOOLCHAIN_CFLAGS_JVM="-pipe -fno-rtti -fno-exceptions \
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
if test "x$OPENJDK_TARGET_OS" = xwindows; then
TOOLCHAIN_CFLAGS_JVM="-pipe -fno-rtti -fno-exceptions \
-fno-strict-aliasing -fno-omit-frame-pointer"
else
# COMMON to gcc and clang
TOOLCHAIN_CFLAGS_JVM="-pipe -fno-rtti -fno-exceptions \
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
fi
fi
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
Expand All @@ -523,9 +541,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"
TOOLCHAIN_CFLAGS_JDK="-fvisibility=hidden -pipe -fstack-protector"
# reduce lib size on linux in link step, this needs also special compile flags
if test "x$OPENJDK_TARGET_OS" = xwindows; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fno-stack-protector"
TOOLCHAIN_CFLAGS_JDK="-pipe -fno-stack-protector"
else
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"
TOOLCHAIN_CFLAGS_JDK="-fvisibility=hidden -pipe -fstack-protector"
fi
# reduce lib size for gcc in link step, this needs also special compile flags
# do this on s390x also for libjvm (where serviceability agent is not supported)
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -ffunction-sections -fdata-sections"
Expand Down Expand Up @@ -564,8 +587,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# The -utf-8 option sets source and execution character sets to UTF-8 to enable correct
# compilation of all source files regardless of the active code page on Windows.
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -Zc:wchar_t-"
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -volatile:iso -utf-8 -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -volatile:iso -utf-8 -Zc:wchar_t-"
fi
# CFLAGS C language level for JDK sources (hotspot only uses C++)
Expand Down Expand Up @@ -623,8 +646,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# Where does this really belong??
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
PICFLAG="-fPIC"
PIEFLAG="-fPIE"
if test "x$OPENJDK_TARGET_OS" = xwindows; then
PICFLAG=""
PIEFLAG=""
else
PICFLAG="-fPIC"
PIEFLAG="-fPIE"
fi
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
PICFLAG=""
fi
Expand Down
49 changes: 34 additions & 15 deletions make/autoconf/flags-ldflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# add -z,relro (mark relocations read only) for all libs
# add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
# add --no-as-needed to disable default --as-needed link flag on some GCC toolchains
BASIC_LDFLAGS="-Wl,-z,defs -Wl,-z,relro -Wl,-z,now -Wl,--no-as-needed -Wl,--exclude-libs,ALL"
# Linux : remove unused code+data in link step
if test "x$OPENJDK_TARGET_OS" = xlinux; then
BASIC_LDFLAGS="-Wl,-z,defs -Wl,-z,relro -Wl,-z,now -Wl,--no-as-needed -Wl,--exclude-libs,ALL"
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
BASIC_LDFLAGS="-Wl,--no-undefined -fno-stack-protector -Wl,--exclude-libs,ALL"
fi
# gcc : remove unused code+data in link step
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,--gc-sections"
Expand All @@ -60,7 +64,11 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
fi
fi
BASIC_LDFLAGS_JVM_ONLY=""
if test "x$OPENJDK_TARGET_OS" = xwindows; then
BASIC_LDFLAGS_JVM_ONLY="-Wl,--exclude-all-symbols -Wl,--subsystem,windows"
else
BASIC_LDFLAGS_JVM_ONLY=""
fi
LDFLAGS_CXX_PARTIAL_LINKING="$MACHINE_FLAG -r"
Expand Down Expand Up @@ -90,7 +98,8 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
fi
if (test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang) \
&& test "x$OPENJDK_TARGET_OS" != xaix; then
&& test "x$OPENJDK_TARGET_OS" != xaix \
&& test "x$OPENJDK_TARGET_OS" != xwindows; then
if test -n "$HAS_NOEXECSTACK"; then
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,noexecstack"
fi
Expand Down Expand Up @@ -122,10 +131,12 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# Setup LDFLAGS for linking executables
if test "x$TOOLCHAIN_TYPE" = xgcc; then
# Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
# java heap.
if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -pie"
if test "x$OPENJDK_TARGET_OS" != xwindows; then
# Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
# java heap.
if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -pie"
fi
fi
fi
Expand Down Expand Up @@ -168,14 +179,22 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
$1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
fi
# MIPS ABI does not support GNU hash style
if test "x${OPENJDK_$1_CPU}" = xmips ||
test "x${OPENJDK_$1_CPU}" = xmipsel ||
test "x${OPENJDK_$1_CPU}" = xmips64 ||
test "x${OPENJDK_$1_CPU}" = xmips64el; then
$1_CPU_LDFLAGS="${$1_CPU_LDFLAGS} -Wl,--hash-style=sysv"
if test "x${OPENJDK_$1_OS}" != xwindows; then
# MIPS ABI does not support GNU hash style
if test "x${OPENJDK_$1_CPU}" = xmips ||
test "x${OPENJDK_$1_CPU}" = xmipsel ||
test "x${OPENJDK_$1_CPU}" = xmips64 ||
test "x${OPENJDK_$1_CPU}" = xmips64el; then
$1_CPU_LDFLAGS="${$1_CPU_LDFLAGS} -Wl,--hash-style=sysv"
else
$1_CPU_LDFLAGS="${$1_CPU_LDFLAGS} -Wl,--hash-style=gnu"
fi
else
$1_CPU_LDFLAGS="${$1_CPU_LDFLAGS} -Wl,--hash-style=gnu"
if test "x${OPENJDK_$1_CPU_BITS}" = "x32"; then
$1_CPU_EXECUTABLE_LDFLAGS="-Wl,--stack=327680"
elif test "x${OPENJDK_$1_CPU_BITS}" = "x64"; then
$1_CPU_EXECUTABLE_LDFLAGS="-Wl,--stack=1048576"
fi
fi
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
Expand Down
Loading

0 comments on commit 469c364

Please sign in to comment.