Commit 3f1fbbc9 authored by Torsten Schönfeld's avatar Torsten Schönfeld

Use the pthread compatibility workaround on NetBSD as well

CPAN testers results indicate that dynamically loading libpthread.so is
not supported on NetBSD either.
parent f746b5ff
......@@ -571,16 +571,16 @@ $dep->install (qw(cairo-perl.h
build/cairo-perl-auto.typemap));
$dep->save_config ('build/IFiles.pm');
# On OpenBSD, any program that directly or indirectly wants to load
# On OpenBSD/NetBSD, any program that directly or indirectly wants to load
# libpthread.so must do so from the start. But when perl is built without
# ithreads, it will also most likely not be compiled with "-pthread". When
# libglib/libgobject then go and try to load libpthread.so, the loader will
# error out.
my @openbsd_compat_flags = ();
if ($^O eq 'openbsd' && $Config::Config{ldflags} !~ m/-pthread\b/) {
warn " ***\n *** on OpenBSD, we either need perl linked with '-pthread',\n",
# libcairo then goes and tries to load libpthread.so, the loader will error
# out.
my @bsd_compat_flags = ();
if (($^O eq 'openbsd' || $^O eq 'netbsd') && $Config::Config{ldflags} !~ m/-pthread\b/) {
warn " ***\n *** on OpenBSD/NetBSD, we either need perl linked with '-pthread',\n",
" *** or we need to set LD_PRELOAD=libpthread.so; doing the latter now...\n ***\n";
@openbsd_compat_flags = (
@bsd_compat_flags = (
macro => {FULLPERLRUN => 'LD_PRELOAD=libpthread.so $(FULLPERL)'},
);
}
......@@ -596,7 +596,7 @@ WriteMakefile (
DL_FUNCS => { Cairo=> [] },
META_MERGE => \%meta_merge,
$dep->get_makefile_vars,
@openbsd_compat_flags,
@bsd_compat_flags,
);
sub MY::postamble
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment