Sync from SUSE:ALP:Source:Standard:1.0 llvm revision e54bd2094269396d946b9ffd3b67403f

This commit is contained in:
Adrian Schröter 2023-12-28 13:20:08 +01:00
commit 12fb6e4196
4 changed files with 2235 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

120
README.packaging Normal file
View File

@ -0,0 +1,120 @@
========
OVERVIEW
This package is a dummy package that always depends on the
version of corresponding LLVM packages that openSUSE
currently supports. This file documents the procedure for
updating the various LLVM components.
There are three major update scenarios that will be addressed
here, patch-level updates to the current LLVM version,
patch-level updates to older LLVM versions, and major/minor
version updates.
LLVM version numbers come in three levels. For version
X.0.Z, changes to the X level are major updates, changes to
the Y level are minor updates, and changes to the Z level
are patch-level updates. Since LLVM 4, the minor version
is always expected to be 0. [1] Library .so numbers are
based on the major version, for example libLLVM.so.X.
Patch-level updates do not update the version number of
libraries. For this reason, only changes to the major
version number get a new llvm package.
There are up to three packages that need to be handled in a
given update. This package, the base "llvm" package, the
current "llvmX" package (X is the major version numbers),
and the next "llvmX" package if the major version has changed.
NOTE: This package should always have the same "License"
tag as the currently-supported version of the llvmX package.
[1] http://blog.llvm.org/2016/12/llvms-new-versioning-scheme.html
===================
PATCH-LEVEL UPDATES
For patch level updates, the corresponding llvmX package needs
to be updated.
1. llvmX package:
1. Add the new sources to the package and delete the old
ones. This will not include clang-docs-X.0.Z.src.tar.xz
or llvm-docs-X.0.Z.src.tar.xz (see next item).
2. Build clang-docs-X.0.Z.src.tar.xz and
llvm-docs-X.0.Z.src.tar.xz. The instructions are in
the %install section of llvmX.spec. The instructions
need RPM substitutions, for example via rpmspec -P.
Add those sources as well and delete the old ones.
3. Update the "_relver" tag in llvmX.spec to match the
new sources.
4. Update the version number in the patches to match the
new sources.
5. Update the "_uaver" tag in llvmX.spec to match
the "_relver" tag.
6. Confirm everything builds successfully and there are
no new rpmlint issues.
7. Update the llvmX.changes file.
=====================
MAJOR VERSION UPDATES
For updates that change the major version number, this
package (llvm) needs to be updated and a new llvmX package
needs to be created.
1. New llvmX package:
1. Copy (do not link) the old llvmX to the new
major/minor version number.
2. Add the new sources to the package and delete the old
ones. This will not include clang-docs-X.0.Z.src.tar.xz
or llvm-docs-X.0.Z.src.tar.xz (see next item).
3. Build clang-docs-X.0.Z.src.tar.xz and
llvm-docs-X.0.Z.src.tar.xz. The instructions are in
the %install section of llvmX.spec. The instructions
need RPM substitutions, for example via rpmspec -P.
Add those sources as well and delete the old ones.
4. Rename the .spec, .changes, and rpmlintrc files in the
new llvmX package to the new major/minor version
number
5. Rename the packages in llvmX.spec files to match the
new package name.
6. Change the "_sonum" tag in llvmX.spec to match the
new major/minor versions. It should be of the form "X".
Change the "_itsme" definition to "%define _itsmeX 1".
7. Change the "_minor" tag in llvmX.spec to match
the new major/minor versions. It should be of the
form "X.0".
8. Change the "_uaver" tag in llvmX.spec to match the
new major/minor versions. It should be of the form "X0Z".
9. Update the "_relver" tag and the version numbers in
the patches as described in PATCH-LEVEL UPDATES above.
10. Confirm llvmX.spec builds successfully and there are
no new rpmlint issues.
11. Check whether the .so numbers of "libc++.so.W.V" or
"libclang.so.X" have changed. If so, change the
"_socxx" or "_soclang" tag to match.
It should be of the form "W" if the "V" value is 0
or "W_V" if the "V" value is greater than 0.
12. Confirm everything builds successfully and there are
no new rpmlint issues. Some patches may need to be
removed or rebased.
13. Update the llvmX.changes file.
2. llvm package:
1. Change the "_sonum" tag to match the one in the
new "llvmX.spec" file.
2. Update the llvm.changes file.
3. Project config:
1. Change %product_libs_llvm_ver to X.
2. If one of the .so version numbers for libclang, libc++
or libc++abi changed, add a corresponding
Prefer: libcxxW
Prefer: libcxxabiW
Prefer: libclangW
for the new .so version and a corresponding definition
%product_libs_llvm_ver_libcxxW X
%product_libs_llvm_ver_libcxxabiW X
%product_libs_llvm_ver_libclangW X
with W the old .so version and X the old LLVM version.

1745
llvm.changes Normal file

File diff suppressed because it is too large Load Diff

