From nobody Thu Jun 20 04:47:02 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 4W4SdY2mtXz5P7HC for ; Thu, 20 Jun 2024 04:47:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4W4SdX6HHyz4Zv2 for ; Thu, 20 Jun 2024 04:47:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 45K4l3IV013113; Thu, 20 Jun 2024 07:47:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 45K4l3IV013113 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 45K4l25O013109; Thu, 20 Jun 2024 07:47:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 20 Jun 2024 07:47:02 +0300 From: Konstantin Belousov To: Bakul Shah Cc: Warner Losh , "freebsd-arch@freebsd.org" Subject: Re: Minimum gcc and clang supported to generate FreeBSD binaries Message-ID: References: <197A5386-1096-4754-BA82-996140B56EAF@iitbombay.org> 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <197A5386-1096-4754-BA82-996140B56EAF@iitbombay.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4W4SdX6HHyz4Zv2 On Wed, Jun 19, 2024 at 06:26:12PM -0700, Bakul Shah wrote: > On Jun 19, 2024, at 6:01 PM, 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 unrelated to this desire. pcc doesn't support gnuc symbols at all last I checked. 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 make it work. The pcc upstream has been weird lately too. > > 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.