Skip to content

Commit f9c8b37

Browse files
committed
Fix issue with ExtUtils::MakeMaker > 7.10
Fixes #25 Perl-Toolchain-Gang/ExtUtils-MakeMaker#274
1 parent 4a7d89d commit f9c8b37

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Changes

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CSS::Sass (3.3.6)
22

3+
* Fix issue with ExtUtils::MakeMaker 7.12+
34
* Add gcc 4.4 compatibility for libsass
45

56
CSS::Sass (3.3.5)

Makefile.PL

+16
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,22 @@ my @SOURCES = map { join '/', 'libsass', 'src', $_ }
305305
grep { s/\.c(?:pp)?$/\.o/ }
306306
(@CFILES, @CPPFILES);
307307

308+
# Fix an issue with EU::MM > 7.10 as reported in:
309+
# https://github.com/sass/perl-libsass/issues/25
310+
if ($ExtUtils::MakeMaker::VERSION > 7.10) {
311+
if (exists $compiler_flags{'dynamic_lib'}) {
312+
my $dynlibs = $compiler_flags{'dynamic_lib'};
313+
if (exists $dynlibs->{'OTHERLDFLAGS'}) {
314+
if ($guess->is_gcc) {
315+
$dynlibs->{'OTHERLDFLAGS'} = join " ",
316+
'-Wl,--no-as-needed',
317+
$dynlibs->{'OTHERLDFLAGS'},
318+
'-Wl,--as-needed';
319+
}
320+
}
321+
}
322+
}
323+
308324
# See lib/ExtUtils/MakeMaker.pm for details of how to
309325
# influence content of the Makefile that is written.
310326
WriteMakefile(

0 commit comments

Comments
 (0)