From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wjoYMrtd/2rbLSEAWB0awg (envelope-from ) for ; Thu, 19 Nov 2026 15:36:11 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=HtAjCRuO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B27221E0BC; Thu, 19 Nov 2026 15:36:11 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, 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 A7D0C1E023 for ; Thu, 19 Nov 2026 15:36:10 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A84E4BA2E39 for ; Thu, 19 Nov 2026 20:36:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A84E4BA2E39 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=HtAjCRuO Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) by sourceware.org (Postfix) with ESMTPS id 0B04B4BA2E22 for ; Thu, 19 Nov 2026 20:35:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B04B4BA2E22 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0B04B4BA2E22 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795120543; cv=none; b=JxV9YFzS37HjJYkhJ0eQFmSwJLcNlflWFRyh9lN6jmB31pEyxQXOoiwlPZRUsrxGW9ROM7XC5r7OAJB1tm3Wxch8XNBNvciqcv4sDo+N31KYXiGkkjnKN5uRyyvhkk+n+MCoi4eyTdHPQ24sWY3F+vXAoiXZXDJuXqC+gMQn13I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795120543; c=relaxed/simple; bh=/N99Ayf5ybbKXKiMQvVIvq4o9oJABhtVnt1Ri4QUpy4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=sV/EQveswIA0tPfzmEQxDosKlUFpVGczAceHEA7DiaV1IFmbEpm6K3WkQGfy/caJgLNvBkw731Cw1uRk5lk3H+AtCI3Dt5zviM6/JwBq7Azy3dBkXJS6pDNV3Tf+0JCsn4zuilteKCKM+RneJ0jNIaDLnFeMJkLWI7hvQU3Ro0c= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=HtAjCRuO reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B04B4BA2E22 Received: from eig-obgw-5006b.ext.cloudfilter.net ([10.0.29.217]) by cmsmtp with ESMTPS id U2NCx2g4Eyb4YU8r7xQn8C; Thu, 19 Nov 2026 20:35:42 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id U8r7xgYEbSeuLU8r7xLTyw; Thu, 19 Nov 2026 20:35:41 +0000 X-Authority-Analysis: v=2.4 cv=NYvm13D4 c=1 sm=1 tr=0 ts=6aff5d9d a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=zJRp6_cAMcgA:10 a=ItBw4LHWJt0A:10 a=vbyJIY8eAAAA:8 a=qV6Hr2XIOZZN2iNffYQA:9 a=UXyj_mcEdvtx2GLQwyJ1:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jsqK4BGMN80Qi75M1Xx1SZCq8M3J7+1vhrDzk5WvGFg=; b=HtAjCRuOiOTDEc4hNIfdrkdKop UMt5t6BZJyxHHds9qfc39t5H5Y6J/IUbjK4amgfhJoryOcTroKcxb26aVW2541LJrd7fnOwhMqQ17 JMqgoapLIgPvzIYpQivapf8XE; Received: from 97-122-110-129.hlrn.qwest.net ([97.122.110.129]:43112 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xU8r6-00000002h6D-2FZR; Thu, 19 Nov 2026 13:35:40 -0700 From: Tom Tromey To: Nick Alcock Cc: binutils@sourceware.org, gdb-patches@sourceware.org, iain@sandoe.co.uk Subject: Re: [PATCH] Fix libiberty.h inclusion on non-glibc hosts tree-wide In-Reply-To: <20261118004926.6404-1-nix@esperi.org.uk> (Nick Alcock's message of "Wed, 18 Nov 2026 00:49:26 +0000") References: <20261118004926.6404-1-nix@esperi.org.uk> X-Attribution: Tom Date: Thu, 19 Nov 2026 13:35:39 -0700 Message-ID: <87bj7kzhic.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.129 X-Source-L: No X-Exim-ID: 1xU8r6-00000002h6D-2FZR X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-129.hlrn.qwest.net (bapiya) [97.122.110.129]:43112 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfAPTZvchkUxxREWuLEe5TLbbG+2CGl88jTxa6kTe8HFvZH8XE/fhfkoEEANWCVeq5gq9xBhRmSmnrEGChvHDzGpudQ04LzGUlBa5ZdvyfoYjkptPgMj1 XUtv45zFdEQ7VJQdayKewH7CZDQhv1GGhvHhU6AtYnKbqjdNUEXk+Z3Rsn7CxNTYhuQMU1wgn81NB8kUD8jZytyyQYJb2wYLTdY= 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 >>>>> "Nick" == Nick Alcock writes: Nick> In 2025, Iain Sandoe added memrchr support to libiberty.h. This requires Nick> a new AC_CHECK_FUNCS of memrchr in every project that transitively Nick> includes it, or builds on non-glibc, non-Linux hosts will fail (observed Nick> on FreeBSD 15). Not really your issue but this would all be a lot simpler if libiberty made a config.h-style header with its own namespaced names, and then included this and checked these names from the include/ headers. That way changes to libiberty wouldn't have to propagate through all the possible users. gdb kinds of works around this deficiency with libiberty.m4 but really that's a failure of encapsulation. Nick> Iain Sandoe Cc:ed: Iain, if you disagree with my rather nasty approach Nick> here, I'd be interested in anything better. (The need to use %top in Nick> binutils/arlex.l is slightly worrying. It's not in POSIX, but Nick> we need something like it or we can't include config.h before the Nick> system headers it must precede. (Including config.h in libiberty.h Nick> won't work for the same reason.) In gdb we switched to pre-including the "defs.h" file from the compiler command line, which I guess avoids stuff like this. Though at the same time I don't think we had this precise problem so I wonder what's up with that. The gdb and sim bits here are fine but it sounds like this patch is going to be handled a different way in libiberty? thanks, Tom