From 2d72a861d7b181929059d8853a1b7d2bd6069534 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 15 Feb 2024 10:01:17 +0800 Subject: IPO: Support duplicate object names in large archives Apply the fix from commit 1ec6485c6a (Support duplicate object names in large archives, 2014-04-16, v3.1.0-rc1~629^2) to the IPO-specific archiving rules. Use "quick append" instead of "replace". Fixes: #25675 Issue: #14874 --- Modules/Compiler/Clang.cmake | 4 ++-- Modules/Compiler/GNU.cmake | 4 ++-- Modules/Compiler/IBMClang.cmake | 4 ++-- Modules/Compiler/IntelLLVM.cmake | 4 ++-- Modules/Compiler/LCC.cmake | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 4f8a9b7..2452d5e 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -95,11 +95,11 @@ else() endif() set(CMAKE_${lang}_ARCHIVE_CREATE_IPO - "\"${__ar}\" cr " + "\"${__ar}\" qc " ) set(CMAKE_${lang}_ARCHIVE_APPEND_IPO - "\"${__ar}\" r " + "\"${__ar}\" q " ) set(CMAKE_${lang}_ARCHIVE_FINISH_IPO diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index 88c8997..138bb4b 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -168,11 +168,11 @@ macro(__compiler_gnu lang) # # [1]: https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Optimize-Options.html set(CMAKE_${lang}_ARCHIVE_CREATE_IPO - "\"${CMAKE_${lang}_COMPILER_AR}\" cr " + "\"${CMAKE_${lang}_COMPILER_AR}\" qc " ) set(CMAKE_${lang}_ARCHIVE_APPEND_IPO - "\"${CMAKE_${lang}_COMPILER_AR}\" r " + "\"${CMAKE_${lang}_COMPILER_AR}\" q " ) set(CMAKE_${lang}_ARCHIVE_FINISH_IPO diff --git a/Modules/Compiler/IBMClang.cmake b/Modules/Compiler/IBMClang.cmake index 169a0f0..a43f788 100644 --- a/Modules/Compiler/IBMClang.cmake +++ b/Modules/Compiler/IBMClang.cmake @@ -58,11 +58,11 @@ macro(__compiler_ibmclang lang) set(__ranlib "${CMAKE_${lang}_COMPILER_RANLIB}") set(CMAKE_${lang}_ARCHIVE_CREATE_IPO - "\"${__ar}\" cr " + "\"${__ar}\" qc " ) set(CMAKE_${lang}_ARCHIVE_APPEND_IPO - "\"${__ar}\" r " + "\"${__ar}\" q " ) set(CMAKE_${lang}_ARCHIVE_FINISH_IPO diff --git a/Modules/Compiler/IntelLLVM.cmake b/Modules/Compiler/IntelLLVM.cmake index a58128a..5afb1ce 100644 --- a/Modules/Compiler/IntelLLVM.cmake +++ b/Modules/Compiler/IntelLLVM.cmake @@ -19,8 +19,8 @@ set(__pch_header_OBJCXX "objective-c++-header") macro(__compiler_intel_llvm_common lang) set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES) set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) - set(CMAKE_${lang}_ARCHIVE_CREATE_IPO "\"${CMAKE_${lang}_COMPILER_AR}\" cr ") - set(CMAKE_${lang}_ARCHIVE_APPEND_IPO "\"${CMAKE_${lang}_COMPILER_AR}\" r ") + set(CMAKE_${lang}_ARCHIVE_CREATE_IPO "\"${CMAKE_${lang}_COMPILER_AR}\" qc ") + set(CMAKE_${lang}_ARCHIVE_APPEND_IPO "\"${CMAKE_${lang}_COMPILER_AR}\" q ") set(CMAKE_${lang}_ARCHIVE_FINISH_IPO "\"${CMAKE_${lang}_COMPILER_RANLIB}\" ") endmacro() diff --git a/Modules/Compiler/LCC.cmake b/Modules/Compiler/LCC.cmake index f8c2084..2892ec6 100644 --- a/Modules/Compiler/LCC.cmake +++ b/Modules/Compiler/LCC.cmake @@ -65,11 +65,11 @@ macro(__compiler_lcc lang) set(CMAKE_${lang}_COMPILE_OPTIONS_IPO ${__lto_flags}) set(CMAKE_${lang}_ARCHIVE_CREATE_IPO - "\"${CMAKE_${lang}_COMPILER_AR}\" cr " + "\"${CMAKE_${lang}_COMPILER_AR}\" qc " ) set(CMAKE_${lang}_ARCHIVE_APPEND_IPO - "\"${CMAKE_${lang}_COMPILER_AR}\" r " + "\"${CMAKE_${lang}_COMPILER_AR}\" q " ) set(CMAKE_${lang}_ARCHIVE_FINISH_IPO -- cgit v0.12