From: Ruben Kerkhof Date: Sat, 6 Aug 2016 11:09:15 +0000 (+0200) Subject: perl : fix build without compiler optimization X-Git-Tag: collectd-5.6.0~95^3 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=5acef0c9d1ea126dcd5ad0d71df7fd25ecf60e47;hp=d1bc5fb594a846ce31e4326bc81520a58b6310f8;p=collectd.git 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 --- 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"