From 0d315c88a77a811fdfad0b9fdaa4d8b337cc0a39 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Mon, 5 Apr 2021 19:21:35 +0300 Subject: [PATCH] sim: Add bfd include path for common testsuite tools 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" | ^~~~~~~ Signed-off-by: Dimitar Dimitrov --- sim/ChangeLog | 4 ++++ sim/Makefile.in | 3 ++- sim/testsuite/ChangeLog | 4 ++++ sim/testsuite/common/local.mk | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sim/ChangeLog b/sim/ChangeLog index 16bca69cacc..469e768aee0 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,7 @@ +2021-05-07 Dimitar Dimitrov + + * Makefile.in: Rebuild. + 2021-05-04 Tom Tromey * Makefile.in: Rebuild. diff --git a/sim/Makefile.in b/sim/Makefile.in index 5c997b0c118..416014769fd 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -731,7 +731,8 @@ LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ EXTRA_DEJAGNU_SITE_CONFIG = site-srcdir.exp testsuite_common_CPPFLAGS = \ -I$(srcdir)/common \ - -I$(srcroot)/include + -I$(srcroot)/include \ + -I../bfd all: all-recursive diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog index 8b03c1d0a72..4234747c86e 100644 --- a/sim/testsuite/ChangeLog +++ b/sim/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2021-05-07 Dimitar Dimitrov + + * local.mk (%C%_CPPFLAGS): Add ../bfd include path. + 2021-04-08 Mike Frysinger * lib/sim-defs.exp (run_sim_test): Set status to unsupported if 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