From 065343069aef540a05f485a57605f7cfdd024978 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 20 Jul 2022 10:44:54 -0700 Subject: [PATCH] Fix -flto flag compat erosion w/ gcc. --- ircd/Makefile.am | 5 ++++- matrix/Makefile.am | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ircd/Makefile.am b/ircd/Makefile.am index b8515c440..37fade82a 100644 --- a/ircd/Makefile.am +++ b/ircd/Makefile.am @@ -43,11 +43,14 @@ endif endif if LTO -AM_CXXFLAGS += -flto=thin +if GCC +AM_CXXFLAGS += -flto=auto +endif endif if LTO if CLANG +AM_CXXFLAGS += -flto=thin AM_CXXFLAGS += -fstrict-vtable-pointers AM_CXXFLAGS += -fwhole-program-vtables #AM_LDFLAGS += -Wl,-plugin-opt,-pass-remarks='.*' diff --git a/matrix/Makefile.am b/matrix/Makefile.am index c42a5f469..d28469600 100644 --- a/matrix/Makefile.am +++ b/matrix/Makefile.am @@ -34,11 +34,14 @@ AM_CXXFLAGS += -ftls-model=local-dynamic endif if LTO -AM_CXXFLAGS += -flto=thin +if GCC +AM_CXXFLAGS += -flto=auto +endif endif if LTO if CLANG +AM_CXXFLAGS += -flto=thin AM_CXXFLAGS += -fstrict-vtable-pointers AM_CXXFLAGS += -fwhole-program-vtables endif