From nobody Thu Jun 20 06:49:57 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 4W4WMQ2bqWz5PL6n for ; Thu, 20 Jun 2024 06:50:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (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 4W4WMQ0mn3z4nWv for ; Thu, 20 Jun 2024 06:50:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1f7274a453bso4290885ad.2 for ; Wed, 19 Jun 2024 23:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1718866208; x=1719471008; 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=davMuaa45FhSs7BNDU7ps0bFLLd0Fd55CPYTRYM+j7A=; b=MbVC7e22/spS2PZcGBcLAvMrijXTvwS1y5g/B5JeH/1gjqB3sX4Xe2CnR2pH/IOy4q WN8c1cFwOP2TptB2Mlhaoq8N3yNZMp30TQk8gkHsyKQ+obxQT7b/mBb3k+5UElnikbqS WouKXGz6euJAlIcHThGp7bSDFnJkW9ZTzbht/6qCjltA94c8ukMjWQuctMFB9MiYiUfz EQ0eK2fPjYMSqhD8obZTy5TIQ/H+COV1j/RVfhdp2lidwUXoyXmoi3ztcVlI0RreXo5e 0MprYiBCxqzhoAZmeh801hCpxmtjqAz7C0odxogTRUjrhf00qoZjktNakun4gkxNJVdK LAsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718866208; x=1719471008; 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=davMuaa45FhSs7BNDU7ps0bFLLd0Fd55CPYTRYM+j7A=; b=FJ+qvWvXCvkXJ8jqJeZrBrtNSsQjOh3vK8r31C7PX/rX1bcHHYqgYg4r+LKh2MER/k 5lu+66aqDDMiVEEBZP8DLEOhibz6TGVGlnHh35W+eoDhTjGHHpMwA9Diaa1WvZqMWjDK JWG0/vENrPMx64lIi7iDcuWDt4fLPoCXlOTWfUsXxuHhk46eNPJr51gXAkW+9VD0FmpE RO9eVitw3BI0VzbTXiQi8F/paIGroyoEHI+nnwNMCYRVlOa8rEL1KGCUoKSNrTSPAQ3O 3pdAKjXM4ESsW+lPIuvvI6oiJYbYVZFmVM1C/E/ixVrYGc5Jz6CWQExsIIE2yWmmUILN 6Y/A== X-Forwarded-Encrypted: i=1; AJvYcCU+UoFURrpFZwV10Y0yqzVi5bkcdYz3gzCB5Swet+W0UbCq7LrHQuXLYP2uGNkW9uqKCBUAIL9+4zETrwPVPQxLLnMb3BFBjHw= X-Gm-Message-State: AOJu0YzvLl/7GWFNd8cpY8ISGkB8jBz2SE9w7rRvfqYbA8Or2/KD8u0k ToFLtPNJ9j9vydLUYzo802BFW27WZ/Me+IOzeFspTbz6oTKY7Pqs+z5sG3vcB+mhZAUcbCP9mFw ZtyuWzoCKLqCBGGlMhLPqKrDrA0FMOOw1F/A15A== X-Google-Smtp-Source: AGHT+IGpNEnegL6bIe3cIF/mYTBFt2dL4pc6gVlHP3Y5jB4Y6V2xMvEp904+s2RNC2hA2pZsVWl+NMaDqzmk0I9r6W0= X-Received: by 2002:a17:90a:34c5:b0:2c2:8a67:96e4 with SMTP id 98e67ed59e1d1-2c7b57ff0d1mr4351553a91.7.1718866208258; Wed, 19 Jun 2024 23:50:08 -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:49:57 -0600 Message-ID: Subject: Re: Minimum gcc and clang supported to generate FreeBSD binaries To: Bakul Shah Cc: Konstantin Belousov , "freebsd-arch@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000c29610061b4cb9f3" 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: 4W4WMQ0mn3z4nWv --000000000000c29610061b4cb9f3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 20, 2024, 12:40=E2=80=AFAM Bakul Shah wro= te: > On Jun 19, 2024, at 11:10=E2=80=AFPM, Warner Losh wrote: > > > >> > 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 whateve= r >> 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. > > > How common is symbol versioning? [Sorry, I've been out of compiler > business for a long time now and haven't kept uptodate on such things] > Relatively. Tcc is an outlier The reason I ask is, there may be other std compliant C compilers that may > not do symbol versioning. While they may supply their own libraries, > programs will still depend on system header files and libraries. In so fa= r > as possible we shouldn't make it hard to user other compilers (such as lc= c, > qbe, icc etc.). Stricter requirements on freebsd provided programs & > libraries is fine but ideally their use by programs compiled with 3rd > party compilers is possible without jumping through hoops... > Yea. We shouldn't. But it's kinda necessary to have the compilers tested all the time to spot regressions. This stuff is fiddly enough with 2 main compiles and 2 that kinda emulate these two... comes a point that you need to say enough unless somebody is really, actively using it, our kinda support becomes the worst of both worlds: a random drag on development that isn't actually useful to anybody. I have been using Warner's patch (thanks for that) where I use tcc but have > to remember to patch cdefs.h every time I do installworld! > Yea. I'd like to get them done and in. Warner > > Bakul > > --000000000000c29610061b4cb9f3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Jun 20, 2024, 12:40=E2=80=AFAM Bakul Shah <= bakul@iitbombay.org> wrote:
On Jun 19, 2024, at 11:10=E2=80=AFPM, Warner Losh <imp@bsdimp.com> wrote:
How common is symbol versio= ning? [Sorry, I've been out of compiler business for a long time now an= d haven't kept uptodate on such things]
<= /div>

Relatively. Tcc is an ou= tlier

The reason I ask is, there may be other std compliant C comp= ilers that may not do symbol versioning. While they may supply their own li= braries, programs will still depend on system header files and libraries. I= n so far as possible we shouldn't make it hard to user other compilers = (such as lcc, qbe, icc etc.). Stricter requirements on freebsd provided pro= grams & libraries is fine but ideally their use by =C2=A0programs compi= led with 3rd party compilers is possible without jumping through hoops...

Yea. We shouldn't. But it's kinda necessary to have the compi= lers tested all the time to spot regressions. This stuff is fiddly enough w= ith 2 main compiles and 2 that kinda emulate these two...=C2=A0 comes a poi= nt that you need to say enough unless somebody is really, actively using it= , our kinda support becomes the worst of both worlds: a random drag on deve= lopment that isn't actually useful to anybody.
<= br>
I have been usin= g Warner's patch (thanks for that) where I use tcc but have to remember= to patch cdefs.h every time I do installworld!

Yea. I'd like to= get them done and in.

W= arner=C2=A0

Bakul

--000000000000c29610061b4cb9f3--