--- gcc/gcc/doc/invoke.texi +++ gcc/gcc/doc/invoke.texi @@ -12842,6 +12842,10 @@ allocations. @option{-fstack-clash-protection} may also provide limited protection for static stack allocations if the target supports @option{-fstack-check=specific}. +NOTE: In ALT gcc 10.2.1-alt1 and later versions this option is enabled by +default for C, C++, ObjC, ObjC++ if @option{-fno-stack-clash-protection} +is not specified. + @item -fstack-limit-register=@var{reg} @itemx -fstack-limit-symbol=@var{sym} @itemx -fno-stack-limit --- gcc/gcc/gcc.c +++ gcc/gcc/gcc.c @@ -1146,6 +1146,7 @@ static const char *cpp_debug_options = "%{d*}"; static const char *cc1_options = "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{!fno-stack-protector:%{!fstack-protector:%{!fstack-protector-strong:%{!fstack-protector-all:%{!fstack-protector-explicit:%{!ffreestanding:%{!nostdlib:-fstack-protector-strong}}}}}}}\ + %{!fno-stack-clash-protection:%{!fstack-clash-protection:-fstack-clash-protection}}\ %{!iplugindir*:%{fplugin*:%:find-plugindir()}}\ %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{aux-info*}\ %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} \