Accepting request 186832 from devel:tools:compiler
- Disable shared libs on PowerPC - Disable ARCMT, it only makes sense for iOS/OSX - Fix build - Disable building unit-tests, should fix undefined reference problem on ARM & PowerPC OBS-URL: https://build.opensuse.org/request/show/186832 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm?expand=0&rev=48
This commit is contained in:
@@ -5,6 +5,7 @@ from Config import *
|
||||
addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*")
|
||||
addFilter("devel-file-in-non-devel-package .*/clang/.*/lib/.*")
|
||||
|
||||
addFilter("zero-length .*/llvm-apidoc/.*")
|
||||
addFilter("arch-dependent-file-in-usr-share .*/llvm-apidoc/.*")
|
||||
addFilter("binaryinfo-readelf-failed .*/llvm-apidoc/.*")
|
||||
# PPC64 related hacks, remove these when we can
|
||||
# build shared libs there.
|
||||
addFilter("devel-file-in-non-devel-package .*/lib.*/*.a")
|
||||
addFilter ("libclang.*shlib-policy-name-error")
|
||||
|
17
llvm.changes
17
llvm.changes
@@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 12 16:43:26 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Disable shared libs on PowerPC
|
||||
- Disable ARCMT, it only makes sense for iOS/OSX
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 6 05:51:46 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Fix build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 17 12:54:40 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Disable building unit-tests, should fix undefined reference
|
||||
problem on ARM & PowerPC
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 16 08:35:00 UTC 2013 - coolo@suse.com
|
||||
|
||||
|
43
llvm.spec
43
llvm.spec
@@ -21,6 +21,10 @@
|
||||
%define _supported_archs "AArch64;ARM;PowerPC;X86"
|
||||
%define _experimental_archs "R600"
|
||||
|
||||
%ifarch arm
|
||||
%define _supported_archs "ARM"
|
||||
%endif
|
||||
|
||||
Name: llvm
|
||||
Version: 3.3
|
||||
Release: 0
|
||||
@@ -171,13 +175,19 @@ sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \
|
||||
%endif
|
||||
|
||||
# Only enable target archs otherwise llvm-config is messed up
|
||||
%ifnarch arm
|
||||
sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC R600 X86", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
%ifarch arm
|
||||
sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt
|
||||
%endif
|
||||
|
||||
sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt
|
||||
echo > utils/unittest/LLVMBuild.txt
|
||||
|
||||
%build
|
||||
TOPLEVEL=$PWD
|
||||
# as-needed avoids linking LLVMgold to LTO, just because cmake places -lLTO before the .o file is used
|
||||
mkdir stage1 stage2
|
||||
pushd stage1
|
||||
|
||||
@@ -196,24 +206,21 @@ pushd stage1
|
||||
%endif
|
||||
%ifarch ppc64
|
||||
%define host_triple powerpc64-suse-linux
|
||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
|
||||
rm -rf ../projects/compiler-rt
|
||||
%endif
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
%ifarch %arm
|
||||
-DLLVM_TARGETS_TO_BUILD=ARM \
|
||||
%else
|
||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
||||
%endif
|
||||
-DCMAKE_C_FLAGS="-O0" \
|
||||
-DCMAKE_CXX_FLAGS="-O0" \
|
||||
-DLLVM_TARGET_ARCH=host \
|
||||
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags} clang
|
||||
make %{?_smp_mflags} VERBOSE=1 clang
|
||||
|
||||
popd
|
||||
pushd stage2
|
||||
@@ -222,9 +229,11 @@ export CC=$TOPLEVEL/stage1/bin/clang
|
||||
export CXX=$TOPLEVEL/stage1/bin/clang++
|
||||
|
||||
cmake -G "Unix Makefiles" \
|
||||
%ifnarch ppc64
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
%endif
|
||||
%ifarch %arm ppc64
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
%else
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
||||
@@ -245,16 +254,15 @@ cmake -G "Unix Makefiles" \
|
||||
%if 0%{?suse_version} >= 1220
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
||||
%endif
|
||||
%ifarch %arm
|
||||
-DLLVM_TARGETS_TO_BUILD=ARM \
|
||||
%else
|
||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
||||
%ifnarch arm ppc64
|
||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \
|
||||
%endif
|
||||
-DLLVM_BUILD_TESTS=ON \
|
||||
-DLLVM_BUILD_TESTS=OFF \
|
||||
-DCLANG_ENABLE_ARCMT=OFF \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags}
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
|
||||
%check
|
||||
cd stage2
|
||||
@@ -407,20 +415,25 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
|
||||
%{py_sitedir}/Resources
|
||||
%{_datadir}/clang
|
||||
%{_mandir}/man1/clang.1%{ext_man}
|
||||
%{_libdir}/libLTO.so
|
||||
%{_libdir}/libprofile_rt.so
|
||||
%{_libdir}/libLTO.*
|
||||
%{_libdir}/libprofile_rt.*
|
||||
%if 0%{?suse_version} >= 1220
|
||||
%{_libdir}/LLVMgold.so
|
||||
%{_libdir}/bfd-plugins/
|
||||
%endif
|
||||
%{_libdir}/clang
|
||||
%ifnarch ppc64
|
||||
%{_libdir}/clang/%{_release_version}/lib/linux/
|
||||
%endif
|
||||
|
||||
%files -n libclang
|
||||
%defattr(-,root,root,-)
|
||||
%exclude %{_libdir}/libclang.so
|
||||
%{_libdir}/libclang*.so
|
||||
%{_libdir}/libclang.so.*
|
||||
%ifarch ppc64
|
||||
%{_libdir}/libclang*.a
|
||||
%endif
|
||||
|
||||
%files clang-devel
|
||||
%defattr(-,root,root)
|
||||
|
Reference in New Issue
Block a user