From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MbzxFE0Ahmq7DTEAWB0awg (envelope-from ) for ; Wed, 19 Aug 2026 15:13:17 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=RYPtvrt1; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3EAA11E0A3; Wed, 19 Aug 2026 15:13:17 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 891361E09B for ; Wed, 19 Aug 2026 15:13:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6B40E4B99F58 for ; Wed, 19 Aug 2026 19:13:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B40E4B99F58 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=RYPtvrt1 Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 7CEC64BA9013; Wed, 19 Aug 2026 19:11:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7CEC64BA9013 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7CEC64BA9013 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787166693; cv=none; b=AAXNRodz/hSQ/NFyX/o/6Pc4RAcCNkrYG+e6ymp1pv/u0t1vLHDaLF5h6+iqGgdNDX9Bi1SL+04qRz4sXHTPcJUp677hNeylNwbipJpxcVMe+sKpH63O1ZWMApW4NCYFuGN5pwb6klzVxX6eoT3UGeb/UgzLgje2GcBMA8ADEvI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787166693; c=relaxed/simple; bh=qAOSBHEG62dqxE61Zjtiv8q+nfWSM7eHMwWaA8ea/S4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dOF0XFg9pSth7m4xTWf8KM0nQjCTaTae+oAzhkshBKBkX5OHe7uBh1P03ioJobwAJMrAJOGO5/mKBGqjxOPUwjUZRL6X4Z+8cdR+XiNWho687FI2LkyAlu9yLBReQ7O3DBBNLEhVaGbCBH/vaLZl2K72r72n1Tp7helVcK01e3o= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=RYPtvrt1 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CEC64BA9013 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 9F136E5CE4; Wed, 19 Aug 2026 21:11:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:references :in-reply-to:subject:subject:from:from:received:received; s= 20200306; t=1787166692; bh=qAOSBHEG62dqxE61Zjtiv8q+nfWSM7eHMwWaA 8ea/S4=; b=RYPtvrt1JdOo60GUh2kDJL8ZoaJqIkBcWD+1s8C9davaSC7/vLuGf NAdkgzGSV++cM9GQVvQrgSckXMmSixjdvP0az879nnGwp5YOi08tjjV1xUtUVTn7 EaSIqt1IdkQYhsXumv/NmT6ozFQ3cXMJJgBnu0X7ND+QRGGzlLLc52p8gNyBscr3 MyR7kKR4ZKDCPkNwmbIdlsxSRO9FO69vdEDmItxmjZ/kFYi6qSSW1NzXC4R+774p c9NGdSZXlcRHpx09NJ/DpK0VZzUDceg1B+lGAYoxSLET3A4/jR0L7cAh76/50jqT x+/8AMYNHUFX/XasryckE3kFaTcrmMk6w== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hVRxvt_0iobP; Wed, 19 Aug 2026 21:11:32 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508553da.dip0.t-ipconnect.de [80.133.83.218]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 3C68CE5F6D; Wed, 19 Aug 2026 21:11:32 +0200 (CEST) From: Rainer Orth To: Hans-Peter Nilsson Cc: Simon Marchi , gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: [PATCH] include, opcodes: prefix REG_* macros in cris.h, nds32.h and microblaze-opcm.h In-Reply-To: (Hans-Peter Nilsson's message of "Wed, 19 Aug 2026 13:32:11 -0400 (EDT)") References: <20260818202744.171176-1-simon.marchi@efficios.com> Date: Wed, 19 Aug 2026 21:11:31 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Hi Hans-Peter, > On Tue, 18 Aug 2026, Simon Marchi wrote: > >> Bug 34537 reports: >> >> When building gdb with the default configure options of gdb buildbots (which >> include --enable-targets=all), gdb fails to build: >> >> CXX microblaze-tdep.o >> In file included from ../../binutils-gdb/gdb/microblaze-tdep.c:37: > >> 158 | #define REG_PC REG_RIP >> | ^~~~~~ >> ../../binutils-gdb/gdb/../opcodes/microblaze-opcm.h:120:9: error: ?REG_SP? redefined [-Werror] >> 120 | #define REG_SP 1 /* stack pointer. */ >> | ^~~~~~ > >> Attempt to fix it by prefixing the macros with the arch name. > > An alternative, less intrusive method, would be to #undef those > macros in a suitable gdb toplevel file, maybe defs.h, after > including cstdlib but before including binutils/gdb files. The > error is clearly on the Solaris side, for namespace intrusion > and pollution. what namespace would that be? It's clearly ok for systems to define REG_* macros in their system headers. It's quite common in or similar headers. The clashes only occur if the same definitions are present on different systems (which can only occur in multi-target code like this --enable-targets=all configuration). Why would cris (or microblaze or nds32 or solaris) have more right to them than others? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University