Skip to content

Commit

Permalink
Fix stack protection with LTO.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentarctagon committed Jun 11, 2018
1 parent fbc74bf commit 5a2d1bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SConstruct
Expand Up @@ -503,6 +503,9 @@ for env in [test_env, client_env, env]:
env.AppendUnique(LINKFLAGS = ["-fPIE", "-pie", "-Wl,-z,now,-z,relro"])
env.AppendUnique(CPPDEFINES = ["_FORTIFY_SOURCE=2"])

if env["enable_lto"] == True:
env.AppendUnique(LINKFLAGS = ["-fstack-protector-strong"])

# #
# Start determining options for debug build
# #
Expand Down

0 comments on commit 5a2d1bc

Please sign in to comment.