Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 May 2022 12:53:17 -0700
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Ed Maste <emaste@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Profiled libraries on freebsd-current
Message-ID:  <YnLZraesrXQJdgy3@troutmask.apl.washington.edu>
In-Reply-To: <80e38cf3-0d53-fce6-76e6-936c47d95c91@FreeBSD.org>
References:  <Ymt%2BICLaQPxx2knx@troutmask.apl.washington.edu> <CAPyFy2CuSFd7zm8BvrWYDv%2BEgM0Ryz-bxwWNzUEMEkm0fruokA@mail.gmail.com> <Ym1XE9QSSvIy/4uo@troutmask.apl.washington.edu> <CAPyFy2AcKcT3NmpA5cs0WG4B7gPCJwdax%2BPp02YHEQBmJ10ZtQ@mail.gmail.com> <Ym6tJn60RmqQVsrv@troutmask.apl.washington.edu> <CAPyFy2DJp6ycnqsZMH%2B094B%2BhykYrF4T5PN3qHm9qogVkQm9dQ@mail.gmail.com> <YnAWvEvQaNgzTFYn@troutmask.apl.washington.edu> <80e38cf3-0d53-fce6-76e6-936c47d95c91@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 04, 2022 at 11:12:55AM -0700, John Baldwin wrote:
> On 5/2/22 10:37 AM, Steve Kargl wrote:
> > On Mon, May 02, 2022 at 12:32:25PM -0400, Ed Maste wrote:
> > > On Sun, 1 May 2022 at 11:54, Steve Kargl
> > > <sgk@troutmask.apl.washington.edu> wrote:
> > > > 
> > > > 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
> > > 
> > > I wonder if we can simplify things now, and remove this
> > > `FBSD_NO_THREADS` case. I didn't see anything similar in other GCC
> > > targets I looked at.
> > 
> > That I don't know.  FBSD_NO_THREADS is defined in freebsd-nthr.h.
> > In fact, it's the only thing in that header (except copyright
> > broilerplate).  freebsd-nthr.h only appears in config.gcc and
> > seems to only get added to the build if someone runs configure
> > with --enable-threads=no.  Looking at my last config.log for
> > gcc trunk, I see "Thread model: posix", which appears to be
> > the default case or if someone does --enable-threads=yes or
> > --enable-threads=posix.  So, I suppose it comes down to
> > two questions: (1) is libpthread.* available on all supported
> > targets and versions? (2) does anyone build gcc without
> > threads support?
> 
> libpthread is available on all supported architectures on all
> supported versions.  libthr has been the default threading library
> since 7.0 and the only supported library since 8.0.  In GDB I just
> assume libthr style threads, and I think GCC can safely do the
> same.
> 

I don't know the entire FreeBSD ecosystem.  Do people
use FreeBSD on embedded systems (e.g., nanobsd) where
libthr may be stripped out?  Thus, --enable-threads=no
is needed.

gcc/config/freebsd-nthr.h was committed on May 22, 2001.
There have been no changes to the file other than cosmetic
ones (e.g., updating copyright notice).

gcc/config/freebsd-spec.h has had a number of changes.
Someone with a better understanding of the spec file
will need to clean that up.

-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YnLZraesrXQJdgy3>