# HG changeset patch # User Franz Glasner # Date 1641734094 -3600 # Node ID 91e74fb1ea90685d8ca3a771579390e0566296ae # Parent 87db5a732797aca31a4b05f19ec3518f6c3182d3 Enable the stack-protector (or /GS) diff -r 87db5a732797 -r 91e74fb1ea90 windows-dev/Configure.py --- a/windows-dev/Configure.py Sun Jan 09 13:52:05 2022 +0100 +++ b/windows-dev/Configure.py Sun Jan 09 14:14:54 2022 +0100 @@ -278,6 +278,7 @@ ccflags.append("/MD") # link to dll runtime #ccflags.append("/EHsc") # no C++ here ccflags.append("/Gy") # enable function level linking + ccflags.append("/GS") # enable the stack protector -fstack-protector ccflags.append("/O2") # XXX TBD machine @@ -318,8 +319,7 @@ ccflags.append("-ffunction-sections") ccflags.append("-fdata-sections") ccflags.append("-fno-strict-aliasing") - - if tool.clang: + ccflags.append("-fstack-protector") ccflags.append("-faddrsig") # use with --icf=all/safe when linking ldflags.append("-shared")