mirror of https://github.com/gnss-sdr/gnss-sdr
Fix lintian warning hardening-no-fortify-functions
This commit is contained in:
parent
e2e1949804
commit
fa9d25a5b2
|
@ -1158,6 +1158,11 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||||
${USE_THIS_PYTHON}
|
${USE_THIS_PYTHON}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(ENABLE_PACKAGING)
|
||||||
|
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
||||||
|
-DENABLE_PACKAGING=ON
|
||||||
|
)
|
||||||
|
endif()
|
||||||
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
||||||
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
||||||
-DCROSSCOMPILE_MULTILIB=TRUE
|
-DCROSSCOMPILE_MULTILIB=TRUE
|
||||||
|
|
|
@ -556,6 +556,13 @@ else()
|
||||||
message(STATUS "System profiling is disabled.")
|
message(STATUS "System profiling is disabled.")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS " Modify using: -DENABLE_PROFILING=ON/OFF")
|
message(STATUS " Modify using: -DENABLE_PROFILING=ON/OFF")
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Option to pass _FORTIFY_SOURCES=2 to the compiler regardless of
|
||||||
|
# the building type
|
||||||
|
########################################################################
|
||||||
|
option(ENABLE_PACKAGING "Always pass _FORTIFY_SOURCES=2 to the compiler" OFF)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
|
@ -71,6 +71,12 @@ else()
|
||||||
target_link_libraries(volk_gnsssdr_profile PRIVATE volk_gnsssdr ${orc_lib})
|
target_link_libraries(volk_gnsssdr_profile PRIVATE volk_gnsssdr ${orc_lib})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
target_compile_definitions(volk_gnsssdr_profile
|
||||||
|
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>$<$<ENABLE_PACKAGING>:_FORTIFY_SOURCE=2>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_STRIP)
|
if(ENABLE_STRIP)
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
set_target_properties(volk_gnsssdr_profile
|
set_target_properties(volk_gnsssdr_profile
|
||||||
|
@ -94,6 +100,12 @@ else()
|
||||||
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${orc_lib})
|
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${orc_lib})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
target_compile_definitions(volk_gnsssdr-config-info
|
||||||
|
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>$<$<ENABLE_PACKAGING>:_FORTIFY_SOURCE=2>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_STRIP)
|
if(ENABLE_STRIP)
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
set_target_properties(volk_gnsssdr-config-info
|
set_target_properties(volk_gnsssdr-config-info
|
||||||
|
|
|
@ -592,7 +592,7 @@ if(NOT (ENABLE_STATIC_LIBS AND (CMAKE_GENERATOR STREQUAL Xcode)))
|
||||||
)
|
)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_compile_definitions(volk_gnsssdr
|
target_compile_definitions(volk_gnsssdr
|
||||||
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>
|
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>$<$<ENABLE_PACKAGING>:_FORTIFY_SOURCE=2>
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
if(USE_CPU_FEATURES)
|
if(USE_CPU_FEATURES)
|
||||||
|
@ -667,7 +667,7 @@ if(ENABLE_STATIC_LIBS)
|
||||||
)
|
)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_compile_definitions(volk_gnsssdr_static
|
target_compile_definitions(volk_gnsssdr_static
|
||||||
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>
|
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>$<$<ENABLE_PACKAGING>:_FORTIFY_SOURCE=2>
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(volk_gnsssdr_static PROPERTIES OUTPUT_NAME volk_gnsssdr)
|
set_target_properties(volk_gnsssdr_static PROPERTIES OUTPUT_NAME volk_gnsssdr)
|
||||||
|
|
Loading…
Reference in New Issue