| |
@@ -24,10 +24,8 @@
|
| |
%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
| |
%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
| |
%global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
| |
- %ifnarch riscv64
|
| |
+ %ifarch riscv64
|
| |
# Disable LTO (ld.gold not supported on riscv64)
|
| |
- %global _lto_cflags -flto=thin
|
| |
- %else
|
| |
%global _lto_cflags %{nil}
|
| |
%endif
|
| |
|
| |
@@ -80,7 +78,7 @@
|
| |
|
| |
Name: %{pkg_name}
|
| |
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
|
| |
- Release: 8%{?dist}
|
| |
+ Release: 9%{?dist}
|
| |
Summary: The Low Level Virtual Machine
|
| |
|
| |
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
| |
@@ -160,9 +158,8 @@
|
| |
# but this caused bugs (rhbz#1773678) and forced us to carry two non-upstream
|
| |
# patches.
|
| |
Requires: %{name}-static%{?_isa} = %{version}-%{release}
|
| |
- %if %{without compat_build}
|
| |
Requires: %{name}-test%{?_isa} = %{version}-%{release}
|
| |
- %endif
|
| |
+ Requires: %{name}-googletest%{?_isa} = %{version}-%{release}
|
| |
|
| |
|
| |
Requires(post): %{_sbindir}/alternatives
|
| |
@@ -207,8 +204,6 @@
|
| |
CMake utilities shared across LLVM subprojects.
|
| |
This is for internal use by LLVM packages only.
|
| |
|
| |
- %if %{without compat_build}
|
| |
-
|
| |
%package test
|
| |
Summary: LLVM regression tests
|
| |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
@@ -225,8 +220,6 @@
|
| |
%description googletest
|
| |
LLVM's modified googletest sources.
|
| |
|
| |
- %endif
|
| |
-
|
| |
%prep
|
| |
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
| |
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3}' --data='%{SOURCE2}'
|
| |
@@ -257,7 +250,7 @@
|
| |
%endif
|
| |
|
| |
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
| |
- export ASMFLAGS=$CFLAGS
|
| |
+ export ASMFLAGS="%{build_cflags}"
|
| |
|
| |
# force off shared libs as cmake macros turns it on.
|
| |
%cmake -G Ninja \
|
| |
@@ -295,33 +288,23 @@
|
| |
\
|
| |
-DLLVM_INCLUDE_TESTS:BOOL=ON \
|
| |
-DLLVM_BUILD_TESTS:BOOL=ON \
|
| |
- %if %{with compat_build}
|
| |
- -DLLVM_INSTALL_GTEST:BOOL=OFF \
|
| |
- %else
|
| |
-DLLVM_INSTALL_GTEST:BOOL=ON \
|
| |
- %endif
|
| |
-DLLVM_LIT_ARGS=-v \
|
| |
\
|
| |
-DLLVM_INCLUDE_EXAMPLES:BOOL=ON \
|
| |
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
|
| |
\
|
| |
-DLLVM_INCLUDE_UTILS:BOOL=ON \
|
| |
- %if %{with compat_build}
|
| |
- -DLLVM_INSTALL_UTILS:BOOL=OFF \
|
| |
- %else
|
| |
-DLLVM_INSTALL_UTILS:BOOL=ON \
|
| |
- -DLLVM_UTILS_INSTALL_DIR:PATH=%{_bindir} \
|
| |
+ -DLLVM_UTILS_INSTALL_DIR:PATH=bin \
|
| |
-DLLVM_TOOLS_INSTALL_DIR:PATH=bin \
|
| |
- %endif
|
| |
\
|
| |
-DLLVM_INCLUDE_DOCS:BOOL=ON \
|
| |
-DLLVM_BUILD_DOCS:BOOL=ON \
|
| |
-DLLVM_ENABLE_SPHINX:BOOL=ON \
|
| |
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
|
| |
\
|
| |
- %if %{without compat_build}
|
| |
-DLLVM_VERSION_SUFFIX='' \
|
| |
- %endif
|
| |
-DLLVM_UNREACHABLE_OPTIMIZE:BOOL=OFF \
|
| |
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
|
| |
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
| |
@@ -348,29 +331,33 @@
|
| |
|
| |
mkdir -p %{buildroot}/%{_bindir}
|
| |
|
| |
- %if %{without compat_build}
|
| |
-
|
| |
- # Fix some man pages
|
| |
- ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1
|
| |
-
|
| |
# Install binaries needed for lit tests
|
| |
%global test_binaries llvm-isel-fuzzer llvm-opt-fuzzer
|
| |
|
| |
for f in %{test_binaries}
|
| |
do
|
| |
- install -m 0755 %{_vpath_builddir}/bin/$f %{buildroot}%{_bindir}
|
| |
+ install -m 0755 %{_vpath_builddir}/bin/$f %{buildroot}%{install_bindir}
|
| |
done
|
| |
|
| |
# Remove testing of update utility tools
|
| |
rm -rf test/tools/UpdateTestChecks
|
| |
|
| |
- %multilib_fix_c_header --file %{_includedir}/llvm/Config/llvm-config.h
|
| |
-
|
| |
# Install libraries needed for unittests
|
| |
+ %if %{without compat_build}
|
| |
%global build_libdir %{_vpath_builddir}/%{_lib}
|
| |
+ %else
|
| |
+ %global build_libdir %{_vpath_builddir}/lib
|
| |
+ %endif
|
| |
+
|
| |
+ install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{install_libdir}
|
| |
+
|
| |
+ # Fix multi-lib
|
| |
+ %multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h
|
| |
+
|
| |
+ %if %{without compat_build}
|
| |
|
| |
- install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir}
|
| |
- install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{_libdir}
|
| |
+ # Fix some man pages
|
| |
+ ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1
|
| |
|
| |
%if %{with gold}
|
| |
# Add symlink to lto plugin in the binutils plugin directory.
|
| |
@@ -386,17 +373,9 @@
|
| |
ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
|
| |
done
|
| |
|
| |
- # Move header files
|
| |
- mkdir -p %{buildroot}/%{pkg_includedir}
|
| |
- ln -s ../../../%{install_includedir}/llvm %{buildroot}/%{pkg_includedir}/llvm
|
| |
- ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-c
|
| |
-
|
| |
- # Fix multi-lib
|
| |
- %multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h
|
| |
-
|
| |
# Create ld.so.conf.d entry
|
| |
- mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
| |
- cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
|
| |
+ mkdir -p %{buildroot}/etc/ld.so.conf.d
|
| |
+ cat >> %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
|
| |
%{install_libdir}
|
| |
EOF
|
| |
|
| |
@@ -407,9 +386,6 @@
|
| |
mv $f %{buildroot}%{_mandir}/man1/$filename%{exec_suffix}.1
|
| |
done
|
| |
|
| |
- # Remove opt-viewer, since this is just a compatibility package.
|
| |
- rm -Rf %{build_install_prefix}/share/opt-viewer
|
| |
-
|
| |
%endif
|
| |
|
| |
# llvm-config special casing. llvm-config is managed by update-alternatives.
|
| |
@@ -474,59 +450,72 @@
|
| |
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
|
| |
%if %{without compat_build}
|
| |
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
|
| |
+
|
| |
+ # During the upgrade from LLVM 16 (F38) to LLVM 17 (F39), we found out the
|
| |
+ # main llvm-devel package was leaving entries in the alternatives system.
|
| |
+ # Try to remove them now.
|
| |
+ for v in 14 15 16; do
|
| |
+ if [[ -e %{_bindir}/llvm-config-$v
|
| |
+ && "x$(%{_bindir}/llvm-config-$v --version | awk -F . '{ print $1 }')" != "x$v" ]]; then
|
| |
+ %{_sbindir}/update-alternatives --remove llvm-config-$v %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
| |
+ fi
|
| |
+ done
|
| |
%endif
|
| |
|
| |
%postun devel
|
| |
if [ $1 -eq 0 ]; then
|
| |
%{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
| |
+ fi
|
| |
%if %{without compat_build}
|
| |
+ # When upgrading between minor versions (i.e. from x.y.1 to x.y.2), we must
|
| |
+ # not remove the alternative.
|
| |
+ # However, during a major version upgrade (i.e. from 16.x.y to 17.z.w), the
|
| |
+ # alternative must be removed in order to give priority to a newly installed
|
| |
+ # compat package.
|
| |
+ if [[ $1 -eq 0
|
| |
+ || "x$(%{_bindir}/llvm-config-%{maj_ver} --version | awk -F . '{ print $1 }')" != "x%{maj_ver}" ]]; then
|
| |
%{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
| |
- %endif
|
| |
fi
|
| |
+ %endif
|
| |
|
| |
%files
|
| |
%license LICENSE.TXT
|
| |
%exclude %{_mandir}/man1/llvm-config*
|
| |
%{_mandir}/man1/*
|
| |
- %{_bindir}/*
|
| |
+ %{install_bindir}/*
|
| |
+ %if %{with compat_build}
|
| |
+ # This is for all the binaries with the version suffix.
|
| |
+ %{_bindir}/*%{exec_suffix}
|
| |
+ %endif
|
| |
|
| |
%exclude %{_bindir}/llvm-config%{exec_suffix}
|
| |
%exclude %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
| |
|
| |
- %if %{without compat_build}
|
| |
%exclude %{_bindir}/llvm-config-%{maj_ver}
|
| |
%exclude %{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits}
|
| |
- %exclude %{_bindir}/not
|
| |
- %exclude %{_bindir}/count
|
| |
- %exclude %{_bindir}/yaml-bench
|
| |
- %exclude %{_bindir}/lli-child-target
|
| |
- %exclude %{_bindir}/llvm-isel-fuzzer
|
| |
- %exclude %{_bindir}/llvm-opt-fuzzer
|
| |
- %{_datadir}/opt-viewer
|
| |
- %else
|
| |
- %{install_bindir}
|
| |
- %endif
|
| |
+ %exclude %{install_bindir}/not
|
| |
+ %exclude %{install_bindir}/count
|
| |
+ %exclude %{install_bindir}/yaml-bench
|
| |
+ %exclude %{install_bindir}/lli-child-target
|
| |
+ %exclude %{install_bindir}/llvm-isel-fuzzer
|
| |
+ %exclude %{install_bindir}/llvm-opt-fuzzer
|
| |
+ %{pkg_datadir}/opt-viewer
|
| |
|
| |
%files libs
|
| |
%license LICENSE.TXT
|
| |
- %{install_libdir}/libLLVM-%{maj_ver}.so
|
| |
- %if %{without compat_build}
|
| |
+ %{install_libdir}/libLLVM-%{maj_ver}%{?llvm_snapshot_version_suffix:%{llvm_snapshot_version_suffix}}.so
|
| |
%if %{with gold}
|
| |
- %{_libdir}/LLVMgold.so
|
| |
+ %{install_libdir}/LLVMgold.so
|
| |
+ %if %{without compat_build}
|
| |
%{_libdir}/bfd-plugins/LLVMgold.so
|
| |
%endif
|
| |
- %{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
|
| |
- %{_libdir}/libLTO.so*
|
| |
- %else
|
| |
- %config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
|
| |
- %if %{with gold}
|
| |
- %{_libdir}/%{name}/lib/LLVMgold.so
|
| |
%endif
|
| |
%{install_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
|
| |
%{install_libdir}/libLTO.so*
|
| |
- %exclude %{install_libdir}/libLTO.so
|
| |
- %endif
|
| |
%{install_libdir}/libRemarks.so*
|
| |
+ %if %{with compat_build}
|
| |
+ %config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
| |
+ %endif
|
| |
|
| |
%files devel
|
| |
%license LICENSE.TXT
|
| |
@@ -539,14 +528,8 @@
|
| |
%{install_includedir}/llvm-c
|
| |
%{install_libdir}/libLLVM.so
|
| |
%{install_libdir}/cmake/llvm
|
| |
- %if %{without compat_build}
|
| |
%{install_bindir}/llvm-config-%{maj_ver}-%{__isa_bits}
|
| |
%ghost %{_bindir}/llvm-config-%{maj_ver}
|
| |
- %else
|
| |
- %{pkg_includedir}/llvm
|
| |
- %{pkg_includedir}/llvm-c
|
| |
- %{install_libdir}/libLTO.so
|
| |
- %endif
|
| |
|
| |
%files doc
|
| |
%license LICENSE.TXT
|
| |
@@ -555,27 +538,23 @@
|
| |
%files static
|
| |
%license LICENSE.TXT
|
| |
%{install_libdir}/*.a
|
| |
- %if %{without compat_build}
|
| |
%exclude %{install_libdir}/libLLVMTestingSupport.a
|
| |
%exclude %{install_libdir}/libLLVMTestingAnnotations.a
|
| |
%exclude %{install_libdir}/libllvm_gtest.a
|
| |
%exclude %{install_libdir}/libllvm_gtest_main.a
|
| |
- %endif
|
| |
|
| |
%files cmake-utils
|
| |
%license LICENSE.TXT
|
| |
%{pkg_datadir}/llvm/cmake
|
| |
|
| |
- %if %{without compat_build}
|
| |
-
|
| |
%files test
|
| |
%license LICENSE.TXT
|
| |
- %{_bindir}/not
|
| |
- %{_bindir}/count
|
| |
- %{_bindir}/yaml-bench
|
| |
- %{_bindir}/lli-child-target
|
| |
- %{_bindir}/llvm-isel-fuzzer
|
| |
- %{_bindir}/llvm-opt-fuzzer
|
| |
+ %{install_bindir}/not
|
| |
+ %{install_bindir}/count
|
| |
+ %{install_bindir}/yaml-bench
|
| |
+ %{install_bindir}/lli-child-target
|
| |
+ %{install_bindir}/llvm-isel-fuzzer
|
| |
+ %{install_bindir}/llvm-opt-fuzzer
|
| |
|
| |
%files googletest
|
| |
%license LICENSE.TXT
|
| |
@@ -586,9 +565,11 @@
|
| |
%{install_includedir}/llvm-gtest
|
| |
%{install_includedir}/llvm-gmock
|
| |
|
| |
- %endif
|
| |
|
| |
%changelog
|
| |
+ * Thu May 02 2024 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.6-9
|
| |
+ - Start distributing the binaries. Fix rhbz#2277782
|
| |
+
|
| |
* Sat Mar 16 2024 David Abdurachmanov <davidlt@rivosinc.com> - 16.0.6-9
|
| |
- Add support for riscv64
|
| |
- Fix build error: '/usr/bin/ld: bad -plugin-opt option' on riscv64.
|
| |
This is a partial backport from llvm17 that let llvm16 distribute the
binaries. It also comes with other fixes that had already been applied
to llvm17 and were missing in llvm16.