From 5385c8b9d099449a2e2fd36b3a5b4f6dd142eec141845aea34c45cd90d6a5b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Fri, 14 Jun 2013 14:24:42 +0000 Subject: [PATCH 01/31] Accepting request 178917 from home:tobijk:X11:XOrg Review SR for llvm with cmake: Please note: 1) Tests are commented out: Bug 15242 2) ARM Build failures due to incomplete build script (patches are fixed now) -> But it at least builds Mesa with radeonsi driver enabled OBS-URL: https://build.opensuse.org/request/show/178917 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=221 --- arm_suse_support.diff | 7 +- llvm.changes | 7 ++ llvm.spec | 196 +++++++++++++++++------------------------- 3 files changed, 89 insertions(+), 121 deletions(-) diff --git a/arm_suse_support.diff b/arm_suse_support.diff index c8fa470..2ef8739 100644 --- a/arm_suse_support.diff +++ b/arm_suse_support.diff @@ -1,6 +1,6 @@ ---- llvm/tools/clang/lib/Driver/ToolChains.cpp.orig 2012-11-22 10:26:49.202107824 +0100 -+++ llvm/tools/clang/lib/Driver/ToolChains.cpp 2012-11-22 12:20:33.662825882 +0100 -@@ -1056,10 +1056,12 @@ Generic_GCC::GCCInstallationDetector::GC +--- /tools/clang/lib/Driver/ToolChains.cpp.orig 2012-11-22 10:26:49.202107824 +0100 ++++ /tools/clang/lib/Driver/ToolChains.cpp 2012-11-22 12:20:33.662825882 +0100 +@@ -1082,11 +1082,13 @@ Generic_GCC::GCCInstallationDetector::GC static const char *const ARMLibDirs[] = { "/lib" }; static const char *const ARMTriples[] = { "arm-linux-gnueabi", @@ -10,6 +10,7 @@ static const char *const ARMHFTriples[] = { "arm-linux-gnueabihf", + "armv7hl-suse-linux-gnueabi" + "armv7hl-redhat-linux-gnueabi" }; static const char *const X86_64LibDirs[] = { "/lib64", "/lib" }; diff --git a/llvm.changes b/llvm.changes index 7850619..0fce38a 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 13 18:33:31 UTC 2013 - tobias.johannes.klausmann@mni.thm.de + +- Initial version of a cmake based buildscript + + Updated arm_suse_support.diff (patch6) to work with llvm 3.3 + + Set version in spec to 3.3 + ------------------------------------------------------------------- Thu Jun 13 11:42:33 UTC 2013 - idonmez@suse.com diff --git a/llvm.spec b/llvm.spec index 0af7e75..ca4937a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -18,10 +18,11 @@ %define _revision 183898 %define _release_version 3.3 -%define _supported_archs "arm,aarch64,powerpc,x86" +%define _supported_archs "AArch64;ARM;PowerPC;X86" +%define _experimental_archs "R600" Name: llvm -Version: 3.2.91 +Version: 3.3 Release: 0 Summary: Low Level Virtual Machine License: NCSA @@ -47,6 +48,9 @@ Patch8: unreachable-code.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake + +BuildRequires: cmake + %if 0%{?suse_version} >= 1220 BuildRequires: binutils-devel >= 2.21.90 %endif @@ -145,19 +149,10 @@ This package contains vim plugins for LLVM like syntax highlighting. # We hardcode i586 rm tools/clang/test/Driver/x86_features.c -# lib64 related problems on 64bit -%if "%{_lib}" == "lib64" -rm tools/clang/test/Driver/linux-ld.c -%endif - sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp -# Nasty hardcoded path -sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp tools/clang/test/Preprocessor/iwithprefix.c - # Only enable target archs otherwise llvm-config is messed up -sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC X86", lib/Target/LLVMBuild.txt sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt echo > utils/unittest/LLVMBuild.txt @@ -167,98 +162,62 @@ TOPLEVEL=$PWD export SUSE_ASNEEDED=0 mkdir stage1 stage2 pushd stage1 -mkdir Release -# autotools ignore --libdir -ln -s lib Release/lib64 - -../configure \ - --enable-optimized \ - --disable-assertions \ - --with-optimize-option="-O0" \ +cmake -G "Unix Makefiles" \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE="Release" \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_ENABLE_PIC=ON \ %ifarch %arm - --disable-sjlj-exceptions \ - --disable-werror --enable-checking=release \ %ifarch armv5el armv5tel - --with-arch=armv5te --with-float=soft --with-mode=arm \ - --build=armv5tel-suse-linux-gnueabi --host=armv5tel-suse-linux-gnueabi --target=armv5tel-suse-linux-gnueabi \ + %endif %ifarch armv7l armv7hl - --with-arch=armv7-a \ - --with-tune=cortex-a9 \ - --with-float=hard \ - --with-fpu=vfpv3-d16 \ - --with-abi=aapcs-vfp \ - --build=armv7hl-suse-linux-gnueabi --host=armv7hl-suse-linux-gnueabi --target=armv7hl-suse-linux-gnueabi \ -%if 0%{?suse_version} >= 1220 - --with-mode=thumb \ -%else - --with-mode=arm \ -%endif -%endif -%endif - --enable-targets=host -make %{?_smp_mflags} clang-only +%endif + -DLLVM_TARGETS_TO_BUILD=ARM \ +%else + -DCMAKE_C_FLAGS="-O0" \ + -DCMAKE_CXX_FLAGS="-O0" \ + -DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \ +%endif + -DLLVM_TARGET_ARCH=host \ + ../ + +make %{?_smp_mflags} clang popd pushd stage2 -# autotools ignore --libdir -%ifnarch ppc64 -mkdir Release+Debug -ln -s lib Release+Debug/lib64 -%else -mkdir Release -ln -s lib Release/lib64 -%endif - -export CC=$TOPLEVEL/stage1/Release/bin/clang -export CXX=$TOPLEVEL/stage1/Release/bin/clang++ +export CC=$TOPLEVEL/stage1/bin/clang +export CXX=$TOPLEVEL/stage1/bin/clang++ +cmake -G "Unix Makefiles" \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ %ifarch armv7l armv7hl -# This fixes the armv7 build. (Allow to run stage2 without problem) -export CFLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" -export CXXFLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" + -DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \ + -DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \ %endif - -../configure \ - --prefix=%{_prefix} \ - --enable-optimized \ - --disable-assertions \ - --enable-pic \ - --disable-timestamps \ +%ifarch x86_64 + -DLLVM_LIBDIR_SUFFIX=64 \ +%endif + -DLLVM_REQUIRES_RTTI=ON \ + -DLLVM_ENABLE_TIMESTAMPS=OFF \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_ENABLE_PIC=ON \ %if 0%{?suse_version} >= 1220 - --with-binutils-include=/usr/include \ + -DLLVM_BINUTILS_INCDIR=/usr/include \ %endif %ifarch %arm - --with-optimize-option="-U_GLIBCXX_ATOMIC_BUILTINS" \ - --disable-sjlj-exceptions \ - --disable-werror --enable-checking=release \ -%ifarch armv5el armv5tel - --with-arch=armv5te --with-float=soft --with-mode=arm \ -%endif -%ifarch armv7l armv7hl - --with-arch=armv7-a \ - --with-tune=cortex-a9 \ - --with-float=hard \ - --with-fpu=vfpv3-d16 \ - --with-abi=aapcs-vfp \ -%if 0%{?suse_version} >= 1220 - --with-mode=thumb \ + -DLLVM_TARGETS_TO_BUILD=ARM \ %else - --with-mode=arm \ + -DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \ + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \ %endif -%endif - --enable-targets=arm \ -%else - --enable-targets=%{_supported_archs} \ -%endif -%ifnarch ppc64 - --enable-debug-symbols \ - --enable-debug-runtime \ -%endif - --with-clang-resource-dir="../%{_lib}/clang/%{_release_version}" + -DLLVM_BUILD_TESTS=ON \ + ../ make %{?_smp_mflags} REQUIRES_RTTI=1 @@ -266,29 +225,27 @@ make %{?_smp_mflags} REQUIRES_RTTI=1 cd stage2 %if 0%{!?qemu_user_space_build:1} # we just do not have enough memory with qemu emulation -make check + +# Disable this check for now - http://llvm.org/bugs/show_bug.cgi?id=15242 +#make check cd tools/clang make test %endif %install cd stage2 -%makeinstall +make install DESTDIR=%{buildroot} cd .. -# Fixup libdir -%if "%{_lib}" == "lib64" -mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/lib64 -%endif - # Build man/html pages cd docs # Docs are prebuilt due to sphinx dependency -- cartman #make -f Makefile.sphinx html man rm -rf %{buildroot}/usr/docs + mkdir -p %{buildroot}%{_docdir}/llvm -cp -r _build/man/* %{buildroot}/usr/share/man/man1 -cp -r _build/html/* %{buildroot}%{_docdir}/llvm/ +#cp -r _build/man/* %{buildroot}/usr/share/man/man1 +#cp -r _build/html/* %{buildroot}%{_docdir}/llvm/ cd ../tools/clang/docs mkdir -p %{buildroot}%{_docdir}/llvm-clang/html @@ -297,12 +254,6 @@ cp *.css *.png *.html %{buildroot}%{_docdir}/llvm-clang/html cp -r analyzer %{buildroot}%{_docdir}/llvm-clang cd ../../.. -# cleanup -file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d -file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d -find %{buildroot}%{_includedir}/clang -name '*.tmp' -exec rm {} + -chmod -x %{buildroot}/%{_libdir}/*.a - # install scan-build et al install -d %{buildroot}%{_datadir}/clang install -d %{buildroot}%{py_sitedir} @@ -356,10 +307,12 @@ install -m 644 utils/vim/*.vim %{buildroot}%{_datadir}/vim/site/syntax/ mv utils/vim/README utils/vim/README.vim # Stuff we don't want to include -rm %{buildroot}%{_libdir}/libclang.a rm %{buildroot}%{_libdir}/BugpointPasses.* rm %{buildroot}%{_libdir}/LLVMHello.* +# Remove cmake files +rm -rf %{buildroot}/usr/share/llvm/cmake + %fdupes -s %{buildroot}%{_docdir}/%{name} %fdupes -s %{buildroot}%{_docdir}/%{name}-doc @@ -380,15 +333,16 @@ rm %{buildroot}%{_libdir}/LLVMHello.* %exclude %{_bindir}/%{name}-config %{_bindir}/%{name}* %{_bindir}/opt -%{_mandir}/man1/bugpoint.1%{ext_man} -%exclude %{_mandir}/man1/lit.1%{ext_man} -%{_mandir}/man1/tblgen.1%{ext_man} -%{_mandir}/man1/llc.1%{ext_man} -%{_mandir}/man1/lli.1%{ext_man} -%exclude %{_mandir}/man1/%{name}-config.1%{ext_man} -%{_mandir}/man1/llvm*.1%{ext_man} -%{_mandir}/man1/FileCheck.1%{ext_man} -%{_mandir}/man1/opt.1%{ext_man} + +#%{_mandir}/man1/bugpoint.1%{ext_man} +#%exclude %{_mandir}/man1/lit.1%{ext_man} +#%{_mandir}/man1/tblgen.1%{ext_man} +#%{_mandir}/man1/llc.1%{ext_man} +#%{_mandir}/man1/lli.1%{ext_man} +#%exclude %{_mandir}/man1/%{name}-config.1%{ext_man} +#%{_mandir}/man1/llvm*.1%{ext_man} +#%{_mandir}/man1/FileCheck.1%{ext_man} +#%{_mandir}/man1/opt.1%{ext_man} %files clang %defattr(-,root,root) @@ -396,7 +350,7 @@ rm %{buildroot}%{_libdir}/LLVMHello.* %{_bindir}/clang-* %{_bindir}/clang++ %{_bindir}/clang-format -%{_bindir}/c-index-test +#%{_bindir}/c-index-test %{_bindir}/ccc-analyzer %{_bindir}/c++-analyzer %{_bindir}/scan-build @@ -406,10 +360,17 @@ rm %{buildroot}%{_libdir}/LLVMHello.* %{py_sitedir}/startfile.py %{py_sitedir}/Resources %{_datadir}/clang -%{_mandir}/man1/clang.1.gz +%exclude %{_libdir}/clang/3.3/lib/linux/libclang*.a +#%{_mandir}/man1/clang.1.gz + +#%exclude %{_libdir}/libclang.so %{_libdir}/libclang.so + +%{_libdir}/libclang.so* +%{_libdir}/libclang*.so +%{_libdir}/libgtest*.so + %{_libdir}/libLTO.so -%{_libdir}/*profile*.a %if 0%{?suse_version} >= 1220 %{_libdir}/LLVMgold.so %{_libdir}/bfd-plugins/ @@ -420,23 +381,22 @@ rm %{buildroot}%{_libdir}/LLVMHello.* %defattr(-,root,root) %{_includedir}/clang %{_includedir}/clang-c -%{_libdir}/libLTO.a -%{_libdir}/libclang*.a +%{_libdir}/clang/3.3/lib/linux/libclang*.a %{_libdir}/*profile*.so %doc %{_docdir}/llvm-clang %files devel %defattr(-,root,root,-) %{_bindir}/%{name}-config -%doc %{_mandir}/man1/%{name}-config.1%{ext_man} +#%doc %{_mandir}/man1/%{name}-config.1%{ext_man} %{_includedir}/%{name}/ %{_includedir}/%{name}-c/ %{_libdir}/libLLVM* -%doc %{_docdir}/%{name} +#%doc %{_docdir}/%{name} %files vim-plugins %defattr(-,root,root,-) -%doc utils/vim/README.vim +#%doc utils/vim/README.vim %{_datadir}/vim/ %changelog From f549f14b5cd934d43067e8b5963151311c12974eb60bbd9d2c334b5c4ca81540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 18 Jun 2013 14:27:48 +0000 Subject: [PATCH 02/31] Accepting request 179579 from home:tobijk:X11:XOrg Mesa-32 with radeonsi wants a x86 libLLVMCore.so on x86_64, lets provide it. Sorry for the missing changelog btw! OBS-URL: https://build.opensuse.org/request/show/179579 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=223 --- baselibs.conf | 9 +++++++++ llvm.changes | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 baselibs.conf diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..1e9b9fa --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,9 @@ +llvm +llvm-devel +# requires -llvm- +# requires "llvm- = " +llvm-clang +llvm-clang-devel + requires -llvm-clang- + requires "llvm-clang- = " +llvm-vim-plugins diff --git a/llvm.changes b/llvm.changes index 0fce38a..f6bc689 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 18 13:42:57 UTC 2013 - tobias.johannes.klausmann@mni.thm.de + +- Create a baselibs.conf + Provide *-32 Bit Packages for x86_64 + ------------------------------------------------------------------- Thu Jun 13 18:33:31 UTC 2013 - tobias.johannes.klausmann@mni.thm.de From abea2dabb72bb624d1d2dbb0d86be1e685ff7b15754dc6cb5e9ca6fe1309e66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 12:42:23 +0000 Subject: [PATCH 03/31] Accepting request 179941 from home:namtrac:branches:devel:tools:compiler - Fix ARM v5/v7 builds OBS-URL: https://build.opensuse.org/request/show/179941 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=224 --- arm-config.guess.patch | 23 +++++++++++++++++++++++ llvm.changes | 5 +++++ llvm.spec | 24 ++++++++++++------------ 3 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 arm-config.guess.patch diff --git a/arm-config.guess.patch b/arm-config.guess.patch new file mode 100644 index 0000000..b65bd33 --- /dev/null +++ b/arm-config.guess.patch @@ -0,0 +1,23 @@ +Index: llvm-3.3/autoconf/config.guess +=================================================================== +--- llvm-3.3.orig/autoconf/config.guess ++++ llvm-3.3/autoconf/config.guess +@@ -885,13 +885,11 @@ EOF + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else +- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep -q __ARM_PCS_VFP +- then +- echo ${UNAME_MACHINE}-unknown-linux-gnueabi +- else +- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf +- fi ++ if uname -a | grep -q "armv7"; then ++ echo armv7hl-suse-linux-gnueabi ++ else ++ echo armv5tel-suse-linux-gnueabi ++ fi + fi + exit ;; + avr32*:Linux:*:*) diff --git a/llvm.changes b/llvm.changes index f6bc689..32d1ce5 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 19 12:41:30 UTC 2013 - idonmez@suse.com + +- Fix ARM v5/v7 builds + ------------------------------------------------------------------- Tue Jun 18 13:42:57 UTC 2013 - tobias.johannes.klausmann@mni.thm.de diff --git a/llvm.spec b/llvm.spec index ca4937a..51a8ca8 100644 --- a/llvm.spec +++ b/llvm.spec @@ -45,6 +45,7 @@ Patch6: arm_suse_support.diff Patch7: disable_neon_in_armv7.diff # PATCH-FIX-OPENSUSE unreachable-code.patch -- Unreachable code warning triggered on SLE Patch8: unreachable-code.patch +Patch9: arm-config.guess.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -140,6 +141,7 @@ This package contains vim plugins for LLVM like syntax highlighting. %endif %ifarch %arm %patch6 -p1 +%patch9 -p1 %endif %ifarch armv7l armv7hl %patch7 -p0 @@ -165,24 +167,18 @@ pushd stage1 cmake -G "Unix Makefiles" \ -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_PIC=ON \ %ifarch %arm -%ifarch armv5el armv5tel - -%endif -%ifarch armv7l armv7hl - -%endif -DLLVM_TARGETS_TO_BUILD=ARM \ %else - -DCMAKE_C_FLAGS="-O0" \ - -DCMAKE_CXX_FLAGS="-O0" \ -DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \ %endif + -DCMAKE_C_FLAGS="-O0" \ + -DCMAKE_CXX_FLAGS="-O0" \ -DLLVM_TARGET_ARCH=host \ - ../ + .. make %{?_smp_mflags} clang @@ -194,7 +190,11 @@ export CXX=$TOPLEVEL/stage1/bin/clang++ cmake -G "Unix Makefiles" \ -DBUILD_SHARED_LIBS=ON \ +%ifarch %arm ppc64 + -DCMAKE_BUILD_TYPE=Release \ +%else -DCMAKE_BUILD_TYPE=RelWithDebInfo \ +%endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ %ifarch armv7l armv7hl -DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \ @@ -217,9 +217,9 @@ cmake -G "Unix Makefiles" \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \ %endif -DLLVM_BUILD_TESTS=ON \ - ../ + .. -make %{?_smp_mflags} REQUIRES_RTTI=1 +make %{?_smp_mflags} %check cd stage2 From 6a13a5d26e138bc08c70759643109a37d433cdf5512cbb04ce1547a227da339b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 13:23:39 +0000 Subject: [PATCH 04/31] We only need 32bit llvm-devel OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=225 --- baselibs.conf | 8 -------- 1 file changed, 8 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index 1e9b9fa..de8a8d0 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,9 +1 @@ -llvm llvm-devel -# requires -llvm- -# requires "llvm- = " -llvm-clang -llvm-clang-devel - requires -llvm-clang- - requires "llvm-clang- = " -llvm-vim-plugins From 9d6b2307120af552c5f0c841fe96eac19384c57d0601398259ca1fd6599103f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 14:17:03 +0000 Subject: [PATCH 05/31] Accepting request 179950 from home:llunak:branches:devel:tools:compiler x86_64 clang cannot find e.g. stddef.h because of lib vs lib64 in /usr/lib/clang/3.3 . OBS-URL: https://build.opensuse.org/request/show/179950 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=226 --- llvm.changes | 5 +++++ llvm.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/llvm.changes b/llvm.changes index 32d1ce5..9d47626 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 19 12:58:24 UTC 2013 - llunak@suse.com + +- Fix finding internal headers on x86_64 + ------------------------------------------------------------------- Wed Jun 19 12:41:30 UTC 2013 - idonmez@suse.com diff --git a/llvm.spec b/llvm.spec index 51a8ca8..cde8ab0 100644 --- a/llvm.spec +++ b/llvm.spec @@ -202,6 +202,7 @@ cmake -G "Unix Makefiles" \ %endif %ifarch x86_64 -DLLVM_LIBDIR_SUFFIX=64 \ + -DCLANG_RESOURCE_DIR=../%{_lib}/clang/3.3 \ %endif -DLLVM_REQUIRES_RTTI=ON \ -DLLVM_ENABLE_TIMESTAMPS=OFF \ From ff76bbc614d1bbeebc28aff9363d17564f246066932484b5de08e834c7b9db25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 14:58:47 +0000 Subject: [PATCH 06/31] Bring back docs OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=227 --- llvm.spec | 56 ++++++++++++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/llvm.spec b/llvm.spec index cde8ab0..d61799e 100644 --- a/llvm.spec +++ b/llvm.spec @@ -155,6 +155,7 @@ sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp # Only enable target archs otherwise llvm-config is messed up +sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC R600 X86", lib/Target/LLVMBuild.txt sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt echo > utils/unittest/LLVMBuild.txt @@ -227,8 +228,10 @@ cd stage2 %if 0%{!?qemu_user_space_build:1} # we just do not have enough memory with qemu emulation -# Disable this check for now - http://llvm.org/bugs/show_bug.cgi?id=15242 -#make check +# Due to http://llvm.org/bugs/show_bug.cgi?id=15242 +rm ../test/BugPoint/{crash-narrowfunctiontest, metadata, remove_arguments_test}.ll + +make check cd tools/clang make test %endif @@ -244,15 +247,15 @@ cd docs #make -f Makefile.sphinx html man rm -rf %{buildroot}/usr/docs -mkdir -p %{buildroot}%{_docdir}/llvm -#cp -r _build/man/* %{buildroot}/usr/share/man/man1 -#cp -r _build/html/* %{buildroot}%{_docdir}/llvm/ +mkdir -p %{buildroot}%{_docdir}/llvm/html +mkdir -p %{buildroot}/usr/share/man/man1 +cp -r _build/man/* %{buildroot}/usr/share/man/man1 +cp -r _build/html/* %{buildroot}%{_docdir}/llvm/html cd ../tools/clang/docs mkdir -p %{buildroot}%{_docdir}/llvm-clang/html -cp *.txt %{buildroot}%{_docdir}/llvm-clang -cp *.css *.png *.html %{buildroot}%{_docdir}/llvm-clang/html -cp -r analyzer %{buildroot}%{_docdir}/llvm-clang +cp -r _build/man/* %{buildroot}/usr/share/man/man1 +cp -r _build/html/* %{buildroot}%{_docdir}/llvm-clang/html cd ../../.. # install scan-build et al @@ -310,6 +313,7 @@ mv utils/vim/README utils/vim/README.vim # Stuff we don't want to include rm %{buildroot}%{_libdir}/BugpointPasses.* rm %{buildroot}%{_libdir}/LLVMHello.* +rm %{buildroot}%{_libdir}/gtest* # Remove cmake files rm -rf %{buildroot}/usr/share/llvm/cmake @@ -334,16 +338,13 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %exclude %{_bindir}/%{name}-config %{_bindir}/%{name}* %{_bindir}/opt - -#%{_mandir}/man1/bugpoint.1%{ext_man} -#%exclude %{_mandir}/man1/lit.1%{ext_man} -#%{_mandir}/man1/tblgen.1%{ext_man} -#%{_mandir}/man1/llc.1%{ext_man} -#%{_mandir}/man1/lli.1%{ext_man} -#%exclude %{_mandir}/man1/%{name}-config.1%{ext_man} -#%{_mandir}/man1/llvm*.1%{ext_man} -#%{_mandir}/man1/FileCheck.1%{ext_man} -#%{_mandir}/man1/opt.1%{ext_man} +%{_mandir}/man1/bugpoint.1%{ext_man} +%{_mandir}/man1/tblgen.1%{ext_man} +%{_mandir}/man1/llc.1%{ext_man} +%{_mandir}/man1/lli.1%{ext_man} +%{_mandir}/man1/llvm*.1%{ext_man} +%{_mandir}/man1/FileCheck.1%{ext_man} +%{_mandir}/man1/opt.1%{ext_man} %files clang %defattr(-,root,root) @@ -351,7 +352,6 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{_bindir}/clang-* %{_bindir}/clang++ %{_bindir}/clang-format -#%{_bindir}/c-index-test %{_bindir}/ccc-analyzer %{_bindir}/c++-analyzer %{_bindir}/scan-build @@ -361,16 +361,8 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{py_sitedir}/startfile.py %{py_sitedir}/Resources %{_datadir}/clang -%exclude %{_libdir}/clang/3.3/lib/linux/libclang*.a -#%{_mandir}/man1/clang.1.gz - -#%exclude %{_libdir}/libclang.so -%{_libdir}/libclang.so - +%{_mandir}/man1/clang.1{ext_man} %{_libdir}/libclang.so* -%{_libdir}/libclang*.so -%{_libdir}/libgtest*.so - %{_libdir}/libLTO.so %if 0%{?suse_version} >= 1220 %{_libdir}/LLVMgold.so @@ -384,20 +376,20 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{_includedir}/clang-c %{_libdir}/clang/3.3/lib/linux/libclang*.a %{_libdir}/*profile*.so -%doc %{_docdir}/llvm-clang +%doc %{_docdir}/llvm-clang/html %files devel %defattr(-,root,root,-) %{_bindir}/%{name}-config -#%doc %{_mandir}/man1/%{name}-config.1%{ext_man} +%doc %{_mandir}/man1/%{name}-config.1%{ext_man} %{_includedir}/%{name}/ %{_includedir}/%{name}-c/ %{_libdir}/libLLVM* -#%doc %{_docdir}/%{name} +%doc %{_docdir}/%{name}/html %files vim-plugins %defattr(-,root,root,-) -#%doc utils/vim/README.vim +%doc utils/vim/README.vim %{_datadir}/vim/ %changelog From d2c8ab0821c696664e9a57db9900e1b4fde51abfde7e39c4ac29172ec56bd220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 16:08:16 +0000 Subject: [PATCH 07/31] - OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=228 --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index d61799e..906f0a2 100644 --- a/llvm.spec +++ b/llvm.spec @@ -313,7 +313,7 @@ mv utils/vim/README utils/vim/README.vim # Stuff we don't want to include rm %{buildroot}%{_libdir}/BugpointPasses.* rm %{buildroot}%{_libdir}/LLVMHello.* -rm %{buildroot}%{_libdir}/gtest* +rm %{buildroot}%{_libdir}/libgtest* # Remove cmake files rm -rf %{buildroot}/usr/share/llvm/cmake From 9067bc97b9aa5a4600ff2091c8051ccb402d67a1cb156a905813c2cf2ba78706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 18:08:38 +0000 Subject: [PATCH 08/31] Fix build OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=229 --- llvm.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 906f0a2..d897376 100644 --- a/llvm.spec +++ b/llvm.spec @@ -162,7 +162,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 -export SUSE_ASNEEDED=0 mkdir stage1 stage2 pushd stage1 @@ -229,7 +228,10 @@ cd stage2 # we just do not have enough memory with qemu emulation # Due to http://llvm.org/bugs/show_bug.cgi?id=15242 -rm ../test/BugPoint/{crash-narrowfunctiontest, metadata, remove_arguments_test}.ll +rm ../test/BugPoint/ +for i in crash-narrowfunctiontest metadata remove_arguments_test; do + rm ../test/BugPoint/$i.ll; +done make check cd tools/clang From 9f9e0ec09bc1d68345b2253b045040d84e3a5d1860005cbf1c1ba7cea611e608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 18:38:35 +0000 Subject: [PATCH 09/31] Pff OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=230 --- llvm.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index d897376..dc9eafd 100644 --- a/llvm.spec +++ b/llvm.spec @@ -228,7 +228,6 @@ cd stage2 # we just do not have enough memory with qemu emulation # Due to http://llvm.org/bugs/show_bug.cgi?id=15242 -rm ../test/BugPoint/ for i in crash-narrowfunctiontest metadata remove_arguments_test; do rm ../test/BugPoint/$i.ll; done From 4e9553e32e4da2a89e0268b6eb7083e1f42f502ebd63762381a6eb8ab6b1f65f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 19:05:31 +0000 Subject: [PATCH 10/31] Nearly there OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=231 --- llvm.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index dc9eafd..9763ea4 100644 --- a/llvm.spec +++ b/llvm.spec @@ -362,7 +362,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{py_sitedir}/startfile.py %{py_sitedir}/Resources %{_datadir}/clang -%{_mandir}/man1/clang.1{ext_man} +%{_mandir}/man1/clang.1%{ext_man} %{_libdir}/libclang.so* %{_libdir}/libLTO.so %if 0%{?suse_version} >= 1220 @@ -375,7 +375,6 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %defattr(-,root,root) %{_includedir}/clang %{_includedir}/clang-c -%{_libdir}/clang/3.3/lib/linux/libclang*.a %{_libdir}/*profile*.so %doc %{_docdir}/llvm-clang/html From 6b82a48c790a43d99e7e10d13f990fdb3bfd7160085b505b3af287fc4c774c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 19:08:01 +0000 Subject: [PATCH 11/31] More build fixes OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=232 --- llvm.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 9763ea4..dde0d55 100644 --- a/llvm.spec +++ b/llvm.spec @@ -202,7 +202,7 @@ cmake -G "Unix Makefiles" \ %endif %ifarch x86_64 -DLLVM_LIBDIR_SUFFIX=64 \ - -DCLANG_RESOURCE_DIR=../%{_lib}/clang/3.3 \ + -DCLANG_RESOURCE_DIR=../%{_lib}/clang/%{_release_version} \ %endif -DLLVM_REQUIRES_RTTI=ON \ -DLLVM_ENABLE_TIMESTAMPS=OFF \ @@ -315,6 +315,7 @@ mv utils/vim/README utils/vim/README.vim rm %{buildroot}%{_libdir}/BugpointPasses.* rm %{buildroot}%{_libdir}/LLVMHello.* rm %{buildroot}%{_libdir}/libgtest* +rm -rf %{buildroot}%{_libdir}/clang/%{_release_version}/lib/linux/ # Remove cmake files rm -rf %{buildroot}/usr/share/llvm/cmake From ab982571f57c0f52de21fe9f25696b6d782ea73b693189e95f725cd5ac5b5b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 19:42:25 +0000 Subject: [PATCH 12/31] - OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=233 --- llvm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm.spec b/llvm.spec index dde0d55..df17d62 100644 --- a/llvm.spec +++ b/llvm.spec @@ -315,6 +315,7 @@ mv utils/vim/README utils/vim/README.vim rm %{buildroot}%{_libdir}/BugpointPasses.* rm %{buildroot}%{_libdir}/LLVMHello.* rm %{buildroot}%{_libdir}/libgtest* +rm %{buildroot}%{_mandir}/man1/lit.1%{ext_man} rm -rf %{buildroot}%{_libdir}/clang/%{_release_version}/lib/linux/ # Remove cmake files From db402d36bc4f8b2abe6246472b7db1409f466cc572d1faf25f64156fac23dd13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 20:06:27 +0000 Subject: [PATCH 13/31] sigh OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=234 --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index df17d62..3fc859a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -315,7 +315,7 @@ mv utils/vim/README utils/vim/README.vim rm %{buildroot}%{_libdir}/BugpointPasses.* rm %{buildroot}%{_libdir}/LLVMHello.* rm %{buildroot}%{_libdir}/libgtest* -rm %{buildroot}%{_mandir}/man1/lit.1%{ext_man} +rm %{buildroot}%{_mandir}/man1/lit.1 rm -rf %{buildroot}%{_libdir}/clang/%{_release_version}/lib/linux/ # Remove cmake files From 5eafa942bcfb440c084636e767660bcd3bf31edc0f28366f5efcebab4018039e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 20:35:34 +0000 Subject: [PATCH 14/31] Moar OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=235 --- llvm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 3fc859a..381a0e7 100644 --- a/llvm.spec +++ b/llvm.spec @@ -233,8 +233,7 @@ for i in crash-narrowfunctiontest metadata remove_arguments_test; do done make check -cd tools/clang -make test +make clang-test %endif %install @@ -365,6 +364,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{py_sitedir}/Resources %{_datadir}/clang %{_mandir}/man1/clang.1%{ext_man} +%{_libdir}/libclang*.so %{_libdir}/libclang.so* %{_libdir}/libLTO.so %if 0%{?suse_version} >= 1220 From 2a22a9f0f355b63da5515c0ee183e5e516a3a551b22273385e3189a1d5c742e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 22:06:48 +0000 Subject: [PATCH 15/31] Fixing build once again OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=236 --- llvm.spec | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/llvm.spec b/llvm.spec index 381a0e7..e5b1724 100644 --- a/llvm.spec +++ b/llvm.spec @@ -62,10 +62,6 @@ BuildRequires: flex BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: groff -%ifarch x86_64 -# For tests -BuildRequires: glibc-devel-32bit -%endif BuildRequires: libffi-devel BuildRequires: libtool BuildRequires: python-base @@ -154,6 +150,13 @@ rm tools/clang/test/Driver/x86_features.c sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp +%if "%{_lib}" == "lib64" +# Nasty hardcoded path +sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \ + tools/clang/test/Driver/linux-ld.c \ + tools/clang/test/Preprocessor/iwithprefix.c +%endif + # Only enable target archs otherwise llvm-config is messed up sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC R600 X86", lib/Target/LLVMBuild.txt sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt @@ -200,7 +203,7 @@ cmake -G "Unix Makefiles" \ -DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \ -DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \ %endif -%ifarch x86_64 +%if "%{_lib}" == "lib64" -DLLVM_LIBDIR_SUFFIX=64 \ -DCLANG_RESOURCE_DIR=../%{_lib}/clang/%{_release_version} \ %endif @@ -227,6 +230,10 @@ cd stage2 %if 0%{!?qemu_user_space_build:1} # we just do not have enough memory with qemu emulation +%if "%{_lib}" == "lib64" +ln -s lib lib64 +%endif + # Due to http://llvm.org/bugs/show_bug.cgi?id=15242 for i in crash-narrowfunctiontest metadata remove_arguments_test; do rm ../test/BugPoint/$i.ll; From 63afbb85ceda5688fa861c7dd01658a26d363de9e627d6b53990d00206af42db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 22:35:16 +0000 Subject: [PATCH 16/31] Fix OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=237 --- llvm.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index e5b1724..c7e2cf0 100644 --- a/llvm.spec +++ b/llvm.spec @@ -147,13 +147,17 @@ This package contains vim plugins for LLVM like syntax highlighting. # We hardcode i586 rm tools/clang/test/Driver/x86_features.c +# lib64 related problems on 64bit +%if "%{_lib}" == "lib64" +rm tools/clang/test/Driver/linux-ld.c +%endif + sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp %if "%{_lib}" == "lib64" # Nasty hardcoded path sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \ - tools/clang/test/Driver/linux-ld.c \ tools/clang/test/Preprocessor/iwithprefix.c %endif From f318759e64624c54553da05bfe1435055daa78bd3444663246320276bc618a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 23:09:04 +0000 Subject: [PATCH 17/31] Maybe OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=238 --- llvm.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index c7e2cf0..b6d25cc 100644 --- a/llvm.spec +++ b/llvm.spec @@ -389,7 +389,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{_includedir}/clang %{_includedir}/clang-c %{_libdir}/*profile*.so -%doc %{_docdir}/llvm-clang/html +%doc %{_docdir}/llvm-clang %files devel %defattr(-,root,root,-) @@ -398,7 +398,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{_includedir}/%{name}/ %{_includedir}/%{name}-c/ %{_libdir}/libLLVM* -%doc %{_docdir}/%{name}/html +%doc %{_docdir}/%{name} %files vim-plugins %defattr(-,root,root,-) From 0a4089733d945ae4083ae312759de1542d9ebf7e8088d62507c91628ffdd0225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 19 Jun 2013 23:41:11 +0000 Subject: [PATCH 18/31] - OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=239 --- llvm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm.spec b/llvm.spec index b6d25cc..e21769d 100644 --- a/llvm.spec +++ b/llvm.spec @@ -351,6 +351,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %exclude %{_bindir}/%{name}-config %{_bindir}/%{name}* %{_bindir}/opt +%exclude %{_mandir}/man1/%{name}-config.1%{ext_man} %{_mandir}/man1/bugpoint.1%{ext_man} %{_mandir}/man1/tblgen.1%{ext_man} %{_mandir}/man1/llc.1%{ext_man} From 7ab11fc7f76847eddebc55aac75a18983a872f8c4aa01b9dae40043d9387f1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 20 Jun 2013 09:24:43 +0000 Subject: [PATCH 19/31] Fix arm_suse_support.diff and include profile_rt libs OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=240 --- arm_suse_support.diff | 2 +- llvm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arm_suse_support.diff b/arm_suse_support.diff index 2ef8739..98b3c4a 100644 --- a/arm_suse_support.diff +++ b/arm_suse_support.diff @@ -9,7 +9,7 @@ }; static const char *const ARMHFTriples[] = { "arm-linux-gnueabihf", -+ "armv7hl-suse-linux-gnueabi" ++ "armv7hl-suse-linux-gnueabi", "armv7hl-redhat-linux-gnueabi" }; diff --git a/llvm.spec b/llvm.spec index e21769d..f18230d 100644 --- a/llvm.spec +++ b/llvm.spec @@ -326,7 +326,6 @@ rm %{buildroot}%{_libdir}/BugpointPasses.* rm %{buildroot}%{_libdir}/LLVMHello.* rm %{buildroot}%{_libdir}/libgtest* rm %{buildroot}%{_mandir}/man1/lit.1 -rm -rf %{buildroot}%{_libdir}/clang/%{_release_version}/lib/linux/ # Remove cmake files rm -rf %{buildroot}/usr/share/llvm/cmake @@ -384,6 +383,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{_libdir}/bfd-plugins/ %endif %{_libdir}/clang +%{_libdir}/clang/%{_release_version}/lib/linux/ %files clang-devel %defattr(-,root,root) From c3c0eb59b90f0c8ddf37f3280295c92742789f84c67e22be87017c9bc66d75a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 20 Jun 2013 09:28:27 +0000 Subject: [PATCH 20/31] - Remove llvm-config-lib64.patch, we can use sed in the spec file instead. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=241 --- llvm-config-lib64.patch | 31 ------------------------------- llvm.changes | 6 ++++++ llvm.spec | 5 +---- 3 files changed, 7 insertions(+), 35 deletions(-) delete mode 100644 llvm-config-lib64.patch diff --git a/llvm-config-lib64.patch b/llvm-config-lib64.patch deleted file mode 100644 index 98b5bd8..0000000 --- a/llvm-config-lib64.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -ur llvm.orig/tools/llvm-config/llvm-config.cpp llvm/tools/llvm-config/llvm-config.cpp ---- llvm.orig/tools/llvm-config/llvm-config.cpp 2012-11-12 11:25:40.547628293 +0100 -+++ llvm/tools/llvm-config/llvm-config.cpp 2012-12-02 15:09:31.981279773 +0100 -@@ -231,15 +231,15 @@ - switch (DevelopmentTreeLayout) { - case MakefileStyle: - ActiveBinDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/bin"; -- ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib"; -+ ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib64"; - break; - case CMakeStyle: - ActiveBinDir = ActiveObjRoot + "/bin"; -- ActiveLibDir = ActiveObjRoot + "/lib"; -+ ActiveLibDir = ActiveObjRoot + "/lib64"; - break; - case CMakeBuildModeStyle: - ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE; -- ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE; -+ ActiveLibDir = ActiveObjRoot + "/lib64/" + LLVM_BUILDMODE; - break; - } - -@@ -250,7 +250,7 @@ - ActivePrefix = CurrentExecPrefix; - ActiveIncludeDir = ActivePrefix + "/include"; - ActiveBinDir = ActivePrefix + "/bin"; -- ActiveLibDir = ActivePrefix + "/lib"; -+ ActiveLibDir = ActivePrefix + "/lib64"; - ActiveIncludeOption = "-I" + ActiveIncludeDir; - } - diff --git a/llvm.changes b/llvm.changes index 9d47626..baee9a2 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 20 09:27:36 UTC 2013 - idonmez@suse.com + +- Remove llvm-config-lib64.patch, we can use sed in the spec file + instead. + ------------------------------------------------------------------- Wed Jun 19 12:58:24 UTC 2013 - llunak@suse.com diff --git a/llvm.spec b/llvm.spec index f18230d..baa39dc 100644 --- a/llvm.spec +++ b/llvm.spec @@ -38,7 +38,6 @@ Patch2: assume-opensuse.patch Patch3: clang-disable-ada-extension.patch # PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit Patch4: default-to-i586.patch -Patch5: llvm-config-lib64.patch # PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support Patch6: arm_suse_support.diff # PATCH-FIX-OPENSUSE disable_neon_in_armv7.diff -- Disable use of neon in armv7 openSUSE @@ -132,9 +131,6 @@ This package contains vim plugins for LLVM like syntax highlighting. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%if "%{_lib}" == "lib64" -%patch5 -p1 -%endif %ifarch %arm %patch6 -p1 %patch9 -p1 @@ -158,6 +154,7 @@ sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp %if "%{_lib}" == "lib64" # Nasty hardcoded path sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \ + tools/llvm-config/llvm-config.cpp \ tools/clang/test/Preprocessor/iwithprefix.c %endif From 30ae80c09fb47e63dbf99406aa7d541d069e97eabae1ecbb275a1f05b78ed7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 20 Jun 2013 10:03:03 +0000 Subject: [PATCH 21/31] More filtering OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=242 --- llvm-rpmlintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm-rpmlintrc b/llvm-rpmlintrc index a096141..0e4cd96 100644 --- a/llvm-rpmlintrc +++ b/llvm-rpmlintrc @@ -3,6 +3,7 @@ from Config import * # it is a compiler and the package provides llvm-gcc-devel, llvm-gcc-c++-devel 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/.*") From 52bd613c4ae9589cca416b1f9ae253d1881e85a1020c9368239222cd0b97b39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 20 Jun 2013 11:32:24 +0000 Subject: [PATCH 22/31] Move profile_rt.so into clang package OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=243 --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index baa39dc..b741fb0 100644 --- a/llvm.spec +++ b/llvm.spec @@ -375,6 +375,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{_libdir}/libclang*.so %{_libdir}/libclang.so* %{_libdir}/libLTO.so +%{_libdir}/libprofile_rt.so %if 0%{?suse_version} >= 1220 %{_libdir}/LLVMgold.so %{_libdir}/bfd-plugins/ @@ -386,7 +387,6 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %defattr(-,root,root) %{_includedir}/clang %{_includedir}/clang-c -%{_libdir}/*profile*.so %doc %{_docdir}/llvm-clang %files devel From 19427ca1d17167cc84e73809cef821f990c644dfa7267aa025acd2c3f03be2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 20 Jun 2013 12:28:28 +0000 Subject: [PATCH 23/31] speed up stage1 build OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=244 --- llvm.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index b741fb0..7d071f2 100644 --- a/llvm.spec +++ b/llvm.spec @@ -170,10 +170,9 @@ mkdir stage1 stage2 pushd stage1 cmake -G "Unix Makefiles" \ - -DBUILD_SHARED_LIBS=ON \ + -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_ASSERTIONS=OFF \ - -DLLVM_ENABLE_PIC=ON \ %ifarch %arm -DLLVM_TARGETS_TO_BUILD=ARM \ %else From 006b44f70558aa2f5704a454cd5fb527f1c769aa4ce64dec6c71a36979d8c1b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 26 Jun 2013 10:07:09 +0000 Subject: [PATCH 24/31] Accepting request 180695 from home:tobijk:X11:XOrg Bring back llvm-config lib64 patch to build mesa with shared libs again OBS-URL: https://build.opensuse.org/request/show/180695 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=245 --- llvm-config-lib64.patch | 31 +++++++++++++++++++++++++++++++ llvm.spec | 6 +++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 llvm-config-lib64.patch diff --git a/llvm-config-lib64.patch b/llvm-config-lib64.patch new file mode 100644 index 0000000..3cd7ac4 --- /dev/null +++ b/llvm-config-lib64.patch @@ -0,0 +1,31 @@ +diff -ur llvm.orig/tools/llvm-config/llvm-config.cpp llvm/tools/llvm-config/llvm-config.cpp +--- llvm.orig/tools/llvm-config/llvm-config.cpp 2012-11-12 11:25:40.547628293 +0100 ++++ llvm/tools/llvm-config/llvm-config.cpp 2012-12-02 15:09:31.981279773 +0100 +@@ -231,15 +231,15 @@ + switch (DevelopmentTreeLayout) { + case MakefileStyle: + ActiveBinDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/bin"; +- ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib"; ++ ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib64"; + break; + case CMakeStyle: + ActiveBinDir = ActiveObjRoot + "/bin"; +- ActiveLibDir = ActiveObjRoot + "/lib"; ++ ActiveLibDir = ActiveObjRoot + "/lib64"; + break; + case CMakeBuildModeStyle: + ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE; +- ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE; ++ ActiveLibDir = ActiveObjRoot + "/lib64/" + LLVM_BUILDMODE; + break; + } + +@@ -250,7 +250,7 @@ + ActivePrefix = CurrentExecPrefix; + ActiveIncludeDir = ActivePrefix + "/include"; + ActiveBinDir = ActivePrefix + "/bin"; +- ActiveLibDir = ActivePrefix + "/lib"; ++ ActiveLibDir = ActivePrefix + "/lib64"; + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } + \ No newline at end of file diff --git a/llvm.spec b/llvm.spec index 7d071f2..2780b87 100644 --- a/llvm.spec +++ b/llvm.spec @@ -38,6 +38,7 @@ Patch2: assume-opensuse.patch Patch3: clang-disable-ada-extension.patch # PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit Patch4: default-to-i586.patch +Patch5: llvm-config-lib64.patch # PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support Patch6: arm_suse_support.diff # PATCH-FIX-OPENSUSE disable_neon_in_armv7.diff -- Disable use of neon in armv7 openSUSE @@ -131,6 +132,9 @@ This package contains vim plugins for LLVM like syntax highlighting. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%if "%{_lib}" == "lib64" +%patch5 -p1 +%endif %ifarch %arm %patch6 -p1 %patch9 -p1 @@ -153,8 +157,8 @@ sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp %if "%{_lib}" == "lib64" # Nasty hardcoded path +# tools/llvm-config/llvm-config.cpp \ sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \ - tools/llvm-config/llvm-config.cpp \ tools/clang/test/Preprocessor/iwithprefix.c %endif From 5737fa52aac16fa5029e7f4aa73251e4b07b5a57a85e7fb3ca7c369c870ae7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 26 Jun 2013 10:08:23 +0000 Subject: [PATCH 25/31] - OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=246 --- llvm.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 2780b87..d63d8e9 100644 --- a/llvm.spec +++ b/llvm.spec @@ -157,7 +157,6 @@ sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp %if "%{_lib}" == "lib64" # Nasty hardcoded path -# tools/llvm-config/llvm-config.cpp \ sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp \ tools/clang/test/Preprocessor/iwithprefix.c %endif From 8aa136d84f93dfba564ff4db28d9f731598a5e77546452298259efb9fff336cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 26 Jun 2013 10:08:54 +0000 Subject: [PATCH 26/31] - OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=247 --- llvm.changes | 6 ------ 1 file changed, 6 deletions(-) diff --git a/llvm.changes b/llvm.changes index baee9a2..9d47626 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Thu Jun 20 09:27:36 UTC 2013 - idonmez@suse.com - -- Remove llvm-config-lib64.patch, we can use sed in the spec file - instead. - ------------------------------------------------------------------- Wed Jun 19 12:58:24 UTC 2013 - llunak@suse.com From 920ac6cf68782bc8c5feb8c4fc2cbc30adcd60ec433ff1668bce2e6db1262338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 3 Jul 2013 13:13:45 +0000 Subject: [PATCH 27/31] - Create libLLVM and libclang subpackages. - Fix ARM v5/v7 builds OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=248 --- baselibs.conf | 2 +- llvm.changes | 7 ++++++- llvm.spec | 39 ++++++++++++++++++++++++++++++++------- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index de8a8d0..3df1296 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1 @@ -llvm-devel +libLLVM diff --git a/llvm.changes b/llvm.changes index 9d47626..35eb83f 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 3 13:13:25 UTC 2013 - idonmez@suse.com + +- Create libLLVM and libclang subpackages. + ------------------------------------------------------------------- Wed Jun 19 12:58:24 UTC 2013 - llunak@suse.com @@ -6,7 +11,7 @@ Wed Jun 19 12:58:24 UTC 2013 - llunak@suse.com ------------------------------------------------------------------- Wed Jun 19 12:41:30 UTC 2013 - idonmez@suse.com -- Fix ARM v5/v7 builds +- Fix ARM v5/v7 builds ------------------------------------------------------------------- Tue Jun 18 13:42:57 UTC 2013 - tobias.johannes.klausmann@mni.thm.de diff --git a/llvm.spec b/llvm.spec index d63d8e9..c9fa125 100644 --- a/llvm.spec +++ b/llvm.spec @@ -65,6 +65,7 @@ BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool BuildRequires: python-base +Requires: libLLVM = %{version}-%{release} # llvm does not work on ppc, only ppc64 ExcludeArch: ppc @@ -76,8 +77,15 @@ arbitrary programming languages. The compiler infrastructure includes mirror sets of programming tools as well as libraries with equivalent functionality. +%package -n libLLVM +Summary: Libraries for LLVM +Group: Development/Libraries/C and C++ + +%description -n libLLVM +This package contains the shared libraries needed for LLVM. + %package devel -Summary: Libraries and Header Files for LLVM +Summary: Header Files for LLVM Group: Development/Languages/Other Requires: %{name} = %{version} Requires: libffi-devel @@ -102,12 +110,20 @@ Summary: CLANG frontend for LLVM Group: Development/Languages/Other Requires: %{name} = %{version} Requires: binutils +Requires: libclang = %{version}-%{release} Requires: libstdc++-devel Provides: clang %description clang This package contains the clang (C language) frontend for LLVM. +%package -n libclang +Summary: Library files needed for clang +Group: Development/Libraries/C and C++ + +%description -n libclang +This package contains the shared libraries needed for clang. + %package clang-devel Summary: CLANG frontend for LLVM (devel package) Group: Development/Languages/Other @@ -332,12 +348,13 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %fdupes -s %{buildroot}%{_docdir}/%{name} %fdupes -s %{buildroot}%{_docdir}/%{name}-doc -%post clang -p /sbin/ldconfig +%post -n libLLVM -p /sbin/ldconfig +%postun -n libLLVM -p /sbin/ldconfig -%postun clang -p /sbin/ldconfig +%post -n libclang -p /sbin/ldconfig +%postun -n libclang -p /sbin/ldconfig %post clang-devel -p /sbin/ldconfig - %postun clang-devel -p /sbin/ldconfig %files @@ -358,6 +375,10 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{_mandir}/man1/FileCheck.1%{ext_man} %{_mandir}/man1/opt.1%{ext_man} +%files -n libLLVM +%defattr(-,root,root,-) +%{_libdir}/libLLVM* + %files clang %defattr(-,root,root) %{_bindir}/clang @@ -374,8 +395,6 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{py_sitedir}/Resources %{_datadir}/clang %{_mandir}/man1/clang.1%{ext_man} -%{_libdir}/libclang*.so -%{_libdir}/libclang.so* %{_libdir}/libLTO.so %{_libdir}/libprofile_rt.so %if 0%{?suse_version} >= 1220 @@ -385,8 +404,15 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %{_libdir}/clang %{_libdir}/clang/%{_release_version}/lib/linux/ +%files -n libclang +%defattr(-,root,root,-) +%exclude %{_libdir}/libclang.so +%{_libdir}/libclang*.so +%{_libdir}/libclang.so.* + %files clang-devel %defattr(-,root,root) +%{_libdir}/libclang.so %{_includedir}/clang %{_includedir}/clang-c %doc %{_docdir}/llvm-clang @@ -397,7 +423,6 @@ rm -rf %{buildroot}/usr/share/llvm/cmake %doc %{_mandir}/man1/%{name}-config.1%{ext_man} %{_includedir}/%{name}/ %{_includedir}/%{name}-c/ -%{_libdir}/libLLVM* %doc %{_docdir}/%{name} %files vim-plugins From c23285a176ad13a665da20da4aeb16c7e2d580a013bd10a38a4abbd906a42807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 4 Jul 2013 11:56:15 +0000 Subject: [PATCH 28/31] - Drop disable_neon_in_armv7.diff, neon seems to be working fine - Add cmake-host-triple.patch to pass a host triple argument OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=249 --- cmake-host-triple.patch | 33 +++++++++++++++++++++++++++++++++ disable_neon_in_armv7.diff | 14 -------------- llvm.changes | 6 ++++++ llvm.spec | 31 ++++++++++++++++++++----------- 4 files changed, 59 insertions(+), 25 deletions(-) create mode 100644 cmake-host-triple.patch delete mode 100644 disable_neon_in_armv7.diff diff --git a/cmake-host-triple.patch b/cmake-host-triple.patch new file mode 100644 index 0000000..85ed998 --- /dev/null +++ b/cmake-host-triple.patch @@ -0,0 +1,33 @@ +Index: llvm-3.3/cmake/modules/GetHostTriple.cmake +=================================================================== +--- llvm-3.3.orig/cmake/modules/GetHostTriple.cmake ++++ llvm-3.3/cmake/modules/GetHostTriple.cmake +@@ -15,15 +15,19 @@ function( get_host_triple var ) + set( value "i686-pc-mingw32" ) + endif() + else( MSVC ) +- set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess) +- execute_process(COMMAND sh ${config_guess} +- RESULT_VARIABLE TT_RV +- OUTPUT_VARIABLE TT_OUT +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if( NOT TT_RV EQUAL 0 ) +- message(FATAL_ERROR "Failed to execute ${config_guess}") +- endif( NOT TT_RV EQUAL 0 ) +- set( value ${TT_OUT} ) ++ if( NOT LLVM_HOST_TRIPLE ) ++ set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess) ++ execute_process(COMMAND sh ${config_guess} ++ RESULT_VARIABLE TT_RV ++ OUTPUT_VARIABLE TT_OUT ++ OUTPUT_STRIP_TRAILING_WHITESPACE) ++ if( NOT TT_RV EQUAL 0 ) ++ message(FATAL_ERROR "Failed to execute ${config_guess}") ++ endif( NOT TT_RV EQUAL 0 ) ++ set( value ${TT_OUT} ) ++ else( LLVM_HOST_TRIPLE ) ++ set( value ${LLVM_HOST_TRIPLE} ) ++ endif( NOT LLVM_HOST_TRIPLE ) + endif( MSVC ) + set( ${var} ${value} PARENT_SCOPE ) + message(STATUS "Target triple: ${value}") diff --git a/disable_neon_in_armv7.diff b/disable_neon_in_armv7.diff deleted file mode 100644 index a58bcc0..0000000 --- a/disable_neon_in_armv7.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- ./tools/clang/lib/Driver/Tools.cpp.orig 2012-11-22 10:37:49.686675877 +0100 -+++ ./tools/clang/lib/Driver/Tools.cpp 2012-11-27 10:55:58.984167280 +0100 -@@ -5763,8 +5763,9 @@ void linuxtools::Assemble::ConstructJob( - CmdArgs.push_back("-many"); - } else if (getToolChain().getArch() == llvm::Triple::arm) { - StringRef MArch = getToolChain().getArchName(); -- if (MArch == "armv7" || MArch == "armv7a" || MArch == "armv7-a") -- CmdArgs.push_back("-mfpu=neon"); -+ // Do not use neon in openSUSE -+// if (MArch == "armv7" || MArch == "armv7a" || MArch == "armv7-a") -+// CmdArgs.push_back("-mfpu=neon"); - - StringRef ARMFloatABI = getARMFloatABI(getToolChain().getDriver(), Args, - getToolChain().getTriple()); diff --git a/llvm.changes b/llvm.changes index 35eb83f..8bd89d0 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 4 11:55:43 UTC 2013 - idonmez@suse.com + +- Drop disable_neon_in_armv7.diff, neon seems to be working fine +- Add cmake-host-triple.patch to pass a host triple argument + ------------------------------------------------------------------- Wed Jul 3 13:13:25 UTC 2013 - idonmez@suse.com diff --git a/llvm.spec b/llvm.spec index c9fa125..fb64a1a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -41,11 +41,9 @@ Patch4: default-to-i586.patch Patch5: llvm-config-lib64.patch # PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support Patch6: arm_suse_support.diff -# PATCH-FIX-OPENSUSE disable_neon_in_armv7.diff -- Disable use of neon in armv7 openSUSE -Patch7: disable_neon_in_armv7.diff # PATCH-FIX-OPENSUSE unreachable-code.patch -- Unreachable code warning triggered on SLE -Patch8: unreachable-code.patch -Patch9: arm-config.guess.patch +Patch7: unreachable-code.patch +Patch8: cmake-host-triple.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -151,13 +149,8 @@ This package contains vim plugins for LLVM like syntax highlighting. %if "%{_lib}" == "lib64" %patch5 -p1 %endif -%ifarch %arm %patch6 -p1 -%patch9 -p1 -%endif -%ifarch armv7l armv7hl -%patch7 -p0 -%endif +%patch7 -p1 %patch8 -p1 # We hardcode i586 @@ -188,6 +181,20 @@ TOPLEVEL=$PWD mkdir stage1 stage2 pushd stage1 +# Define host-triple +%ifarch %{ix86} +%define host_triple i586-suse-linux +%endif +%ifarch x86_64 +%define host_triple x86_64-suse-linux +%endif +%ifarch armv6hl +%define host_triple armv6hl-suse-linux-gnueabi +%endif +%ifarch armv7hl +%define host_triple armv7hl-suse-linux-gnueabi +%endif + cmake -G "Unix Makefiles" \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_BUILD_TYPE=Release \ @@ -200,6 +207,7 @@ cmake -G "Unix Makefiles" \ -DCMAKE_C_FLAGS="-O0" \ -DCMAKE_CXX_FLAGS="-O0" \ -DLLVM_TARGET_ARCH=host \ + -DLLVM_HOST_TRIPLE=%{host_triple} \ .. make %{?_smp_mflags} clang @@ -216,9 +224,10 @@ cmake -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ %else -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DLLVM_HOST_TRIPLE=%{host_triple} \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -%ifarch armv7l armv7hl +%ifarch armv7hl -DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \ -DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \ %endif From cea5e2414e82730985841bf137652b1c2fc806afba54bbf85522242f45701cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 4 Jul 2013 14:12:02 +0000 Subject: [PATCH 29/31] Add powerpc64 triple OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=250 --- llvm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm.spec b/llvm.spec index fb64a1a..1afcea8 100644 --- a/llvm.spec +++ b/llvm.spec @@ -194,6 +194,9 @@ pushd stage1 %ifarch armv7hl %define host_triple armv7hl-suse-linux-gnueabi %endif +%ifarch powerpc64 +%define host_triple powerpc64-suse-linux +%endif cmake -G "Unix Makefiles" \ -DBUILD_SHARED_LIBS=OFF \ From 8630f33abbfdcf07277f913b159122767e69ac81c27a3c980ff4efdf151d8f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 4 Jul 2013 14:19:01 +0000 Subject: [PATCH 30/31] Fix ppc again OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=251 --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 1afcea8..84981a7 100644 --- a/llvm.spec +++ b/llvm.spec @@ -194,7 +194,7 @@ pushd stage1 %ifarch armv7hl %define host_triple armv7hl-suse-linux-gnueabi %endif -%ifarch powerpc64 +%ifarch ppc64 %define host_triple powerpc64-suse-linux %endif From 6e7daf8871a82b348cce245d3a0f76c374927198961e5c3d189b2808820667cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 4 Jul 2013 14:19:17 +0000 Subject: [PATCH 31/31] Remove old patch OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=252 --- arm-config.guess.patch | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 arm-config.guess.patch diff --git a/arm-config.guess.patch b/arm-config.guess.patch deleted file mode 100644 index b65bd33..0000000 --- a/arm-config.guess.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: llvm-3.3/autoconf/config.guess -=================================================================== ---- llvm-3.3.orig/autoconf/config.guess -+++ llvm-3.3/autoconf/config.guess -@@ -885,13 +885,11 @@ EOF - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else -- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep -q __ARM_PCS_VFP -- then -- echo ${UNAME_MACHINE}-unknown-linux-gnueabi -- else -- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf -- fi -+ if uname -a | grep -q "armv7"; then -+ echo armv7hl-suse-linux-gnueabi -+ else -+ echo armv5tel-suse-linux-gnueabi -+ fi - fi - exit ;; - avr32*:Linux:*:*)