--- a/make/autoconf/flags-cflags.m4~ Sun Apr 12 19:51:35 2020 +++ b/make/autoconf/flags-cflags.m4 Sun Apr 12 21:38:33 2020 @@ -597,8 +597,8 @@ fi if test "x$TOOLCHAIN_TYPE" = xgcc; then - TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector" - TOOLCHAIN_CFLAGS_JDK="-pipe -fstack-protector" + TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM" + TOOLCHAIN_CFLAGS_JDK="-pipe" # reduce lib size on linux 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 @@ -647,7 +647,12 @@ # CFLAGS C language level for JDK sources (hotspot only uses C++) if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then - LANGSTD_CFLAGS="-std=c11" + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + # illumos headers are confused by c11 + LANGSTD_CFLAGS="-std=gnu11" + else + LANGSTD_CFLAGS="-std=c11" + fi elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then LANGSTD_CFLAGS="-std:c11" fi