From c2fc4b379565552ba6c82553ceceb7d4cd754cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 2 Jul 2013 10:28:15 +0200 Subject: [PATCH] Link to libperl explicitly on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Písař --- lib/ExtUtils/MM_Unix.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 25a1778..fcd130a 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -30,6 +30,7 @@ BEGIN { $Is{IRIX} = $^O eq 'irix'; $Is{NetBSD} = $^O eq 'netbsd'; $Is{Interix} = $^O eq 'interix'; + $Is{Linux} = $^O eq 'linux'; $Is{SunOS4} = $^O eq 'sunos'; $Is{Solaris} = $^O eq 'solaris'; $Is{SunOS} = $Is{SunOS4} || $Is{Solaris}; @@ -1022,7 +1023,7 @@ sub xs_make_dynamic_lib { push(@m," \$(RM_F) \$\@\n"); my $libs = '$(LDLOADLIBS)'; - if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') { + if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') { # Use nothing on static perl platforms, and to the flags needed # to link against the shared libperl library on shared perl # platforms. We peek at lddlflags to see if we need -Wl,-R @@ -1035,6 +1036,11 @@ sub xs_make_dynamic_lib { # The Android linker will not recognize symbols from # libperl unless the module explicitly depends on it. $libs .= ' "-L$(PERL_INC)" -lperl'; + } else { + if ($ENV{PERL_CORE}) { + $libs .= ' -L$(PERL_INC)'; + } + $libs .= ' -lperl'; } } -- 2.5.5