From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aQZ8BLvohWoB6TAAWB0awg (envelope-from ) for ; Wed, 19 Aug 2026 13:32:43 -0400 Received: by simark.ca (Postfix, from userid 112) id E9EC41E0A3; Wed, 19 Aug 2026 13:32:42 -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.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 25E151E033 for ; Wed, 19 Aug 2026 13:32:42 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A49DC4B9DB54 for ; Wed, 19 Aug 2026 17:32:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A49DC4B9DB54 Received: from arjuna.pair.com (arjuna.pair.com [209.68.5.131]) by sourceware.org (Postfix) with ESMTPS id 15EDD4B9DB50; Wed, 19 Aug 2026 17:32:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 15EDD4B9DB50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bitrange.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bitrange.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 15EDD4B9DB50 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=209.68.5.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787160737; cv=none; b=UOq3gnRP3IXppVYwrLjLOIfANJGg8XXAMW6jcxcBUTPOfZSIsbUSAuhV4pDdzbEe0B/qme0OUlFt3zYyWNwIIHoVdxpjEf6foGI2Ag2H7JqCcFHxivpNsICP/dTG0XWV/qJgLG+tnbT3vtNgtJdlVjbPBWnFDbcqZ7tTQZXl+Og= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787160737; c=relaxed/simple; bh=vOxCAHj25HGGhY5bs14FS6YFrjXhXh4z5llqZBmua8E=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=J4e7Cvq6ySk0vFDfiFGZ6FHRI9TsJVgAO10j0GUHK5ER78OBdFh2CcGEfLau82bmnqzb/3qvSICn+nyNLGvUdODQR4WJDQsTx+vQdQAn5/pJA9YAv176th6KGjdvxtZL63JUf8CmVv+Ztum6TOpcBkVsKlXip/XO+BfLONSLt/o= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15EDD4B9DB50 Received: by arjuna.pair.com (Postfix, from userid 3006) id EA75919C22F; Wed, 19 Aug 2026 13:32:11 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by arjuna.pair.com (Postfix) with ESMTP id E868E19C230; Wed, 19 Aug 2026 13:32:11 -0400 (EDT) Date: Wed, 19 Aug 2026 13:32:11 -0400 (EDT) From: Hans-Peter Nilsson X-X-Sender: hp@arjuna.pair.com To: Simon Marchi cc: 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: <20260818202744.171176-1-simon.marchi@efficios.com> Message-ID: References: <20260818202744.171176-1-simon.marchi@efficios.com> User-Agent: Alpine 2.20.16 (BSF 172 2016-09-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: mailmunge 3.09 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 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. Having said and suggested that, if that won't work, the CRIS bits are fine. > > I only modified the macros starting with "REG_", but there are other > macros with very generic names (e.g. "MAX_REG") that could be renamed > too (for consistency, IMO, all the macros in those files should be > prefixed the same way). > > I couldn't build-test this patch on Solaris, but it build with > --enable-targets=all on Linux. How would you tell this attempt is complete? (Maybe someone's doing evil ungreppable things like REG_ ## SP. ;-) Are there not Solaris machines in the gcc build farm? brgds, H-P