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?
> +} 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