compiler: clang: Don't link libgcc for native_posix

libgcc isn't used by native_posix.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This commit is contained in:
Oleg Zhurakivskyy 2019-04-20 15:37:37 +03:00 committed by Anas Nashif
commit bee7d1ec8b

View file

@ -28,6 +28,8 @@ find_program(CMAKE_RANLIB llvm-ranlib ${find_program_clang_args})
find_program(CMAKE_OBJCOPY objcopy ${find_program_binutils_args}) find_program(CMAKE_OBJCOPY objcopy ${find_program_binutils_args})
find_program(CMAKE_READELF readelf ${find_program_binutils_args}) find_program(CMAKE_READELF readelf ${find_program_binutils_args})
if(NOT "${ARCH}" STREQUAL "posix")
foreach(file_name include include-fixed) foreach(file_name include include-fixed)
execute_process( execute_process(
COMMAND ${CMAKE_C_COMPILER} --print-file-name=${file_name} COMMAND ${CMAKE_C_COMPILER} --print-file-name=${file_name}
@ -61,6 +63,8 @@ list(APPEND TOOLCHAIN_LIBS gcc)
set(CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags} -Wl,--unresolved-symbols=ignore-in-object-files) set(CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags} -Wl,--unresolved-symbols=ignore-in-object-files)
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
endif()
# Load toolchain_cc-family macros # Load toolchain_cc-family macros
macro(toolchain_cc_nostdinc) macro(toolchain_cc_nostdinc)