Skip to content

Commit a399924

Browse files
ozhurakinashif
authored andcommitted
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 <[email protected]>
1 parent 2688bfa commit a399924

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/compiler/clang/target.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
6363

6464
# Load toolchain_cc-family macros
6565
# Clang and GCC are almost feature+flag compatible, so reuse freestanding gcc
66-
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_security_fortify.cmake)
6766
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_security_canaries.cmake)
6867
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_optimizations.cmake)
6968
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_cpp.cmake)
7069
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_asm.cmake)
7170
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_baremetal.cmake)
71+
72+
macro(toolchain_cc_security_fortify)
73+
# No op, clang doesn't understand fortify at all
74+
endmacro()

0 commit comments

Comments
 (0)