Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add -fstack-protector-all without checks #5185

Merged
merged 2 commits into from
Nov 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,7 @@ zephyr_cc_option(-fno-strict-overflow)
zephyr_cc_option(-Wno-pointer-sign)

if(CONFIG_STACK_CANARIES)
zephyr_cc_option(-fstack-protector-all)
else()
zephyr_cc_option(-fno-stack-protector)
zephyr_cc_option_nocheck(-fstack-protector-all)
endif()

if(CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT)
Expand Down
6 changes: 6 additions & 0 deletions cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ function(zephyr_cc_option)
endforeach()
endfunction()

function(zephyr_cc_option_nocheck)
foreach(arg ${ARGV})
target_compile_options(zephyr_interface INTERFACE ${arg})
endforeach()
endfunction()

function(zephyr_cc_option_fallback option1 option2)
target_cc_option_fallback(zephyr_interface INTERFACE ${option1} ${option2})
endfunction()
Expand Down