diff options
author | Slava Barinov <v.barinov@samsung.com> | 2017-04-17 15:23:43 +0300 |
---|---|---|
committer | Slava Barinov <v.barinov@samsung.com> | 2017-06-19 17:21:18 +0300 |
commit | b42340beb211c71ac8768b9b40043eb03db20e0d (patch) | |
tree | 492787cd09f9f412491b95de914071111198f8dc | |
parent | 44652613c26e39f50aa21d7382e1e8c00b5700e1 (diff) | |
download | qemu-accel-b42340beb211c71ac8768b9b40043eb03db20e0d.tar.gz qemu-accel-b42340beb211c71ac8768b9b40043eb03db20e0d.tar.bz2 qemu-accel-b42340beb211c71ac8768b9b40043eb03db20e0d.zip |
Add clang acceleration supportsubmit/tizen_base/20170801.052130submit/tizen_base/20170705.023439submit/tizen_base/20170622.094219accepted/tizen/base/20170801.052539accepted/tizen/base/20170707.183518
Change-Id: I0c311a865a73cf9959cc99ed2af3548cfe248312
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
-rw-r--r-- | packaging/qemu-accel-aarch64.spec | 19 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7l.spec | 19 | ||||
-rw-r--r-- | packaging/qemu-accel.spec.in | 19 |
3 files changed, 33 insertions, 24 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index 3bccb4d..5099a56 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -60,6 +60,7 @@ BuildRequires: icecream BuildRequires: mono-core BuildRequires: libunwind BuildRequires: libuuid +BuildRequires: clang Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -146,7 +147,8 @@ for executable in $LD \ %{_rpmconfigdir}/*deps \ %{_bindir}/mono-sgen \ %{_libdir}/{libmonoboehm-*.so.*,libMonoPosixHelper.so,libmonosgen-*.so.*} \ - %{_libdir}/{libunwind*.so*,libuuid*.so*} + %{_libdir}/{libunwind*.so*,libuuid*.so*} \ + %{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*} do binaries="$binaries $executable `ldd $executable | sed -n 's,.*=> \(/[^ ]*\) .*,\1,p'`" done @@ -354,15 +356,17 @@ gcc_install_dir=$(%{target_arch}-gcc -print-search-dirs | sed -ne '/install: /s/ sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 ${gcc_install_dir}/liblto_plugin.so," %{_sourcedir}/baselibs.conf -%{?multilib: -sed -i -e '/post "/a post "echo '%{our_path}/lib' >> /etc/ld.so.conf"\n' %{_sourcedir}/baselibs.conf +# Use /usr/lib for cross clang libdir on armv7l architecture +%{?armv7l: +awk '/post "/ && !x {print $0; print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +} -# Set rpm config directory corresponding to architecture -mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ -echo "export RPM_CONFIGDIR=%{libdir}/rpm" > %{buildroot}%{_sysconfdir}/profile.d/rpm.bash +%{?multilib: +awk '/post "/ && !x {print $0; print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } + # allow build of baselibs.conf -sed -i -e "/targettype %{cross} block!/d" %{_sourcedir}/baselibs.conf +sed -e "/targettype %{cross} block!/d" -i %{_sourcedir}/baselibs.conf %post ldconfig @@ -374,7 +378,6 @@ ldconfig %files %defattr(-,root,root) %{our_path} -%{?multilib:%{_sysconfdir}/profile.d/rpm.bash} %exclude %{our_path}%{_bindir}/python* %files -n python-accel diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index 53c4b65..3ad805c 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -60,6 +60,7 @@ BuildRequires: icecream BuildRequires: mono-core BuildRequires: libunwind BuildRequires: libuuid +BuildRequires: clang Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -146,7 +147,8 @@ for executable in $LD \ %{_rpmconfigdir}/*deps \ %{_bindir}/mono-sgen \ %{_libdir}/{libmonoboehm-*.so.*,libMonoPosixHelper.so,libmonosgen-*.so.*} \ - %{_libdir}/{libunwind*.so*,libuuid*.so*} + %{_libdir}/{libunwind*.so*,libuuid*.so*} \ + %{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*} do binaries="$binaries $executable `ldd $executable | sed -n 's,.*=> \(/[^ ]*\) .*,\1,p'`" done @@ -354,15 +356,17 @@ gcc_install_dir=$(%{target_arch}-gcc -print-search-dirs | sed -ne '/install: /s/ sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 ${gcc_install_dir}/liblto_plugin.so," %{_sourcedir}/baselibs.conf -%{?multilib: -sed -i -e '/post "/a post "echo '%{our_path}/lib' >> /etc/ld.so.conf"\n' %{_sourcedir}/baselibs.conf +# Use /usr/lib for cross clang libdir on armv7l architecture +%{?armv7l: +awk '/post "/ && !x {print $0; print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +} -# Set rpm config directory corresponding to architecture -mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ -echo "export RPM_CONFIGDIR=%{libdir}/rpm" > %{buildroot}%{_sysconfdir}/profile.d/rpm.bash +%{?multilib: +awk '/post "/ && !x {print $0; print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } + # allow build of baselibs.conf -sed -i -e "/targettype %{cross} block!/d" %{_sourcedir}/baselibs.conf +sed -e "/targettype %{cross} block!/d" -i %{_sourcedir}/baselibs.conf %post ldconfig @@ -374,7 +378,6 @@ ldconfig %files %defattr(-,root,root) %{our_path} -%{?multilib:%{_sysconfdir}/profile.d/rpm.bash} %exclude %{our_path}%{_bindir}/python* %files -n python-accel diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index 96148c8..02e678d 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -57,6 +57,7 @@ BuildRequires: icecream BuildRequires: mono-core BuildRequires: libunwind BuildRequires: libuuid +BuildRequires: clang Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -143,7 +144,8 @@ for executable in $LD \ %{_rpmconfigdir}/*deps \ %{_bindir}/mono-sgen \ %{_libdir}/{libmonoboehm-*.so.*,libMonoPosixHelper.so,libmonosgen-*.so.*} \ - %{_libdir}/{libunwind*.so*,libuuid*.so*} + %{_libdir}/{libunwind*.so*,libuuid*.so*} \ + %{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*} do binaries="$binaries $executable `ldd $executable | sed -n 's,.*=> \(/[^ ]*\) .*,\1,p'`" done @@ -351,15 +353,17 @@ gcc_install_dir=$(%{target_arch}-gcc -print-search-dirs | sed -ne '/install: /s/ sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}${gcc_install_dir}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 ${gcc_install_dir}/liblto_plugin.so," %{_sourcedir}/baselibs.conf -%{?multilib: -sed -i -e '/post "/a post "echo '%{our_path}/lib' >> /etc/ld.so.conf"\n' %{_sourcedir}/baselibs.conf +# Use /usr/lib for cross clang libdir on armv7l architecture +%{?armv7l: +awk '/post "/ && !x {print $0; print " post \"echo export\\ CLANG_NO_LIBDIR_SUFFIX=1 >> /etc/profile\""; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf +} -# Set rpm config directory corresponding to architecture -mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ -echo "export RPM_CONFIGDIR=%{libdir}/rpm" > %{buildroot}%{_sysconfdir}/profile.d/rpm.bash +%{?multilib: +awk '/post "/ && !x {print $0; print " post \"echo '%{our_path}/lib' >> /etc/ld.so.conf\"\n"; x=1;next} 1' %{_sourcedir}/baselibs.conf > baselibs_updated && mv baselibs_updated %{_sourcedir}/baselibs.conf } + # allow build of baselibs.conf -sed -i -e "/targettype %{cross} block!/d" %{_sourcedir}/baselibs.conf +sed -e "/targettype %{cross} block!/d" -i %{_sourcedir}/baselibs.conf %post ldconfig @@ -371,7 +375,6 @@ ldconfig %files %defattr(-,root,root) %{our_path} -%{?multilib:%{_sysconfdir}/profile.d/rpm.bash} %exclude %{our_path}%{_bindir}/python* %files -n python-accel |