]> git.pld-linux.org Git - packages/llvm.git/commitdiff
apply x32 abi stripping patch only when building with rt
authorJan Palus <jpalus@fastmail.com>
Sun, 16 Oct 2022 21:59:43 +0000 (23:59 +0200)
committerJan Palus <jpalus@fastmail.com>
Sun, 16 Oct 2022 21:59:43 +0000 (23:59 +0200)
llvm.spec
x32-compiler-rt.patch [new file with mode: 0644]
x32-gcc-toolchain.patch

index df98848b64aeb90702f0488f5b579930abff6913..7f680b82588ec72ac1ef87b23612013dfeae99d7 100644 (file)
--- a/llvm.spec
+++ b/llvm.spec
@@ -119,6 +119,7 @@ Patch8:             %{name}-selective_bindings.patch
 Patch9:                %{name}-libexecdir.patch
 Patch10:       compiler-rt-paths.patch
 Patch11:       cmake-utils-path-override.patch
+Patch12:       x32-compiler-rt.patch
 URL:           https://llvm.org/
 BuildRequires: bash
 BuildRequires: binutils-devel
@@ -708,6 +709,7 @@ Integracja narzÄ™dzi Clang do formatowania i zmiany nazw z Vimem.
 %patch9 -p1
 %if %{with rt}
 %patch10 -p1
+%patch12 -p1
 %endif
 %patch11 -p1
 
diff --git a/x32-compiler-rt.patch b/x32-compiler-rt.patch
new file mode 100644 (file)
index 0000000..e8b85ff
--- /dev/null
@@ -0,0 +1,12 @@
+--- llvm-15.0.2.src/projects/compiler-rt/cmake/Modules/CompilerRTUtils.cmake.orig      2022-10-04 11:29:17.000000000 +0200
++++ llvm-15.0.2.src/projects/compiler-rt/cmake/Modules/CompilerRTUtils.cmake   2022-10-16 22:33:08.014906010 +0200
+@@ -478,7 +478,8 @@
+ function(get_compiler_rt_target arch variable)
+   string(FIND ${COMPILER_RT_DEFAULT_TARGET_TRIPLE} "-" dash_index)
+-  string(SUBSTRING ${COMPILER_RT_DEFAULT_TARGET_TRIPLE} ${dash_index} -1 triple_suffix)
++  string(SUBSTRING ${COMPILER_RT_DEFAULT_TARGET_TRIPLE} ${dash_index} -1 triple_suffix_with_abi)
++  string(REPLACE "-gnux32" "" triple_suffix ${triple_suffix_with_abi})
+   if(COMPILER_RT_DEFAULT_TARGET_ONLY)
+     # Use exact spelling when building only for the target specified to CMake.
+     set(target "${COMPILER_RT_DEFAULT_TARGET_TRIPLE}")
index 4087f7a25bc1ed867539f6eb6f57a7ebab469312..b551b903b51d5276203d202c2555f8c88a8990fe 100644 (file)
      }
      BiarchLibDirs.append(begin(X86LibDirs), end(X86LibDirs));
      BiarchTripleAliases.append(begin(X86Triples), end(X86Triples));
---- llvm-15.0.2.src/projects/compiler-rt/cmake/Modules/CompilerRTUtils.cmake.orig      2022-10-04 11:29:17.000000000 +0200
-+++ llvm-15.0.2.src/projects/compiler-rt/cmake/Modules/CompilerRTUtils.cmake   2022-10-16 22:33:08.014906010 +0200
-@@ -478,7 +478,8 @@
- function(get_compiler_rt_target arch variable)
-   string(FIND ${COMPILER_RT_DEFAULT_TARGET_TRIPLE} "-" dash_index)
--  string(SUBSTRING ${COMPILER_RT_DEFAULT_TARGET_TRIPLE} ${dash_index} -1 triple_suffix)
-+  string(SUBSTRING ${COMPILER_RT_DEFAULT_TARGET_TRIPLE} ${dash_index} -1 triple_suffix_with_abi)
-+  string(REPLACE "-gnux32" "" triple_suffix ${triple_suffix_with_abi})
-   if(COMPILER_RT_DEFAULT_TARGET_ONLY)
-     # Use exact spelling when building only for the target specified to CMake.
-     set(target "${COMPILER_RT_DEFAULT_TARGET_TRIPLE}")
This page took 0.243008 seconds and 4 git commands to generate.