SHA256
1
0
forked from pool/llvm14

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

- Add llvm-rust-mangle-for-fastcall.patch for rust 1.59.
- Fix armv6hl cpu architecture typo.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm14?expand=0&rev=6
This commit is contained in:
Aaron Puchert 2022-04-12 20:47:18 +00:00 committed by Git OBS Bridge
parent 15aa018b72
commit 65d4d69fab
3 changed files with 37 additions and 3 deletions

View File

@ -13,3 +13,7 @@ addFilter("SUSE_Backports_policy-SLE_conflict")
# Archive seems to be deliberately empty on some architectures.
addFilter("lto-no-text-in-archive .*/lib.*/clang/.*/lib/linux/libclang_rt.asan_static-.*.a")
# 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

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

View File

@ -67,6 +67,21 @@
%bcond_without polly
%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}
# Expands to -n if we're providing the distribution default for the given package.
@ -112,6 +127,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/llvm/llvm-project/commit/54b909de682bfa4e3389b680b0916ab18c99952a.
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
@ -557,8 +574,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
@ -649,10 +666,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
@ -708,6 +725,7 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo)
%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_HOST_TRIPLE=%{host_triple} \
-DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \
-DLLVM_LINK_LLVM_DYLIB:BOOL=OFF \
-DLLVM_PARALLEL_COMPILE_JOBS="$max_compile_jobs" \
@ -790,6 +808,7 @@ export LD_LIBRARY_PATH=${PWD}/build/%{_lib}
# -z,now is breaking now, it needs to be fixed
%cmake \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_HOST_TRIPLE=%{host_triple} \
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
-DCLANG_LINK_CLANG_DYLIB:BOOL=ON \