From 513e121afde696c340be0d815d8ad56dda4b81eb Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Fri, 7 Aug 2020 19:56:46 +0000 Subject: [PATCH] net-mgmt/netdata: fix build on powerpc64 elfv2 with LTO Configure crashes when building with LTO and Clang, use GCC: checking if -flto builds executables... Segmentation fault (core dumped) no configure: error: LTO is required but is not available. --- net-mgmt/netdata/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net-mgmt/netdata/Makefile b/net-mgmt/netdata/Makefile index e032af0d135d..41a4a600974e 100644 --- a/net-mgmt/netdata/Makefile +++ b/net-mgmt/netdata/Makefile @@ -87,6 +87,10 @@ LTO_USES= compiler:c11 BROKEN= Link-Time Optimization breaks compilation on FreeBSD 11 .endif +.if ${PORT_OPTIONS:MLTO} && ${ARCH} == powerpc64 +USE_GCC= yes +.endif + post-patch: @${REINPLACE_CMD} -e 's|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g' \ ${PATCH_WRKSRC}/configure.ac