From nobody Thu Jun 20 06:10:23 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 4W4VTp1vlXz5PGV5 for ; Thu, 20 Jun 2024 06:10:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W4VTn4T09z4kBf for ; Thu, 20 Jun 2024 06:10:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-70631cd9e50so459913b3a.0 for ; Wed, 19 Jun 2024 23:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1718863835; x=1719468635; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HL6DTM71VPSvQwlyQ0iymMi+dPAS9Ca+mf2MThJ8Ci4=; b=U8LqT+NNPhF3m1GhCkJtjT5W8onW3Bobv0cai6zyNcUq6u58kFDeRdtGe43aZnxkWw Li3FJYKciFvaLK8zSVqGG0NyHiZ6XvLSJE6pk0U+osJ9gnxaupCN15JQ4VdoHMuCA3we YX5G+QodAMa1VTu5jyn6DQrOhWBJedJjMkiDyQx1z/JUU7Ohji/vO3c+Me6HjNF8cKYV 2wbUgxqYvYkDA01JGDFUaK5ny971bVpV+PfA6ESRBeVovIgd7h8VFnxYo4ev33376BLH 9x3dcwRFICXddd20/ENCapMa+thChR9GiX5chNcZ6KQC7HUjfrFI/DT4v0+nCsbGfiep BSDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718863835; x=1719468635; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HL6DTM71VPSvQwlyQ0iymMi+dPAS9Ca+mf2MThJ8Ci4=; b=ZDTnSTZv4x1tbLXBVbb+e1c8fGdpMPi/6HAugQNVwpqGfg5jOjYaFWyJd/Sx2uQ3Qy h9GDeU2pP4pwgNuxuvc60ZEdA0JT3MnoqSufu3DkuSh4XHhZx0j6E+IqLetM7hi0XJLt 86lVxwOUfnL5I3/TNej/SFe3Brna+O2F45Fwn+oHZzvHuVrGQDgE+4fWdte37DvuGSzn smqVLjBeoMJw4PDtxVGbJW1M8BpMpOSDcXtGX843IqFVaFfJM5MS9U9LYKQvkYK1Akfm VeTI8VklJlfVDzFfkr3qPC4AnWwaav1BGg7/1tL8NGJL2GSMMJ1VSzhR9Xn+zK9PnSCs 5lyg== X-Forwarded-Encrypted: i=1; AJvYcCV0te2CghGnEaX7jnLFl+WeYjsQ4SLjXpxm2GGzHanJZFiND4HRminhLQboP6rMWNscZ9NBaxFpDBw4patpWsilKjuGKtOKhEc= X-Gm-Message-State: AOJu0Yx9315XVrn3oiRlngZImQr4R56fmIUlKlSgurlFk/NDMHDpFbcR sas8PrFtoAym+0Sc2lCfxESHJrniqyTezubcPBhoqkSllFx4MT1VrFBry+GQfVQ2/1Y0EYjN3X2 iva5UbJ46josI+Bmg+K3hSdG8l3NVCHluxbllPg== X-Google-Smtp-Source: AGHT+IFeYSngmdQcbavjdD7+ueXwp+4I5GJLDiY05hfKjeU7SBxGXpHFjZh5IJw7G51S2v185qosCyVzSvXX9RXFx0I= X-Received: by 2002:a05:6a21:7886:b0:1b4:e956:ae64 with SMTP id adf61e73a8af0-1bcbb69b5d8mr5238714637.54.1718863834592; Wed, 19 Jun 2024 23:10:34 -0700 (PDT) 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 References: <197A5386-1096-4754-BA82-996140B56EAF@iitbombay.org> In-Reply-To: From: Warner Losh Date: Thu, 20 Jun 2024 00:10:23 -0600 Message-ID: Subject: Re: Minimum gcc and clang supported to generate FreeBSD binaries To: Konstantin Belousov Cc: Bakul Shah , "freebsd-arch@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000047540e061b4c2cee" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4W4VTn4T09z4kBf --00000000000047540e061b4c2cee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 19, 2024 at 10:47=E2=80=AFPM Konstantin Belousov wrote: > On Wed, Jun 19, 2024 at 06:26:12PM -0700, Bakul Shah wrote: > > On Jun 19, 2024, at 6:01=E2=80=AFPM, Warner Losh wrote= : > > > > > > Ah, but what do you say about tcc and pcc which are't gcc? Well, tcc > lies, and says it supports gcc (version 9 I think, but it's been a while > since I checked). tcc can't work today because we have qsort.h using > versioned symbols unconditionally, and it doesn't support versioned > symbols.... And patches to do that have been stalled for reasons unrelate= d > to this desire. pcc doesn't support gnuc symbols at all last I checked. B= ut > it has real issues building some things in the tree, so I'll not gate > things by it unless somebody steps up to actually do the work to make it > work. The pcc upstream has been weird lately too. > pcc supports up through gcc 4.3 __attributes__ fyi. > > Why are versioned symbols required for qsort.h? > Look at the qsort_r() stuff in stdlib.h to maintain backward compat > with previous definition of qsort_r() comparator. > > I think that for the purposes of keeping some support for tcc or whatever > not-quite-gcc compiler, we should just avoid doing the backward-compat > dance, > if such compiler is detected. > https://reviews.freebsd.org/D45651 is a good, minimal patch to do that. A more extensive patch would not define the symver macro for tcc (so any uses we'd catch right away) and change the ifndef __TCC__ to ifdef symver. Warner --00000000000047540e061b4c2cee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jun 19, 2024 at 10:47=E2=80= =AFPM Konstantin Belousov <kostik= bel@gmail.com> wrote:
On Wed, Jun 19, 2024 at 06:26:12PM -0700, Bakul Shah wrote: > On Jun 19, 2024, at 6:01=E2=80=AFPM, Warner Losh <imp@bsdimp.com> wrote:
> >
> > Ah, but what do you say about tcc and pcc which are't gcc? We= ll, tcc lies, and says it supports gcc (version 9 I think, but it's bee= n a while since I checked). tcc can't work today because we have qsort.= h using versioned symbols unconditionally, and it doesn't support versi= oned symbols.... And patches to do that have been stalled for reasons unrel= ated to this desire. pcc doesn't support gnuc symbols at all last I che= cked. But it has real issues building some things in the tree, so I'll = not gate things by it unless somebody steps up to actually do the work to m= ake it work. The pcc upstream has been weird lately too.

pcc supports up through gcc 4.3 __attributes__ fyi.
<= /div>
=C2=A0
> Why are versioned symbols required for qsort.h?
Look at the qsort_r() stuff in stdlib.h to maintain backward compat
with previous definition of qsort_r() comparator.

I think that for the purposes of keeping some support for tcc or whatever not-quite-gcc compiler, we should just avoid doing the backward-compat danc= e,
if such compiler is detected.


--00000000000047540e061b4c2cee--