From 7b47a21cf228dbe247b34860da2a551b2fb938e7 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 7 Feb 2016 03:15:46 +0000 Subject: [PATCH] Limit -fno-lto-odr-type-merging to GCC 5.x git-svn-id: https://svn.eduke32.com/eduke32@5617 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile.common | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 50351c3e0..2d2880a56 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -471,7 +471,7 @@ ifneq (0,$(RELEASE)) ifneq (0,$(LTO)) COMPILERFLAGS += -DUSING_LTO - COMMONFLAGS += -flto -fno-lto-odr-type-merging + COMMONFLAGS += -flto endif else ## Debugging enabled @@ -660,6 +660,12 @@ ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4))) L_SSP := -lssp endif +ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 5))) + ifneq (0,$(LTO)) + COMMONFLAGS += -fno-lto-odr-type-merging + endif +endif + # NOTE: If your setup doesn't have libstdc++, you can try using libsupc++. # Search for STDCPPLIB below and change it to -lsupc++.