mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
cmake fix px4_base linker flags
This commit is contained in:
committed by
Lorenz Meier
parent
d0dd52c0d6
commit
93d261a558
@@ -566,6 +566,7 @@ function(px4_add_common_flags)
|
|||||||
# QuRT 6.4.X compiler identifies as Clang but does not support this option
|
# QuRT 6.4.X compiler identifies as Clang but does not support this option
|
||||||
if (NOT ${OS} STREQUAL "qurt")
|
if (NOT ${OS} STREQUAL "qurt")
|
||||||
list(APPEND warnings
|
list(APPEND warnings
|
||||||
|
-Qunused-arguments
|
||||||
-Wno-unused-const-variable
|
-Wno-unused-const-variable
|
||||||
-Wno-varargs
|
-Wno-varargs
|
||||||
)
|
)
|
||||||
@@ -701,14 +702,11 @@ function(px4_add_common_flags)
|
|||||||
-DCONFIG_ARCH_BOARD_${board_config}
|
-DCONFIG_ARCH_BOARD_${board_config}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT ${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")
|
if (NOT (APPLE AND (${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")))
|
||||||
set(added_exe_link_flags
|
set(added_exe_linker_flags
|
||||||
-Wl,--warn-common
|
-Wl,--warn-common
|
||||||
-Wl,--gc-sections
|
-Wl,--gc-sections
|
||||||
)
|
#,--print-gc-sections
|
||||||
else()
|
|
||||||
set(added_exe_link_flags
|
|
||||||
-Wl,--warn-common
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user