cmake fix px4_base linker flags

This commit is contained in:
Daniel Agar
2016-04-26 13:04:58 -04:00
committed by Lorenz Meier
parent d0dd52c0d6
commit 93d261a558
+4 -6
View File
@@ -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()