-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b20
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8206788 | 12 | Martin Buchholz | P3 | Resolved | Fixed | team |
JDK-8206565 | 11.0.1 | Martin Buchholz | P3 | Resolved | Fixed | b01 |
Currently we have clang stack alignment flags defined only for macosx
They should be TOOLCHAIN_CFLAGS_JVM flags instead
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -470,6 +470,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# 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$TOOLCHAIN_TYPE" = xclang; then
+ # In principle the stack alignment below is cpu- and ABI-dependent and
+ # should agree with values of StackAlignmentInBytes in various
+ # src/hotspot/cpu/*/globalDefinitions_*.hpp files, but this value
+ # currently works for all platforms.
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
+ fi
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
@@ -601,10 +609,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
fi
fi
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- OS_CFLAGS_JVM="$OS_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
- fi
-
# Optional POSIX functionality needed by the JVM
#
# Check if clock_gettime is available and in which library. This indicates
They should be TOOLCHAIN_CFLAGS_JVM flags instead
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -470,6 +470,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# 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$TOOLCHAIN_TYPE" = xclang; then
+ # In principle the stack alignment below is cpu- and ABI-dependent and
+ # should agree with values of StackAlignmentInBytes in various
+ # src/hotspot/cpu/*/globalDefinitions_*.hpp files, but this value
+ # currently works for all platforms.
+ TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
+ fi
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
@@ -601,10 +609,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
fi
fi
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- OS_CFLAGS_JVM="$OS_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
- fi
-
# Optional POSIX functionality needed by the JVM
#
# Check if clock_gettime is available and in which library. This indicates
- backported by
-
JDK-8206565 Make clang stack flags independent of OS
-
- Resolved
-
-
JDK-8206788 Make clang stack flags independent of OS
-
- Resolved
-