From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id zaMJGc1W/WoQeRsAWB0awg (envelope-from ) for ; Wed, 18 Nov 2026 02:42:05 -0500 Received: by simark.ca (Postfix, from userid 112) id 50BA81E087; Wed, 18 Nov 2026 02:42: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 [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 46A621E087 for ; Wed, 18 Nov 2026 02:42:04 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AC3414BA2E26 for ; Wed, 18 Nov 2026 07:42:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC3414BA2E26 Received: from smtp006.apm-internet.net (smtp006.apm-internet.net [85.119.248.207]) by sourceware.org (Postfix) with ESMTPS id 128D44BA2E37 for ; Wed, 18 Nov 2026 07:41:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 128D44BA2E37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sandoe.co.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 128D44BA2E37 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=85.119.248.207 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794987701; cv=none; b=BG9glBSCPOTyW5qbDr2mGy1W6+0wwCBsY8RmzBPzi9d4vnIAF+f4hQ1RobW4gx6d6WeGmFzDIylRNlBO498kHQu/fzVsbRF3A84Au4A9PgmDA9dXiP0sOPo5NHQQWVYNtnqQll8A3qB3pFyFhBFKNcET2PgL73t8xhLd+8lNy2U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794987701; c=relaxed/simple; bh=2X61Tv0LC1tREINQcRiXPwyo/MNnnJ11QYEG55L90Tw=; h=Mime-Version:Subject:From:Date:Message-Id:To; b=PdQYRITBWP0xiaC30E0JD5OR6pcJ/J7rPKEGW9S8D2e+ZPScGDeYGl9WHZ28J9wb9Nr3viT6noOkaXCjNynQs5WPoExhUnTsrsJREbaTJZYHVRIXxBESUHRep37/rb/mWXKhUCKqEV4PsMst1XPzQIu9gFrL/wW2uIKigfts3Fg= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 128D44BA2E37 Received: (qmail 56538 invoked from network); 18 Nov 2026 07:41:37 -0000 X-APM-Out-ID: 17949876955653 X-APM-Authkey: 257869/1(257869/1) 6 Received: from unknown (HELO smtpclient.apple) (124.195.223.123) by smtp006.apm-internet.net with SMTP; 18 Nov 2026 07:41:37 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.11\)) Subject: Re: [PATCH] Fix libiberty.h inclusion on non-glibc hosts tree-wide From: Iain Sandoe In-Reply-To: <20972285-e1ea-4048-8a65-62d4f0ea021d@suse.com> Date: Wed, 18 Nov 2026 12:41:24 +0500 Cc: GDB Patches , GCC Binutils , Jan Beulich , sam@gentoo.org, pietro@sociotechnical.xyz Content-Transfer-Encoding: quoted-printable Message-Id: <9FF06E6B-7535-448F-90D7-3E8436D54440@sandoe.co.uk> References: <20261118004926.6404-1-nix@esperi.org.uk> <20972285-e1ea-4048-8a65-62d4f0ea021d@suse.com> To: Nick Alcock X-Mailer: Apple Mail (2.3826.700.81.1.11) 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 @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 = (since it was a BSD derivative that prompted adding this)=E2=80=A6but that=E2=80=99s = life :) >> Fix trivial, but a tad invasive, since a lot of projects include >> libiberty.h, and it shows up a few places that don't include config.h = at >> all (including some that include ansidecl.h, which requires config.h = for >> proper operation). >>=20 >> All relevant configury regenerated. >>=20 >> Also touches GDB machinery, so gdb-patches is Cc:ed. >>=20 >> 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 = addition to GCC-local. Adding folks who are currently working on updating GCC=E2=80=99s = configury=E2=80=A6 Iain >=20 > Jan