diff --git a/llvm-rpmlintrc b/llvm-rpmlintrc index 0e4cd96..056193b 100644 --- a/llvm-rpmlintrc +++ b/llvm-rpmlintrc @@ -5,6 +5,13 @@ from Config import * addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*") addFilter("devel-file-in-non-devel-package .*/clang/.*/lib/.*") + +# 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") + + addFilter("zero-length .*/llvm-apidoc/.*") addFilter("arch-dependent-file-in-usr-share .*/llvm-apidoc/.*") addFilter("binaryinfo-readelf-failed .*/llvm-apidoc/.*") diff --git a/llvm.changes b/llvm.changes index e4c2ba2..228f7c6 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/llvm.spec b/llvm.spec index 79da4cd..b877b3a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -25,10 +25,6 @@ %define _supported_archs "ARM" %endif -%ifarch ppc64 -%define _supported_archs "PowerPC" -%endif - Name: llvm Version: 3.3 Release: 0 @@ -179,14 +175,10 @@ 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 ppc64 +%ifnarch arm sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC R600 X86", lib/Target/LLVMBuild.txt %endif -%ifarch ppc64 -sed -i s,"subdirectories = .*","subdirectories = PowerPC", lib/Target/LLVMBuild.txt -%endif - %ifarch arm sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt %endif @@ -196,7 +188,6 @@ 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 @@ -229,7 +220,7 @@ cmake -G "Unix Makefiles" \ -DLLVM_HOST_TRIPLE=%{host_triple} \ .. -make %{?_smp_mflags} clang +make %{?_smp_mflags} VERBOSE=1 clang popd pushd stage2 @@ -238,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} \ @@ -266,9 +259,10 @@ cmake -G "Unix Makefiles" \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \ %endif -DLLVM_BUILD_TESTS=OFF \ + -DCLANG_ENABLE_ARCMT=OFF \ .. -make %{?_smp_mflags} +make %{?_smp_mflags} VERBOSE=1 %check cd stage2 @@ -421,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)