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
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"