summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Merinov <n.merinov@samsung.com>2019-01-17 14:07:11 +0300
committerNikolai Merinov <n.merinov@samsung.com>2019-01-17 15:12:50 +0300
commitd7f956bc70380189d6a8cbc0a7930a09e08b64c4 (patch)
tree0e0aac05586cc38e6efbfbc1016f414d633d2701
parent1359e4dbfecabab05500d06a8621919150a6dc38 (diff)
downloadqemu-accel-d7f956bc70380189d6a8cbc0a7930a09e08b64c4.tar.gz
qemu-accel-d7f956bc70380189d6a8cbc0a7930a09e08b64c4.tar.bz2
qemu-accel-d7f956bc70380189d6a8cbc0a7930a09e08b64c4.zip
Move gcc acceleration files to separate package
Signed-off-by: Nikolai Merinov <n.merinov@samsung.com>
-rw-r--r--packaging/baselibs_body11
-rw-r--r--packaging/qemu-accel-aarch64.spec46
-rw-r--r--packaging/qemu-accel-armv7hl.spec46
-rw-r--r--packaging/qemu-accel-armv7l.spec46
-rw-r--r--packaging/qemu-accel.spec.in46
5 files changed, 150 insertions, 45 deletions
diff --git a/packaging/baselibs_body b/packaging/baselibs_body
index d00e563..faba769 100644
--- a/packaging/baselibs_body
+++ b/packaging/baselibs_body
@@ -6,11 +6,20 @@ qemu-accel
targettype 32bit block!
autoreqprov off
+/
- requires "gcc"
config -/pkg-config$
+
+gcc-accel
+ targettype aarch64 block!
+ targettype armv7l block!
+ targettype armv7hl block!
+ targettype 32bit block!
+ autoreqprov off
+ +/
+ requires "gcc"
post "#PLUGIN_POSTIN#"
postun "#PLUGIN_POSTUN#"
+
python-accel
targettype aarch64 block!
targettype armv7l block!
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec
index 6c2ebbb..cbb638b 100644
--- a/packaging/qemu-accel-aarch64.spec
+++ b/packaging/qemu-accel-aarch64.spec
@@ -83,6 +83,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
@@ -158,8 +171,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 \
@@ -200,6 +211,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-*}
@@ -310,7 +325,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
@@ -374,16 +389,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
@@ -399,17 +414,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
@@ -452,6 +467,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
@@ -489,6 +510,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)
diff --git a/packaging/qemu-accel-armv7hl.spec b/packaging/qemu-accel-armv7hl.spec
index 3b4626d..b7fefb9 100644
--- a/packaging/qemu-accel-armv7hl.spec
+++ b/packaging/qemu-accel-armv7hl.spec
@@ -83,6 +83,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
@@ -158,8 +171,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 \
@@ -200,6 +211,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-*}
@@ -310,7 +325,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
@@ -374,16 +389,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
@@ -399,17 +414,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
@@ -452,6 +467,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
@@ -489,6 +510,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)
diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec
index a399ec8..5db0e96 100644
--- a/packaging/qemu-accel-armv7l.spec
+++ b/packaging/qemu-accel-armv7l.spec
@@ -83,6 +83,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
@@ -158,8 +171,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 \
@@ -200,6 +211,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-*}
@@ -310,7 +325,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
@@ -374,16 +389,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
@@ -399,17 +414,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
@@ -452,6 +467,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
@@ -489,6 +510,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)
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)