import llvm-15.0.0-3.module+el8.8.0+17274+5f3a8c6c
This commit is contained in:
parent
0a9f2b0c38
commit
953f0a47c9
@ -64,9 +64,17 @@
|
||||
%global experimental_targets_to_build ""
|
||||
%global _smp_mflags -j8
|
||||
|
||||
%if 0%{?rhel} == 8
|
||||
%undefine __cmake_in_source_build
|
||||
|
||||
# libedit-devel is a buildroot-only package in RHEL8, so we can't have a
|
||||
# any run-time depencies on it.
|
||||
%global use_libedit 0
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} > 8
|
||||
%global use_libedit 1
|
||||
%endif
|
||||
|
||||
%else
|
||||
##########
|
||||
@ -80,9 +88,10 @@
|
||||
# Spec File
|
||||
################################################################################
|
||||
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: The Low Level Virtual Machine
|
||||
|
||||
License: NCSA
|
||||
@ -127,11 +136,13 @@ BuildRequires: libedit-devel
|
||||
%endif
|
||||
# Need pandoc to cover markdown to rst, because RHEL does not have recommonmark,
|
||||
# so we can't build the documentation as is.
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: pandoc
|
||||
%else
|
||||
%if !0%{?rhel}
|
||||
BuildRequires: python3-recommonmark
|
||||
%endif
|
||||
%if 0%{?rhel} == 8
|
||||
# RHEL8 has pandoc which we can use instead of python3-recommonmark for some things.
|
||||
BuildRequires: pandoc
|
||||
%endif
|
||||
# We need python3-devel for pathfix.py and %%py3_shebang_fix.
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
@ -221,20 +232,20 @@ Summary: LLVM's modified googletest sources
|
||||
%description googletest
|
||||
LLVM's modified googletest sources.
|
||||
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
%package toolset
|
||||
Summary: Package that installs llvm-toolset
|
||||
Requires: clang = %{version}
|
||||
Summary: Package that installs llvm-toolset
|
||||
Requires: clang = %{version}
|
||||
Requires: llvm = %{version}
|
||||
|
||||
Requires: llvm = %{version}
|
||||
%ifnarch s390x
|
||||
Requires: lld = %{version}
|
||||
Requires: lld = %{version}
|
||||
%endif
|
||||
|
||||
%description toolset
|
||||
This is the main package for llvm-toolset
|
||||
This is the main package for llvm-toolset.
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%prep
|
||||
@ -252,7 +263,7 @@ mv %{cmake_srcdir} cmake
|
||||
tools/opt-viewer/*.py \
|
||||
utils/update_cc_test_checks.py
|
||||
|
||||
%if 0%{?rhel}
|
||||
%if 0%{?rhel} == 8
|
||||
# Convert markdown files to rst to cope with the absence of compatible md parser in rhel.
|
||||
# The sed expression takes care of a slight difference between pandoc markdown and sphinx markdown.
|
||||
find -name '*.md' | while read md; do sed -r -e 's/^( )*\* /\n\1\* /' ${md} | pandoc -f markdown -o ${md%.md}.rst ; done
|
||||
@ -267,18 +278,13 @@ find -name '*.md' | while read md; do sed -r -e 's/^( )*\* /\n\1\* /' ${md} | pa
|
||||
%global _lto_cflags -flto=thin
|
||||
%endif
|
||||
|
||||
%ifarch s390 s390x %{arm} %ix86 ppc64le
|
||||
%ifarch s390 s390x %{arm} %ix86
|
||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||
# On ppc64le, this is done to reduce disk usage.
|
||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||
%endif
|
||||
|
||||
# Need to explicitly call set_build_flags if we want to update LDFLAGS
|
||||
%set_build_flags
|
||||
export LDFLAGS="${LDFLAGS} -Wl,--build-id=md5"
|
||||
|
||||
# force off shared libs as cmake macros turns it on.
|
||||
%cmake -G Ninja -S . -B %{_vpath_builddir} \
|
||||
%cmake -G Ninja \
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
@ -350,11 +356,11 @@ export LDFLAGS="${LDFLAGS} -Wl,--build-id=md5"
|
||||
# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there
|
||||
# are no other compile jobs running. This will help reduce OOM errors on the
|
||||
# builders without having to artificially limit the number of concurrent jobs.
|
||||
%ninja_build -C %{_vpath_builddir} LLVM
|
||||
%ninja_build -C %{_vpath_builddir}
|
||||
%cmake_build --target LLVM
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%ninja_install -C %{_vpath_builddir}
|
||||
%cmake_install
|
||||
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
|
||||
@ -407,7 +413,7 @@ ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so
|
||||
# Add version suffix to binaries
|
||||
for f in %{buildroot}/%{install_bindir}/*; do
|
||||
filename=`basename $f`
|
||||
ln -s ../../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
|
||||
ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
|
||||
done
|
||||
|
||||
# Move header files
|
||||
@ -535,7 +541,6 @@ fi
|
||||
%{_libdir}/bfd-plugins/LLVMgold.so
|
||||
%endif
|
||||
%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
|
||||
%{_libdir}/libLLVM-%{maj_ver}.so
|
||||
%{_libdir}/libLTO.so*
|
||||
%else
|
||||
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
@ -601,10 +606,11 @@ fi
|
||||
%{_datadir}/llvm/src/utils
|
||||
%{_libdir}/libLLVMTestingSupport.a
|
||||
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
%files toolset
|
||||
%license LICENSE.TXT
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user