Accepting request 968066 from home:dirkmueller:Factory
- add llvm-rust-mangle-for-fastcall.patch for rust 1.59 - fix armv6hl cpu architecture typo OBS-URL: https://build.opensuse.org/request/show/968066 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm13?expand=0&rev=19
This commit is contained in:
parent
b2e7998d08
commit
e38f24ab12
43
llvm-rust-mangle-for-fastcall.patch
Normal file
43
llvm-rust-mangle-for-fastcall.patch
Normal file
@ -0,0 +1,43 @@
|
||||
Taken from https://github.com/rust-lang/llvm-project/commit/c03f9802c54067aab1c94085a657d11870d2a26f.patch
|
||||
|
||||
From c03f9802c54067aab1c94085a657d11870d2a26f Mon Sep 17 00:00:00 2001
|
||||
From: Amanieu d'Antras <amanieu@gmail.com>
|
||||
Date: Fri, 25 Feb 2022 22:06:47 +0000
|
||||
Subject: [PATCH] [Mangler] Mangle aliases to fastcall/vectorcall functions
|
||||
correctly
|
||||
|
||||
These aliases are produced by MergeFunctions and need to be mangled according to the calling convention of the function they are pointing to instead of defaulting to the C calling convention.
|
||||
|
||||
Reviewed By: rnk
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D120382
|
||||
---
|
||||
llvm/lib/IR/Mangler.cpp | 2 +-
|
||||
llvm/test/CodeGen/X86/fastcall-correct-mangling.ll | 4 ++++
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/llvm/lib/IR/Mangler.cpp b/llvm/lib/IR/Mangler.cpp
|
||||
index 2399ea27ee9d4..b8e3e40e4c1d5 100644
|
||||
--- a/llvm/lib/IR/Mangler.cpp
|
||||
+++ b/llvm/lib/IR/Mangler.cpp
|
||||
@@ -144,7 +144,7 @@ void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
|
||||
|
||||
// Mangle functions with Microsoft calling conventions specially. Only do
|
||||
// this mangling for x86_64 vectorcall and 32-bit x86.
|
||||
- const Function *MSFunc = dyn_cast<Function>(GV);
|
||||
+ const Function *MSFunc = dyn_cast_or_null<Function>(GV->getBaseObject());
|
||||
|
||||
// Don't add byte count suffixes when '\01' or '?' are in the first
|
||||
// character.
|
||||
diff --git a/llvm/test/CodeGen/X86/fastcall-correct-mangling.ll b/llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
|
||||
index 00dc44e75e8f5..dd8ce0f0ef505 100644
|
||||
--- a/llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
|
||||
+++ b/llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
|
||||
@@ -31,3 +31,7 @@ define private x86_fastcallcc void @dontCrash() {
|
||||
; CHECK64-LABEL: {{^}}.LdontCrash:
|
||||
ret void
|
||||
}
|
||||
+
|
||||
+@alias = alias void(i64, i8, i8, i16), void(i64, i8, i8, i16)* @func
|
||||
+; CHECK32-LABEL: {{^}}.set @alias@20, @func@20
|
||||
+; CHECK64-LABEL: {{^}}.set alias, func
|
@ -27,6 +27,16 @@ Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||
seem to be needed. We mostly need libLLVM and maybe libclang-cpp.
|
||||
- Only suggest documentation packages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 9 17:53:48 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add llvm-rust-mangle-for-fastcall.patch for rust 1.59
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 6 21:24:55 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- fix armv6hl cpu architecture typo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 19 15:23:13 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||
|
||||
|
11
llvm13.spec
11
llvm13.spec
@ -119,6 +119,8 @@ Source100: %{name}-rpmlintrc
|
||||
Source101: baselibs.conf
|
||||
# PATCH-FIX-OPENSUSE lto-disable-cache.patch -- Disable ThinLTO cache
|
||||
Patch0: lto-disable-cache.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/rust-lang/llvm-project/commit/c03f9802c54067aab1c94085a657d11870d2a26f.patch
|
||||
Patch1: llvm-rust-mangle-for-fastcall.patch
|
||||
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
|
||||
Patch2: assume-opensuse.patch
|
||||
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit
|
||||
@ -563,8 +565,8 @@ This package contains the development files for Polly.
|
||||
|
||||
%prep
|
||||
%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -b 50 -b 51 -n llvm-%{_version}.src
|
||||
|
||||
%patch0 -p2
|
||||
%patch1 -p2
|
||||
%patch5 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
@ -654,10 +656,10 @@ mv libcxxabi-%{_version}.src projects/libcxxabi
|
||||
flags=$(echo %{optflags} | sed 's/-D_FORTIFY_SOURCE=./-D_FORTIFY_SOURCE=0/;s/\B-g\b//g')
|
||||
|
||||
%ifarch armv6hl
|
||||
flags+=" -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp"
|
||||
flags+=" -mfloat-abi=hard -mcpu=arm1176jzf-s -mfpu=vfpv2"
|
||||
%endif
|
||||
%ifarch armv7hl
|
||||
flags+=" -mfloat-abi=hard -march=armv7-a -mtune=cortex-a15 -mfpu=vfpv3-d16"
|
||||
flags+=" -mfloat-abi=hard -march=armv7-a -mtune=cortex-a17 -mfpu=vfpv3-d16"
|
||||
%endif
|
||||
|
||||
CFLAGS=$flags
|
||||
@ -727,6 +729,9 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo)
|
||||
-DLLVM_INCLUDE_TESTS:BOOL=OFF \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_TARGETS_TO_BUILD=Native \
|
||||
%ifarch armv6hl
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE=armv6kz-suse-linux-gnueabihf \
|
||||
%endif
|
||||
-DCLANG_ENABLE_ARCMT:BOOL=OFF \
|
||||
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \
|
||||
-DCOMPILER_RT_BUILD_SANITIZERS:BOOL=OFF \
|
||||
|
Loading…
Reference in New Issue
Block a user