347
llvm.spec Normal file
View File

@ -0,0 +1,347 @@
#
# spec file for package llvm
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _sonum 17
%ifarch aarch64 x86_64
%define has_lldb 1
%define has_lldb_python 1
%endif
# obsolete_llvm_versioned() prefix postfix
# Obsolete packages <prefix>X or <prefix>X-<postfix> with X being a set of older versions.
%define obsolete_llvm_versioned() \
Obsoletes: %{1}10%{?2:-%{2}} \
Obsoletes: %{1}11%{?2:-%{2}} \
Obsoletes: %{1}12%{?2:-%{2}} \
Obsoletes: %{1}13%{?2:-%{2}} \
Obsoletes: %{1}14%{?2:-%{2}} \
Obsoletes: %{1}15%{?2:-%{2}} \
Obsoletes: %{1}16%{?2:-%{2}} \
Obsoletes: %{1}7%{?2:-%{2}} \
Obsoletes: %{1}8%{?2:-%{2}} \
Obsoletes: %{1}9%{?2:-%{2}}
Name: llvm
Version: %{_sonum}
Release: 0
Summary: Low Level Virtual Machine
License: Apache-2.0 WITH LLVM-exception OR NCSA
Group: Development/Languages/Other
URL: https://www.llvm.org/
# This file documents the process for updating llvm
Source0: README.packaging
Requires: llvm%{_sonum}
Suggests: %{name}-doc
%description
LLVM is a compiler infrastructure designed for compile-time,
link-time, runtime, and idle-time optimization of programs from
arbitrary programming languages.
The compiler infrastructure includes mirror sets of programming
tools as well as libraries with equivalent functionality.
This package is a dummy package that depends on the version of
llvm that openSUSE currently supports. Packages that
don't require a specific LLVM version should depend on this.
%package devel
Summary: Header Files for LLVM
Group: Development/Libraries/C and C++
Requires: llvm%{_sonum}-devel
Provides: llvm-LTO-devel = %{version}
Obsoletes: llvm-LTO-devel < %{version}
Requires: llvm-gold
%obsolete_llvm_versioned llvm devel
%obsolete_llvm_versioned llvm LTO-devel
%description devel
This package contains library and header files needed to develop
new native programs that use the LLVM infrastructure.
This package is a dummy package that depends on the version of
llvm-devel that openSUSE currently supports. Packages that
don't require a specific LLVM version should depend on this.
%package doc
Summary: Documentation for LLVM
Group: Documentation/HTML
Requires: %{name} = %{version}
Requires: llvm%{_sonum}-doc
%obsolete_llvm_versioned llvm doc
%description doc
This package contains documentation for the LLVM infrastructure.
This package is a dummy package that depends on the version of
llvm-doc that openSUSE currently supports. Packages that
don't require a specific LLVM version should depend on this.
%package -n clang
Summary: CLANG frontend for LLVM
Group: Development/Languages/C and C++
URL: https://clang.llvm.org/
Requires: clang%{_sonum}
Provides: llvm-clang = %{version}
Obsoletes: llvm-clang < %{version}
Provides: llvm-emacs-plugins
Suggests: clang-doc
%description -n clang
This package contains the clang (C language) frontend for LLVM.
This package is a dummy package that depends on the version of
clang that openSUSE currently supports. Packages that
don't require a specific Clang version should depend on this.
%package -n clang-devel
Summary: CLANG frontend for LLVM (devel package)
Group: Development/Libraries/C and C++
Requires: clang%{_sonum}-devel
Provides: llvm-clang-devel = %{version}
Obsoletes: llvm-clang-devel < %{version}
Provides: clang-devel-static = %{version}
Obsoletes: clang-devel-static < %{version}
%obsolete_llvm_versioned clang devel
%description -n clang-devel
This package contains the clang (C language) frontend for LLVM.
(development files)
This package is a dummy package that depends on the version of
clang-devel that openSUSE currently supports. Packages that
don't require a specific Clang version should depend on this.
%package -n clang-doc
Summary: Documentation for Clang
Group: Documentation/HTML
Requires: clang = %{version}
Requires: clang%{_sonum}-doc
%obsolete_llvm_versioned clang doc
%description -n clang-doc
This package contains documentation for the Clang compiler.
This package is a dummy package that depends on the version of
clang-doc that openSUSE currently supports. Packages that
don't require a specific Clang version should depend on this.
%package gold
Summary: Gold linker plugin for LLVM
Group: Development/Tools/Building
Requires: llvm%{_sonum}-gold
%obsolete_llvm_versioned llvm gold
%description gold
This package contains the Gold linker plugin for LLVM.
This package is a dummy package that depends on the version of
llvm-gold that openSUSE currently supports. Packages that
don't require a specific LLVM version should depend on this.
%package vim-plugins
Summary: Vim plugins for LLVM
Group: Productivity/Text/Editors
Requires: llvm%{_sonum}-vim-plugins
Supplements: packageand(llvm:vim)
%obsolete_llvm_versioned llvm vim-plugins
BuildArch: noarch
%description vim-plugins
This package contains vim plugins for LLVM like syntax highlighting.
This package is a dummy package that depends on the version of
llvm-vim-plugins that openSUSE currently supports. Packages that
don't require a specific LLVM version should depend on this.
%package opt-viewer
Summary: Tools for visualising the LLVM optimization records
Group: Development/Languages/Other
Requires: llvm%{_sonum}-opt-viewer
%obsolete_llvm_versioned llvm opt-viewer
BuildArch: noarch
%description opt-viewer
Set of tools for visualising the LLVM optimization records generated
with -fsave-optimization-record. Used for compiler-assisted performance
analysis.
This package is a dummy package that depends on the version of
llvm-opt-viewer that openSUSE currently supports. Packages that
don't require a specific LLVM version should depend on this.
%package -n lldb
Summary: Software debugger built using LLVM libraries
Group: Development/Tools/Debuggers
URL: https://lldb.llvm.org/
Requires: lldb%{_sonum}
Recommends: python3-lldb
%description -n lldb
LLDB is a next generation, high-performance debugger. It is built as a set
of reusable components which highly leverage existing libraries in the
larger LLVM Project, such as the Clang expression parser and LLVM
disassembler.
This package is a dummy package that depends on the version of
lldb that openSUSE currently supports. Packages that
don't require a specific LLDB version should depend on this.
%package -n lldb-devel
Summary: Development files for LLDB
Group: Development/Libraries/C and C++
Requires: lldb%{_sonum}-devel
%obsolete_llvm_versioned lldb devel
%description -n lldb-devel
This package contains the development files for LLDB.
This package is a dummy package that depends on the version of
lldb-devel that openSUSE currently supports. Packages that
don't require a specific LLDB version should depend on this.
%package -n python3-clang
Summary: Python bindings for libclang
Group: Development/Libraries/Python
Requires: python3-clang%{_sonum}
%obsolete_llvm_versioned python3-clang
BuildArch: noarch
%description -n python3-clang
This package contains the Python bindings to clang (C language)
frontend for LLVM.
%package -n python3-lldb
Summary: Python bindings for liblldb
Group: Development/Libraries/Python
Requires: python3-lldb%{_sonum}
%obsolete_llvm_versioned python3-lldb
%description -n python3-lldb
This package contains the Python bindings to clang (C language) frontend for LLVM.
This package is a dummy package that depends on the version of
python3-lldb that openSUSE currently supports. Packages that
don't require a specific LLDB version should depend on this.
%package -n lld
Summary: Linker for Clang/LLVM
Group: Development/Tools/Building
URL: https://lld.llvm.org/
Requires: lld%{_sonum}
%description -n lld
LLD is a linker from the LLVM project. That is a drop-in replacement for
system linkers and runs much faster than them. It also provides features that
are useful for toolchain developers.
%package polly
Summary: LLVM Framework for High-Level Loop and Data-Locality Optimizations
Group: Development/Languages/Other
URL: https://polly.llvm.org/
Requires: llvm%{_sonum}-polly
%obsolete_llvm_versioned llvm polly
%description polly
Polly is a high-level loop and data-locality optimizer and optimization
infrastructure for LLVM. It uses an abstract mathematical representation based
on integer polyhedra to analyze and optimize the memory access pattern of a
program. Polly can currently perform classical loop transformations, especially
tiling and loop fusion to improve data-locality. It can also exploit OpenMP
level parallelism and expose SIMDization opportunities.
This package is a dummy package that depends on the version of
llvm-polly that openSUSE currently supports. Packages that
don't require a specific LLVM version should depend on this.
%package polly-devel
Summary: Development files for Polly
Group: Development/Libraries/C and C++
Requires: llvm%{_sonum}-polly-devel
Requires: llvm-polly = %{version}
%obsolete_llvm_versioned llvm polly-devel
%description polly-devel
This package contains the development files for Polly.
This package is a dummy package that depends on the version of
llvm-polly-devel that openSUSE currently supports. Packages that
don't require a specific LLVM version should depend on this.
%prep
# Not needed
%build
echo "This is a dummy package to provide a dependency on the system compiler." > README
%install
# Not needed
%files
%doc README
%files -n clang
%doc README
%files gold
%doc README
%files devel
%doc README
%files doc
%doc README
%files -n clang-devel
%doc README
%files -n clang-doc
%doc README
%files vim-plugins
%doc README
%files opt-viewer
%doc README
%if 0%{?has_lldb}
%files -n lldb
%doc README
%files -n lldb-devel
%doc README
%endif
%files -n python3-clang
%doc README
%if 0%{?has_lldb_python}
%files -n python3-lldb
%doc README
%endif
%files -n lld
%doc README
%files polly
%doc README
%files polly-devel
%doc README
%changelog