----- Original Message ----- From: "Lars Balker Rasmussen" <[EMAIL PROTECTED]> To: "Juergen Boemmels" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, October 28, 2003 6:36 PM Subject: Re: [perl #24333] [PATCH] pthreads configure on FreeBSD
> Juergen Boemmels <[EMAIL PROTECTED]> writes: > > Lars Balker Rasmussen (via RT) <[EMAIL PROTECTED]> writes: > >> The pthreads library seems to be missing on the FreeBSD 4.8 and 5.0 > >> machines I have access to. I don't know what, if any, FreeBSD'en > >> should happen to have that library... > >> > >> There are two ways to link in the pthreads-stuff on FreeBSD - I have > >> taken the method from the ports systems makefile to decide between them. > > > > I have another patch from Nick Kostirya <[EMAIL PROTECTED]> which > > accidently dropped off-list. He tries to solve the same issue (and > > uses a similar approach). But he changed ccflags. Can someone of the > > FreeBSD guys enlighten me which of these two patches is the better > > one? I can apply only one. > > I'm sure we can agree on something. > > > +if ($osreldate >= 500016) { > > + # use KSE (libpthread) > > + # See http://www.freebsd.org/kse/ > > + if ( $libs !~ /-lpthreads/ ) { > > + $libs .= ' -lpthreads'; > > + } > > My 5.0 reports version 500043, but doesn't have libpthreads, so the > above won't work for me. > > And the KSE-page mentions -lpthread? Oh,I made an error, of couse I should have used -lpthread :-). As Lars Balker Rasmussen suggested the parrot should be linked to libc_r library by default. Additionally, Configure.pl key for for KSE should be provided. For example perl Configure.pl --kse. This key should be used only after 500023 osversion (5.0-CURRENT after KSE Milestone 2). How you think? And why +if ($osversion < 500036) { ? In http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk .if ${OSVERSION} < 500016 is used. > > > +} else { > > + # use libc_r > > + $libs =~ s/-lpthreads//; > > + > > + my $ccflags = Configure::Data->get('ccflags'); > > + if ( $ccflags !~ /-pthread/ ) { > > + $ccflags .= ' -pthread'; > > + } > > + Configure::Data->set( > > + ccflags => $ccflags, > > + ) > > I suppose it's technically more correct to set -pthread in ccflags. > -- > Lars Balker Rasmussen Consult::Perl > > > >