https://github.com/JRaspass/Cache-Memcached-Fast/pull/11 From 4bba22fac564a0798022197476f63fb6b481129f Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Tue, 3 Oct 2017 20:20:14 +1300 Subject: [PATCH] Strip -flto from CFLAGS -flto breaks compilation of static archives and needs significant magic to not break, including sentience about which CC you're using. --- Makefile.PL | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index 0054164..ad249b9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -24,6 +24,13 @@ }, ); +sub MY::cflags { + my $self = shift; + my $orig = $self->MM::cflags(@_); + $orig =~ s/-flto\b//g; + return $orig; +} + sub MY::postamble { <<'MAKE' } $(MYEXTLIB): src/Makefile cd src && $(MAKE) $(PASTHRU)