diff options
Diffstat (limited to 'packaging/qemu-accel.spec.in')
-rw-r--r-- | packaging/qemu-accel.spec.in | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index c3f9f98..2bf3c80 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -80,6 +80,19 @@ This package is used in %{cross} architecture builds using qemu to speed up buil with native binaries. This should not be installed on systems, it is just intended for qemu environments. +%package -n gcc-accel +AutoReqProv: off +Requires: qemu-accel +Provides: gcc-accel +Version: %{version} +Release: %{release} +Summary: Binaries for gcc acceleration +License: GPL-2.0 +Group: Development/Cross Compilation + +%description -n gcc-accel +This package is used in gcc-accel to accelerate clang compiler. + %package -n python-accel AutoReqProv: off Requires: qemu-accel @@ -155,8 +168,6 @@ for executable in $LD \ %{_bindir}/xsltproc \ %{_bindir}/{ccmake,cmake,cpack,ctest} \ %{_bindir}/%{target_arch}-{addr2line,ar,as,c++filt,dwp,elfedit,gprof,ld,ld.bfd,ld.gold,nm,objcopy,objdump,ranlib,readelf,size,strings,strip} \ - %{_bindir}/%{target_arch}-{c++,g++,cpp,gcc,gcc-${gcc_version},gcc-ar,gcc-nm,gcc-ranlib,gcov,gfortran} \ - %{libdir}/gcc/%{target_arch}/${gcc_version}/{cc1,cc1plus,collect2,lto1,lto-wrapper,liblto_plugin.so*,f951} \ %{_bindir}/file \ %{_bindir}/icecc \ %{_bindir}/icerun \ @@ -197,6 +208,10 @@ function prepare_package_list { prepare_package_list all \ $binaries +prepare_package_list gcc \ + %{_bindir}/%{target_arch}-{c++,g++,cpp,gcc,gcc-${gcc_version},gcc-ar,gcc-nm,gcc-ranlib,gcov,gfortran} \ + %{libdir}/gcc/%{target_arch}/${gcc_version}/{cc1,cc1plus,collect2,lto1,lto-wrapper,liblto_plugin.so*,f951} + prepare_package_list clang \ %{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*} @@ -307,7 +322,7 @@ echo '%{our_path}/usr/lib' >> %{_sourcedir}/multilib-accel.list } # rename binutils binaries -for binary in addr2line ar as c++filt dwp elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip gcov +for binary in addr2line ar as c++filt dwp elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip do mv %{buildroot}%{our_path}%{_bindir}/%{target_arch}-$binary %{buildroot}%{our_path}%{_bindir}/$binary sed -e "\|%{our_path}%{_bindir}/%{target_arch}-$binary|d" -i %{_sourcedir}/all-accel.list @@ -371,16 +386,16 @@ do [ x"$sanitizer_enabled" == x"1" ] && bin+="-real" mv %{buildroot}%{our_path}%{_bindir}/%{target_arch}-$bin %{buildroot}/%{our_path}%{_bindir}/$bin ln -s $bin %{buildroot}%{our_path}%{_bindir}/%{target_arch}-$bin - echo "%{our_path}%{_bindir}/$bin" >> %{_sourcedir}/all-accel.list + echo "%{our_path}%{_bindir}/$bin" >> %{_sourcedir}/gcc-accel.list done -for bin in cpp gcc-ar gcc-nm gcc-ranlib +for bin in cpp gcc-ar gcc-nm gcc-ranlib gcov do mv %{buildroot}%{our_path}%{_bindir}/%{target_arch}-$bin %{buildroot}/%{our_path}%{_bindir}/$bin ln -s $bin %{buildroot}%{our_path}%{_bindir}/%{target_arch}-$bin - echo "%{our_path}%{_bindir}/$bin" >> %{_sourcedir}/all-accel.list + echo "%{our_path}%{_bindir}/$bin" >> %{_sourcedir}/gcc-accel.list done ln -s gcc %{buildroot}%{our_path}/%{_bindir}/cc -echo '%{our_path}%{_bindir}/cc' >> %{_sourcedir}/all-accel.list +echo '%{our_path}%{_bindir}/cc' >> %{_sourcedir}/gcc-accel.list # rpmbuild when generating 'requires' tag for gobject-introspection binaries # selects (64-bit) suffix for libs based on ${HOSTTYPE} bash variable @@ -396,17 +411,17 @@ mkdir -p %{buildroot}%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/o for binary in as cpp gcc-ar gcc-nm gcc-ranlib gcov nm do ln -sf %{our_path}%{_bindir}/${binary} %{buildroot}%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/${binary} - echo "%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/${binary}" >> %{_sourcedir}/all-accel.list + echo "%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/${binary}" >> %{_sourcedir}/gcc-accel.list done for binary in cc1 cc1plus collect2 lto1 lto-wrapper f951 do ln -sf %{our_path}/usr/lib/gcc/%{target_arch}/${gcc_version}/${binary} %{buildroot}%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/${binary} - echo "%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/${binary}" >> %{_sourcedir}/all-accel.list + echo "%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/${binary}" >> %{_sourcedir}/gcc-accel.list done ln -sf %{our_path}%{_bindir}/gcc %{buildroot}%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/xgcc ln -sf %{our_path}%{_bindir}/g++ %{buildroot}%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/xg++ -echo "%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/xgcc" >> %{_sourcedir}/all-accel.list -echo "%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/xg++" >> %{_sourcedir}/all-accel.list +echo "%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/xgcc" >> %{_sourcedir}/gcc-accel.list +echo "%{our_path}/home/abuild/rpmbuild/BUILD/gcc-${gcc_version}/obj/gcc/xg++" >> %{_sourcedir}/gcc-accel.list # support /lib/cpp ln -sf %{our_path}%{_bindir}/cpp %{buildroot}%{our_path}/usr/lib/cpp @@ -449,6 +464,12 @@ find . %{_sourcedir} -name '*.list' -exec sed -e 's|%{our_path}/%{_lib}|%{our_pa # Join native and multilib lists cat %{_sourcedir}/all-accel.list %{?multilib:%{_sourcedir}/multilib-accel.list} | sort -u > %{_sourcedir}/qemu-accel.list +## gcc-accel +# Prepare gcc files list +sed -e 's|%{our_path}/%{_lib}|%{our_path}%{_libdir}|' %{_sourcedir}/gcc-accel.list | sort -u > gcc-full.list +# Remove common files from gcc-accel +comm -13 %{_sourcedir}/qemu-accel.list gcc-full.list > %{_sourcedir}/gcc-accel.list + ## python-accel # Generate list of all python files find %{buildroot} -name '*.py' | sed -e 's|%{buildroot}%{our_path}||' >> python.list @@ -486,6 +507,9 @@ ldconfig %defattr(-,root,root) %exclude %{our_path}%{py_libdir}/* +%files -n gcc-accel -f %{_sourcedir}/gcc-accel.list +%defattr(-,root,root) + %files -n python-accel -f %{_sourcedir}/python-accel.list %defattr(-,root,root) |