From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id C58083858D37 for ; Sun, 15 Jan 2023 17:48:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C58083858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: by gnu.wildebeest.org (Postfix, from userid 1000) id B618B302BBEC; Sun, 15 Jan 2023 18:48:46 +0100 (CET) Date: Sun, 15 Jan 2023 18:48:46 +0100 From: Mark Wielaard To: Mike Frysinger Cc: gdb-patches@sourceware.org, Sam James Subject: Re: [PATCH] sim: common, microblaze, mn10300: handle signal.h defining REC_PC. Message-ID: <20230115174846.GE29805@gnu.wildebeest.org> References: <20230114232805.827713-1-mark@klomp.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-3038.0 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Mike, On Sat, Jan 14, 2023 at 07:22:29PM -0500, Mike Frysinger wrote: > On 15 Jan 2023 00:28, Mark Wielaard wrote: > > signal.h isn't needed in microblaze and mn10300 interp.c > > so don't include it. > > these changes are fine to merge if you want to split it out Thanks. I pushed the attached for just those two changed. > > In common sim-events.c, sim-signal.c, nrun.c and dv-sockser.c we > > do need signal.h, but check whether REG_PC is defined (and then > > undefine it) before including the sim headers. > > > > It breaks the build on sparc because signal.h indirectly > > includes /usr/include/sys/ucontext.h and defines REG_PC, > > which is also defined in microblaze-opcm.h > > i don't think this is correct. none of the files quoted use REG_PC, > so undefining a random symbol in them doesn't make sense. nothing in > sim/common/ uses REG_PC for that matter. I see what you mean. I'll try to come up with another fix for this part. Cheers, Mark --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-sim-microblaze-mn10300-remove-signal.h-include-in-in.patch" >From ad6adc6657192a2bec1d721f4e2e7743db4c1da0 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 14 Jan 2023 22:54:20 +0100 Subject: [PATCH] sim: microblaze, mn10300: remove signal.h include in interp.c signal.h isn't needed in microblaze and mn10300 interp.c so don't include it. --- sim/microblaze/interp.c | 1 - sim/mn10300/interp.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c index a4f505e77a8..f53c1d7d65b 100644 --- a/sim/microblaze/interp.c +++ b/sim/microblaze/interp.c @@ -19,7 +19,6 @@ /* This must come before any other includes. */ #include "defs.h" -#include #include #include #include diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index 2915551253f..07c3b8c900f 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -1,8 +1,6 @@ /* This must come before any other includes. */ #include "defs.h" -#include - #include "sim-main.h" #include "sim-options.h" #include "sim-hw.h" -- 2.31.1 --/9DWx/yDrRhgMJTb--