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

build: removed -fcf-protection build option for old GCC #2908

Open
wants to merge 1 commit into
base: rls-v3.7
Choose a base branch
from
Open
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
8 changes: 5 additions & 3 deletions cmake/SDL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ macro(sdl_unix_common_ccxx_flags var)
append(${var} "-fPIC -Wformat -Wformat-security")
endmacro()

macro(sdl_gnu_common_ccxx_flags var)
macro(sdl_gnu_common_ccxx_flags var gnu_version)
append(${var} "-fstack-protector-strong")
if(DNNL_TARGET_ARCH STREQUAL "X64")
if(NOT (${gnu_version} VERSION_LESS 8.0)
AND (DNNL_TARGET_ARCH STREQUAL "X64"))
append(${var} "-fcf-protection=full")
endif()
endmacro()
Expand Down Expand Up @@ -61,7 +62,8 @@ if(UNIX)
append(ONEDNN_SDL_COMPILER_FLAGS "-D_FORTIFY_SOURCE=2")
endif()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
sdl_gnu_common_ccxx_flags(ONEDNN_SDL_COMPILER_FLAGS)
sdl_gnu_common_ccxx_flags(ONEDNN_SDL_COMPILER_FLAGS
CMAKE_CXX_COMPILER_VERSION)
sdl_gnu_src_ccxx_flags(CMAKE_SRC_CCXX_FLAGS)
sdl_gnu_example_ccxx_flags(CMAKE_EXAMPLE_CCXX_FLAGS)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?[Cc]lang")
Expand Down
2 changes: 1 addition & 1 deletion cmake/host_compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if(DPCPP_HOST_COMPILER_KIND MATCHES "^(GNU|CLANG)$")

if(DPCPP_HOST_COMPILER_KIND STREQUAL "GNU")
platform_gnu_nowarn_ccxx_flags(DPCPP_CXX_NOWARN_FLAGS ${DPCPP_HOST_COMPILER_MAJOR_VER}.${DPCPP_HOST_COMPILER_MINOR_VER})
sdl_gnu_common_ccxx_flags(DPCPP_HOST_COMPILER_OPTS)
sdl_gnu_common_ccxx_flags(DPCPP_HOST_COMPILER_OPTS DPCPP_HOST_COMPILER_VER)
sdl_gnu_src_ccxx_flags(DPCPP_SRC_CXX_FLAGS)
sdl_gnu_example_ccxx_flags(DPCPP_EXAMPLE_CXX_FLAGS)

Expand Down
Loading