From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NETFD9fuhWqQ8zAAWB0awg (envelope-from ) for ; Wed, 19 Aug 2026 13:58:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1787162327; bh=F+46I04e6fRiWvY754FMtwJThL9nHtP/WXxeeFzsBNk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=b9ldawRXKdSKD2UsrWZRx8wVmmCfeZJOus/rCbOv7FeSU742MVPpy4AkrK/9PUq6i VZSFOG8kXy27byeRVfwwEKMpVXdyrlWENt7zyx1vDO7j45Cw0e7sNkp/OMK67MqsNg 6igje6xO8OZWKP70NNXYfcSN+rRXffxXSghK2KyE= Received: by simark.ca (Postfix, from userid 112) id 2C0EA1E033; Wed, 19 Aug 2026 13:58:47 -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 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=HcELZTpX; dkim-atps=neutral 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 5F42A1E033 for ; Wed, 19 Aug 2026 13:58:46 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C7D974B9DB6F for ; Wed, 19 Aug 2026 17:58:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7D974B9DB6F Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=HcELZTpX Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 435AD4B9DB50; Wed, 19 Aug 2026 17:58:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 435AD4B9DB50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 435AD4B9DB50 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787162298; cv=none; b=OaaC6wEFcHxV4cl2iR4OwIaOgKxEXW1MzIe0ApYU2mmxcYYfw/519PgHNEHvvlajVas35yaegv4DMYZsojTLkpMdagTNT6Urt65MMc+0CbHkV8AsG83bRhMTdAlO4jyBolMOhYrSxw3dGlMdQwPnpXdGV5JKXxClcTZ5TYrV+0U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787162298; c=relaxed/simple; bh=F+46I04e6fRiWvY754FMtwJThL9nHtP/WXxeeFzsBNk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Q4PgFzC707IV1Mwc9W5VrdNyD6ESWxGJEA7dinr2fysDzDd6zCClrzfhm25WUJDeZjdDVELQFVuKbE9gHMmW6CDE4FTi249EDYFFJEpB58hC1sEXsDA+maZR67IYapKYG18swZFyg4DIvL6CGFgxVTFZh7GJ7Mn41M2sD1R4Tg0= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=HcELZTpX DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 435AD4B9DB50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1787162297; bh=F+46I04e6fRiWvY754FMtwJThL9nHtP/WXxeeFzsBNk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HcELZTpX6LZQ5g5fBMm+X3dGtYIyzsMpIZM4jqvo8hX9JOsGE1+pJZlJ4xXKB8hMg vTp90dCaJU/ha+UTbQuPZGG00T5yt1N4D2ZIbVbz6KWeuSnnyvRqE1foaqBpyt4mci xBxwT20qKuVLM33UHqKtYzW3OvuzIG+NkmLn4aGs= Received: by simark.ca (Postfix) id A40B11E033; Wed, 19 Aug 2026 13:58:16 -0400 (EDT) Message-ID: Date: Wed, 19 Aug 2026 13:58:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] include, opcodes: prefix REG_* macros in cris.h, nds32.h and microblaze-opcm.h To: Hans-Peter Nilsson , Simon Marchi Cc: gdb-patches@sourceware.org, binutils@sourceware.org References: <20260818202744.171176-1-simon.marchi@efficios.com> Content-Language: fr From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 8/19/26 1:32 PM, Hans-Peter Nilsson wrote: > 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. I think that would be more obscure and less maintainable. > 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? I rely on Rainer to tell me :). As mentioned here: https://inbox.sourceware.org/gdb-patches/alpine.BSF.2.20.16.2608191324250.89035@arjuna.pair.com/T/#mcffe63661ff054a3384964589356e90d21eebdac I did try to build on Solaris, but I hit some other separate build errors. Simon