- Consistently set host triple as *-suse-linux-gnu*.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm13?expand=0&rev=20
This commit is contained in:
Aaron Puchert 2022-04-12 20:39:15 +00:00 committed by Git OBS Bridge
parent e38f24ab12
commit a047e503aa
4 changed files with 25 additions and 7 deletions

View File

@ -1,6 +1,4 @@
Taken from https://github.com/rust-lang/llvm-project/commit/c03f9802c54067aab1c94085a657d11870d2a26f.patch From 54b909de682bfa4e3389b680b0916ab18c99952a Mon Sep 17 00:00:00 2001
From c03f9802c54067aab1c94085a657d11870d2a26f Mon Sep 17 00:00:00 2001
From: Amanieu d'Antras <amanieu@gmail.com> From: Amanieu d'Antras <amanieu@gmail.com>
Date: Fri, 25 Feb 2022 22:06:47 +0000 Date: Fri, 25 Feb 2022 22:06:47 +0000
Subject: [PATCH] [Mangler] Mangle aliases to fastcall/vectorcall functions Subject: [PATCH] [Mangler] Mangle aliases to fastcall/vectorcall functions

View File

@ -10,3 +10,7 @@ addFilter("devel-file-in-non-devel-package .*/lib.*/*.so")
# We're deliberately conflicting with SLE. (https://code.opensuse.org/leap/features/issue/55) # We're deliberately conflicting with SLE. (https://code.opensuse.org/leap/features/issue/55)
addFilter("SUSE_Backports_policy-SLE_conflict") addFilter("SUSE_Backports_policy-SLE_conflict")
# Different versions of LLVM can produce the same SONAME, so we'll have to use
# non-standard names sometimes. (Leap's rpmlint complains, Tumbleweed's doesn't.)
addFilter("shlib-policy-name-error")

View File

@ -25,6 +25,7 @@ Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
- Let llvm-polly-devel depend on llvm-devel. - Let llvm-polly-devel depend on llvm-devel.
- Remove libLTO and *-devel packages from baselibs, they don't - Remove libLTO and *-devel packages from baselibs, they don't
seem to be needed. We mostly need libLLVM and maybe libclang-cpp. seem to be needed. We mostly need libLLVM and maybe libclang-cpp.
- Consistently set host triple as *-suse-linux-gnu*.
- Only suggest documentation packages. - Only suggest documentation packages.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -67,6 +67,21 @@
%bcond_without polly %bcond_without polly
%bcond_without lld %bcond_without lld
# Figure out the host triple.
%ifarch armv6l
# See https://build.opensuse.org/request/show/968066.
%define host_cpu armv6kz
%else
%define host_cpu %{_host_cpu}
%endif
%ifarch %{arm}
%define host_runtime gnueabihf
%else
%define host_runtime gnu
%endif
%define host_triple %{host_cpu}-%{_host_vendor}-%{_host_os}-%{host_runtime}
%define _plv %{!?product_libs_llvm_ver:%{_sonum}}%{?product_libs_llvm_ver} %define _plv %{!?product_libs_llvm_ver:%{_sonum}}%{?product_libs_llvm_ver}
# Expands to -n if we're providing the distribution default for the given package. # Expands to -n if we're providing the distribution default for the given package.
@ -119,7 +134,8 @@ Source100: %{name}-rpmlintrc
Source101: baselibs.conf Source101: baselibs.conf
# PATCH-FIX-OPENSUSE lto-disable-cache.patch -- Disable ThinLTO cache # PATCH-FIX-OPENSUSE lto-disable-cache.patch -- Disable ThinLTO cache
Patch0: lto-disable-cache.patch Patch0: lto-disable-cache.patch
# PATCH-FIX-UPSTREAM https://github.com/rust-lang/llvm-project/commit/c03f9802c54067aab1c94085a657d11870d2a26f.patch # PATCH-FIX-UPSTREAM https://github.com/llvm/llvm-project/commit/54b909de682bfa4e3389b680b0916ab18c99952a,
# rebased past https://github.com/llvm/llvm-project/commit/40ec1c0f16cb23f8b83fb3d28b195e83991defd9.
Patch1: llvm-rust-mangle-for-fastcall.patch Patch1: llvm-rust-mangle-for-fastcall.patch
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features # PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
Patch2: assume-opensuse.patch Patch2: assume-opensuse.patch
@ -715,6 +731,7 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo)
%cmake \ %cmake \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_HOST_TRIPLE=%{host_triple} \
-DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \
-DLLVM_LINK_LLVM_DYLIB:BOOL=OFF \ -DLLVM_LINK_LLVM_DYLIB:BOOL=OFF \
-DLLVM_PARALLEL_COMPILE_JOBS="$max_compile_jobs" \ -DLLVM_PARALLEL_COMPILE_JOBS="$max_compile_jobs" \
@ -729,9 +746,6 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo)
-DLLVM_INCLUDE_TESTS:BOOL=OFF \ -DLLVM_INCLUDE_TESTS:BOOL=OFF \
-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_TARGETS_TO_BUILD=Native \ -DLLVM_TARGETS_TO_BUILD=Native \
%ifarch armv6hl
-DLLVM_DEFAULT_TARGET_TRIPLE=armv6kz-suse-linux-gnueabihf \
%endif
-DCLANG_ENABLE_ARCMT:BOOL=OFF \ -DCLANG_ENABLE_ARCMT:BOOL=OFF \
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \
-DCOMPILER_RT_BUILD_SANITIZERS:BOOL=OFF \ -DCOMPILER_RT_BUILD_SANITIZERS:BOOL=OFF \
@ -798,6 +812,7 @@ export LD_LIBRARY_PATH=${PWD}/build/%{_lib}
# -z,now is breaking now, it needs to be fixed # -z,now is breaking now, it needs to be fixed
%cmake \ %cmake \
-DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_HOST_TRIPLE=%{host_triple} \
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
-DCLANG_LINK_CLANG_DYLIB:BOOL=ON \ -DCLANG_LINK_CLANG_DYLIB:BOOL=ON \