diff options
author | Nikolai Bozhenov <n.bozhenov@samsung.com> | 2015-02-24 15:08:25 +0300 |
---|---|---|
committer | Nikolai Bozhenov <n.bozhenov@samsung.com> | 2015-04-13 16:27:01 +0300 |
commit | e749492b5947f3083f59db67da15e33d0ed9e1ea (patch) | |
tree | 94dec9086020ea745fa3923ebb174172750255e5 /packaging | |
parent | eccd2f4643add2028c333f27011c357f8f0dc162 (diff) | |
download | qemu-accel-e749492b5947f3083f59db67da15e33d0ed9e1ea.tar.gz qemu-accel-e749492b5947f3083f59db67da15e33d0ed9e1ea.tar.bz2 qemu-accel-e749492b5947f3083f59db67da15e33d0ed9e1ea.zip |
Install cross LTO plugin when installing qemu-accelsubmit/tizen_common/20150616.095732submit/tizen_3.0.2015.q2_common/20150616.095826accepted/tizen/common/20150616.100059accepted/tizen/3.0.2015.q2/common/20150616.100208
So that binutils can work with LTO objects without additional flags
in qemu-accel mode
Change-Id: Ic50d79a6453a51ca39e7dc6b251190e70304dae2
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/baselibs.conf | 32 | ||||
-rw-r--r-- | packaging/qemu-accel-aarch64.spec | 14 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7l.spec | 14 | ||||
-rw-r--r-- | packaging/qemu-accel.spec.in | 14 |
4 files changed, 74 insertions, 0 deletions
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf index 73d841c..8bfedf9 100644 --- a/packaging/baselibs.conf +++ b/packaging/baselibs.conf @@ -63,6 +63,22 @@ qemu-accel-armv7l post " ln -s /usr/lib/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/$f /usr/armv7l-tizen-linux-gnueabi/bin/$f;" post " done" post "fi" + post "" + post "HOST_ARCH=`echo -n %{_host_cpu} | sed -e 's/i.86/i586/'`" + post "ACCEL_DIR=/emul/$HOST_ARCH-for-arm" + post "mkdir -p %_bindir/../lib/bfd-plugins" + post "%_sbindir/update-alternatives --install \" + post " %_bindir/../lib/bfd-plugins/liblto_plugin_%{_arch}.so \" + post " liblto_plugin_%{_arch}.so \" + post " $ACCEL_DIR/usr/lib/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/liblto_plugin.so \" + post " 3" + post "" + postun "HOST_ARCH=`echo -n %{_host_cpu} | sed -e 's/i.86/i586/'`" + postun "ACCEL_DIR=/emul/$HOST_ARCH-for-arm" + postun "GCCVER=$(LANG=C gcc --version | head -1 | sed -e "s/^.*gcc[^0-9]*\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2/") " + postun "%_sbindir/update-alternatives --remove \" + postun " liblto_plugin_%{_arch}.so \" + postun " $ACCEL_DIR/usr/lib/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/liblto_plugin.so" +/ qemu-accel-aarch64 @@ -129,4 +145,20 @@ qemu-accel-aarch64 post " ln -s /usr/lib64/gcc/aarch64-tizen-linux/${GCCVER}/$f /usr/lib/$f;" post " done" post "fi" + post "" + post "HOST_ARCH=`echo -n %{_host_cpu} | sed -e 's/i.86/i586/'`" + post "ACCEL_DIR=/emul/$HOST_ARCH-for-aarch64" + post "mkdir -p %_bindir/../lib/bfd-plugins" + post "%_sbindir/update-alternatives --install \" + post " %_bindir/../lib/bfd-plugins/liblto_plugin_%{_arch}.so \" + post " liblto_plugin_%{_arch}.so \" + post " $ACCEL_DIR/usr/lib/gcc/aarch64-tizen-linux/${GCCVER}/liblto_plugin.so \" + post " 3" + post "" + postun "HOST_ARCH=`echo -n %{_host_cpu} | sed -e 's/i.86/i586/'`" + postun "ACCEL_DIR=/emul/$HOST_ARCH-for-aarch64" + postun "GCCVER=$(LANG=C gcc --version | head -1 | sed -e "s/^.*gcc[^0-9]*\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2/") " + postun "%_sbindir/update-alternatives --remove \" + postun " liblto_plugin_%{_arch}.so \" + postun " $ACCEL_DIR/usr/lib/gcc/aarch64-tizen-linux/${GCCVER}/liblto_plugin.so" +/ diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index e4f4b26..5536629 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -59,6 +59,8 @@ BuildRequires: qemu-linux-user BuildRequires: elfutils BuildRequires: libxslt-tools Requires: coreutils +Requires(post): update-alternatives +Requires(postun): update-alternatives Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -76,6 +78,11 @@ ExclusiveArch: x86_64 %ix86 %define binaries_binutils addr2line ar as elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip %define binaries_binutils_comma %(echo %{binaries_binutils} | sed -e "s/ /,/g") +%define bfd_plugin_dir %{_bindir}/../lib/bfd-plugins +%define bfd_plugin_lto_name liblto_plugin_%{_arch}.so +%define bfd_plugin_lto %{bfd_plugin_dir}/%{bfd_plugin_lto_name} +%define gcc_plugin_lto %{our_path}%{_libdir}/gcc/%{emulated_arch_triple_long}/%{gcc_version_dot}/liblto_plugin.so + %description This package is used in %{emulated_arch_long} architecture builds using qemu to speed up builds with native binaries. @@ -288,11 +295,17 @@ ln -s %{our_path}/usr/sbin %{buildroot}/%{our_path}/sbin ln -s %{our_path}/usr/bin/rpm %{buildroot}/%{our_path}/usr/bin/rpmquery ln -s %{our_path}/usr/bin/rpm %{buildroot}/%{our_path}/usr/bin/rpmverify +mkdir -p "%{buildroot}%{bfd_plugin_dir}" +touch "%{buildroot}%{bfd_plugin_lto}" + %post ldconfig +"%_sbindir/update-alternatives" --install \ + "%{bfd_plugin_lto}" "%{bfd_plugin_lto_name}" "%{gcc_plugin_lto}" 3 %postun ldconfig +"%_sbindir/update-alternatives" --remove %{bfd_plugin_lto_name} "%{gcc_plugin_lto}" %files %defattr(-,root,root) @@ -301,5 +314,6 @@ ldconfig /usr/%{emulated_arch_triple_long}/include /emul /qemu +%ghost %{bfd_plugin_lto} %changelog diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index 358b6d9..a22c5ed 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -59,6 +59,8 @@ BuildRequires: qemu-linux-user BuildRequires: elfutils BuildRequires: libxslt-tools Requires: coreutils +Requires(post): update-alternatives +Requires(postun): update-alternatives Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -76,6 +78,11 @@ ExclusiveArch: x86_64 %ix86 %define binaries_binutils addr2line ar as elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip %define binaries_binutils_comma %(echo %{binaries_binutils} | sed -e "s/ /,/g") +%define bfd_plugin_dir %{_bindir}/../lib/bfd-plugins +%define bfd_plugin_lto_name liblto_plugin_%{_arch}.so +%define bfd_plugin_lto %{bfd_plugin_dir}/%{bfd_plugin_lto_name} +%define gcc_plugin_lto %{our_path}%{_libdir}/gcc/%{emulated_arch_triple_long}/%{gcc_version_dot}/liblto_plugin.so + %description This package is used in %{emulated_arch_long} architecture builds using qemu to speed up builds with native binaries. @@ -288,11 +295,17 @@ ln -s %{our_path}/usr/sbin %{buildroot}/%{our_path}/sbin ln -s %{our_path}/usr/bin/rpm %{buildroot}/%{our_path}/usr/bin/rpmquery ln -s %{our_path}/usr/bin/rpm %{buildroot}/%{our_path}/usr/bin/rpmverify +mkdir -p "%{buildroot}%{bfd_plugin_dir}" +touch "%{buildroot}%{bfd_plugin_lto}" + %post ldconfig +"%_sbindir/update-alternatives" --install \ + "%{bfd_plugin_lto}" "%{bfd_plugin_lto_name}" "%{gcc_plugin_lto}" 3 %postun ldconfig +"%_sbindir/update-alternatives" --remove %{bfd_plugin_lto_name} "%{gcc_plugin_lto}" %files %defattr(-,root,root) @@ -301,5 +314,6 @@ ldconfig /usr/%{emulated_arch_triple_long}/include /emul /qemu +%ghost %{bfd_plugin_lto} %changelog diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index a37ac97..22732df 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -59,6 +59,8 @@ BuildRequires: qemu-linux-user BuildRequires: elfutils BuildRequires: libxslt-tools Requires: coreutils +Requires(post): update-alternatives +Requires(postun): update-alternatives Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -76,6 +78,11 @@ ExclusiveArch: x86_64 %ix86 %define binaries_binutils addr2line ar as elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip %define binaries_binutils_comma %(echo %{binaries_binutils} | sed -e "s/ /,/g") +%define bfd_plugin_dir %{_bindir}/../lib/bfd-plugins +%define bfd_plugin_lto_name liblto_plugin_%{_arch}.so +%define bfd_plugin_lto %{bfd_plugin_dir}/%{bfd_plugin_lto_name} +%define gcc_plugin_lto %{our_path}%{_libdir}/gcc/%{emulated_arch_triple_long}/%{gcc_version_dot}/liblto_plugin.so + %description This package is used in %{emulated_arch_long} architecture builds using qemu to speed up builds with native binaries. @@ -288,11 +295,17 @@ ln -s %{our_path}/usr/sbin %{buildroot}/%{our_path}/sbin ln -s %{our_path}/usr/bin/rpm %{buildroot}/%{our_path}/usr/bin/rpmquery ln -s %{our_path}/usr/bin/rpm %{buildroot}/%{our_path}/usr/bin/rpmverify +mkdir -p "%{buildroot}%{bfd_plugin_dir}" +touch "%{buildroot}%{bfd_plugin_lto}" + %post ldconfig +"%_sbindir/update-alternatives" --install \ + "%{bfd_plugin_lto}" "%{bfd_plugin_lto_name}" "%{gcc_plugin_lto}" 3 %postun ldconfig +"%_sbindir/update-alternatives" --remove %{bfd_plugin_lto_name} "%{gcc_plugin_lto}" %files %defattr(-,root,root) @@ -301,5 +314,6 @@ ldconfig /usr/%{emulated_arch_triple_long}/include /emul /qemu +%ghost %{bfd_plugin_lto} %changelog |