Skip to content

Commit e72a327

Browse files
stephanosiogalak
authored andcommitted
cmake: gcc: Remove no_libgcc exclusion for libgcc detection
This commit removes the `NOT no_libgcc` condition for the automatic libgcc path detection. The `no_libgcc` variable was previously set in this file to exclude libgcc detection for the x86-64 targets because the x86-64 arch used x32 ABI (`-mx32`) and the multilib for this ABI was not commonly available. This is no longer the case (x86-64 targets now use `-m64`) and libgcc must always be available. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 1cf1d75 commit e72a327

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

cmake/compiler/gcc/target.cmake

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,21 @@ elseif("${ARCH}" STREQUAL "sparc")
6161
include(${CMAKE_CURRENT_LIST_DIR}/target_sparc.cmake)
6262
endif()
6363

64-
if(NOT no_libgcc)
65-
# This libgcc code is partially duplicated in compiler/*/target.cmake
66-
execute_process(
67-
COMMAND ${CMAKE_C_COMPILER} ${TOOLCHAIN_C_FLAGS} --print-libgcc-file-name
68-
OUTPUT_VARIABLE LIBGCC_FILE_NAME
69-
OUTPUT_STRIP_TRAILING_WHITESPACE
70-
)
64+
# This libgcc code is partially duplicated in compiler/*/target.cmake
65+
execute_process(
66+
COMMAND ${CMAKE_C_COMPILER} ${TOOLCHAIN_C_FLAGS} --print-libgcc-file-name
67+
OUTPUT_VARIABLE LIBGCC_FILE_NAME
68+
OUTPUT_STRIP_TRAILING_WHITESPACE
69+
)
7170

72-
assert_exists(LIBGCC_FILE_NAME)
71+
assert_exists(LIBGCC_FILE_NAME)
7372

74-
get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)
73+
get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)
7574

76-
assert_exists(LIBGCC_DIR)
75+
assert_exists(LIBGCC_DIR)
7776

78-
LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
79-
LIST(APPEND TOOLCHAIN_LIBS gcc)
80-
endif()
77+
LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
78+
LIST(APPEND TOOLCHAIN_LIBS gcc)
8179

8280
if(SYSROOT_DIR)
8381
# The toolchain has specified a sysroot dir that we can use to set

0 commit comments

Comments
 (0)