sim: Add bfd include path for common testsuite tools
authorDimitar Dimitrov <dimitar@dinux.eu>
Mon, 5 Apr 2021 16:21:35 +0000 (19:21 +0300)
committerDimitar Dimitrov <dimitar@dinux.eu>
Fri, 7 May 2021 18:02:34 +0000 (21:02 +0300)
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 <dimitar@dinux.eu>
sim/ChangeLog
sim/Makefile.in
sim/testsuite/ChangeLog
sim/testsuite/common/local.mk

index 16bca69cacccf146ea5c1105230ca2ec2c3556df..469e768aee03a865fb87e59b0b5ad6c54e41b4b8 100644 (file)
@@ -1,3 +1,7 @@
+2021-05-07  Dimitar Dimitrov  <dimitar@dinux.eu>
+
+       * Makefile.in: Rebuild.
+
 2021-05-04  Tom Tromey  <tromey@adacore.com>
 
        * Makefile.in: Rebuild.
index 5c997b0c1185d25819fe8277c80d5a309ee94982..416014769fde2431b6a708dae801081220438037 100644 (file)
@@ -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
 
index 8b03c1d0a726a6dbd927ad1e85ec4757329c99b0..4234747c86e2eebd7d7e9e6e801f45e8eee5708a 100644 (file)
@@ -1,3 +1,7 @@
+2021-05-07  Dimitar Dimitrov  <dimitar@dinux.eu>
+
+       * local.mk (%C%_CPPFLAGS): Add ../bfd include path.
+
 2021-04-08  Mike Frysinger  <vapier@gentoo.org>
 
        * lib/sim-defs.exp (run_sim_test): Set status to unsupported if
index 38ffb0b0b7d24f41f0c5b0c87212ec7712ebfd6b..4db7981d160225bc3022e41e55483e5eaed4e009 100644 (file)
@@ -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