Skip to content

Commit

Permalink
cmake: test availability of -fcf-protection
Browse files Browse the repository at this point in the history
Builds on an Orange Pi running Ubuntu 22.04 fail if -fcf-protection
is used.  Compilers are 11.4.0. Architecture is aarch64.

c++, g++ and gcc return: cc1plus:

    error: ‘-fcf-protection=full’ is not supported for this target
  • Loading branch information
Bill Meek committed Sep 21, 2024
1 parent 7b2b857 commit c2ea9dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mythtv/external/libexiv2/cmake/compilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
# This fails under Fedora - MinGW - Gcc 8.3
if (NOT MINGW)
if (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
add_compile_options(-fstack-clash-protection -fcf-protection)
add_compile_options(-fstack-clash-protection)
check_cxx_compiler_flag(-fcf-protection HAS_FCF_PROTECTION)
if (${HAS_FCF_PROTECTION})
add_compile_options(-fcf-protection)
endif()
endif()

if (COMPILER_IS_GCC OR (COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.7 ))
Expand Down

0 comments on commit c2ea9dc

Please sign in to comment.