Re: [PATCH 1/3] sim: testsuite: calculate $arch from $subdir

Mike Frysinger via Gdb-patches
2021-04-05T17:17:06Z

On 05 Apr 2021 19:31, Dimitar Dimitrov wrote:
> From 6f0fb28ff86acc17b5038978cc42144ffa5a5cb4 Mon Sep 17 00:00:00 2001
> From: Dimitar Dimitrov <dimitar@dinux.eu>
> Date: Mon, 5 Apr 2021 19:21:35 +0300
> Subject: [PATCH] sim: Add bfd include path for common testsuite tools
>
> On my Fedora33 host 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"
> | ^~~~~~~

i'm guessing you don't have libbfd installed in your host distro already ?
i do which is why i think i missed this.

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

this looks fine. i'm not sure it's super kosher since it's technically,
mixing host & target headers, but i don't think we have much choice at
this point.
-mike