Hack around gdb >= 7.0 trying to globally install syscall/*linux.xml.

This commit is contained in:
Ralf Corsepius
2009-10-07 06:49:32 +00:00
parent 7b1df57761
commit 2b22160ffe

View File

@@ -26,5 +26,19 @@
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib@tool_target@-sim.a
%if "%{gdb_version}" >= "7.0"
# Bug in gdb-7.0, bogusly installs linux-only files
somethinguseful=0
for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do
case $f in
*linux.xml) rm -f $f;;
*.xml) somethinguseful=1;;
esac
done
if test $somethinguseful -eq 0; then
rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls"
fi
%endif
cd ..