From nobody Mon Jul 29 16:18:52 2024 X-Original-To: freebsd-arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXk7h3SKPz5RXMx; Mon, 29 Jul 2024 16:18:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXk7h2tsbz4B84; Mon, 29 Jul 2024 16:18:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722269936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7dvfJHG8sy4fESMTbEL2Go2gyZykAe7nl+IeVy1er0s=; b=CO1N+/5lgjgcqQr8KoHavUCV2jVjPsWQlRtN7Gg6WJrCzJba6+xVnDethTw/wOnSXnhw4P 5E1+Lci8Wqnds07r34gs1YghNvnX1KXEShCRjJZKReDiXpBdP1gQTh0GZhlCsPeoEfA5ZC o4mLwxow9zp+WQTWsw+2c6bqlis1mF/BC8tNXlywy3BKs0IJKJvYgU8M00fNUkdhL3LHbK 087tRDEDyQD6NLh6n4Jh0furaR2mlUIAgWOTI9VsOFkQL6Kki6bZZJgxlMH8jRLfMnQk38 nk29qaZjtv0PfYyCOqQimoU8H4tTGP25LTpkhzJl9Me3GKC/dqGEcsS8OfT0Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722269936; a=rsa-sha256; cv=none; b=hDs7UeSsXCkjiUu3xLG7DVeo2IVh8kKJ7dt1GowbgIypT8++nEfAi+9cjPAQSOdf3i+sCO y1+7fTiHb/w8lBCPbpXdY/O72bbNHjJI4Hac16Ese3rJZxJqeqBuB0j54Dq7tOaqlfFl2d /dDiHXFJoLiHAa//Zgi/Yjnow5jO3XYokIDjhnGa66Ip82T2ccfPo+b8pNAmmUXWF20aVs bSrLTTsv6zwlM/o+Pp6enjS6Q6cEkAKq4L9wXlhACkcu98m4RHDW4blgXOTryQdkKe64zj jchKva2mv8LG3MrYQ8LSeVtVRrHJEL9PT9DKi//VPovA27VV2seqhlIgFy4yaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722269936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7dvfJHG8sy4fESMTbEL2Go2gyZykAe7nl+IeVy1er0s=; b=x2L0vNhjVe/nL5LXLHra+MBoUkhLnBYfrfbeGEdjiIzocOyWY51MVlN7YrO+1Jba93qJsp SrNzLwzJzkkkUZkW40J220dwyKDTjFGHsNztcDBt+tA4yWB8BoFw5v9KyCiQZAiklwl4rb Vrp8E/BTgSLxPk2hwwkggt9GBBhe5XbhcHQ0kkTNE/GiyDZatAGOWk+gEj5WbbrCp91vll 3JQOAig6/TZ9MXcumBzuEGXvuw+UnhYTKVGfGxlcsBNoxcRg7O7a37HpoWVevpTiZsIWtQ aklGHzDwxQCyuSPQACLzjQwIS3hQO/uVMYcCOAQg3Ee9dy2tE+Tq1mzBUqtsXw== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R11" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WXk7h1mKCz1PWP; Mon, 29 Jul 2024 16:18:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 66737565E0; Mon, 29 Jul 2024 18:18:52 +0200 (CEST) Content-Type: text/plain; charset=us-ascii List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Subject: Re: FreeBSD libc++ , ports, and import std or import std.compat : what if potential ports start using them over time? From: Dimitry Andric In-Reply-To: <22A8133D-B6E6-4818-932A-5D6B03882AC4@yahoo.com> Date: Mon, 29 Jul 2024 18:18:52 +0200 Cc: Charlie Li , freebsd-arch , FreeBSD Toolchain Content-Transfer-Encoding: quoted-printable Message-Id: <03578B4A-BA6A-4F9D-BCE0-9C01A84623C5@FreeBSD.org> References: <87497F2F-8C4F-48C8-8737-979070B41C78.ref@yahoo.com> <87497F2F-8C4F-48C8-8737-979070B41C78@yahoo.com> <5ef8f532-e411-449e-9d0e-798ad9da3c3f@freebsd.org> <22A8133D-B6E6-4818-932A-5D6B03882AC4@yahoo.com> To: Mark Millard X-Mailer: Apple Mail (2.3731.700.6.1.1) On 29 Jul 2024, at 18:01, Mark Millard wrote: >=20 > On Jul 29, 2024, at 07:54, Charlie Li wrote: >> ... >> While you're talking about std and std.compat, I have a related issue = whilst working on the www/webkit2-gtk update. They have code that relies = on a std::pair implementation/ABI that does not work with our base = system libc++. This is because our base system uses LLVM libc++ ABI = version 1, but the needed implementation is in ABI version 2, which they = have still (even in trunk!) not declared stable. >=20 > FreeBSD updating its C++ ABI would be a rather major change, > or so I would expect. Likely avoided as long as possible? >=20 > I wonder what property of std::pair's implementation is at > issue for the ABI version distinction(s). It's a bit of a historical wart that is hard to get rid of. In FreeBSD = we were "too early" and changed our standard C++ library to libc++ = before this std::pair trivial copy constructor issue was hashed out in = the standards committees. After it was settled in those committees, = libc++ changed its implementation to match, but this actually breaks the = ABI! For anybody who switched to libc++ after that time, there was no = problem using the new ABI, but in FreeBSD we have been stuck with the = older interpretation ever since. Changing the ABI involves bumping libc++.so to .2, and putting = libc++.so.1 into a 'compat' package for the sake of old binaries. I had = originally wanted to do this for FreeBSD 14 but never got to it, and for = some reason upstream is also stalled for years now in bumping their own = official ABI version to 2. It would be preferable if upstream libc++ bumps its 'stable' ABI to 2 = and starts working on 3 as the then-experimental one, then all = downstream consumers can upgrade, leaving all compat crutches behind. -Dimitry