[PATCH/committed] sim: Add bfd include path for common testsuite tools

Dimitar Dimitrov
2021-05-07T18:21:48Z

On a host without installed libbfd, this patch fixes the following
"make check-sim" errors for both pru cross target, and native x86_64:

In file included from ../../../binutils/sim/common/sim-basics.h:131,
from testsuite/common/bits32m0.c:13:../../../binutils/sim/../include/gdb/callback.h:55:10: fatal error: bfd.h: No such file or directory
55 | #include "bfd.h"
| ^~~~~~~

sim/ChangeLog:

* Makefile.in: Rebuild.

sim/testsuite/ChangeLog:

* local.mk (%C%_CPPFLAGS): Add ../bfd include path.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
sim/testsuite/common/local.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sim/testsuite/common/local.mk b/sim/testsuite/common/local.mk
index 38ffb0b0b7d..4db7981d160 100644
--- a/sim/testsuite/common/local.mk
+++ b/sim/testsuite/common/local.mk
@@ -29,7 +29,8 @@ check_PROGRAMS += $(TESTS)

%C%_CPPFLAGS = \
-I$(srcdir)/common \
- -I$(srcroot)/include
+ -I$(srcroot)/include \
+ -I../bfd

# These tests are build-time only tools. Override the default rules for them.
%D%/%.o: %D%/%.c
--
2.20.1