From 5acef0c9d1ea126dcd5ad0d71df7fd25ecf60e47 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 6 Aug 2016 13:09:15 +0200 Subject: [PATCH] perl : fix build without compiler optimization CC perl_la-perl.lo In file included from /usr/include/stdio.h:27:0, from ./daemon/collectd.h:34, from perl.c:36: /usr/include/features.h:331:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] # warning _FORTIFY_SOURCE requires compiling with optimization (-O) ^~~~~~~ cc1: all warnings being treated as errors Makefile:4439: recipe for target 'perl_la-perl.lo' failed make[3]: *** [perl_la-perl.lo] Error 1 ccflags contains the flags used to compile libperl itself, not the ones needed for compiling code that uses it. Switch to perl_inc which just returns the neccesary include flags Fixes #1858 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2ac9c729..1b38efcd 100644 --- a/configure.ac +++ b/configure.ac @@ -3656,7 +3656,7 @@ then SAVE_CFLAGS="$CFLAGS" SAVE_LIBS="$LIBS" dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string) - PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts` + PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e perl_inc` PERL_LIBS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts` CFLAGS="$CFLAGS $PERL_CFLAGS" LIBS="$LIBS $PERL_LIBS" -- 2.30.2