← Commit list

298f73f95b

Viktor Szakats
Viktor Szakats
2026-02-15
SUCCESS Duration: 364s

Subject

cmake: enable binutils ld workaround for all toolchains at build-time (revert)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

CMakeLists.txt+22 -20
@@ -1820,28 +1820,30 @@ endif()
# linkers sensitive to lib order. There must be a better solution to this.
# Enable the workaround for all compilers, to make it available when using GCC
# to consume libcurl, regardless of the compiler used to build libcurl itself.
-if(USE_OPENSSL AND TARGET OpenSSL::Crypto)
- get_target_property(_curl_imported OpenSSL::Crypto IMPORTED)
- if(_curl_imported)
- add_library(CURL::OpenSSL_Crypto INTERFACE IMPORTED)
- get_target_property(_curl_libname OpenSSL::Crypto LOCATION)
- set_target_properties(CURL::OpenSSL_Crypto PROPERTIES INTERFACE_LINK_LIBRARIES "${_curl_libname}")
- list(APPEND CURL_LIBS CURL::OpenSSL_Crypto)
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ if(USE_OPENSSL AND TARGET OpenSSL::Crypto)
+ get_target_property(_curl_imported OpenSSL::Crypto IMPORTED)
+ if(_curl_imported)
+ add_library(CURL::OpenSSL_Crypto INTERFACE IMPORTED)
+ get_target_property(_curl_libname OpenSSL::Crypto LOCATION)
+ set_target_properties(CURL::OpenSSL_Crypto PROPERTIES INTERFACE_LINK_LIBRARIES "${_curl_libname}")
+ list(APPEND CURL_LIBS CURL::OpenSSL_Crypto)
+ endif()
endif()
-endif()
-if(HAVE_LIBZ AND TARGET ZLIB::ZLIB)
- get_target_property(_curl_imported ZLIB::ZLIB IMPORTED)
- if(_curl_imported)
- add_library(CURL::ZLIB INTERFACE IMPORTED)
- get_target_property(_curl_libname ZLIB::ZLIB LOCATION)
- set_target_properties(CURL::ZLIB PROPERTIES INTERFACE_LINK_LIBRARIES "${_curl_libname}")
- list(APPEND CURL_LIBS CURL::ZLIB)
+ if(HAVE_LIBZ AND TARGET ZLIB::ZLIB)
+ get_target_property(_curl_imported ZLIB::ZLIB IMPORTED)
+ if(_curl_imported)
+ add_library(CURL::ZLIB INTERFACE IMPORTED)
+ get_target_property(_curl_libname ZLIB::ZLIB LOCATION)
+ set_target_properties(CURL::ZLIB PROPERTIES INTERFACE_LINK_LIBRARIES "${_curl_libname}")
+ list(APPEND CURL_LIBS CURL::ZLIB)
+ endif()
+ endif()
+ if(WIN32)
+ add_library(CURL::win32_winsock INTERFACE IMPORTED)
+ set_target_properties(CURL::win32_winsock PROPERTIES INTERFACE_LINK_LIBRARIES "ws2_32")
+ list(APPEND CURL_LIBS CURL::win32_winsock)
endif()
-endif()
-if(WIN32)
- add_library(CURL::win32_winsock INTERFACE IMPORTED)
- set_target_properties(CURL::win32_winsock PROPERTIES INTERFACE_LINK_LIBRARIES "ws2_32")
- list(APPEND CURL_LIBS CURL::win32_winsock)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") # MSVC but exclude clang-cl