sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/version.h
%build
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DBFD_PLUGIN_LTO_NAME=liblto_plugin_%{_arch}.so"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS |sed -e 's/atom/i686/g'`
%if 0%{!?cross:1}
# We have gdb in separate package
rm -f %buildroot/%_bindir/gdb*
+rm -f %buildroot/%_bindir/gcore*
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
# We have gdb in separate package
rm -f $RPM_BUILD_ROOT%{_bindir}/gdb*
+rm -f $RPM_BUILD_ROOT%{_bindir}/gcore*
rm -rf $RPM_BUILD_ROOT%{_datadir}/gdb
> ../binutils.lang