1 |
diff --git openjdk.orig/make/autoconf/flags-cflags.m4 openjdk/make/autoconf/flags-cflags.m4 |
2 |
--- openjdk.orig/make/autoconf/flags-cflags.m4 |
3 |
+++ openjdk/make/autoconf/flags-cflags.m4 |
4 |
@@ -715,9 +715,21 @@ |
5 |
# CFLAGS PER CPU |
6 |
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then |
7 |
# COMMON to gcc and clang |
8 |
+ AC_MSG_CHECKING([if $1 is x86]) |
9 |
if test "x$FLAGS_CPU" = xx86; then |
10 |
- # Force compatibility with i586 on 32 bit intel platforms. |
11 |
- $1_CFLAGS_CPU="-march=i586" |
12 |
+ AC_MSG_RESULT([yes]) |
13 |
+ AC_MSG_CHECKING([if control flow protection is enabled by additional compiler flags]) |
14 |
+ if echo "${EXTRA_CFLAGS}${EXTRA_CXXFLAGS}${EXTRA_ASFLAGS}" | ${GREP} -q 'fcf-protection' ; then |
15 |
+ # cf-protection requires CMOV and thus i686 |
16 |
+ $1_CFLAGS_CPU="-march=i686" |
17 |
+ AC_MSG_RESULT([yes, forcing ${$1_CFLAGS_CPU}]) |
18 |
+ else |
19 |
+ # Force compatibility with i586 on 32 bit intel platforms. |
20 |
+ $1_CFLAGS_CPU="-march=i586" |
21 |
+ AC_MSG_RESULT([no, forcing ${$1_CFLAGS_CPU}]) |
22 |
+ fi |
23 |
+ else |
24 |
+ AC_MSG_RESULT([no]) |
25 |
fi |
26 |
fi |
27 |
|