- Use ninja for building
- Remove libstdc++-devel from requires, clang now ships libc++ OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=368
This commit is contained in:
parent
66a675c3be
commit
a4dd9949df
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 5 16:09:45 UTC 2014 - idonmez@suse.com
|
||||
|
||||
- Use ninja for building
|
||||
- Remove libstdc++-devel from requires, clang now ships libc++
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 4 12:26:10 UTC 2014 - idonmez@suse.com
|
||||
|
||||
|
46
llvm.spec
46
llvm.spec
@ -55,13 +55,9 @@ Patch10: clang-resourcedirs.patch
|
||||
Patch11: libcxxabi-exceptions.patch
|
||||
Patch12: libcxx-libdir.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cmake
|
||||
%if 0%{?suse_version} >= 1220
|
||||
BuildRequires: binutils-devel >= 2.21.90
|
||||
%endif
|
||||
BuildRequires: bison
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc
|
||||
@ -70,6 +66,7 @@ BuildRequires: groff
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: ninja
|
||||
BuildRequires: python-base
|
||||
Requires: libLLVM = %{version}-%{release}
|
||||
# llvm does not work on ppc, only ppc64
|
||||
@ -95,7 +92,6 @@ Summary: Header Files for LLVM
|
||||
Group: Development/Languages/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: libffi-devel
|
||||
Requires: libstdc++-devel >= 3.4
|
||||
Requires: ncurses-devel
|
||||
|
||||
%description devel
|
||||
@ -108,7 +104,6 @@ Group: Development/Languages/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: binutils
|
||||
Requires: libclang = %{version}-%{release}
|
||||
Requires: libstdc++-devel
|
||||
Provides: clang
|
||||
|
||||
%description clang
|
||||
@ -203,7 +198,7 @@ sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt
|
||||
sed -i s,"subdirectories = .*","subdirectories = PowerPC", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
%ifarch s390 s390x
|
||||
%ifarch s390x
|
||||
sed -i s,"subdirectories = .*","subdirectories = SystemZ", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
@ -240,18 +235,12 @@ sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmak
|
||||
%define host_triple powerpc64le-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
|
||||
%endif
|
||||
%ifarch s390
|
||||
%define host_triple s390-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"SystemZ"',g ../cmake/modules/AddLLVM.cmake
|
||||
rm -rf ../projects/compiler-rt
|
||||
%endif
|
||||
%ifarch s390x
|
||||
%ifarch 390x
|
||||
%define host_triple s390x-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"SystemZ"',g ../cmake/modules/AddLLVM.cmake
|
||||
rm -rf ../projects/compiler-rt
|
||||
%endif
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
cmake -G "Ninja" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
@ -261,7 +250,7 @@ cmake -G "Unix Makefiles" \
|
||||
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1 clang
|
||||
ninja %{?_smp_mflags} clang
|
||||
|
||||
popd
|
||||
pushd stage2
|
||||
@ -273,7 +262,7 @@ pushd stage2
|
||||
export CC=$TOPLEVEL/stage1/bin/clang
|
||||
export CXX=$TOPLEVEL/stage1/bin/clang++
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
cmake -G "Ninja" \
|
||||
%ifnarch ppc64 ppc64le
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
%endif
|
||||
@ -299,9 +288,7 @@ cmake -G "Unix Makefiles" \
|
||||
-DLLVM_ENABLE_TIMESTAMPS=OFF \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_ENABLE_PIC=ON \
|
||||
%if 0%{?suse_version} >= 1220
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
||||
%endif
|
||||
%ifarch %{ix86} x86_64
|
||||
-DLLVM_TARGETS_TO_BUILD="host;R600" \
|
||||
%else
|
||||
@ -310,7 +297,7 @@ cmake -G "Unix Makefiles" \
|
||||
-DLLVM_BUILD_TESTS=ON \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
ninja %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
cd stage2
|
||||
@ -322,11 +309,11 @@ cd stage2
|
||||
ln -s lib lib64
|
||||
%endif
|
||||
|
||||
make check
|
||||
make clang-test
|
||||
ninja check
|
||||
ninja clang-test
|
||||
|
||||
%ifarch %{ix86} x86_64
|
||||
make check-libcxxabi
|
||||
ninja check-libcxxabi
|
||||
%endif
|
||||
|
||||
%endif
|
||||
@ -334,7 +321,7 @@ make check-libcxxabi
|
||||
|
||||
%install
|
||||
cd stage2
|
||||
make install DESTDIR=%{buildroot}
|
||||
DESTDIR=%{buildroot} ninja install
|
||||
cd ..
|
||||
|
||||
# Build man/html pages
|
||||
@ -389,10 +376,8 @@ pushd %{buildroot}%{_bindir}
|
||||
ln -s ccc-analyzer c++-analyzer
|
||||
popd
|
||||
|
||||
%if 0%{?suse_version} >= 1220
|
||||
mkdir -p %{buildroot}%{_libdir}/bfd-plugins
|
||||
ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
|
||||
%endif
|
||||
|
||||
sed -i 's,RealBin/bin/clang,RealBin/clang,' \
|
||||
%{buildroot}%{_bindir}/scan-build
|
||||
@ -428,6 +413,9 @@ rm %{buildroot}%{_mandir}/man1/lit.1
|
||||
%post -n libLLVM -p /sbin/ldconfig
|
||||
%postun -n libLLVM -p /sbin/ldconfig
|
||||
|
||||
%post clang -p /sbin/ldconfig
|
||||
%postun clang -p /sbin/ldconfig
|
||||
|
||||
%post -n libclang -p /sbin/ldconfig
|
||||
%postun -n libclang -p /sbin/ldconfig
|
||||
|
||||
@ -478,14 +466,10 @@ rm %{buildroot}%{_mandir}/man1/lit.1
|
||||
%{_libdir}/libc++*
|
||||
%{_includedir}/c++/*
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1220
|
||||
%{_libdir}/LLVMgold.so
|
||||
%{_libdir}/bfd-plugins/
|
||||
%endif
|
||||
%{_libdir}/clang
|
||||
%ifnarch %arm aarch64 ppc64 s390 s390x
|
||||
%{_libdir}/clang/%{_release_version}/lib/linux/
|
||||
%endif
|
||||
|
||||
%files -n libclang
|
||||
%defattr(-,root,root,-)
|
||||
|
Loading…
x
Reference in New Issue
Block a user