rpm: add patches to fix bfd.h related build issues
This commit adds two patches to the rpm package to fix two separate but
related build issues:
- The first patch fixes a build that occurs when rpm is built after
elfutils, but without binutils. In this case, dwarf.h is present, so
rpm enables the build of a number of additional tools. But one of
them uses bfd.h, provided by binutils, without checking for its
existence. So the first patch fixes that by checking for bfd.h
existence before enabling the tool.
Fixes:
http://autobuild.buildroot.net/results/810/
810e24cab65f67d143da29c78c0f89d37a851cd7/build-end.log
- The second patch fixes a build issue that occurs when rpm is built
after both dwarf and binutils. In this case, bfd.h complains because
config.h is not included. That's a weird and silly issue in bfd.h
that the binutils developers don't want to fix, and you have to
define PACKAGE or PACKAGE_VERSION before including bfd.h to use it
outside of binutils.
Fixes:
http://autobuild.buildroot.net/results/362/
362502f89631c9ba1d71906527674657ccff01ed/build-end.log
Thanks a lot to James Knight <james.knight@rockwellcollins.com> for the
initial investigation about the first issue.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>