You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/06/12 20:25:01 UTC
[lucy-commits] svn commit: r1134953 - /incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
Author: marvin
Date: Sun Jun 12 18:25:01 2011
New Revision: 1134953
URL: http://svn.apache.org/viewvc?rev=1134953&view=rev
Log:
LUCY-157 Add -pthread link flag on OpenBSD.
OpenBSD has userland pthreads. If we don't supply the "-pthread" flag to the
linker, then lazy binding of symbols from pthread.h fails.
Modified:
incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm?rev=1134953&r1=1134952&r2=1134953&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm Sun Jun 12 18:25:01 2011
@@ -582,10 +582,13 @@ sub ACTION_compile_custom_xs {
# .o => .(a|bundle)
my $lib_file = catfile( $archdir, "Lucy.$Config{dlext}" );
if ( !$self->up_to_date( [ @objects, $AUTOGEN_DIR ], $lib_file ) ) {
+ # TODO: use Charmonizer to determine whether pthreads are userland.
+ my $link_flags = $Config{osname} =~ /openbsd/i ? '-pthread ' : '';
$cbuilder->link(
- module_name => 'Lucy',
- objects => \@objects,
- lib_file => $lib_file,
+ module_name => 'Lucy',
+ objects => \@objects,
+ lib_file => $lib_file,
+ extra_linker_flags => $link_flags,
);
}
}