File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ macro(sdl_unix_common_ccxx_flags var)
30
30
append (${var} "-fPIC -Wformat -Wformat-security" )
31
31
endmacro ()
32
32
33
- macro (sdl_gnu_common_ccxx_flags var)
33
+ macro (sdl_gnu_common_ccxx_flags var gnu_version )
34
34
append (${var} "-fstack-protector-strong" )
35
- if (DNNL_TARGET_ARCH STREQUAL "X64" )
35
+ if (NOT (${gnu_version} VERSION_LESS 8.0)
36
+ AND (DNNL_TARGET_ARCH STREQUAL "X64" ))
36
37
append (${var} "-fcf-protection=full" )
37
38
endif ()
38
39
endmacro ()
@@ -61,7 +62,8 @@ if(UNIX)
61
62
append (ONEDNN_SDL_COMPILER_FLAGS "-D_FORTIFY_SOURCE=2" )
62
63
endif ()
63
64
if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
64
- sdl_gnu_common_ccxx_flags(ONEDNN_SDL_COMPILER_FLAGS)
65
+ sdl_gnu_common_ccxx_flags(ONEDNN_SDL_COMPILER_FLAGS
66
+ CMAKE_CXX_COMPILER_VERSION)
65
67
sdl_gnu_src_ccxx_flags(CMAKE_SRC_CCXX_FLAGS)
66
68
sdl_gnu_example_ccxx_flags(CMAKE_EXAMPLE_CCXX_FLAGS)
67
69
elseif (CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?[Cc]lang" )
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ if(DPCPP_HOST_COMPILER_KIND MATCHES "^(GNU|CLANG)$")
78
78
79
79
if (DPCPP_HOST_COMPILER_KIND STREQUAL "GNU" )
80
80
platform_gnu_nowarn_ccxx_flags(DPCPP_CXX_NOWARN_FLAGS ${DPCPP_HOST_COMPILER_MAJOR_VER} .${DPCPP_HOST_COMPILER_MINOR_VER} )
81
- sdl_gnu_common_ccxx_flags(DPCPP_HOST_COMPILER_OPTS)
81
+ sdl_gnu_common_ccxx_flags(DPCPP_HOST_COMPILER_OPTS DPCPP_HOST_COMPILER_VER )
82
82
sdl_gnu_src_ccxx_flags(DPCPP_SRC_CXX_FLAGS)
83
83
sdl_gnu_example_ccxx_flags(DPCPP_EXAMPLE_CXX_FLAGS)
84
84
You can’t perform that action at this time.
0 commit comments