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

Dimitar Dimitrov
2021-04-05T16:31:34Z

[-- Attachment #1: Type: text/plain, Size: 2792 bytes --]

On Sun, 4 Apr 2021 17:35:36 EEST Mike Frysinger via Gdb-patches wrote:
> Since we require ports to use a matching subdir name in the testsuite
> tree, we can use that to calculate the $arch value.
> ---
> sim/testsuite/aarch64/allinsn.exp | 4 ----
> sim/testsuite/arm/allinsn.exp | 4 ----
> sim/testsuite/arm/iwmmxt/iwmmxt.exp | 4 ----
> sim/testsuite/arm/misc.exp | 4 ----
> sim/testsuite/arm/thumb/allthumb.exp | 4 ----
> sim/testsuite/arm/xscale/xscale.exp | 4 ----
> sim/testsuite/avr/allinsn.exp | 4 ----
> sim/testsuite/bfin/allinsn.exp | 4 ----
> sim/testsuite/bpf/allinsn.exp | 4 ----
> sim/testsuite/cr16/allinsn.exp | 4 ----
> sim/testsuite/cr16/misc.exp | 4 ----
> sim/testsuite/cris/asm/asm.exp | 4 ----
> sim/testsuite/cris/c/c.exp | 4 ----
> sim/testsuite/cris/hw/rv-n-cris/rvc.exp | 7 +-----
> sim/testsuite/d10v/allinsn.exp | 4 ----
> sim/testsuite/example-synacor/allinsn.exp | 4 ----
> sim/testsuite/frv/allinsn.exp | 4 ----
> sim/testsuite/frv/fr400/allinsn.exp | 4 ----
> sim/testsuite/frv/fr500/allinsn.exp | 4 ----
> sim/testsuite/frv/fr550/allinsn.exp | 4 ----
> sim/testsuite/frv/interrupts.exp | 4 ----
> sim/testsuite/frv/misc.exp | 4 ----
> sim/testsuite/frv/parallel.exp | 4 ----
> sim/testsuite/ft32/allinsn.exp | 4 ----
> sim/testsuite/h8300/allinsn.exp | 4 ----
> sim/testsuite/iq2000/allinsn.exp | 4 ----
> sim/testsuite/lib/sim-defs.exp | 27 ++++++++++++++---------
> sim/testsuite/lm32/allinsn.exp | 4 ----
> sim/testsuite/m32c/allinsn.exp | 4 ----
> sim/testsuite/m32r/allinsn.exp | 4 ----
> sim/testsuite/m32r/misc.exp | 4 ----
> sim/testsuite/m68hc11/allinsn.exp | 4 ----
> sim/testsuite/mcore/allinsn.exp | 4 ----
> sim/testsuite/microblaze/allinsn.exp | 4 ----
> sim/testsuite/mips/basic.exp | 4 ----
> sim/testsuite/mn10300/allinsn.exp | 4 ----
> sim/testsuite/moxie/allinsn.exp | 4 ----
> sim/testsuite/msp430/allinsn.exp | 4 ----
> sim/testsuite/or1k/alltests.exp | 4 ----
> sim/testsuite/pru/allinsn.exp | 4 ----
> sim/testsuite/riscv/allinsn.exp | 4 ----
> sim/testsuite/sh/allinsn.exp | 4 ----
> sim/testsuite/v850/allinsns.exp | 4 ----
> 43 files changed, 18 insertions(+), 180 deletions(-)
Hi,

This patch set, in combination with the attached minor fix, is resolving all
"check-sim" errors and failures for PRU target.

Thanks,
Dimitar

[-- Attachment #2: 0001-sim-Add-bfd-include-path-for-common-testsuite-tools.patch --]
[-- Type: text/x-patch, Size: 1204 bytes --]

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"
| ^~~~~~~

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