mirror of
https://abf.rosa.ru/djam/lld.git
synced 2025-02-23 14:32:55 +00:00
117 lines
2.4 KiB
RPMSpec
117 lines
2.4 KiB
RPMSpec
%define major %(echo %version |cut -d. -f1)
|
|
%define libname %mklibname %{name} %{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
%if %{mdvver} <= 201610
|
|
%bcond_without clang
|
|
%else
|
|
%bcond_with clang
|
|
%endif
|
|
|
|
%if %{with clang}
|
|
%define debug_package %{nil}
|
|
%endif
|
|
|
|
%bcond_without git
|
|
|
|
Summary: The LLVM Linker
|
|
Name: lld
|
|
Version: 12.0.1
|
|
Release: 1
|
|
Group: Development/Other
|
|
License: NCSA
|
|
Url: http://llvm.org
|
|
%if %{with git}
|
|
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz
|
|
%else
|
|
Source0: http://releases.llvm.org/%{version}/%{name}-%{version}.src.tar.xz
|
|
%endif
|
|
Source1: https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-%{version}/libunwind/include/mach-o/compact_unwind_encoding.h
|
|
BuildRequires: cmake
|
|
%if %{with clang}
|
|
BuildRequires: clang
|
|
BuildRequires: libcxx-devel
|
|
%endif
|
|
BuildRequires: llvm-devel = %{version}
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: zlib-devel
|
|
Requires: clang
|
|
Requires: llvm
|
|
Requires: llvm-plugins
|
|
|
|
%description
|
|
The LLVM project linker.
|
|
|
|
%files
|
|
%doc LICENSE.TXT
|
|
%{_bindir}/ld64.lld
|
|
%{_bindir}/ld64.lld.darwinnew
|
|
%{_bindir}/ld.lld
|
|
%{_bindir}/lld
|
|
%{_bindir}/lld-link
|
|
%{_bindir}/wasm-ld
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{libname}
|
|
Summary: LLD shared libraries
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname}
|
|
Shared libraries for LLD.
|
|
|
|
%files -n %{libname}
|
|
%doc LICENSE.TXT
|
|
%{_libdir}/lib%{name}*.so.%{major}*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Libraries and header files for LLD
|
|
Group: Development/Other
|
|
Requires: %{libname} = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
This package contains library and header files needed to develop new native
|
|
programs that use the LLD infrastructure.
|
|
|
|
%files -n %{devname}
|
|
%doc LICENSE.TXT
|
|
%{_includedir}/lld
|
|
%{_libdir}/liblld*.so
|
|
%{_libdir}/cmake/%{name}/
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -qn %{name}-%{version}.src
|
|
|
|
mkdir include/mach-o
|
|
cp %{S:1} include/mach-o
|
|
|
|
%build
|
|
%if %{with clang}
|
|
%clang_gcc_wrapper
|
|
export CC=clang
|
|
export CXX=clang++
|
|
%endif
|
|
|
|
%cmake \
|
|
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
|
-DLLVM_DYLIB_COMPONENTS="all" \
|
|
%ifarch x86_64
|
|
-DLLVM_LIBDIR_SUFFIX=64
|
|
%else
|
|
-DLLVM_LIBDIR_SUFFIX=
|
|
%endif
|
|
|
|
%make -s
|
|
|
|
%install
|
|
%makeinstall_std -C build
|
|
|
|
# we do not need
|
|
rm -fr %{buildroot}%{_includedir}/mach-o/compact_unwind_encoding.h
|
|
|
|
|