From nobody Sun May 01 15:54:14 2022 X-Original-To: freebsd-current@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 B6CD3199C00F for ; Sun, 1 May 2022 15:54:23 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (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 "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KrrPp5Xd9z4bPG; Sun, 1 May 2022 15:54:22 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.16.1/8.16.1) with ESMTPS id 241FsElQ029891 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 1 May 2022 08:54:14 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.16.1/8.16.1/Submit) id 241FsE3h029890; Sun, 1 May 2022 08:54:14 -0700 (PDT) (envelope-from sgk) Date: Sun, 1 May 2022 08:54:14 -0700 From: Steve Kargl To: Ed Maste Cc: FreeBSD Current Subject: Re: Profiled libraries on freebsd-current Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4KrrPp5Xd9z4bPG X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [0.17 / 15.00]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.11)[-0.111]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; NEURAL_SPAM_MEDIUM(0.39)[0.390]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.11)[-0.107]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-current]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none] X-ThisMailContainsUnwantedMimeParts: N On Sat, Apr 30, 2022 at 04:07:48PM -0400, Ed Maste wrote: > On Sat, 30 Apr 2022 at 11:34, Steve Kargl > wrote: > > > > On Sat, Apr 30, 2022 at 09:39:32AM -0400, Ed Maste wrote: > > > On Fri, 29 Apr 2022 at 01:58, Steve Kargl > > > wrote: > > > > > > > > If one looks at src.conf(5), one finds > > > > > > > > WITH_PROFILE > > > > Build profiled libraries for use with gprof(8). This option is > > > > deprecated and is not present in FreeBSD 14. > > > > > > > > I assume that the *_p.a libraries will no longer be built and > > > > installed on FreeBSD 14 and later. Is this correct? > > > > > > FreeBSD 14 is not yet released, of course, but that is indeed the > > > intent. PR256874 reports that a GCC patch (to stop linking against > > > _p.a) is in the works but unfortunately has not had an update for some > > > time. > > > > I see. It only took me 2+ years to get > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89125 > > > > committed to the GCC repository. Good luck with > > getting your patch upstream. > > Heh, thanks. > > I have just now changed the WITH_PROFILE description to state "a > future version of FreeBSD" since it may well not happen for FreeBSD > 14. > > We could also just install libc_p.a as a symlink to libc.a (and same > for the other _p.a archives). This works for me, but there is one addition place dealing with -pg in freebsd-spec.h diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h index 594487829b5..1e8ab2e1827 100644 --- a/gcc/config/freebsd-spec.h +++ b/gcc/config/freebsd-spec.h @@ -93,14 +93,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see (similar to the default, except no -lg, and no -p). */ #ifdef FBSD_NO_THREADS +#if FBSD_MAJOR < 14 #define FBSD_LIB_SPEC " \ - %{pthread: %eThe -pthread option is only supported on FreeBSD when gcc \ + %{pthread: %eThe -pthread option is only supported on FreeBSD when gcc \ is built with the --enable-threads configure-time option.} \ %{!shared: \ %{!pg: -lc} \ %{pg: -lc_p} \ }" #else +#define FBSD_LIB_SPEC " \ + %{pthread: %eThe -pthread option is only supported on FreeBSD when gcc \ +is built with the --enable-threads configure-time option.} \ + }" +#endif +#else +#if FBSD_MAJOR < 14 #define FBSD_LIB_SPEC " \ %{!shared: \ %{!pg: %{pthread:-lpthread} -lc} \ @@ -109,6 +117,15 @@ is built with the --enable-threads configure-time option.} \ %{shared: \ %{pthread:-lpthread} -lc \ }" +#else +#define FBSD_LIB_SPEC " \ + %{!shared: \ + %{pthread:-lpthread} -lc \ + } \ + %{shared: \ + %{pthread:-lpthread} -lc \ + }" +#endif #endif /* To make matters interesting, we can't actually use __FreeBSD_version -- Steve