From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id dgloHymR/WpVIxwAWB0awg (envelope-from ) for ; Wed, 18 Nov 2026 06:51:05 -0500 Received: by simark.ca (Postfix, from userid 112) id 6DDF01E087; Wed, 18 Nov 2026 06:51:05 -0500 (EST) 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 [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 47F881E087 for ; Wed, 18 Nov 2026 06:51:04 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1170E4BA23C4 for ; Wed, 18 Nov 2026 11:51:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1170E4BA23C4 Received: from mail.esperi.org.uk (icebox.esperi.org.uk [81.187.191.129]) by sourceware.org (Postfix) with ESMTPS id 6FD934BA2E06 for ; Wed, 18 Nov 2026 11:50:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6FD934BA2E06 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=esperi.org.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=esperi.org.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6FD934BA2E06 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=81.187.191.129 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795002639; cv=none; b=JirsW+auYSDy/TbND4ixnwzgxdTB4iLvUvxlnqybna1VY+jIk0Yi0uMKFD3lFZ0b39OecqA139ZNQOF3w7W9U//a8+QazDD4DBNxR4YoqzKa5UWc9dfA6G2+BmzSM3///raicgWaDpOJwvTLoGnCRSkF8b9a6O77qfaI923i+fo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795002639; c=relaxed/simple; bh=PtBKevH3hhW/T8dgBQL+GR5PDyIkCAX21kekKJSptCE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=tb707h6G7d7XfsbQS4vrycg7+onp97s8M29sF3e78sHp4liIlhg0ok52YZi1gcR11UzYRtgdXzSLMG+E7znbrhV84EGJqAq4F1pbfGt7mrUg2/I1svZOwMkOffUsfRZPvIZETsriPq9/5Ss4CrcaSJBA10aYcRADtojp07Ig/a0= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FD934BA2E06 Received: from loom (nix@sidle.srvr.nix [192.168.14.8]) by mail.esperi.org.uk (8.17.2/8.17.2) with ESMTPS id 6AIBoZ8J013675 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 18 Nov 2026 11:50:36 GMT From: Nick Alcock To: Iain Sandoe Cc: GDB Patches , GCC Binutils , Jan Beulich , sam@gentoo.org, pietro@sociotechnical.xyz Subject: Re: [PATCH] Fix libiberty.h inclusion on non-glibc hosts tree-wide In-Reply-To: <9FF06E6B-7535-448F-90D7-3E8436D54440@sandoe.co.uk> References: <20261118004926.6404-1-nix@esperi.org.uk> <20972285-e1ea-4048-8a65-62d4f0ea021d@suse.com> <9FF06E6B-7535-448F-90D7-3E8436D54440@sandoe.co.uk> Emacs: there's a reason it comes with a built-in psychotherapist. Date: Wed, 18 Nov 2026 11:50:35 +0000 Message-ID: <87pkw2mk8k.fsf@esperi.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-DCC-wuwien-Metrics: loom 1290; Body=6 Fuz1=6 Fuz2=6 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 18 Nov 2026, Iain Sandoe spake thusly: > @sam, @pietro =E2=80=A6 any ideas most welcome. > >> On 18 Nov 2026, at 12:24, Jan Beulich wrote: >>=20 >> On 18.11.2026 01:49, Nick Alcock wrote: >>> In 2025, Iain Sandoe added memrchr support to libiberty.h. This requires >>> a new AC_CHECK_FUNCS of memrchr in every project that transitively >>> includes it, or builds on non-glibc, non-Linux hosts will fail (observed >>> on FreeBSD 15). > > In a way, it=E2=80=99s a nit surprising to find a *BSD having an issue (s= ince it was a > BSD derivative that prompted adding this)=E2=80=A6but that=E2=80=99s life= :) I'm only surprised it took so long to uncover. Surely I can't be the only person testing on FreeBSD... >>> Iain Sandoe Cc:ed: Iain, if you disagree with my rather nasty approach >>> here, I'd be interested in anything better. (The need to use %top in >>> binutils/arlex.l is slightly worrying. It's not in POSIX, but >>> we need something like it or we can't include config.h before the >>> system headers it must precede. (Including config.h in libiberty.h >>> won't work for the same reason.) >>=20 >> What does this mean compatibility-wise? I.e. when did relevant tools (no >> idea which one it would be on the BSDs) start supporting %top? > > I have no better idea - unless there=E2=80=99s a way to down-scope the ad= dition to > GCC-local. Or at least move the prototype there, or put it behind some sort of guard (it's a shame there isn't a CHECKED_* to go with HAVE_* for things like this, so you could skip the prototype unless the configure check was done: if it wasn't done, odds are that subproject won't call the function anyway.)