SHA256
1
0
forked from pool/llvm

- Disable shared libs on PowerPC

- Disable ARCMT, it only makes sense for iOS/OSX

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=260
This commit is contained in:
Ismail Dönmez 2013-08-13 07:19:17 +00:00 committed by Git OBS Bridge
parent 3e8ea9e3af
commit 4b6a41397e
3 changed files with 27 additions and 15 deletions

View File

@ -5,6 +5,13 @@ from Config import *
addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*") addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*")
addFilter("devel-file-in-non-devel-package .*/clang/.*/lib/.*") 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("zero-length .*/llvm-apidoc/.*")
addFilter("arch-dependent-file-in-usr-share .*/llvm-apidoc/.*") addFilter("arch-dependent-file-in-usr-share .*/llvm-apidoc/.*")
addFilter("binaryinfo-readelf-failed .*/llvm-apidoc/.*") addFilter("binaryinfo-readelf-failed .*/llvm-apidoc/.*")

View File

@ -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 Tue Aug 6 05:51:46 UTC 2013 - idonmez@suse.com

View File

@ -25,10 +25,6 @@
%define _supported_archs "ARM" %define _supported_archs "ARM"
%endif %endif
%ifarch ppc64
%define _supported_archs "PowerPC"
%endif
Name: llvm Name: llvm
Version: 3.3 Version: 3.3
Release: 0 Release: 0
@ -179,14 +175,10 @@ sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \
%endif %endif
# Only enable target archs otherwise llvm-config is messed up # 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 sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC R600 X86", lib/Target/LLVMBuild.txt
%endif %endif
%ifarch ppc64
sed -i s,"subdirectories = .*","subdirectories = PowerPC", lib/Target/LLVMBuild.txt
%endif
%ifarch arm %ifarch arm
sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt
%endif %endif
@ -196,7 +188,6 @@ echo > utils/unittest/LLVMBuild.txt
%build %build
TOPLEVEL=$PWD TOPLEVEL=$PWD
# as-needed avoids linking LLVMgold to LTO, just because cmake places -lLTO before the .o file is used
mkdir stage1 stage2 mkdir stage1 stage2
pushd stage1 pushd stage1
@ -229,7 +220,7 @@ cmake -G "Unix Makefiles" \
-DLLVM_HOST_TRIPLE=%{host_triple} \ -DLLVM_HOST_TRIPLE=%{host_triple} \
.. ..
make %{?_smp_mflags} clang make %{?_smp_mflags} VERBOSE=1 clang
popd popd
pushd stage2 pushd stage2
@ -238,9 +229,11 @@ export CC=$TOPLEVEL/stage1/bin/clang
export CXX=$TOPLEVEL/stage1/bin/clang++ export CXX=$TOPLEVEL/stage1/bin/clang++
cmake -G "Unix Makefiles" \ cmake -G "Unix Makefiles" \
%ifnarch ppc64
-DBUILD_SHARED_LIBS=ON \ -DBUILD_SHARED_LIBS=ON \
%endif
%ifarch %arm ppc64 %ifarch %arm ppc64
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
%else %else
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLLVM_HOST_TRIPLE=%{host_triple} \ -DLLVM_HOST_TRIPLE=%{host_triple} \
@ -266,9 +259,10 @@ cmake -G "Unix Makefiles" \
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \
%endif %endif
-DLLVM_BUILD_TESTS=OFF \ -DLLVM_BUILD_TESTS=OFF \
-DCLANG_ENABLE_ARCMT=OFF \
.. ..
make %{?_smp_mflags} make %{?_smp_mflags} VERBOSE=1
%check %check
cd stage2 cd stage2
@ -421,20 +415,25 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
%{py_sitedir}/Resources %{py_sitedir}/Resources
%{_datadir}/clang %{_datadir}/clang
%{_mandir}/man1/clang.1%{ext_man} %{_mandir}/man1/clang.1%{ext_man}
%{_libdir}/libLTO.so %{_libdir}/libLTO.*
%{_libdir}/libprofile_rt.so %{_libdir}/libprofile_rt.*
%if 0%{?suse_version} >= 1220 %if 0%{?suse_version} >= 1220
%{_libdir}/LLVMgold.so %{_libdir}/LLVMgold.so
%{_libdir}/bfd-plugins/ %{_libdir}/bfd-plugins/
%endif %endif
%{_libdir}/clang %{_libdir}/clang
%ifnarch ppc64
%{_libdir}/clang/%{_release_version}/lib/linux/ %{_libdir}/clang/%{_release_version}/lib/linux/
%endif
%files -n libclang %files -n libclang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%exclude %{_libdir}/libclang.so %exclude %{_libdir}/libclang.so
%{_libdir}/libclang*.so %{_libdir}/libclang*.so
%{_libdir}/libclang.so.* %{_libdir}/libclang.so.*
%ifarch ppc64
%{_libdir}/libclang*.a
%endif
%files clang-devel %files clang-devel
%defattr(-,root,root) %defattr(-,root,root)