Skip to content
Permalink
Browse files

cmake: clang: Don't unconditionally use gcc's fortify

clang doesn't understand fortify at all, provide no op macro,
in order to handle the request to fortify in a generic way.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
  • Loading branch information...
ozhuraki authored and nashif committed Mar 8, 2019
1 parent 2688bfa commit a3999243a107e50ff06cb84cacf852d55a20a6e7
Showing with 4 additions and 1 deletion.
  1. +4 −1 cmake/compiler/clang/target.cmake
@@ -63,9 +63,12 @@ string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")

# Load toolchain_cc-family macros
# Clang and GCC are almost feature+flag compatible, so reuse freestanding gcc
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_security_fortify.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_security_canaries.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_optimizations.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_cpp.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_asm.cmake)
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_baremetal.cmake)

macro(toolchain_cc_security_fortify)
# No op, clang doesn't understand fortify at all
endmacro()

0 comments on commit a399924

Please sign in to comment.
You can’t perform that action at this time.