From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=altlinux.org; s=dkim; h=Subject:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jpLNd+yc3uxKaHFqV2GHmzKaA0YiI39LY5Gz6khExUU=; b=IM1Atn4dedyGe5P9zBLcPlma3p hltbZ9EbXTtEQ371TH77C9uBaqDdvVwCiYHtidKrbJH7zwcyHbtLVjjmFeRGm9x/bDzdIBL1Nije2 8wwUC/96nANr9+Y2vZsa7spwcsGJKcu1QV2bQqNU5jCOs69KaBxhx11XMQLDSe7WZZ8mVxBuHo0pQ dKjPzqf4rkaYRh5rszA7GBVIZrDS8+9mIETmwqXAXka4rziid3f7cotyu6vjGm3uJxEvIZaUJQHuq ohqs4vw2LIoUI1F5uHW52We1K+67BUSUBgNsDkFzFoHA4zF8ewTLwm9Ditl5vYlvvwuvSXkmEctvd /UBHIYTg==; Date: Fri, 8 Jan 2021 00:18:41 +0300 From: Arseny Maslennikov To: ALT Linux Team development discussions Message-ID: References: <20210107205220.GA1094824@lks.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+VklIx9JO5vDLt2T" Content-Disposition: inline In-Reply-To: <20210107205220.GA1094824@lks.home> OpenPGP: url=http://grep.cs.msu.ru/~ar/pgp-key.asc X-SA-Exim-Connect-IP: 37.204.119.143 X-SA-Exim-Mail-From: arseny@altlinux.org X-SA-Exim-Version: 4.2.1 X-SA-Exim-Scanned: Yes (on mail.cs.msu.ru) Subject: Re: [devel] [#263468] EPERM (try 14) llvm-common.git=11.0.0-alt2 srpm=llvm11.0-11.0.0-alt2.src.rpm X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 21:18:49 -0000 Archived-At: List-Archive: List-Post: --+VklIx9JO5vDLt2T Content-Type: multipart/mixed; boundary="Uf6HQlq2IGGBi8n6" Content-Disposition: inline --Uf6HQlq2IGGBi8n6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 07, 2021 at 09:52:20PM +0100, Konstantin Lepikhov wrote: > Hi Arseny! >=20 > On 01/07/2021, at 05:08:00 PM you wrote: >=20 > > =D0=B3=D0=B8=D1=82=D0=B2=D0=B5=D0=B1 =D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D1= =8B=D0=B2=D0=B0=D0=B5=D1=82 =D0=B5=D0=B3=D0=BE =D0=BF=D0=BE =D1=81=D1=81=D1= =8B=D0=BB=D0=BA=D0=B5 [3]. > >=20 > .... > > [3] http://git.altlinux.org/people/arseny/packages/llvm11.0.git?p=3Dllv= m11.0.git;a=3Dblobdiff;f=3Dllvm11.spec;h=3D64681a96e2520e90e7f4f3d74b5439e0= ea8f2872;hp=3D659847bc56dab3889c89e5e779a6b5e5a9c08202;hb=3Df70dcfeb57560ad= 1e0e39cddc5318ad41c86902a;hpb=3D8986c2acdc8311f69a43a1661a849a2e12788de8 >=20 > =D0=B3=D0=BE=D0=B2=D0=BE=D1=80=D0=B8=D1=82 404 - Reading git-diff-tree fa= iled >=20 > =D0=AF =D0=B1=D1=8B =D0=B2=D1=81=D0=B5-=D1=82=D0=B0=D0=BA=D0=B8 =D1=85=D0= =BE=D1=82=D0=B5=D0=BB =D0=BF=D0=BE=D1=81=D0=BC=D0=BE=D1=82=D1=80=D0=B5=D1= =82=D1=8C =D0=BD=D0=B0 diff. >=20 =D0=A3=D0=9C=D0=92=D0=A0. =D0=9C=D0=BE=D0=B6=D0=B5=D1=82, =D0=BC=D0=BE=D0= =B9 =D0=BF=D0=BE=D1=87=D1=82=D0=BE=D0=B2=D1=8B=D0=B9 =D0=BA=D0=BB=D0=B8=D0= =B5=D0=BD=D1=82 =D1=81=D0=BB=D0=BE=D0=BC=D0=B0=D0=BB =D1=81=D1=81=D1=8B=D0= =BB=D0=BA=D1=83 =D0=B8=D0=BB=D0=B8 =D0=B2=D0=B0=D1=88 =D0=BD=D0=B5 =D1=82= =D0=B0=D0=BA =D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D0=B0=D0=BB? =D0=9F=D1=80=D0=B8=D0=BA=D0=BB=D0=B0=D0=B4=D1=8B=D0=B2=D0=B0=D1=8E =D1=84= =D0=B0=D0=B9=D0=BB=D0=BE=D0=BC. --Uf6HQlq2IGGBi8n6 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="llvm11.spec.diff" Content-Transfer-Encoding: quoted-printable diff --git a/llvm11.spec b/llvm11.spec index 659847bc5..6ff57e544 100644 --- a/llvm11.spec +++ b/llvm11.spec @@ -1,7 +1,26 @@ -%global v_major 11.0 -%global llvm_name llvm%v_major -%global clang_name clang%v_major -%global lld_name lld%v_major +%define _unpackaged_files_terminate_build 1 + +%global v_major 11 +%global v_majmin %v_major.0 +%global v_full %v_majmin.0 +%global rcsuffix %nil +%global llvm_name llvm%v_majmin +%global clang_name clang%v_majmin +%global clangd_name clangd%v_majmin +%global lld_name lld%v_majmin + +%global llvm_default_name llvm%_llvm_version +%global clang_default_name clang%_llvm_version +%global lld_default_name lld%_llvm_version + +%global llvm_prefix %_prefix/lib/llvm-%v_majmin +%global llvm_bindir %llvm_prefix/bin +%global llvm_libdir %llvm_prefix/%_lib +%global llvm_includedir %llvm_prefix/include +%global llvm_libexecdir %llvm_prefix/libexec +%global llvm_datadir %llvm_prefix/share +%global llvm_man1dir %llvm_datadir/man/man1 +%global llvm_docdir %llvm_datadir/doc =20 # Decrease debuginfo verbosity to reduce memory consumption during final l= ibrary linking %ifarch %ix86 %arm @@ -11,6 +30,8 @@ %define optflags_debug -g1 %endif =20 +%define hwasan_symbolize_arches x86_64 aarch64 + %def_disable tests %ifarch x86_64 aarch64 %def_without clang @@ -18,44 +39,62 @@ %def_without clang %endif =20 +%define tarversion %v_full%rcsuffix + Name: %llvm_name -Version: 11.0.0 -Release: alt1 -Summary: The Low Level Virtual Machine +Version: %v_full +Release: alt2 +Summary: The LLVM Compiler Infrastructure =20 Group: Development/C -License: NCSA +License: Apache-2.0 with LLVM-exception Url: http://llvm.org -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%v= ersion/llvm-%version.src.tar.xz -Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%v= ersion/clang-%version.src.tar.xz -Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%v= ersion/lld-%version.src.tar.xz -Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%v= ersion/compiler-rt-%version.src.tar.xz +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/llvm-%tarversion.src.tar.xz +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/clang-%tarversion.src.tar.xz +Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/clang-tools-extra-%tarversion.src.tar.xz +Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/lld-%tarversion.src.tar.xz +Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/compiler-rt-%tarversion.src.tar.xz Patch: clang-alt-i586-fallback.patch Patch1: clang-11-alt-triple.patch +Patch2: 0001-alt-llvm-config-Ignore-wrappers-when-looking-for-current.patch Patch3: llvm-alt-fix-linking.patch Patch4: llvm-alt-triple.patch Patch5: compiler-rt-9-alt-i586-arch.patch Patch6: RH-0001-CMake-Split-static-library-exports-into-their-own-ex.patch Patch7: clang-alt-aarch64-dynamic-linker-path.patch +Patch8: clang-tools-extra-alt-gcc-0001-clangd-satisfy-ALT-gcc-s-Werror-ret= urn-type.patch Patch9: lld-11-alt-mipsel-permit-textrels-by-default.patch Patch10: llvm-10-alt-python3.patch Patch14: llvm-10-alt-riscv64-config-guess.patch +Patch15: llvm-cmake-resolve-symlinks-in-LLVMConfig.cmake.patch +Patch16: clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch + +%if_with clang +# https://bugs.altlinux.org/show_bug.cgi?id=3D34671 +%set_verify_elf_method lint=3Dskip +%endif =20 -# ThinLTO requires /proc/cpuinfo to exists so the same does llvm +# ThinLTO requires /proc/cpuinfo to exist; so the same does llvm BuildPreReq: /proc =20 +# Obtain %%__python3 at prep stage. +BuildRequires(pre): rpm-build-python +BuildRequires(pre): rpm-build-python3 +BuildRequires(pre): rpm-macros-llvm-common + BuildRequires(pre): cmake >=3D 3.4.3 BuildRequires: rpm-build >=3D 4.0.4-alt112 libncursesw-devel -BuildRequires: chrpath libstdc++-devel libffi-devel perl-Pod-Parser perl-d= evel +BuildRequires: libstdc++-devel libffi-devel perl-Pod-Parser perl-devel BuildRequires: python3-module-recommonmark zip zlib-devel binutils-devel n= inja-build %if_with clang -BuildRequires: %clang_name %llvm_name-devel %lld_name +BuildRequires: %clang_default_name %llvm_default_name-devel %lld_default_n= ame %else BuildRequires: gcc-c++ %endif =20 -Provides: llvm =3D %EVR -Obsoletes: llvm < %version +%define requires_filesystem Requires: %name-filesystem =3D %EVR +%requires_filesystem +Requires: llvm >=3D %_llvm_version =20 %description LLVM is a compiler infrastructure designed for compile-time, link-time, @@ -63,11 +102,19 @@ runtime, and idle-time optimization of programs from a= rbitrary programming languages. The compiler infrastructure includes mirror sets of programming tools as well as libraries with equivalent functionality. =20 +%package filesystem +Group: Development/Other +Summary: Owns the installation prefix for LLVM + +%description filesystem +This package owns the installation prefix for LLVM. It is designed to be +pulled in by all non-empty LLVM packages. + %package devel Group: Development/C Summary: Libraries and header files for LLVM -Provides: llvm-devel =3D %EVR -Obsoletes: llvm-devel < %version +%requires_filesystem +Requires: llvm-devel >=3D %_llvm_version Requires: %name =3D %EVR =20 %description devel @@ -77,8 +124,8 @@ native programs that use the LLVM infrastructure. %package devel-static Summary: Static libraries for LLVM Group: Development/C -Provides: llvm-devel-static =3D %EVR -Obsoletes: llvm-devel-static < %version +%requires_filesystem +Requires: llvm-devel-static >=3D %_llvm_version Requires: %name-devel =3D %EVR =20 %description devel-static @@ -88,26 +135,38 @@ native programs that use the LLVM infrastructure. %package libs Group: Development/C Summary: LLVM shared libraries +%requires_filesystem =20 %description libs -Shared libraries for the LLVM compiler infrastructure. +This package contains shared libraries needed to develop new +native programs that use LLVM. =20 %package doc Summary: Documentation for LLVM Group: Documentation BuildArch: noarch -Provides: llvm-doc =3D %EVR -Obsoletes: llvm-doc < %version +%requires_filesystem =20 %description doc Documentation for the LLVM compiler infrastructure. =20 +%package tools +Summary: Various minor tools bundled with LLVM +Group: Development/C +%requires_filesystem + +%description tools +This package contains various tools maintained as part of LLVM, including +opt-viewer. + %package -n %clang_name Summary: A C language family frontend for LLVM Group: Development/C +%requires_filesystem +# clang uses various parts of GNU crt bundled with gcc. +# Should they be packaged separately? Requires: gcc -Provides: clang =3D %EVR -Obsoletes: clang < %version +Requires: clang >=3D %_llvm_version =20 %description -n %clang_name clang: noun @@ -122,15 +181,36 @@ as libraries and designed to be loosely-coupled and e= xtendable. %package -n %clang_name-libs Group: Development/C Summary: clang shared libraries +%requires_filesystem +Requires: %clang_name-libs-support =3D %EVR =20 %description -n %clang_name-libs Shared libraries for the clang compiler. =20 +%package -n %clang_name-libs-support +Group: Development/C +Summary: Support for Clang's shared libraries +%requires_filesystem + +%description -n %clang_name-libs-support +The Clang's shared libraries implement compilers for C and C++, and thus h= ave +to bundle additional platform support headers and libraries for use within= the +compilation product. This package contains the platform support. + +%package -n %clang_name-libs-support-shared-runtimes +Group: Development/C +Summary: Shared runtimes for Clang's shared libraries +%requires_filesystem +Requires: %clang_name-libs-support =3D %EVR + +%description -n %clang_name-libs-support-shared-runtimes +This package contains shared runtime libraries for Scudo and sanitizers. + %package -n %clang_name-devel Summary: Header files for clang Group: Development/C -Provides: clang-devel =3D %EVR -Obsoletes: clang-devel < %version +%requires_filesystem +Requires: clang-devel >=3D %_llvm_version Requires: %clang_name =3D %EVR =20 %description -n %clang_name-devel @@ -139,8 +219,7 @@ This package contains header files for the Clang compil= er. %package -n %clang_name-devel-static Summary: Static libraries for clang Group: Development/C -Provides: clang-devel-static =3D %EVR -Obsoletes: clang-devel-static < %version +%requires_filesystem Requires: %clang_name-devel =3D %EVR =20 %description -n %clang_name-devel-static @@ -150,8 +229,7 @@ This package contains static libraries for the Clang co= mpiler. Summary: A source code analysis framework Group: Development/C BuildArch: noarch -Provides: clang-analyzer =3D %EVR -Obsoletes: clang-analyzer < %version +%requires_filesystem Requires: %clang_name =3D %EVR =20 %description -n %clang_name-analyzer @@ -160,21 +238,38 @@ framework and a standalone tool that finds bugs in C = and Objective-C programs. The standalone tool is invoked from the command-line, and is intended to run in tandem with a build of a project or code base. =20 +%package -n %clang_name-tools +Summary: Various clang-based tools +Group: Development/C +%requires_filesystem +Requires: %clang_name =3D %EVR + +%description -n %clang_name-tools +This package contains various code analysis and manipulation tools based on +libclang, including clang-format. + %package -n %clang_name-doc Summary: Documentation for Clang Group: Documentation BuildArch: noarch -Provides: clang-doc =3D %EVR -Obsoletes: clang-doc < %version +%requires_filesystem =20 %description -n %clang_name-doc Documentation for the Clang compiler front-end. =20 +%package -n %clangd_name +Summary: A clang-based language server +Group: Development/C +%requires_filesystem + +%description -n %clangd_name +This package contains clangd, a Clang-based language server for C and C++. + %package -n %lld_name Summary: LLD - The LLVM Linker Group: Development/C -Provides: lld =3D %EVR -Obsoletes: lld < %version +%requires_filesystem +Requires: lld >=3D %_llvm_version =20 %description -n %lld_name LLD is a linker from the LLVM project. That is a drop-in replacement for s= ystem @@ -184,8 +279,8 @@ useful for toolchain developers. %package -n %lld_name-devel Summary: Header files for LLD Group: Development/C -Provides: lld-devel =3D %EVR -Obsoletes: lld-devel < %version +%requires_filesystem +Requires: lld-devel >=3D %_llvm_version Requires: %lld_name =3D %EVR =20 %description -n %lld_name-devel @@ -195,35 +290,48 @@ This package contains header files for the LLD linker. Summary: Documentation for LLD Group: Documentation BuildArch: noarch -Provides: lld-doc =3D %EVR -Obsoletes: lld-doc < %version +%requires_filesystem =20 %description -n %lld_name-doc Documentation for the LLD linker. =20 %prep -%setup -n llvm-%version.src -a1 -a2 -a3 +%setup -n llvm-%tarversion.src -a1 -a2 -a3 -a4 for pkg in clang lld; do - mv $pkg-%version.src tools/$pkg + mv $pkg-%tarversion.src tools/$pkg done -mv compiler-rt-%version.src projects/compiler-rt +mv clang-tools-extra-%tarversion.src tools/clang/tools/extra +mv compiler-rt-%tarversion.src projects/compiler-rt %patch -p1 -b .alt-i586-fallback %patch1 -p1 -b .alt-triple +%patch2 -p1 +sed -i 's)"%%llvm_bindir")"%llvm_bindir")' lib/Support/Unix/Path.inc %patch3 -p1 -b .alt-fix-linking %patch4 -p1 -b .alt-triple %patch5 -p1 -b .alt-i586-arch %patch6 -p1 %patch7 -p1 -b .alt-aarch64-dynamic-linker +%patch8 -p1 %patch9 -p1 -b .alt-mipsel-permit-textrels-by-default %patch10 -p1 %patch14 -p1 +%patch15 -p2 +%patch16 -p1 + +# Explicitly use python2 in hashbangs. +# TODO: LLVM 12 and onward deprecate Python 2: +# https://releases.llvm.org/11.0.0/docs/ReleaseNotes.html +subst '/^#!.*python$/s|python$|python2|' $(grep -Rl '#!.*python$' *) =20 %build +%define _cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=3DOFF %cmake -G Ninja \ -DLLVM_PARALLEL_LINK_JOBS=3D1 \ -DCMAKE_BUILD_TYPE=3DRelease \ + -DCMAKE_INSTALL_PREFIX=3D%llvm_prefix \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=3DOFF \ -DBUILD_SHARED_LIBS:BOOL=3DOFF \ - -DLLVM_TARGETS_TO_BUILD=3D"host;AMDGPU;BPF;NVPTX;" \ + -DLLVM_TARGETS_TO_BUILD=3D"all" \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=3D'AVR' \ -DLLVM_ENABLE_LIBCXX:BOOL=3DOFF \ -DLLVM_ENABLE_ZLIB:BOOL=3DON \ @@ -287,13 +395,13 @@ ninja -vvv -j %__nprocs -C BUILD =20 %install pushd BUILD -cmake -DCMAKE_INSTALL_PREFIX=3D%buildroot%prefix ../ +cmake -DCMAKE_INSTALL_PREFIX=3D%buildroot%llvm_prefix ../ sed -i 's|man\ tools/lld/docs/docs-lld-html|man|' build.ninja sed -i '/^[[:space:]]*include.*tools\/lld\/docs\/cmake_install.cmake.*/d' = tools/lld/cmake_install.cmake popd ninja -C BUILD install =20 -# And prepare Clang documentation +# Prepare Clang documentation. rm -rf BUILD/clang-docs mkdir -p BUILD/clang-docs for f in LICENSE.TXT NOTES.txt README.txt; do @@ -301,113 +409,295 @@ for f in LICENSE.TXT NOTES.txt README.txt; do done rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools} =20 -install -m 0755 BUILD/%_lib/LLVMHello.so %buildroot%_libdir/ -install -m 0755 BUILD/%_lib/BugpointPasses.so %buildroot%_libdir/ -mkdir -p %buildroot%_docdir/lld - -file %buildroot%_bindir/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpat= h -d -file %buildroot%_libdir/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chr= path -d +install -m 0755 BUILD/%_lib/LLVMHello.so %buildroot%llvm_libdir/ +install -m 0755 BUILD/%_lib/BugpointPasses.so %buildroot%llvm_libdir/ +mkdir -p %buildroot%llvm_docdir/lld =20 %ifarch %ix86 -cd %buildroot%_libdir/clang/%version/lib/linux +cd %buildroot%llvm_libdir/clang/%v_full/lib/linux ls *-i[3-9]86* | while read f; do ln -s $f $(echo $f | sed 's|i[3-9]86|i38= 6|') ; done %endif =20 +# The following files are not used by LLVM builds for Linux. +rm -f %buildroot%llvm_bindir/argdumper +rm -f %buildroot%llvm_datadir/clang/clang-format-bbedit.applescript + +# Install the clang bash completion. +mkdir -p %buildroot%_datadir/bash-completion/completions +ln -sr %buildroot%llvm_datadir/clang/bash-autocomplete.sh %buildroot%_data= dir/bash-completion/completions/clang-%v_major + +# Symlink executables to %_bindir. +mkdir -p %buildroot%_bindir +for b in %buildroot%llvm_bindir/*; do + bb=3D"$(basename "$b")" + echo "$bb" | grep -q -- '-%v_major$' && continue # if already appended + ln -srv "$b" "%buildroot%_bindir/$bb-%v_major" +done +# Symlink man pages to the man dirs. +for mand in %buildroot%llvm_datadir/man/man*; do + mand_index=3D"${mand##*/man}" + for m in "$mand"/*.[1-9]*; do + # Let's force compress the man page, then symlink it. + # /usr/lib/llvm-11.0/share/man/manD/utilX.D.xz -> /usr/share/man/manD/ut= ilX-11.D.xz + # Otherwise, brp-alt(compress) keeps fucking us up. + # It remakes the symlinks first, then compresses their targets, + # severing the symlinks. + /usr/lib/rpm/compress_files "$m" + + mb=3D"$(basename "$m")" # e. g. llvm-ar.1.xz + new_mb=3D"${mb%%.[1-9]*}-%v_major.$mand_index" # e. g. llvm-ar-11.1.xz + + mkdir -p "%buildroot%_mandir/man$mand_index" + ln -srv "$m" "%buildroot%_mandir/man$mand_index/$new_mb" + done +done + +# Symlink sonamed shared libraries in %llvm_prefix/%_libdir to %_libdir. +mkdir -p %buildroot%_libdir +find %buildroot%llvm_libdir/*.so* -type f | grep -E '^%buildroot%llvm_libd= ir/.*(%v_major)' | sort | tee %_tmppath/shared-objects \ + | sed 's)%llvm_libdir)%_libdir)' > %_tmppath/shared-object-links +paste %_tmppath/shared-objects %_tmppath/shared-object-links | while read = object link; do + ln -srv "$object" "$link" +done + +# List all packaged binaries in this source package. +find %buildroot%_bindir/*-%v_major > %_tmppath/PATH-executables + +# For paranoic reasons library packaging policy covers peculiar directory = paths. +# If there are $A.a and $A.so in %llvm_libdir/clang, they should not end u= p in the +# same package (but can be co-installed on a system). +# Let's list all the $A.so for which $A.a exists into a separate package. +# We also consider i386-symlinks for iN86. +find %buildroot%llvm_libdir/clang -type f,l -name '*.a' -or -name '*.so' |= \ + sed -r -n 's/^(\/.+)\.a$/\1/p; s/^(.+)\.so$/\1/p' | sort | uniq -d > %= _tmppath/libclang-support-dupes +sed < %_tmppath/libclang-support-dupes 's)^%buildroot)); s/$/.a/' > %_tmpp= ath/libclang-support-static-runtimes +sed < %_tmppath/libclang-support-dupes 's)^%buildroot)); s/$/.so/' > %_tmp= path/libclang-support-shared-runtimes +sed < %_tmppath/libclang-support-shared-runtimes 's/^/%%exclude /' > %_tmp= path/dyn-files-libclang-support +echo "Expelling likely redundant Clang shared runtimes:" && cat %_tmppath/= dyn-files-libclang-support + %check %if_enabled tests -LD_LIBRARY_PATH=3D%buildroot%_libdir:$LD_LIBRARY_PATH +LD_LIBRARY_PATH=3D%buildroot%llvm_libdir:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ninja -C BUILD check-all || : %endif =20 +# Do not generate dependencies for clang-{format,rename} plugins. +%add_findreq_skiplist %llvm_datadir/clang/* + +%files filesystem +%dir %llvm_prefix +%dir %llvm_bindir +%dir %llvm_libdir +%dir %llvm_includedir +%dir %llvm_libexecdir +%dir %llvm_datadir +%dir %llvm_datadir/clang +%dir %llvm_datadir/man +%dir %llvm_man1dir +%dir %llvm_docdir + %files %doc CREDITS.TXT LICENSE.TXT README.txt +%llvm_bindir/* %_bindir/* +%llvm_man1dir/* %_man1dir/* +%exclude %llvm_bindir/llvm-config* %exclude %_bindir/llvm-config* +%exclude %llvm_bindir/*clang* %exclude %_bindir/*clang* -%exclude %_bindir/c-index-test +%exclude %llvm_bindir/*clangd* +%exclude %_bindir/*clangd* +%exclude %llvm_bindir/c-index-test +%exclude %_bindir/c-index-test-%v_major +%exclude %llvm_bindir/find-all-symbols +%exclude %_bindir/find-all-symbols-%v_major +%exclude %llvm_bindir/scan-* %exclude %_bindir/scan-* -%exclude %_man1dir/llvm-config.1.* -%exclude %_man1dir/clang.1* -%exclude %_man1dir/scan-build.1* +%exclude %llvm_man1dir/llvm-config.1.* +%exclude %_man1dir/llvm-config-%v_major.1.* +%exclude %llvm_man1dir/clang.1* +%exclude %_man1dir/clang-%v_major.1* +%exclude %llvm_man1dir/scan-build.1* +%exclude %_man1dir/scan-build-%v_major.1* +%exclude %llvm_bindir/lld* %exclude %_bindir/lld* -%exclude %_bindir/ld*.lld -%exclude %_bindir/wasm-ld +%exclude %llvm_bindir/ld*.lld +%exclude %_bindir/ld*.lld-%v_major +%exclude %llvm_bindir/wasm-ld +%exclude %_bindir/wasm-ld-%v_major =20 %files libs +%llvm_libdir/libLLVM-*.so %_libdir/libLLVM-*.so +%llvm_libdir/libLTO.so.* %_libdir/libLTO.so.* +%llvm_libdir/libRemarks.so.* %_libdir/libRemarks.so.* =20 +%files tools +%llvm_datadir/opt-viewer + %files devel -%_bindir/llvm-config -%_man1dir/llvm-config.1.* -%_includedir/llvm -%_includedir/llvm-c -%_libdir/libLLVM.so -%_libdir/libLTO.so -%_libdir/LLVMgold.so -%_libdir/libRemarks.so -%_libdir/LLVMHello.so -%_libdir/BugpointPasses.so -%_libdir/cmake/llvm -%exclude %_libdir/cmake/llvm/LLVMStaticExports*.cmake +%llvm_bindir/llvm-config +%_bindir/llvm-config-%v_major +%llvm_man1dir/llvm-config.1.* +%_man1dir/llvm-config-%v_major.1.* +%llvm_includedir/llvm +%llvm_includedir/llvm-c +%llvm_libdir/libLLVM.so +%llvm_libdir/libLTO.so +%llvm_libdir/LLVMgold.so +%llvm_libdir/libRemarks.so +%llvm_libdir/LLVMHello.so +%llvm_libdir/BugpointPasses.so +%dir %llvm_libdir/cmake +%llvm_libdir/cmake/llvm +%exclude %llvm_libdir/cmake/llvm/LLVMStaticExports.cmake =20 %files devel-static -%_libdir/*.a -%exclude %_libdir/libclang*.a -%_libdir/cmake/llvm/LLVMStaticExports*.cmake +%llvm_libdir/*.a +%exclude %llvm_libdir/libclang*.a +%dir %llvm_libdir/cmake +%dir %llvm_libdir/cmake/llvm +%llvm_libdir/cmake/llvm/LLVMStaticExports.cmake =20 %files -n %clang_name %doc BUILD/clang-docs/* -%_bindir/*clang* -%_bindir/c-index-test -%_man1dir/clang.1* +%llvm_bindir/clang-%v_major +%llvm_bindir/clang +%_bindir/clang-%v_major +%llvm_bindir/clang++ +%_bindir/clang++-%v_major +%llvm_bindir/clang-cl +%_bindir/clang-cl-%v_major +%llvm_bindir/clang-cpp +%_bindir/clang-cpp-%v_major +%llvm_man1dir/clang.1* +%_man1dir/clang-%v_major.1* +%exclude %llvm_bindir/clang-check* +%exclude %_bindir/clang-check* +%exclude %llvm_bindir/clang-extdef-mapping* +%exclude %_bindir/clang-extdef-mapping* +%exclude %llvm_bindir/clang-format* +%exclude %_bindir/clang-format* +%exclude %llvm_bindir/git-clang-format* +%exclude %_bindir/git-clang-format* +%exclude %llvm_bindir/clang-offload-* +%exclude %_bindir/clang-offload-* +%exclude %llvm_bindir/clang-refactor* +%exclude %_bindir/clang-refactor* +%exclude %llvm_bindir/clang-rename* +%exclude %_bindir/clang-rename* +%llvm_datadir/clang/bash-autocomplete.sh +%_datadir/bash-completion/completions/clang* =20 %files -n %clang_name-libs -%_libdir/clang +%llvm_libdir/libclang*.so.* %_libdir/libclang*.so.* =20 +%files -n %clang_name-libs-support -f %_tmppath/dyn-files-libclang-support +%llvm_libdir/clang +# clang-tools +%ifarch %hwasan_symbolize_arches +%exclude %llvm_libdir/clang/%v_full/bin/hwasan_symbolize +%endif + +%files -n %clang_name-libs-support-shared-runtimes -f %_tmppath/libclang-s= upport-shared-runtimes + %files -n %clang_name-devel -%_includedir/clang -%_includedir/clang-c -%_libdir/libclang*.so -%_libdir/cmake/clang +%llvm_includedir/clang +%llvm_includedir/clang-c +%llvm_includedir/clang-tidy +%llvm_libdir/libclang*.so +%dir %llvm_libdir/cmake +%llvm_libdir/cmake/clang =20 %files -n %clang_name-devel-static -%_libdir/libclang*.a +%llvm_libdir/libclang*.a =20 %files -n %clang_name-analyzer -%_prefix/libexec/*-analyzer -%_bindir/scan-build -%_bindir/scan-view -%_datadir/scan-build -%_datadir/scan-view -%_man1dir/scan-build.1* +%llvm_prefix/libexec/*-analyzer +%llvm_bindir/scan-build +%_bindir/scan-build-%v_major +%llvm_bindir/scan-view +%_bindir/scan-view-%v_major +%llvm_datadir/scan-build +%llvm_datadir/scan-view +%llvm_man1dir/scan-build.1* +%_man1dir/scan-build-%v_major.1* + +%files -n %clang_name-tools +%llvm_bindir/c-index-test +%_bindir/c-index-test-%v_major +%llvm_bindir/clang-* +%_bindir/clang-* +%exclude %llvm_bindir/clang-%v_major +%exclude %llvm_bindir/clang +%exclude %_bindir/*clang-%v_major +%exclude %llvm_bindir/clang++ +%exclude %_bindir/clang++-%v_major +%exclude %llvm_bindir/clang-cl +%exclude %_bindir/clang-cl-%v_major +%exclude %llvm_bindir/clang-cpp +%exclude %_bindir/clang-cpp-%v_major +%llvm_bindir/find-all-symbols +%_bindir/find-all-symbols-%v_major +%llvm_datadir/clang +%exclude %llvm_datadir/clang/bash-autocomplete.sh +%ifarch %hwasan_symbolize_arches +%llvm_libdir/clang/%v_full/bin/hwasan_symbolize +%endif + +%files -n %clangd_name +%llvm_bindir/clangd +%_bindir/clangd-%v_major =20 %files -n %lld_name +%llvm_bindir/lld* %_bindir/lld* -%_bindir/ld*.lld -%_bindir/wasm-ld +%llvm_bindir/ld*.lld +%_bindir/ld*.lld-%v_major +%llvm_bindir/wasm-ld +%_bindir/wasm-ld-%v_major =20 %files -n %lld_name-devel -%dir %_includedir/lld -%_includedir/lld/* -%_libdir/cmake/lld +%dir %llvm_includedir/lld +%llvm_includedir/lld/* +%dir %llvm_libdir/cmake +%llvm_libdir/cmake/lld =20 %files doc -%doc %_docdir/llvm +%doc %llvm_docdir/llvm =20 %files -n %clang_name-doc -%doc %_docdir/clang +%doc %llvm_docdir/clang +%doc %llvm_docdir/clang-tools =20 %files -n %lld_name-doc -%doc %_docdir/lld +%doc %llvm_docdir/lld =20 %changelog +* Fri Dec 11 2020 Arseny Maslennikov 11.0.0-alt2 +- Installed to /usr/lib/llvm-11.0 to ensure peaceful co-existence with oth= er + LLVM versions. + Numbered shared libraries in %llvm_prefix/%%_lib are symlinked to %%_lib= dir + to properly generate library dependencies. +- Moved clang-format and other clang-based tools to clang11.0-tools. +- New LLVM subproject: clang-tools-extra. + + 2 new packages: clang11.0-tools, clangd11.0 +- Enabled all LLVM targets. +- Moved C/C++ compiler support away from clang-libs to clang-libs-support. +- Moved Clang .so runtimes (scudo and sanitizers) with available static va= riants + to clang-libs-support-shared-runtimes to comply with sisyphus-check-stat= ic. + * Tue Oct 13 2020 Valery Inozemtsev 11.0.0-alt1 - 11.0.0 +- Built with gcc. + +* Wed Aug 12 2020 Aleksei Nikiforov 10.0.1-alt2 +- Applied upstream patch which should fix ppc64le-specific issue. =20 * Tue Aug 11 2020 Valery Inozemtsev 10.0.1-alt1 - 10.0.1 --Uf6HQlq2IGGBi8n6 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="llvm11.whole.diff" Content-Transfer-Encoding: quoted-printable diff --git a/0001-alt-llvm-config-Ignore-wrappers-when-looking-for-current.= patch b/0001-alt-llvm-config-Ignore-wrappers-when-looking-for-current.patch new file mode 100644 index 000000000..09493ea33 --- /dev/null +++ b/0001-alt-llvm-config-Ignore-wrappers-when-looking-for-current.patch @@ -0,0 +1,39 @@ +From febc3e5c7bb8502775add342c33c221af9e87a50 Mon Sep 17 00:00:00 2001 +From: Arseny Maslennikov +Date: Thu, 19 Nov 2020 11:39:51 +0300 +Subject: [PATCH] llvm-config: Ignore wrappers when looking for current + executable path + +In ALT, tools are installed into their own prefix and bindir, and the +respective paths in /usr/bin are symlinked to a small wrapper program +which can call different versions of the requested tool depending on its +environment. + +When /proc/self/exe is not available, the executable is looked up in +PATH, which usually includes /usr/bin and excludes /usr/lib/llvm-*/bin. +We forgo the path to wrapper at /usr/bin/$tool and use +/usr/lib/llvm-%v_majmin/bin/$tool instead. +--- + llvm/lib/Support/Unix/Path.inc | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc +index d91b269cc..b409a8611 100644 +--- a/lib/Support/Unix/Path.inc ++++ b/lib/Support/Unix/Path.inc +@@ -174,6 +174,12 @@ getprogpath(char ret[PATH_MAX], const char *bin) + for (char *t =3D strtok_r(s, ":", &state); t !=3D nullptr; + t =3D strtok_r(nullptr, ":", &state)) { + if (test_dir(ret, t, bin) =3D=3D 0) { ++ /* An ALT-specific exception: if found in /usr/bin, this is a wrapper ++ * and the real binary is in /usr/lib/llvm-%v_majmin/bin. ++ */ ++ if (!strncmp(ret, "/usr/bin/llvm-alt-tool-wrapper", strlen("/usr/bi= n/llvm-alt-tool-wrapper"))) { ++ snprintf(ret, PATH_MAX, "%s/%s", "%llvm_bindir", bin); ++ } + free(s); + return ret; + } +--=20 +2.25.4 + diff --git a/clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch b/clan= g-cmake-resolve-symlinks-in-ClangConfig.cmake.patch new file mode 100644 index 000000000..de165448b --- /dev/null +++ b/clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch @@ -0,0 +1,30 @@ +From c830d84bc802ca1e9219415a5784c4ad97a34819 Mon Sep 17 00:00:00 2001 +From: Peter Wu +Date: Fri, 4 May 2018 15:55:26 +0200 +Subject: [PATCH] [clang] cmake: resolve symlinks in ClangConfig.cmake + +Ensure that symlinks such as /usr/lib/cmake/clang-X.Y (pointing to +/usr/lib/llvm-X.Y/lib/cmake/llvm) are resolved. This ensures that +CLANG_INSTALL_PREFIX ends up to be /usr/lib/llvm-X.Y instead of /usr. + +Partially addresses PR37128 +--- + cmake/modules/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/clang/cmake/modules/CMakeLists.txt b/tools/clang/cmake/= modules/CMakeLists.txt +--- a/tools/clang/cmake/modules/CMakeLists.txt ++++ b/tools/clang/cmake/modules/CMakeLists.txt +@@ -30,10 +30,10 @@ set(CLANG_CONFIG_EXPORTS_FILE) + # Generate ClangConfig.cmake for the install tree. + set(CLANG_CONFIG_CODE " + # Compute the installation prefix from this LLVMConfig.cmake file locatio= n. +-get_filename_component(CLANG_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}= \" PATH)") ++get_filename_component(CLANG_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}= \" REALPATH)") + # Construct the proper number of get_filename_component(... PATH) + # calls to compute the installation prefix. +-string(REGEX REPLACE "/" ";" _count "${CLANG_INSTALL_PACKAGE_DIR}") ++string(REGEX REPLACE "/" ";" _count "prefix/${CLANG_INSTALL_PACKAGE_DIR}") + foreach(p ${_count}) + set(CLANG_CONFIG_CODE "${CLANG_CONFIG_CODE} + get_filename_component(CLANG_INSTALL_PREFIX \"\${CLANG_INSTALL_PREFIX}\" = PATH)") diff --git a/clang-tools-extra-alt-gcc-0001-clangd-satisfy-ALT-gcc-s-Werror= -return-type.patch b/clang-tools-extra-alt-gcc-0001-clangd-satisfy-ALT-gcc-= s-Werror-return-type.patch new file mode 100644 index 000000000..438ad35d6 --- /dev/null +++ b/clang-tools-extra-alt-gcc-0001-clangd-satisfy-ALT-gcc-s-Werror-return= -type.patch @@ -0,0 +1,29 @@ +From 1035bddfb8612ef6ddb9d675a7d597ac502f15cc Mon Sep 17 00:00:00 2001 +From: Arseny Maslennikov +Date: Thu, 26 Nov 2020 22:16:58 +0300 +Subject: [PATCH] clangd: satisfy ALT gcc's -Werror-return-type + +--- + clang-tools-extra/clangd/CompileCommands.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tools/clang/tools/extra/clangd/CompileCommands.cpp b/tools/cl= ang/tools/extra/clangd/CompileCommands.cpp +index 473122157..6353bb13a 100644 +--- a/tools/clang/tools/extra/clangd/CompileCommands.cpp ++++ b/tools/clang/tools/extra/clangd/CompileCommands.cpp +@@ -270,6 +270,12 @@ std::pair getArgCount(const llvm:= :opt::Option &Opt) { + return {Rest, 0}; + case Option::RemainingArgsJoinedClass: + return {Rest, Rest}; ++ /* Shut up ALT GCC! */ ++ default: ++ /* I guess, this control branch is intended to be unreachable thus di= sallowed, ++ * and they say 0 means not allowed, so let's assume {0, 0} is not al= lowed. ++ */ ++ return {0, 0}; + } + } +=20 +--=20 +2.25.4 + diff --git a/llvm-10-alt-python3.patch b/llvm-10-alt-python3.patch index 0b9d2be43..8c0e26d0a 100644 --- a/llvm-10-alt-python3.patch +++ b/llvm-10-alt-python3.patch @@ -1,21 +1,21 @@ ---- llvm-9.0.1.src/tools/clang/tools/clang-format/git-clang-format.alt 202= 0-02-13 07:43:29.545981388 +0000 -+++ llvm-9.0.1.src/tools/clang/tools/clang-format/git-clang-format 2020-02= -13 07:45:08.271273350 +0000 +--- llvm-11.0.1.src/tools/clang/tools/clang-format/git-clang-format.alt 20= 20-02-13 07:43:29.545981388 +0000 ++++ llvm-11.0.1.src/tools/clang/tools/clang-format/git-clang-format 2020-0= 2-13 07:45:08.271273350 +0000 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #=3D=3D=3D- git-clang-format - ClangFormat Git Integration ---------*- py= thon -*--=3D=3D=3D# # ---- llvm-9.0.1.src/tools/clang/utils/hmaptool/hmaptool.alt 2020-02-13 07:4= 4:21.103133843 +0000 -+++ llvm-9.0.1.src/tools/clang/utils/hmaptool/hmaptool 2020-02-13 07:45:25= =2E700324888 +0000 +--- llvm-11.0.1.src/tools/clang/utils/hmaptool/hmaptool.alt 2020-02-13 07:= 44:21.103133843 +0000 ++++ llvm-11.0.1.src/tools/clang/utils/hmaptool/hmaptool 2020-02-13 07:45:2= 5.700324888 +0000 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function =20 import json ---- llvm-9.0.1.src/tools/clang/tools/scan-view/bin/scan-view.alt 2019-12-1= 1 19:15:30.000000000 +0000 -+++ llvm-9.0.1.src/tools/clang/tools/scan-view/bin/scan-view 2020-02-13 11= :15:19.089985347 +0000 +--- llvm-11.0.1.src/tools/clang/tools/scan-view/bin/scan-view.alt 2019-12-= 11 19:15:30.000000000 +0000 ++++ llvm-11.0.1.src/tools/clang/tools/scan-view/bin/scan-view 2020-02-13 1= 1:15:19.089985347 +0000 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 @@ -30,11 +30,3 @@ import os import posixpath import threading ---- llvm-10.0.0.src/projects/compiler-rt/lib/hwasan/scripts/hwasan_symboli= ze.alt 2020-03-25 08:00:47.736222391 +0000 -+++ llvm-10.0.0.src/projects/compiler-rt/lib/hwasan/scripts/hwasan_symboli= ze 2020-03-25 08:02:05.439101328 +0000 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - #=3D=3D=3D- lib/hwasan/scripts/hwasan_symbolize -------------------------= ---------=3D=3D=3D# - # - # Part of the LLVM Project, under the Apache License v2.0 with LLVM Excep= tions. diff --git a/llvm-cmake-resolve-symlinks-in-LLVMConfig.cmake.patch b/llvm-c= make-resolve-symlinks-in-LLVMConfig.cmake.patch new file mode 100644 index 000000000..4e39a8ba8 --- /dev/null +++ b/llvm-cmake-resolve-symlinks-in-LLVMConfig.cmake.patch @@ -0,0 +1,30 @@ +From d0d969074f6e0f975ad53d21e7ce6c7b40cf2957 Mon Sep 17 00:00:00 2001 +From: Peter Wu +Date: Fri, 4 May 2018 15:43:06 +0200 +Subject: [PATCH] [llvm] cmake: resolve symlinks in LLVMConfig.cmake + +Ensure that symlinks such as /usr/lib/llvm-X.Y/cmake (pointing to +lib/cmake/llvm) are resolved. This ensures that LLVM_INSTALL_PREFIX +becomes /usr/lib/llvm-X.Y instead of /usr. + +Partially addresses PR37128 +--- + cmake/modules/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeL= ists.txt +--- a/llvm/cmake/modules/CMakeLists.txt ++++ b/llvm/cmake/modules/CMakeLists.txt +@@ -88,10 +88,10 @@ file(COPY . + # Generate LLVMConfig.cmake for the install tree. + set(LLVM_CONFIG_CODE " + # Compute the installation prefix from this LLVMConfig.cmake file locatio= n. +-get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\= " PATH)") ++get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\= " REALPATH)") + # Construct the proper number of get_filename_component(... PATH) + # calls to compute the installation prefix. +-string(REGEX REPLACE "/" ";" _count "${LLVM_INSTALL_PACKAGE_DIR}") ++string(REGEX REPLACE "/" ";" _count "prefix/${LLVM_INSTALL_PACKAGE_DIR}") + foreach(p ${_count}) + set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE} + get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PA= TH)") diff --git a/llvm11.spec b/llvm11.spec index 659847bc5..6ff57e544 100644 --- a/llvm11.spec +++ b/llvm11.spec @@ -1,7 +1,26 @@ -%global v_major 11.0 -%global llvm_name llvm%v_major -%global clang_name clang%v_major -%global lld_name lld%v_major +%define _unpackaged_files_terminate_build 1 + +%global v_major 11 +%global v_majmin %v_major.0 +%global v_full %v_majmin.0 +%global rcsuffix %nil +%global llvm_name llvm%v_majmin +%global clang_name clang%v_majmin +%global clangd_name clangd%v_majmin +%global lld_name lld%v_majmin + +%global llvm_default_name llvm%_llvm_version +%global clang_default_name clang%_llvm_version +%global lld_default_name lld%_llvm_version + +%global llvm_prefix %_prefix/lib/llvm-%v_majmin +%global llvm_bindir %llvm_prefix/bin +%global llvm_libdir %llvm_prefix/%_lib +%global llvm_includedir %llvm_prefix/include +%global llvm_libexecdir %llvm_prefix/libexec +%global llvm_datadir %llvm_prefix/share +%global llvm_man1dir %llvm_datadir/man/man1 +%global llvm_docdir %llvm_datadir/doc =20 # Decrease debuginfo verbosity to reduce memory consumption during final l= ibrary linking %ifarch %ix86 %arm @@ -11,6 +30,8 @@ %define optflags_debug -g1 %endif =20 +%define hwasan_symbolize_arches x86_64 aarch64 + %def_disable tests %ifarch x86_64 aarch64 %def_without clang @@ -18,44 +39,62 @@ %def_without clang %endif =20 +%define tarversion %v_full%rcsuffix + Name: %llvm_name -Version: 11.0.0 -Release: alt1 -Summary: The Low Level Virtual Machine +Version: %v_full +Release: alt2 +Summary: The LLVM Compiler Infrastructure =20 Group: Development/C -License: NCSA +License: Apache-2.0 with LLVM-exception Url: http://llvm.org -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%v= ersion/llvm-%version.src.tar.xz -Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%v= ersion/clang-%version.src.tar.xz -Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%v= ersion/lld-%version.src.tar.xz -Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%v= ersion/compiler-rt-%version.src.tar.xz +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/llvm-%tarversion.src.tar.xz +Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/clang-%tarversion.src.tar.xz +Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/clang-tools-extra-%tarversion.src.tar.xz +Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/lld-%tarversion.src.tar.xz +Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%t= arversion/compiler-rt-%tarversion.src.tar.xz Patch: clang-alt-i586-fallback.patch Patch1: clang-11-alt-triple.patch +Patch2: 0001-alt-llvm-config-Ignore-wrappers-when-looking-for-current.patch Patch3: llvm-alt-fix-linking.patch Patch4: llvm-alt-triple.patch Patch5: compiler-rt-9-alt-i586-arch.patch Patch6: RH-0001-CMake-Split-static-library-exports-into-their-own-ex.patch Patch7: clang-alt-aarch64-dynamic-linker-path.patch +Patch8: clang-tools-extra-alt-gcc-0001-clangd-satisfy-ALT-gcc-s-Werror-ret= urn-type.patch Patch9: lld-11-alt-mipsel-permit-textrels-by-default.patch Patch10: llvm-10-alt-python3.patch Patch14: llvm-10-alt-riscv64-config-guess.patch +Patch15: llvm-cmake-resolve-symlinks-in-LLVMConfig.cmake.patch +Patch16: clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch + +%if_with clang +# https://bugs.altlinux.org/show_bug.cgi?id=3D34671 +%set_verify_elf_method lint=3Dskip +%endif =20 -# ThinLTO requires /proc/cpuinfo to exists so the same does llvm +# ThinLTO requires /proc/cpuinfo to exist; so the same does llvm BuildPreReq: /proc =20 +# Obtain %%__python3 at prep stage. +BuildRequires(pre): rpm-build-python +BuildRequires(pre): rpm-build-python3 +BuildRequires(pre): rpm-macros-llvm-common + BuildRequires(pre): cmake >=3D 3.4.3 BuildRequires: rpm-build >=3D 4.0.4-alt112 libncursesw-devel -BuildRequires: chrpath libstdc++-devel libffi-devel perl-Pod-Parser perl-d= evel +BuildRequires: libstdc++-devel libffi-devel perl-Pod-Parser perl-devel BuildRequires: python3-module-recommonmark zip zlib-devel binutils-devel n= inja-build %if_with clang -BuildRequires: %clang_name %llvm_name-devel %lld_name +BuildRequires: %clang_default_name %llvm_default_name-devel %lld_default_n= ame %else BuildRequires: gcc-c++ %endif =20 -Provides: llvm =3D %EVR -Obsoletes: llvm < %version +%define requires_filesystem Requires: %name-filesystem =3D %EVR +%requires_filesystem +Requires: llvm >=3D %_llvm_version =20 %description LLVM is a compiler infrastructure designed for compile-time, link-time, @@ -63,11 +102,19 @@ runtime, and idle-time optimization of programs from a= rbitrary programming languages. The compiler infrastructure includes mirror sets of programming tools as well as libraries with equivalent functionality. =20 +%package filesystem +Group: Development/Other +Summary: Owns the installation prefix for LLVM + +%description filesystem +This package owns the installation prefix for LLVM. It is designed to be +pulled in by all non-empty LLVM packages. + %package devel Group: Development/C Summary: Libraries and header files for LLVM -Provides: llvm-devel =3D %EVR -Obsoletes: llvm-devel < %version +%requires_filesystem +Requires: llvm-devel >=3D %_llvm_version Requires: %name =3D %EVR =20 %description devel @@ -77,8 +124,8 @@ native programs that use the LLVM infrastructure. %package devel-static Summary: Static libraries for LLVM Group: Development/C -Provides: llvm-devel-static =3D %EVR -Obsoletes: llvm-devel-static < %version +%requires_filesystem +Requires: llvm-devel-static >=3D %_llvm_version Requires: %name-devel =3D %EVR =20 %description devel-static @@ -88,26 +135,38 @@ native programs that use the LLVM infrastructure. %package libs Group: Development/C Summary: LLVM shared libraries +%requires_filesystem =20 %description libs -Shared libraries for the LLVM compiler infrastructure. +This package contains shared libraries needed to develop new +native programs that use LLVM. =20 %package doc Summary: Documentation for LLVM Group: Documentation BuildArch: noarch -Provides: llvm-doc =3D %EVR -Obsoletes: llvm-doc < %version +%requires_filesystem =20 %description doc Documentation for the LLVM compiler infrastructure. =20 +%package tools +Summary: Various minor tools bundled with LLVM +Group: Development/C +%requires_filesystem + +%description tools +This package contains various tools maintained as part of LLVM, including +opt-viewer. + %package -n %clang_name Summary: A C language family frontend for LLVM Group: Development/C +%requires_filesystem +# clang uses various parts of GNU crt bundled with gcc. +# Should they be packaged separately? Requires: gcc -Provides: clang =3D %EVR -Obsoletes: clang < %version +Requires: clang >=3D %_llvm_version =20 %description -n %clang_name clang: noun @@ -122,15 +181,36 @@ as libraries and designed to be loosely-coupled and e= xtendable. %package -n %clang_name-libs Group: Development/C Summary: clang shared libraries +%requires_filesystem +Requires: %clang_name-libs-support =3D %EVR =20 %description -n %clang_name-libs Shared libraries for the clang compiler. =20 +%package -n %clang_name-libs-support +Group: Development/C +Summary: Support for Clang's shared libraries +%requires_filesystem + +%description -n %clang_name-libs-support +The Clang's shared libraries implement compilers for C and C++, and thus h= ave +to bundle additional platform support headers and libraries for use within= the +compilation product. This package contains the platform support. + +%package -n %clang_name-libs-support-shared-runtimes +Group: Development/C +Summary: Shared runtimes for Clang's shared libraries +%requires_filesystem +Requires: %clang_name-libs-support =3D %EVR + +%description -n %clang_name-libs-support-shared-runtimes +This package contains shared runtime libraries for Scudo and sanitizers. + %package -n %clang_name-devel Summary: Header files for clang Group: Development/C -Provides: clang-devel =3D %EVR -Obsoletes: clang-devel < %version +%requires_filesystem +Requires: clang-devel >=3D %_llvm_version Requires: %clang_name =3D %EVR =20 %description -n %clang_name-devel @@ -139,8 +219,7 @@ This package contains header files for the Clang compil= er. %package -n %clang_name-devel-static Summary: Static libraries for clang Group: Development/C -Provides: clang-devel-static =3D %EVR -Obsoletes: clang-devel-static < %version +%requires_filesystem Requires: %clang_name-devel =3D %EVR =20 %description -n %clang_name-devel-static @@ -150,8 +229,7 @@ This package contains static libraries for the Clang co= mpiler. Summary: A source code analysis framework Group: Development/C BuildArch: noarch -Provides: clang-analyzer =3D %EVR -Obsoletes: clang-analyzer < %version +%requires_filesystem Requires: %clang_name =3D %EVR =20 %description -n %clang_name-analyzer @@ -160,21 +238,38 @@ framework and a standalone tool that finds bugs in C = and Objective-C programs. The standalone tool is invoked from the command-line, and is intended to run in tandem with a build of a project or code base. =20 +%package -n %clang_name-tools +Summary: Various clang-based tools +Group: Development/C +%requires_filesystem +Requires: %clang_name =3D %EVR + +%description -n %clang_name-tools +This package contains various code analysis and manipulation tools based on +libclang, including clang-format. + %package -n %clang_name-doc Summary: Documentation for Clang Group: Documentation BuildArch: noarch -Provides: clang-doc =3D %EVR -Obsoletes: clang-doc < %version +%requires_filesystem =20 %description -n %clang_name-doc Documentation for the Clang compiler front-end. =20 +%package -n %clangd_name +Summary: A clang-based language server +Group: Development/C +%requires_filesystem + +%description -n %clangd_name +This package contains clangd, a Clang-based language server for C and C++. + %package -n %lld_name Summary: LLD - The LLVM Linker Group: Development/C -Provides: lld =3D %EVR -Obsoletes: lld < %version +%requires_filesystem +Requires: lld >=3D %_llvm_version =20 %description -n %lld_name LLD is a linker from the LLVM project. That is a drop-in replacement for s= ystem @@ -184,8 +279,8 @@ useful for toolchain developers. %package -n %lld_name-devel Summary: Header files for LLD Group: Development/C -Provides: lld-devel =3D %EVR -Obsoletes: lld-devel < %version +%requires_filesystem +Requires: lld-devel >=3D %_llvm_version Requires: %lld_name =3D %EVR =20 %description -n %lld_name-devel @@ -195,35 +290,48 @@ This package contains header files for the LLD linker. Summary: Documentation for LLD Group: Documentation BuildArch: noarch -Provides: lld-doc =3D %EVR -Obsoletes: lld-doc < %version +%requires_filesystem =20 %description -n %lld_name-doc Documentation for the LLD linker. =20 %prep -%setup -n llvm-%version.src -a1 -a2 -a3 +%setup -n llvm-%tarversion.src -a1 -a2 -a3 -a4 for pkg in clang lld; do - mv $pkg-%version.src tools/$pkg + mv $pkg-%tarversion.src tools/$pkg done -mv compiler-rt-%version.src projects/compiler-rt +mv clang-tools-extra-%tarversion.src tools/clang/tools/extra +mv compiler-rt-%tarversion.src projects/compiler-rt %patch -p1 -b .alt-i586-fallback %patch1 -p1 -b .alt-triple +%patch2 -p1 +sed -i 's)"%%llvm_bindir")"%llvm_bindir")' lib/Support/Unix/Path.inc %patch3 -p1 -b .alt-fix-linking %patch4 -p1 -b .alt-triple %patch5 -p1 -b .alt-i586-arch %patch6 -p1 %patch7 -p1 -b .alt-aarch64-dynamic-linker +%patch8 -p1 %patch9 -p1 -b .alt-mipsel-permit-textrels-by-default %patch10 -p1 %patch14 -p1 +%patch15 -p2 +%patch16 -p1 + +# Explicitly use python2 in hashbangs. +# TODO: LLVM 12 and onward deprecate Python 2: +# https://releases.llvm.org/11.0.0/docs/ReleaseNotes.html +subst '/^#!.*python$/s|python$|python2|' $(grep -Rl '#!.*python$' *) =20 %build +%define _cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=3DOFF %cmake -G Ninja \ -DLLVM_PARALLEL_LINK_JOBS=3D1 \ -DCMAKE_BUILD_TYPE=3DRelease \ + -DCMAKE_INSTALL_PREFIX=3D%llvm_prefix \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=3DOFF \ -DBUILD_SHARED_LIBS:BOOL=3DOFF \ - -DLLVM_TARGETS_TO_BUILD=3D"host;AMDGPU;BPF;NVPTX;" \ + -DLLVM_TARGETS_TO_BUILD=3D"all" \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=3D'AVR' \ -DLLVM_ENABLE_LIBCXX:BOOL=3DOFF \ -DLLVM_ENABLE_ZLIB:BOOL=3DON \ @@ -287,13 +395,13 @@ ninja -vvv -j %__nprocs -C BUILD =20 %install pushd BUILD -cmake -DCMAKE_INSTALL_PREFIX=3D%buildroot%prefix ../ +cmake -DCMAKE_INSTALL_PREFIX=3D%buildroot%llvm_prefix ../ sed -i 's|man\ tools/lld/docs/docs-lld-html|man|' build.ninja sed -i '/^[[:space:]]*include.*tools\/lld\/docs\/cmake_install.cmake.*/d' = tools/lld/cmake_install.cmake popd ninja -C BUILD install =20 -# And prepare Clang documentation +# Prepare Clang documentation. rm -rf BUILD/clang-docs mkdir -p BUILD/clang-docs for f in LICENSE.TXT NOTES.txt README.txt; do @@ -301,113 +409,295 @@ for f in LICENSE.TXT NOTES.txt README.txt; do done rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools} =20 -install -m 0755 BUILD/%_lib/LLVMHello.so %buildroot%_libdir/ -install -m 0755 BUILD/%_lib/BugpointPasses.so %buildroot%_libdir/ -mkdir -p %buildroot%_docdir/lld - -file %buildroot%_bindir/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpat= h -d -file %buildroot%_libdir/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chr= path -d +install -m 0755 BUILD/%_lib/LLVMHello.so %buildroot%llvm_libdir/ +install -m 0755 BUILD/%_lib/BugpointPasses.so %buildroot%llvm_libdir/ +mkdir -p %buildroot%llvm_docdir/lld =20 %ifarch %ix86 -cd %buildroot%_libdir/clang/%version/lib/linux +cd %buildroot%llvm_libdir/clang/%v_full/lib/linux ls *-i[3-9]86* | while read f; do ln -s $f $(echo $f | sed 's|i[3-9]86|i38= 6|') ; done %endif =20 +# The following files are not used by LLVM builds for Linux. +rm -f %buildroot%llvm_bindir/argdumper +rm -f %buildroot%llvm_datadir/clang/clang-format-bbedit.applescript + +# Install the clang bash completion. +mkdir -p %buildroot%_datadir/bash-completion/completions +ln -sr %buildroot%llvm_datadir/clang/bash-autocomplete.sh %buildroot%_data= dir/bash-completion/completions/clang-%v_major + +# Symlink executables to %_bindir. +mkdir -p %buildroot%_bindir +for b in %buildroot%llvm_bindir/*; do + bb=3D"$(basename "$b")" + echo "$bb" | grep -q -- '-%v_major$' && continue # if already appended + ln -srv "$b" "%buildroot%_bindir/$bb-%v_major" +done +# Symlink man pages to the man dirs. +for mand in %buildroot%llvm_datadir/man/man*; do + mand_index=3D"${mand##*/man}" + for m in "$mand"/*.[1-9]*; do + # Let's force compress the man page, then symlink it. + # /usr/lib/llvm-11.0/share/man/manD/utilX.D.xz -> /usr/share/man/manD/ut= ilX-11.D.xz + # Otherwise, brp-alt(compress) keeps fucking us up. + # It remakes the symlinks first, then compresses their targets, + # severing the symlinks. + /usr/lib/rpm/compress_files "$m" + + mb=3D"$(basename "$m")" # e. g. llvm-ar.1.xz + new_mb=3D"${mb%%.[1-9]*}-%v_major.$mand_index" # e. g. llvm-ar-11.1.xz + + mkdir -p "%buildroot%_mandir/man$mand_index" + ln -srv "$m" "%buildroot%_mandir/man$mand_index/$new_mb" + done +done + +# Symlink sonamed shared libraries in %llvm_prefix/%_libdir to %_libdir. +mkdir -p %buildroot%_libdir +find %buildroot%llvm_libdir/*.so* -type f | grep -E '^%buildroot%llvm_libd= ir/.*(%v_major)' | sort | tee %_tmppath/shared-objects \ + | sed 's)%llvm_libdir)%_libdir)' > %_tmppath/shared-object-links +paste %_tmppath/shared-objects %_tmppath/shared-object-links | while read = object link; do + ln -srv "$object" "$link" +done + +# List all packaged binaries in this source package. +find %buildroot%_bindir/*-%v_major > %_tmppath/PATH-executables + +# For paranoic reasons library packaging policy covers peculiar directory = paths. +# If there are $A.a and $A.so in %llvm_libdir/clang, they should not end u= p in the +# same package (but can be co-installed on a system). +# Let's list all the $A.so for which $A.a exists into a separate package. +# We also consider i386-symlinks for iN86. +find %buildroot%llvm_libdir/clang -type f,l -name '*.a' -or -name '*.so' |= \ + sed -r -n 's/^(\/.+)\.a$/\1/p; s/^(.+)\.so$/\1/p' | sort | uniq -d > %= _tmppath/libclang-support-dupes +sed < %_tmppath/libclang-support-dupes 's)^%buildroot)); s/$/.a/' > %_tmpp= ath/libclang-support-static-runtimes +sed < %_tmppath/libclang-support-dupes 's)^%buildroot)); s/$/.so/' > %_tmp= path/libclang-support-shared-runtimes +sed < %_tmppath/libclang-support-shared-runtimes 's/^/%%exclude /' > %_tmp= path/dyn-files-libclang-support +echo "Expelling likely redundant Clang shared runtimes:" && cat %_tmppath/= dyn-files-libclang-support + %check %if_enabled tests -LD_LIBRARY_PATH=3D%buildroot%_libdir:$LD_LIBRARY_PATH +LD_LIBRARY_PATH=3D%buildroot%llvm_libdir:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ninja -C BUILD check-all || : %endif =20 +# Do not generate dependencies for clang-{format,rename} plugins. +%add_findreq_skiplist %llvm_datadir/clang/* + +%files filesystem +%dir %llvm_prefix +%dir %llvm_bindir +%dir %llvm_libdir +%dir %llvm_includedir +%dir %llvm_libexecdir +%dir %llvm_datadir +%dir %llvm_datadir/clang +%dir %llvm_datadir/man +%dir %llvm_man1dir +%dir %llvm_docdir + %files %doc CREDITS.TXT LICENSE.TXT README.txt +%llvm_bindir/* %_bindir/* +%llvm_man1dir/* %_man1dir/* +%exclude %llvm_bindir/llvm-config* %exclude %_bindir/llvm-config* +%exclude %llvm_bindir/*clang* %exclude %_bindir/*clang* -%exclude %_bindir/c-index-test +%exclude %llvm_bindir/*clangd* +%exclude %_bindir/*clangd* +%exclude %llvm_bindir/c-index-test +%exclude %_bindir/c-index-test-%v_major +%exclude %llvm_bindir/find-all-symbols +%exclude %_bindir/find-all-symbols-%v_major +%exclude %llvm_bindir/scan-* %exclude %_bindir/scan-* -%exclude %_man1dir/llvm-config.1.* -%exclude %_man1dir/clang.1* -%exclude %_man1dir/scan-build.1* +%exclude %llvm_man1dir/llvm-config.1.* +%exclude %_man1dir/llvm-config-%v_major.1.* +%exclude %llvm_man1dir/clang.1* +%exclude %_man1dir/clang-%v_major.1* +%exclude %llvm_man1dir/scan-build.1* +%exclude %_man1dir/scan-build-%v_major.1* +%exclude %llvm_bindir/lld* %exclude %_bindir/lld* -%exclude %_bindir/ld*.lld -%exclude %_bindir/wasm-ld +%exclude %llvm_bindir/ld*.lld +%exclude %_bindir/ld*.lld-%v_major +%exclude %llvm_bindir/wasm-ld +%exclude %_bindir/wasm-ld-%v_major =20 %files libs +%llvm_libdir/libLLVM-*.so %_libdir/libLLVM-*.so +%llvm_libdir/libLTO.so.* %_libdir/libLTO.so.* +%llvm_libdir/libRemarks.so.* %_libdir/libRemarks.so.* =20 +%files tools +%llvm_datadir/opt-viewer + %files devel -%_bindir/llvm-config -%_man1dir/llvm-config.1.* -%_includedir/llvm -%_includedir/llvm-c -%_libdir/libLLVM.so -%_libdir/libLTO.so -%_libdir/LLVMgold.so -%_libdir/libRemarks.so -%_libdir/LLVMHello.so -%_libdir/BugpointPasses.so -%_libdir/cmake/llvm -%exclude %_libdir/cmake/llvm/LLVMStaticExports*.cmake +%llvm_bindir/llvm-config +%_bindir/llvm-config-%v_major +%llvm_man1dir/llvm-config.1.* +%_man1dir/llvm-config-%v_major.1.* +%llvm_includedir/llvm +%llvm_includedir/llvm-c +%llvm_libdir/libLLVM.so +%llvm_libdir/libLTO.so +%llvm_libdir/LLVMgold.so +%llvm_libdir/libRemarks.so +%llvm_libdir/LLVMHello.so +%llvm_libdir/BugpointPasses.so +%dir %llvm_libdir/cmake +%llvm_libdir/cmake/llvm +%exclude %llvm_libdir/cmake/llvm/LLVMStaticExports.cmake =20 %files devel-static -%_libdir/*.a -%exclude %_libdir/libclang*.a -%_libdir/cmake/llvm/LLVMStaticExports*.cmake +%llvm_libdir/*.a +%exclude %llvm_libdir/libclang*.a +%dir %llvm_libdir/cmake +%dir %llvm_libdir/cmake/llvm +%llvm_libdir/cmake/llvm/LLVMStaticExports.cmake =20 %files -n %clang_name %doc BUILD/clang-docs/* -%_bindir/*clang* -%_bindir/c-index-test -%_man1dir/clang.1* +%llvm_bindir/clang-%v_major +%llvm_bindir/clang +%_bindir/clang-%v_major +%llvm_bindir/clang++ +%_bindir/clang++-%v_major +%llvm_bindir/clang-cl +%_bindir/clang-cl-%v_major +%llvm_bindir/clang-cpp +%_bindir/clang-cpp-%v_major +%llvm_man1dir/clang.1* +%_man1dir/clang-%v_major.1* +%exclude %llvm_bindir/clang-check* +%exclude %_bindir/clang-check* +%exclude %llvm_bindir/clang-extdef-mapping* +%exclude %_bindir/clang-extdef-mapping* +%exclude %llvm_bindir/clang-format* +%exclude %_bindir/clang-format* +%exclude %llvm_bindir/git-clang-format* +%exclude %_bindir/git-clang-format* +%exclude %llvm_bindir/clang-offload-* +%exclude %_bindir/clang-offload-* +%exclude %llvm_bindir/clang-refactor* +%exclude %_bindir/clang-refactor* +%exclude %llvm_bindir/clang-rename* +%exclude %_bindir/clang-rename* +%llvm_datadir/clang/bash-autocomplete.sh +%_datadir/bash-completion/completions/clang* =20 %files -n %clang_name-libs -%_libdir/clang +%llvm_libdir/libclang*.so.* %_libdir/libclang*.so.* =20 +%files -n %clang_name-libs-support -f %_tmppath/dyn-files-libclang-support +%llvm_libdir/clang +# clang-tools +%ifarch %hwasan_symbolize_arches +%exclude %llvm_libdir/clang/%v_full/bin/hwasan_symbolize +%endif + +%files -n %clang_name-libs-support-shared-runtimes -f %_tmppath/libclang-s= upport-shared-runtimes + %files -n %clang_name-devel -%_includedir/clang -%_includedir/clang-c -%_libdir/libclang*.so -%_libdir/cmake/clang +%llvm_includedir/clang +%llvm_includedir/clang-c +%llvm_includedir/clang-tidy +%llvm_libdir/libclang*.so +%dir %llvm_libdir/cmake +%llvm_libdir/cmake/clang =20 %files -n %clang_name-devel-static -%_libdir/libclang*.a +%llvm_libdir/libclang*.a =20 %files -n %clang_name-analyzer -%_prefix/libexec/*-analyzer -%_bindir/scan-build -%_bindir/scan-view -%_datadir/scan-build -%_datadir/scan-view -%_man1dir/scan-build.1* +%llvm_prefix/libexec/*-analyzer +%llvm_bindir/scan-build +%_bindir/scan-build-%v_major +%llvm_bindir/scan-view +%_bindir/scan-view-%v_major +%llvm_datadir/scan-build +%llvm_datadir/scan-view +%llvm_man1dir/scan-build.1* +%_man1dir/scan-build-%v_major.1* + +%files -n %clang_name-tools +%llvm_bindir/c-index-test +%_bindir/c-index-test-%v_major +%llvm_bindir/clang-* +%_bindir/clang-* +%exclude %llvm_bindir/clang-%v_major +%exclude %llvm_bindir/clang +%exclude %_bindir/*clang-%v_major +%exclude %llvm_bindir/clang++ +%exclude %_bindir/clang++-%v_major +%exclude %llvm_bindir/clang-cl +%exclude %_bindir/clang-cl-%v_major +%exclude %llvm_bindir/clang-cpp +%exclude %_bindir/clang-cpp-%v_major +%llvm_bindir/find-all-symbols +%_bindir/find-all-symbols-%v_major +%llvm_datadir/clang +%exclude %llvm_datadir/clang/bash-autocomplete.sh +%ifarch %hwasan_symbolize_arches +%llvm_libdir/clang/%v_full/bin/hwasan_symbolize +%endif + +%files -n %clangd_name +%llvm_bindir/clangd +%_bindir/clangd-%v_major =20 %files -n %lld_name +%llvm_bindir/lld* %_bindir/lld* -%_bindir/ld*.lld -%_bindir/wasm-ld +%llvm_bindir/ld*.lld +%_bindir/ld*.lld-%v_major +%llvm_bindir/wasm-ld +%_bindir/wasm-ld-%v_major =20 %files -n %lld_name-devel -%dir %_includedir/lld -%_includedir/lld/* -%_libdir/cmake/lld +%dir %llvm_includedir/lld +%llvm_includedir/lld/* +%dir %llvm_libdir/cmake +%llvm_libdir/cmake/lld =20 %files doc -%doc %_docdir/llvm +%doc %llvm_docdir/llvm =20 %files -n %clang_name-doc -%doc %_docdir/clang +%doc %llvm_docdir/clang +%doc %llvm_docdir/clang-tools =20 %files -n %lld_name-doc -%doc %_docdir/lld +%doc %llvm_docdir/lld =20 %changelog +* Fri Dec 11 2020 Arseny Maslennikov 11.0.0-alt2 +- Installed to /usr/lib/llvm-11.0 to ensure peaceful co-existence with oth= er + LLVM versions. + Numbered shared libraries in %llvm_prefix/%%_lib are symlinked to %%_lib= dir + to properly generate library dependencies. +- Moved clang-format and other clang-based tools to clang11.0-tools. +- New LLVM subproject: clang-tools-extra. + + 2 new packages: clang11.0-tools, clangd11.0 +- Enabled all LLVM targets. +- Moved C/C++ compiler support away from clang-libs to clang-libs-support. +- Moved Clang .so runtimes (scudo and sanitizers) with available static va= riants + to clang-libs-support-shared-runtimes to comply with sisyphus-check-stat= ic. + * Tue Oct 13 2020 Valery Inozemtsev 11.0.0-alt1 - 11.0.0 +- Built with gcc. + +* Wed Aug 12 2020 Aleksei Nikiforov 10.0.1-alt2 +- Applied upstream patch which should fix ppc64le-specific issue. =20 * Tue Aug 11 2020 Valery Inozemtsev 10.0.1-alt1 - 10.0.1 --Uf6HQlq2IGGBi8n6-- --+VklIx9JO5vDLt2T Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE56JD3UKTLEu/ddrm9dQjyAYL01AFAl/3eqgACgkQ9dQjyAYL 01AxNQ//Ufv/K25V15YmdeW5a98lbwMDN2dLwnnjvqynjDjemWdDQ4PMm4dRZPAf QNapViSDEl7up3H8NCn0VZwpkzUxh1cYzDQ1tM3qYAjO57bSml/FhG9GLRJnsYuP NkdICHsJgYsylM95kCm5NRNGiigtSbn3DqkLUVvtZcUQJ92u8DwMDj0YzvS7NDLL q7q7yLbaMhx861OXdPePnLGoOK3c9CKiB7fIPoa/TpqIWOLQfk8J+gD92F5VQgNP +Gy8QDyihtBi774ePPlIrHWnMJPrASYIseZLncHI1cpCJiI72OLXDu9G1FOnVmTg GWWk5H0LKw5egHwlZsfs67Xf86cXPJE5w+RoqXTwLzawwM18+xXzjI6m9JZJtx7K ob9Cv2qCNvj3xvCvIj0fTmyNCOXV8O4MVMzhzgfYgYgD7JMJ+CZUZ1rJfJHz88mf kYbY6fkyTGmAnKC/qoYtC3qH2tJ3LJXNqBSRcmLNtnn79S9JYh0IKA2Gdpx0JCaQ ruZTv112UfYYHMAVrov95D99PGy1hdMuhA7mTnq4o19xMCjs9+vALTsRggtK0TxU B3ArmzQ1DrY6rxwmfOEERzi+ogsHI8Nbx5U+AYjvMfi/JeVFYdRdNXolhrF5SOZp sOSkLu2RGCRVPyn6A9mkR5/C97riNkAodFPwGAbCVGllkXNA9+8= =+LI8 -----END PGP SIGNATURE----- --+VklIx9JO5vDLt2T--