--- old/make/autoconf/flags-cflags.m4 Sun Apr 12 19:51:35 2020 +++ new/make/autoconf/flags-cflags.m4 Sun Apr 12 21:38:33 2020 @@ -461,8 +461,8 @@ fi if test "x$TOOLCHAIN_TYPE" = xgcc; then - TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new -fstack-protector" - TOOLCHAIN_CFLAGS_JDK="-pipe -fstack-protector" + TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new" + 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 @@ -516,7 +516,12 @@ # C99 level. if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then # Explicitly set C99. clang and xlclang support the same flag. - LANGSTD_CFLAGS="-std=c99" + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + # illumos headers are confused by c99 + LANGSTD_CFLAGS="-std=gnu99" + else + LANGSTD_CFLAGS="-std=c99" + fi elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then # MSVC doesn't support C99/C11 explicitly, unless you compile as C++: # LANGSTD_CFLAGS="-TP"