2020-10-15 07:19:00 +00:00
|
|
|
%define major %(echo %version |cut -d. -f1)
|
2018-04-03 22:27:35 +03:00
|
|
|
%define libname %mklibname %{name} %{major}
|
|
|
|
%define devname %mklibname %{name} -d
|
|
|
|
|
2020-08-14 14:04:33 +03:00
|
|
|
%if %{mdvver} <= 201610
|
|
|
|
%bcond_without clang
|
|
|
|
%else
|
|
|
|
%bcond_with clang
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with clang}
|
|
|
|
%define debug_package %{nil}
|
|
|
|
%endif
|
|
|
|
|
2020-02-14 01:55:43 +03:00
|
|
|
%bcond_without git
|
2019-09-23 03:21:17 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
Summary: The LLVM Linker
|
2018-04-03 21:33:04 +03:00
|
|
|
Name: lld
|
2021-07-14 00:03:14 +03:00
|
|
|
Version: 12.0.1
|
|
|
|
Release: 1
|
2018-04-03 22:27:35 +03:00
|
|
|
Group: Development/Other
|
2018-04-03 21:33:04 +03:00
|
|
|
License: NCSA
|
2018-04-03 22:27:35 +03:00
|
|
|
Url: http://llvm.org
|
2019-09-23 03:21:17 +03:00
|
|
|
%if %{with git}
|
2019-08-12 17:37:47 +03:00
|
|
|
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz
|
2019-09-23 03:21:17 +03:00
|
|
|
%else
|
|
|
|
Source0: http://releases.llvm.org/%{version}/%{name}-%{version}.src.tar.xz
|
|
|
|
%endif
|
2018-04-03 22:27:35 +03:00
|
|
|
BuildRequires: cmake
|
2020-08-14 14:04:33 +03:00
|
|
|
%if %{with clang}
|
|
|
|
BuildRequires: clang
|
|
|
|
BuildRequires: libcxx-devel
|
|
|
|
%endif
|
2018-04-03 22:27:35 +03:00
|
|
|
BuildRequires: llvm-devel = %{version}
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: zlib-devel
|
2018-04-23 19:35:39 +03:00
|
|
|
Requires: clang
|
2018-04-23 19:12:08 +03:00
|
|
|
Requires: llvm
|
2018-04-23 18:58:44 +03:00
|
|
|
Requires: llvm-plugins
|
2018-04-03 21:33:04 +03:00
|
|
|
|
|
|
|
%description
|
|
|
|
The LLVM project linker.
|
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
%files
|
|
|
|
%doc LICENSE.TXT
|
|
|
|
%{_bindir}/lld*
|
|
|
|
%{_bindir}/ld.lld
|
|
|
|
%{_bindir}/ld64.lld
|
|
|
|
%{_bindir}/wasm-ld
|
2018-04-03 21:33:04 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
#-------------------------------------------------------------------------
|
2018-04-03 21:33:04 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
%package -n %{libname}
|
2018-04-03 21:33:04 +03:00
|
|
|
Summary: LLD shared libraries
|
2018-04-03 22:27:35 +03:00
|
|
|
Group: System/Libraries
|
2018-04-03 21:33:04 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
%description -n %{libname}
|
2018-04-03 21:33:04 +03:00
|
|
|
Shared libraries for LLD.
|
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
%files -n %{libname}
|
|
|
|
%doc LICENSE.TXT
|
|
|
|
%{_libdir}/lib%{name}*.so.%{major}*
|
2019-09-23 03:21:17 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
#-------------------------------------------------------------------------
|
2018-04-03 21:33:04 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
%package -n %{devname}
|
|
|
|
Summary: Libraries and header files for LLD
|
|
|
|
Group: Development/Other
|
|
|
|
Requires: %{libname} = %{EVRD}
|
|
|
|
Provides: %{name}-devel = %{EVRD}
|
2018-04-03 21:33:04 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
%description -n %{devname}
|
|
|
|
This package contains library and header files needed to develop new native
|
|
|
|
programs that use the LLD infrastructure.
|
2018-04-03 21:33:04 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
%files -n %{devname}
|
|
|
|
%doc LICENSE.TXT
|
|
|
|
%{_includedir}/lld
|
|
|
|
%{_libdir}/liblld*.so
|
2020-10-15 07:22:35 +00:00
|
|
|
%{_libdir}/cmake/%{name}/
|
2019-09-23 03:21:17 +03:00
|
|
|
|
2018-04-03 22:27:35 +03:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -qn %{name}-%{version}.src
|
|
|
|
|
|
|
|
%build
|
2020-08-14 14:04:33 +03:00
|
|
|
%if %{with clang}
|
|
|
|
%clang_gcc_wrapper
|
|
|
|
export CC=clang
|
|
|
|
export CXX=clang++
|
|
|
|
%endif
|
2018-04-03 22:27:35 +03:00
|
|
|
%cmake \
|
2018-04-03 21:33:04 +03:00
|
|
|
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
|
|
|
-DLLVM_DYLIB_COMPONENTS="all" \
|
2018-04-03 22:27:35 +03:00
|
|
|
%ifarch x86_64
|
2018-04-03 21:33:04 +03:00
|
|
|
-DLLVM_LIBDIR_SUFFIX=64
|
|
|
|
%else
|
|
|
|
-DLLVM_LIBDIR_SUFFIX=
|
|
|
|
%endif
|
|
|
|
|
2020-01-13 15:58:05 +03:00
|
|
|
%make -s
|
2018-04-03 21:33:04 +03:00
|
|
|
|
|
|
|
%install
|
2020-01-13 15:58:05 +03:00
|
|
|
%makeinstall_std -C build
|