Update to 19.1.5
- Enable LLVM_ENABLE_ZSTD (rhbz#2321848) - Remove HTML documentation - Add lldb man pages - Fix profiling after a binutils NOTE change (rhbz#2322754) - Install i386 config files on x86_64 Related: https://issues.redhat.com/browse/RHEL-68696
This commit is contained in:
parent
b9722f2d46
commit
10ede2a2dd
@ -1,41 +0,0 @@
|
||||
From d8742e9b361e5fd6fee2298b8ea0aeb4671ec05a Mon Sep 17 00:00:00 2001
|
||||
From: Nikita Popov <npopov@redhat.com>
|
||||
Date: Wed, 22 May 2024 09:39:26 +0200
|
||||
Subject: [PATCH] Remove myst_parser dependency for RHEL
|
||||
|
||||
---
|
||||
clang/docs/conf.py | 3 +--
|
||||
llvm/docs/conf.py | 3 +--
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/clang/docs/conf.py b/clang/docs/conf.py
|
||||
index 4cee382a718f..d2e2198e05d4 100644
|
||||
--- a/clang/docs/conf.py
|
||||
+++ b/clang/docs/conf.py
|
||||
@@ -43,8 +43,7 @@ try:
|
||||
|
||||
extensions.append("myst_parser")
|
||||
except ImportError:
|
||||
- if not tags.has("builder-man"):
|
||||
- raise
|
||||
+ pass
|
||||
|
||||
|
||||
# The encoding of source files.
|
||||
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
|
||||
index 7f2ed5309606..354a41f11280 100644
|
||||
--- a/llvm/docs/conf.py
|
||||
+++ b/llvm/docs/conf.py
|
||||
@@ -36,8 +36,7 @@ try:
|
||||
|
||||
extensions.append("myst_parser")
|
||||
except ImportError:
|
||||
- if not tags.has("builder-man"):
|
||||
- raise
|
||||
+ pass
|
||||
|
||||
# Automatic anchors for markdown titles
|
||||
from llvm_slug import make_slug
|
||||
--
|
||||
2.44.0
|
||||
|
@ -1,43 +0,0 @@
|
||||
From 50cd36c2156d375a6d50f661908b460fbbd22e78 Mon Sep 17 00:00:00 2001
|
||||
From: Nikita Popov <npopov@redhat.com>
|
||||
Date: Wed, 22 May 2024 09:39:26 +0200
|
||||
Subject: [PATCH] Remove myst_parser dependency for RHEL
|
||||
|
||||
---
|
||||
clang/docs/conf.py | 3 +--
|
||||
llvm/docs/conf.py | 5 +----
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/clang/docs/conf.py b/clang/docs/conf.py
|
||||
index 4cee382a718f..d2e2198e05d4 100644
|
||||
--- a/clang/docs/conf.py
|
||||
+++ b/clang/docs/conf.py
|
||||
@@ -43,8 +43,7 @@ try:
|
||||
|
||||
extensions.append("myst_parser")
|
||||
except ImportError:
|
||||
- if not tags.has("builder-man"):
|
||||
- raise
|
||||
+ pass
|
||||
|
||||
|
||||
# The encoding of source files.
|
||||
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
|
||||
index d9fa6961032b..e38c009a457d 100644
|
||||
--- a/llvm/docs/conf.py
|
||||
+++ b/llvm/docs/conf.py
|
||||
@@ -36,10 +36,7 @@ try:
|
||||
|
||||
extensions.append("myst_parser")
|
||||
except ImportError:
|
||||
- if not tags.has("builder-man"):
|
||||
- raise
|
||||
-else:
|
||||
- myst_enable_extensions = ["substitution"]
|
||||
+ pass
|
||||
|
||||
# Automatic anchors for markdown titles
|
||||
myst_heading_anchors = 6
|
||||
--
|
||||
2.46.0
|
||||
|
@ -0,0 +1,86 @@
|
||||
From ccc2b792e57d632bc887b226a4e7f0a8189eab8b Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Mon, 4 Nov 2024 16:37:49 -0800
|
||||
Subject: [PATCH] [profile] Use base+vaddr for `__llvm_write_binary_ids` note
|
||||
pointers
|
||||
|
||||
This function is always examining its own ELF headers in memory, but it
|
||||
was trying to use conditions between examining files or memory, and it
|
||||
wasn't accounting for LOAD offsets at runtime. This is especially bad if
|
||||
a loaded segment has additional padding that's not in the file offsets.
|
||||
|
||||
Now we do a first scan of the program headers to figure out the runtime
|
||||
base address based on `PT_PHDR` and/or `PT_DYNAMIC` (else assume zero),
|
||||
similar to libc's `do_start`. Then each `PT_NOTE` pointer is simply the
|
||||
base plus the segments's `pt_vaddr`, which includes LOAD offsets.
|
||||
|
||||
Fixes #114605
|
||||
---
|
||||
.../lib/profile/InstrProfilingPlatformLinux.c | 40 ++++++++-----------
|
||||
1 file changed, 16 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
|
||||
index e2c06d51e0c6..c365129a0768 100644
|
||||
--- a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
|
||||
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
|
||||
@@ -194,41 +194,33 @@ static int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note,
|
||||
*/
|
||||
COMPILER_RT_VISIBILITY int __llvm_write_binary_ids(ProfDataWriter *Writer) {
|
||||
extern const ElfW(Ehdr) __ehdr_start __attribute__((visibility("hidden")));
|
||||
+ extern ElfW(Dyn) _DYNAMIC[] __attribute__((weak, visibility("hidden")));
|
||||
+
|
||||
const ElfW(Ehdr) *ElfHeader = &__ehdr_start;
|
||||
const ElfW(Phdr) *ProgramHeader =
|
||||
(const ElfW(Phdr) *)((uintptr_t)ElfHeader + ElfHeader->e_phoff);
|
||||
|
||||
+ /* Compute the added base address in case of position-independent code. */
|
||||
+ uintptr_t Base = 0;
|
||||
+ for (uint32_t I = 0; I < ElfHeader->e_phnum; I++) {
|
||||
+ if (ProgramHeader[I].p_type == PT_PHDR)
|
||||
+ Base = (uintptr_t)ProgramHeader - ProgramHeader[I].p_vaddr;
|
||||
+ if (ProgramHeader[I].p_type == PT_DYNAMIC && _DYNAMIC)
|
||||
+ Base = (uintptr_t)_DYNAMIC - ProgramHeader[I].p_vaddr;
|
||||
+ }
|
||||
+
|
||||
int TotalBinaryIdsSize = 0;
|
||||
- uint32_t I;
|
||||
/* Iterate through entries in the program header. */
|
||||
- for (I = 0; I < ElfHeader->e_phnum; I++) {
|
||||
+ for (uint32_t I = 0; I < ElfHeader->e_phnum; I++) {
|
||||
/* Look for the notes segment in program header entries. */
|
||||
if (ProgramHeader[I].p_type != PT_NOTE)
|
||||
continue;
|
||||
|
||||
/* There can be multiple notes segment, and examine each of them. */
|
||||
- const ElfW(Nhdr) * Note;
|
||||
- const ElfW(Nhdr) * NotesEnd;
|
||||
- /*
|
||||
- * When examining notes in file, use p_offset, which is the offset within
|
||||
- * the elf file, to find the start of notes.
|
||||
- */
|
||||
- if (ProgramHeader[I].p_memsz == 0 ||
|
||||
- ProgramHeader[I].p_memsz == ProgramHeader[I].p_filesz) {
|
||||
- Note = (const ElfW(Nhdr) *)((uintptr_t)ElfHeader +
|
||||
- ProgramHeader[I].p_offset);
|
||||
- NotesEnd = (const ElfW(Nhdr) *)((const char *)(Note) +
|
||||
- ProgramHeader[I].p_filesz);
|
||||
- } else {
|
||||
- /*
|
||||
- * When examining notes in memory, use p_vaddr, which is the address of
|
||||
- * section after loaded to memory, to find the start of notes.
|
||||
- */
|
||||
- Note =
|
||||
- (const ElfW(Nhdr) *)((uintptr_t)ElfHeader + ProgramHeader[I].p_vaddr);
|
||||
- NotesEnd =
|
||||
- (const ElfW(Nhdr) *)((const char *)(Note) + ProgramHeader[I].p_memsz);
|
||||
- }
|
||||
+ const ElfW(Nhdr) *Note =
|
||||
+ (const ElfW(Nhdr) *)(Base + ProgramHeader[I].p_vaddr);
|
||||
+ const ElfW(Nhdr) *NotesEnd =
|
||||
+ (const ElfW(Nhdr) *)((const char *)(Note) + ProgramHeader[I].p_memsz);
|
||||
|
||||
int BinaryIdsSize = WriteBinaryIds(Writer, Note, NotesEnd);
|
||||
if (TotalBinaryIdsSize == -1)
|
||||
--
|
||||
2.47.0
|
||||
|
125
Makefile
125
Makefile
@ -1,12 +1,17 @@
|
||||
.DEFAULT_GOAL=help
|
||||
|
||||
# See ~/.config/mock/<CONFIG>.cfg or /etc/mock/<CONFIG>.cfg
|
||||
# Tweak this to centos-stream-9-x86_64 to build for CentOS
|
||||
MOCK_CHROOT?=fedora-rawhide-x86_64
|
||||
MOCK_OPTS_RELEASE=--no-clean --no-cleanup-after
|
||||
MOCK_OPTS_SNAPSHOT=$(MOCK_OPTS_RELEASE) --with snapshot_build
|
||||
MOCK_OPTS?=
|
||||
MOCK_OPTS_RELEASE?=--no-clean --no-cleanup-after $(MOCK_OPTS)
|
||||
MOCK_OPTS_SNAPSHOT?=$(MOCK_OPTS_RELEASE) --with snapshot_build $(MOCK_OPTS)
|
||||
YYYYMMDD=$(shell date +%Y%m%d)
|
||||
SOURCEDIR=$(shell pwd)
|
||||
SPEC=llvm.spec
|
||||
FEDPKG_RELEASE=rawhide
|
||||
# When nothing is given, this will be determined based on
|
||||
# release or snapshot builds.
|
||||
SRPM_PATH?=
|
||||
|
||||
######### Get sources
|
||||
|
||||
@ -21,22 +26,30 @@ get-sources-snapshot:
|
||||
get-sources-release:
|
||||
spectool -g --define "_sourcedir $(SOURCEDIR)" $(SPEC)
|
||||
|
||||
######### Build/Clean SRPM
|
||||
|
||||
.PHONY: clean-srpm
|
||||
## Removes all *.src.rpm (aka SRPMs) from the current directory.
|
||||
clean-srpm:
|
||||
rm -fv $(SOURCEDIR)/*.src.rpm
|
||||
######### Build SRPM
|
||||
|
||||
.PHONY: srpm-release
|
||||
## Builds an SRPM that can be used for a release build.
|
||||
srpm-release: clean-srpm get-sources-release
|
||||
fedpkg --release $(FEDPKG_RELEASE) srpm
|
||||
srpm-release: get-sources-release
|
||||
rpmbuild \
|
||||
--define "_rpmdir $(SOURCEDIR)" \
|
||||
--define "_sourcedir $(SOURCEDIR)" \
|
||||
--define "_specdir $(SOURCEDIR)" \
|
||||
--define "_srcrpmdir $(SOURCEDIR)" \
|
||||
--define "_builddir $(SOURCEDIR)" \
|
||||
-bs $(SPEC)
|
||||
|
||||
.PHONY: srpm-snapshot
|
||||
## Builds an SRPM that can be used for a snapshot build.
|
||||
srpm-snapshot: clean-srpm get-sources-snapshot
|
||||
fedpkg --release $(FEDPKG_RELEASE) srpm -- --define "_with_snapshot_build 1"
|
||||
srpm-snapshot: get-sources-snapshot
|
||||
rpmbuild \
|
||||
--with=snapshot_build \
|
||||
--define "_rpmdir $(SOURCEDIR)" \
|
||||
--define "_sourcedir $(SOURCEDIR)" \
|
||||
--define "_specdir $(SOURCEDIR)" \
|
||||
--define "_srcrpmdir $(SOURCEDIR)" \
|
||||
--define "_builddir $(SOURCEDIR)" \
|
||||
-bs $(SPEC)
|
||||
|
||||
######### Scrub mock chroot and cache
|
||||
|
||||
@ -49,36 +62,36 @@ scrub-chroot:
|
||||
|
||||
.PHONY: mockbuild-release
|
||||
## Start a mock build of the release SRPM.
|
||||
mockbuild-release: srpm-release
|
||||
mock -r $(MOCK_CHROOT) $(MOCK_OPTS_RELEASE) -N *.src.rpm
|
||||
mockbuild-release: srpm-release get-srpm-release
|
||||
mock -r $(MOCK_CHROOT) $(MOCK_OPTS_RELEASE) $(srpm_path)
|
||||
|
||||
.PHONY: mockbuild-snapshot
|
||||
## Start a mock build of the snapshot SRPM.
|
||||
mockbuild-snapshot: srpm-snapshot
|
||||
mock -r $(MOCK_CHROOT) $(MOCK_OPTS_SNAPSHOT) -N *.src.rpm
|
||||
mockbuild-snapshot: srpm-snapshot get-srpm-snapshot
|
||||
mock -r $(MOCK_CHROOT) $(MOCK_OPTS_SNAPSHOT) $(srpm_path)
|
||||
|
||||
######### Edit-last-failing-script
|
||||
|
||||
.PHONY: get-last-run-script
|
||||
## Get the file that was last modified in /var/tmp/ within the chroot.
|
||||
get-last-run-script:
|
||||
$(eval last_run_script:=/var/tmp/$(shell ls -t1 /var/lib/mock/$(MOCK_CHROOT)/root/var/tmp | head -n1))
|
||||
$(info last_run_script=$(last_run_script))
|
||||
@echo > /dev/null
|
||||
|
||||
.PHONY: edit-last-failing-script
|
||||
## Opens the last failing or running script from mock in your editor
|
||||
## of choice for you to edit it and later re-run it in mock with:
|
||||
## "make mockbuild-rerun-last-script-...".
|
||||
edit-last-failing-script:
|
||||
$$EDITOR /var/lib/mock/$(MOCK_CHROOT)/root/var/tmp/rpm-tmp.*
|
||||
## "make mockbuild-rerun-last-script".
|
||||
edit-last-failing-script: get-last-run-script
|
||||
$$EDITOR /var/lib/mock/$(MOCK_CHROOT)/root$(last_run_script)
|
||||
|
||||
######### Re-run the last failing script from mock
|
||||
######### This is particularly useful when you have
|
||||
|
||||
.PHONY: mockbuild-rerun-last-script-release
|
||||
## Re-runs the last failing or running script of your release mockbuild.
|
||||
mockbuild-rerun-last-script-release:
|
||||
mock --root=$(MOCK_CHROOT) $(MOCK_OPTS_RELEASE) --shell 'sh -e /var/tmp/rpm-tmp.*'
|
||||
|
||||
.PHONY: mockbuild-rerun-last-script-snapshot
|
||||
## Re-runs the last failing or running script of your snapshot mockbuild.
|
||||
## We have multiple flavors of this recipe.
|
||||
mockbuild-rerun-last-script-snapshot:
|
||||
mock --root=$(MOCK_CHROOT) $(MOCK_OPTS_SNAPSHOT) --shell 'sh -e /var/tmp/rpm-tmp.*'
|
||||
.PHONY: mockbuild-rerun-last-script
|
||||
## Re-runs the last failing or running script of your release/mock mockbuild.
|
||||
mockbuild-rerun-last-script: get-last-run-script
|
||||
mock --root=$(MOCK_CHROOT) --shell 'sh -e $(last_run_script)'
|
||||
|
||||
.PHONY: help
|
||||
# Based on https://gist.github.com/rcmachado/af3db315e31383502660
|
||||
@ -107,6 +120,7 @@ help:/
|
||||
} \
|
||||
}' $(MAKEFILE_LIST)
|
||||
|
||||
######### Deprecated targets
|
||||
|
||||
# Map deprecated targets to new targets
|
||||
.PHONY: snapshot-srpm release-srpm
|
||||
@ -115,3 +129,52 @@ snapshot-srpm release-srpm:
|
||||
$(eval mapped_target:=$(subst release-srpm,srpm-release,$(mapped_target)))
|
||||
$(info WARNING: "$(MAKECMDGOALS)" is deprecated. Instead running "$(mapped_target)")
|
||||
$(MAKE) $(mapped_target)
|
||||
|
||||
######### Version/Release helper targets to build name of SRPM
|
||||
|
||||
.PHONY: get-llvm-version-release
|
||||
## Determines the LLVM version given in the llvm.spec file.
|
||||
get-llvm-version-release:
|
||||
$(eval llvm_version_release:=$(shell grep -ioP "%global\s+(maj|min|patch)_ver[^0-9]\K[0-9]+" $(SPEC) | paste -sd'.'))
|
||||
$(info LLVM Release Version: $(llvm_version_release))
|
||||
@echo > /dev/null
|
||||
|
||||
.PHONY: get-llvm-version-snapshot
|
||||
## Determines the LLVM version given in the version.spec.inc file.
|
||||
get-llvm-version-snapshot:
|
||||
$(eval llvm_version_snapshot:=$(shell grep -ioP "%global\s+(maj|min|patch)_ver[^0-9]\K[0-9]+" version.spec.inc | paste -sd'.'))
|
||||
$(info LLVM Snapshot Version: $(llvm_version_snapshot))
|
||||
@echo > /dev/null
|
||||
|
||||
.PHONY: get-spec-file-release
|
||||
## Parses the spec file for the Release: tag
|
||||
get-spec-file-release:
|
||||
$(eval spec_file_release:=$(shell grep -ioP '^Release:\s*\K[0-9]+' $(SPEC)))
|
||||
$(info LLVM Spec file Release: $(spec_file_release))
|
||||
@echo > /dev/null
|
||||
|
||||
.PHONY: get-srpm-release
|
||||
## Determines the name of the SRPM used for release builds
|
||||
## Can be overriden by giving "make ... SRPM_PATH=foo.src.rpm".
|
||||
get-srpm-release: get-llvm-version-release get-spec-file-release
|
||||
ifeq ($(SRPM_PATH),)
|
||||
$(eval srpm_path:=llvm-$(llvm_version_release)-$(spec_file_release).*.src.rpm)
|
||||
else
|
||||
$(eval srpm_path:=$(SRPM_PATH))
|
||||
endif
|
||||
$(info LLVM SRPM Release: $(srpm_path))
|
||||
@echo > /dev/null
|
||||
|
||||
.PHONY: get-srpm-snapshot
|
||||
## Determines the name of the SRPM used for snapshot builds
|
||||
## Can be overriden by giving "make ... SRPM_PATH=foo.src.rpm".
|
||||
get-srpm-snapshot: get-llvm-version-snapshot get-spec-file-release
|
||||
ifeq ($(SRPM_PATH),)
|
||||
$(eval yyyymmdd:=$(shell grep -ioP "%global\s+llvm_snapshot_yyyymmdd\s+\K[0-9]+" version.spec.inc))
|
||||
$(eval git_short:=$(shell grep -ioP "%global\s+llvm_snapshot_git_revision_short\s+\K[a-zA-Z0-9]+" version.spec.inc))
|
||||
$(eval srpm_path:=llvm-$(llvm_version_snapshot)~pre$(yyyymmdd).g$(git_short)-$(spec_file_release).*.src.rpm)
|
||||
else
|
||||
$(eval srpm_path:=$(SRPM_PATH))
|
||||
endif
|
||||
$(info LLVM SRPM Snapshot: $(srpm_path))
|
||||
@echo > /dev/null
|
||||
|
144
llvm.spec
144
llvm.spec
@ -2,7 +2,7 @@
|
||||
#region version
|
||||
%global maj_ver 19
|
||||
%global min_ver 1
|
||||
%global patch_ver 3
|
||||
%global patch_ver 5
|
||||
#global rc_ver 4
|
||||
|
||||
%bcond_with snapshot_build
|
||||
@ -261,13 +261,6 @@ Patch2000: 0001-19-Always-build-shared-libs-for-LLD.patch
|
||||
#endregion LLD patches
|
||||
|
||||
#region RHEL patches
|
||||
# All RHEL
|
||||
%if %{maj_ver} >= 20
|
||||
Patch500: 0001-20-Remove-myst_parser-dependency-for-RHEL.patch
|
||||
%else
|
||||
Patch500: 0001-19-Remove-myst_parser-dependency-for-RHEL.patch
|
||||
%endif
|
||||
|
||||
# RHEL 8 only
|
||||
Patch501: 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch
|
||||
#endregion RHEL patches
|
||||
@ -277,6 +270,11 @@ Patch501: 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch
|
||||
# Fixes RHEL-49517.
|
||||
Patch1801: 18-99273.patch
|
||||
|
||||
# Fix profiling after a binutils NOTE change.
|
||||
# https://github.com/llvm/llvm-project/pull/114907
|
||||
Patch1802: 0001-profile-Use-base-vaddr-for-__llvm_write_binary_ids-n.patch
|
||||
Patch1903: 0001-profile-Use-base-vaddr-for-__llvm_write_binary_ids-n.patch
|
||||
|
||||
%if 0%{?rhel} == 8
|
||||
%global python3_pkgversion 3.12
|
||||
%global __python3 /usr/bin/python3.12
|
||||
@ -293,6 +291,7 @@ BuildRequires: cmake
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libzstd-devel
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: ncurses-devel
|
||||
# This intentionally does not use python3_pkgversion. RHEL 8 does not have
|
||||
@ -311,8 +310,10 @@ BuildRequires: python%{python3_pkgversion}-myst-parser
|
||||
BuildRequires: multilib-rpm-config
|
||||
%if %{with gold}
|
||||
BuildRequires: binutils-devel
|
||||
%if %{undefined rhel} || 0%{?rhel} > 8
|
||||
BuildRequires: binutils-gold
|
||||
%endif
|
||||
%endif
|
||||
%ifarch %{valgrind_arches}
|
||||
# Enable extra functionality when run the LLVM JIT under valgrind.
|
||||
BuildRequires: valgrind-devel
|
||||
@ -370,7 +371,7 @@ BuildRequires: procps-ng
|
||||
# For reproducible pyc file generation
|
||||
# See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility
|
||||
# Since Fedora 41 this happens automatically, and RHEL 8 does not support this.
|
||||
%if (%{defined fedora} && 0%{?fedora} < 41) || 0%{?rhel} == 9 || 0%{?rhel} == 10
|
||||
%if %{without compat_build} && ((%{defined fedora} && 0%{?fedora} < 41) || 0%{?rhel} == 9 || 0%{?rhel} == 10)
|
||||
BuildRequires: /usr/bin/marshalparser
|
||||
%global py_reproducible_pyc_path %{buildroot}%{python3_sitelib}
|
||||
%endif
|
||||
@ -647,6 +648,7 @@ Summary: OpenMP runtime for clang
|
||||
|
||||
URL: http://openmp.llvm.org
|
||||
|
||||
Requires: %{pkg_name_llvm}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: elfutils-libelf%{?_isa}
|
||||
|
||||
Provides: libomp(major) = %{maj_ver}
|
||||
@ -795,13 +797,9 @@ The package contains the LLDB Python module.
|
||||
# automatically apply patches based on LLVM version
|
||||
%autopatch -m%{maj_ver}00 -M%{maj_ver}99 -p1
|
||||
|
||||
%if %{defined rhel}
|
||||
%patch -p1 -P500
|
||||
|
||||
%if %{rhel} == 8
|
||||
%if %{defined rhel} && 0%{?rhel} == 8
|
||||
%patch -p1 -P501
|
||||
%endif
|
||||
%endif
|
||||
|
||||
#region LLVM preparation
|
||||
|
||||
@ -836,10 +834,6 @@ The package contains the LLDB Python module.
|
||||
|
||||
#endregion COMPILER-RT preparation
|
||||
|
||||
#region LLDB preparation
|
||||
# Empty lldb/docs/CMakeLists.txt because we cannot build it
|
||||
echo "" > lldb/docs/CMakeLists.txt
|
||||
#endregion LLDB preparation
|
||||
#endregion prep
|
||||
|
||||
#region build
|
||||
@ -891,7 +885,18 @@ popd
|
||||
%endif
|
||||
|
||||
#region cmake options
|
||||
%global cmake_config_args ""
|
||||
|
||||
# Common cmake arguments used by both the normal build and bundle_compat_lib.
|
||||
# Any ABI-affecting flags should be in here.
|
||||
%global cmake_common_args \\\
|
||||
-DLLVM_ENABLE_EH=ON \\\
|
||||
-DLLVM_ENABLE_RTTI=ON \\\
|
||||
-DLLVM_USE_PERF=ON \\\
|
||||
-DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \\\
|
||||
-DBUILD_SHARED_LIBS=OFF \\\
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON
|
||||
|
||||
%global cmake_config_args %{cmake_common_args}
|
||||
|
||||
#region clang options
|
||||
%global cmake_config_args %{cmake_config_args} \\\
|
||||
@ -921,14 +926,20 @@ popd
|
||||
#endregion compiler-rt options
|
||||
|
||||
#region docs options
|
||||
|
||||
# Add all *enabled* documentation targets (no doxygen but sphinx)
|
||||
%global cmake_config_args %{cmake_config_args} \\\
|
||||
-DLLVM_BUILD_DOCS:BOOL=ON \\\
|
||||
-DLLVM_ENABLE_SPHINX:BOOL=ON \\\
|
||||
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \\\
|
||||
-DSPHINX_WARNINGS_AS_ERRORS=OFF \\\
|
||||
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \\\
|
||||
-DLLVM_INCLUDE_DOCS:BOOL=ON \\\
|
||||
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html
|
||||
-DLLVM_ENABLE_SPHINX:BOOL=ON \\\
|
||||
-DLLVM_BUILD_DOCS:BOOL=ON
|
||||
|
||||
# Configure sphinx:
|
||||
# Build man-pages but no HTML docs using sphinx
|
||||
%global cmake_config_args %{cmake_config_args} \\\
|
||||
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \\\
|
||||
-DSPHINX_OUTPUT_HTML:BOOL=OFF \\\
|
||||
-DSPHINX_OUTPUT_MAN:BOOL=ON \\\
|
||||
-DSPHINX_WARNINGS_AS_ERRORS=OFF
|
||||
#endregion docs options
|
||||
|
||||
#region lldb options
|
||||
@ -952,21 +963,20 @@ popd
|
||||
-DLLVM_APPEND_VC_REV:BOOL=OFF \\\
|
||||
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \\\
|
||||
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \\\
|
||||
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \\\
|
||||
-DLLVM_BUILD_RUNTIME:BOOL=ON \\\
|
||||
-DLLVM_BUILD_TOOLS:BOOL=ON \\\
|
||||
-DLLVM_BUILD_UTILS:BOOL=ON \\\
|
||||
-DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \\\
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE=%{llvm_triple} \\\
|
||||
-DLLVM_DYLIB_COMPONENTS="all" \\\
|
||||
-DLLVM_ENABLE_EH=ON \\\
|
||||
-DLLVM_ENABLE_FFI:BOOL=ON \\\
|
||||
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \\\
|
||||
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \\\
|
||||
-DLLVM_ENABLE_PROJECTS="%{projects}" \\\
|
||||
-DLLVM_ENABLE_RTTI:BOOL=ON \\\
|
||||
-DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp;offload" \\\
|
||||
-DLLVM_ENABLE_ZLIB:BOOL=ON \\\
|
||||
-DLLVM_ENABLE_ZLIB:BOOL=FORCE_ON \\\
|
||||
-DLLVM_ENABLE_ZSTD:BOOL=FORCE_ON \\\
|
||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \\\
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \\\
|
||||
-DLLVM_INCLUDE_EXAMPLES:BOOL=ON \\\
|
||||
@ -976,10 +986,8 @@ popd
|
||||
-DLLVM_INSTALL_UTILS:BOOL=ON \\\
|
||||
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \\\
|
||||
-DLLVM_PARALLEL_LINK_JOBS=1 \\\
|
||||
-DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \\\
|
||||
-DLLVM_TOOLS_INSTALL_DIR:PATH=bin \\\
|
||||
-DLLVM_UNREACHABLE_OPTIMIZE:BOOL=OFF \\\
|
||||
-DLLVM_USE_PERF:BOOL=ON \\\
|
||||
-DLLVM_UTILS_INSTALL_DIR:PATH=bin
|
||||
#endregion llvm options
|
||||
|
||||
@ -1007,7 +1015,6 @@ popd
|
||||
|
||||
#region misc options
|
||||
%global cmake_config_args %{cmake_config_args} \\\
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF \\\
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \\\
|
||||
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \\\
|
||||
-DENABLE_LINKER_BUILD_ID:BOOL=ON \\\
|
||||
@ -1099,14 +1106,10 @@ cd ..
|
||||
-DCMAKE_INSTALL_PREFIX=%{buildroot}%{_libdir}/llvm%{compat_maj_ver}/ \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
||||
-DLLVM_ENABLE_EH=ON \
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;lldb" \
|
||||
-DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
%{cmake_common_args}
|
||||
|
||||
%ninja_build -C ../llvm-compat-libs LLVM
|
||||
%ninja_build -C ../llvm-compat-libs libclang.so
|
||||
@ -1185,6 +1188,35 @@ done
|
||||
mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake
|
||||
cp -Rv cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake
|
||||
|
||||
# Install a placeholder to redirect users of the formerly shipped
|
||||
# HTML documentation to the upstream HTML documentation.
|
||||
mkdir -pv %{buildroot}%{_pkgdocdir}/html
|
||||
cat <<EOF > %{buildroot}%{_pkgdocdir}/html/index.html
|
||||
<!doctype html>
|
||||
<html lang=en>
|
||||
<head>
|
||||
<title>LLVM %{maj_ver}.%{min_ver} documentation</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
LLVM %{maj_ver}.%{min_ver} Documentation
|
||||
</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://releases.llvm.org/%{maj_ver}.%{min_ver}.0/docs/index.html">
|
||||
Click here for the upstream documentation of LLVM %{maj_ver}.%{min_ver}.
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://llvm.org/docs/">
|
||||
Click here for the latest upstream documentation of LLVM.
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
#endregion LLVM installation
|
||||
|
||||
#region CLANG installation
|
||||
@ -1262,9 +1294,7 @@ chmod a+x %{buildroot}%{install_datadir}/scan-view/{Reporter.py,startfile.py}
|
||||
rm -vf %{buildroot}%{install_datadir}/clang/clang-format-bbedit.applescript
|
||||
rm -vf %{buildroot}%{install_datadir}/clang/clang-format-sublime.py*
|
||||
|
||||
# TODO: Package html docs
|
||||
rm -Rvf %{buildroot}%{install_docdir}/LLVM/clang/html
|
||||
rm -Rvf %{buildroot}%{install_docdir}/LLVM/clang-tools/html
|
||||
# Remove unpackaged files
|
||||
rm -Rvf %{buildroot}%{install_datadir}/clang-doc/clang-doc-default-stylesheet.css
|
||||
rm -Rvf %{buildroot}%{install_datadir}/clang-doc/index.js
|
||||
|
||||
@ -1283,7 +1313,8 @@ echo "%%clang%{maj_ver}_resource_dir %%{_prefix}/lib/clang/%{maj_ver}" >> %{buil
|
||||
%if %{maj_ver} >=18
|
||||
%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux
|
||||
|
||||
%if %{defined rhel} && 0%{?rhel} < 10
|
||||
# We want to use DWARF-5 on all snapshot builds.
|
||||
%if %{without snapshot_build} && %{defined rhel} && 0%{?rhel} < 10
|
||||
%global cfg_file_content %{cfg_file_content} -gdwarf-4 -g0
|
||||
%endif
|
||||
|
||||
@ -1294,6 +1325,11 @@ echo "%%clang%{maj_ver}_resource_dir %%{_prefix}/lib/clang/%{maj_ver}" >> %{buil
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/
|
||||
echo " %{cfg_file_content}" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang.cfg
|
||||
echo " %{cfg_file_content}" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang++.cfg
|
||||
%ifarch x86_64
|
||||
# On x86_64, install an additional set of config files so -m32 works.
|
||||
echo " %{cfg_file_content}" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/i386-redhat-linux-gnu-clang.cfg
|
||||
echo " %{cfg_file_content}" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/i386-redhat-linux-gnu-clang++.cfg
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
@ -1347,9 +1383,6 @@ rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay
|
||||
|
||||
#region LLD installation
|
||||
|
||||
# Remove LLD's HTML documentation files
|
||||
rm -Rvf %{buildroot}%{install_docdir}/LLVM/lld/html
|
||||
|
||||
%if %{without compat_build}
|
||||
# Required when using update-alternatives:
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
|
||||
@ -1573,6 +1606,13 @@ test_list_filter_out+=("libomp :: worksharing/for/omp_collapse_one_int.c")
|
||||
test_list_filter_out+=("libomp :: flush/omp_flush.c")
|
||||
%endif
|
||||
|
||||
%ifarch aarch64 s390x
|
||||
# The following test has been failling intermittently on aarch64 and s390x.
|
||||
# Re-enable it after https://github.com/llvm/llvm-project/issues/117773
|
||||
# gets fixed.
|
||||
test_list_filter_out+=("libarcher :: races/taskwait-depend.c")
|
||||
%endif
|
||||
|
||||
# The following tests seem pass on ppc64le and x86_64 and aarch64 only:
|
||||
%ifnarch ppc64le x86_64 s390x aarch64
|
||||
# Passes on ppc64le:
|
||||
@ -2072,7 +2112,7 @@ fi
|
||||
|
||||
%files -n %{pkg_name_llvm}-doc
|
||||
%license llvm/LICENSE.TXT
|
||||
%doc %{_pkgdocdir}/html
|
||||
%doc %{_pkgdocdir}/html/index.html
|
||||
|
||||
%files -n %{pkg_name_llvm}-static
|
||||
%license llvm/LICENSE.TXT
|
||||
@ -2129,6 +2169,10 @@ fi
|
||||
%{install_bindir}/clang-cpp
|
||||
%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang.cfg
|
||||
%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang++.cfg
|
||||
%ifarch x86_64
|
||||
%{_sysconfdir}/%{pkg_name_clang}/i386-redhat-linux-gnu-clang.cfg
|
||||
%{_sysconfdir}/%{pkg_name_clang}/i386-redhat-linux-gnu-clang++.cfg
|
||||
%endif
|
||||
%{_mandir}/man1/clang-%{maj_ver}.1.gz
|
||||
%{_mandir}/man1/clang++-%{maj_ver}.1.gz
|
||||
%if %{without compat_build}
|
||||
@ -2445,6 +2489,8 @@ fi
|
||||
%{install_libdir}/liblldb*.so
|
||||
%{install_libdir}/liblldb.so.*
|
||||
%{install_libdir}/liblldbIntelFeatures.so.*
|
||||
%{_mandir}/man1/lldb-server%{exec_suffix}.1.gz
|
||||
%{_mandir}/man1/lldb%{exec_suffix}.1.gz
|
||||
%if %{with bundle_compat_lib}
|
||||
%{_libdir}/liblldb.so.%{compat_maj_ver}*
|
||||
%endif
|
||||
@ -2460,6 +2506,14 @@ fi
|
||||
|
||||
#region changelog
|
||||
%changelog
|
||||
* Wed Dec 04 2024 Konrad Kleine <kkleine@redhat.com> - 19.1.5-1
|
||||
- Update to 19.1.5
|
||||
- Enable LLVM_ENABLE_ZSTD (rhbz#2321848)
|
||||
- Remove HTML documentation
|
||||
- Add lldb man pages
|
||||
- Fix profiling after a binutils NOTE change (rhbz#2322754)
|
||||
- Install i386 config files on x86_64
|
||||
|
||||
* Sat Nov 09 2024 Konrad Kleine <kkleine@redhat.com> - 19.1.3-1
|
||||
- Update to 19.1.3
|
||||
|
||||
|
4
sources
4
sources
@ -1,4 +1,4 @@
|
||||
SHA512 (llvm-project-19.1.3.src.tar.xz) = 0abaf158b373892d5afc184158600df17a0797547ad7238ca9018d6fcdd7310b0db803d158daa82a2e04bd42d9daebaa2c3e4b9024c0fa2df72a88596575df5c
|
||||
SHA512 (llvm-project-19.1.3.src.tar.xz.sig) = 84ef22ee78dbaad4710becbcb02119d06063099f9102bb86f3cd44fbb7e2d87bafe239d8e0cbf22ab5a479f99a11a77125f22394d5006ed86262076ccbf1634d
|
||||
SHA512 (llvm-project-19.1.5.src.tar.xz) = 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22
|
||||
SHA512 (llvm-project-19.1.5.src.tar.xz.sig) = a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54
|
||||
SHA512 (llvm-project-18.1.8.src.tar.xz) = 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db
|
||||
SHA512 (llvm-project-18.1.8.src.tar.xz.sig) = ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b
|
||||
|
Loading…
Reference in New Issue
Block a user