From 7b6963ea672f8fedbbaefd15eaca943495709d37 Mon Sep 17 00:00:00 2001 From: Muhammad Omair Javaid Date: Thu, 19 Jun 2025 03:06:46 +0500 Subject: [PATCH] [compiler-rt] [Fuzzer] Fix tests linking buildbot failure (#144495) Fix for #144495 by 6f4add3 broke sanitizer-aarch64-linux buildbot. compiler-rt/lib/fuzzer/tests build failed because the linker was looking gcc_s without '-l' appended. The CMake script was adding the library name without the required '-l' prefix. This patch adds the -l prefix changing gcc_s to -lgcc_s and gcc to -lgcc. https://lab.llvm.org/buildbot/#/builders/51/builds/18170 --- compiler-rt/lib/fuzzer/tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt index 543f486a9d50..c5885ccccd20 100644 --- a/compiler-rt/lib/fuzzer/tests/CMakeLists.txt +++ b/compiler-rt/lib/fuzzer/tests/CMakeLists.txt @@ -45,10 +45,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND list(APPEND FUZZER_UNWINDER_LIBS ${COMPILER_RT_UNWINDER_LINK_LIBS}) elseif(COMPILER_RT_HAS_GCC_S_LIB) # As a fallback, use the shared libgcc_s library. - list(APPEND FUZZER_UNWINDER_LIBS gcc_s) + list(APPEND FUZZER_UNWINDER_LIBS -lgcc_s) elseif(COMPILER_RT_HAS_GCC_LIB) # As a final fallback, use the static libgcc library. - list(APPEND FUZZER_UNWINDER_LIBS gcc) + list(APPEND FUZZER_UNWINDER_LIBS -lgcc) elseif(NOT COMPILER_RT_USE_BUILTINS_LIBRARY) # If no unwinder is found and we aren't using the builtins library message(FATAL_ERROR "Fuzzer tests require a suitable unwinder, but none was found.")