From 91fc0f37c1e06ba2875f3f4ed1b02ac6e92aafcb Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Sat, 10 Mar 2012 15:38:06 +0100 Subject: clang does not know -ggdb2 --- solenv/gbuild/platform/WNT_INTEL_GCC.mk | 13 ++++++++++--- solenv/gbuild/platform/unxgcc.mk | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'solenv') diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk index ed88e7f224dd..9126288c914a 100644 --- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk @@ -91,7 +91,14 @@ ifeq ($(MINGW_GCCLIB_EH),YES) gb_LinkTarget_LDFLAGS += -shared-libgcc endif -gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline +# clang does not know -ggdb2 +ifneq ($(COM_GCC_IS_CLANG),TRUE) +GGDB2=-ggdb2 +else +GGDB2=-g2 +endif + +gb_DEBUG_CFLAGS := $(GGDB2) -finline-limit=0 -fno-inline -fno-default-inline gb_STDLIBS := \ mingwthrd \ @@ -141,8 +148,8 @@ gb_LinkTarget_CFLAGS := $(gb_CFLAGS) gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) ifeq ($(gb_SYMBOL),$(true)) -gb_LinkTarget_CXXFLAGS += -ggdb2 -gb_LinkTarget_CFLAGS += -ggdb2 +gb_LinkTarget_CXXFLAGS += $(GGDB2) +gb_LinkTarget_CFLAGS += $(GGDB2) endif gb_LinkTarget_INCLUDE +=\ diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 67871bed77d3..1a813d42a967 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -161,7 +161,14 @@ gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS) gb_LINKEROPTFLAGS := -Wl,-O1 endif -gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline +# clang does not know -ggdb2 +ifneq ($(COM_GCC_IS_CLANG),TRUE) +GGDB2=-ggdb2 +else +GGDB2=-g2 +endif + +gb_DEBUG_CFLAGS := $(GGDB2) -finline-limit=0 -fno-inline -fno-default-inline gb_COMPILERNOOPTFLAGS := -O0 @@ -204,8 +211,8 @@ gb_LinkTarget_CFLAGS := $(gb_CFLAGS) gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) ifeq ($(gb_SYMBOL),$(true)) -gb_LinkTarget_CXXFLAGS += -ggdb2 -gb_LinkTarget_CFLAGS += -ggdb2 +gb_LinkTarget_CXXFLAGS += $(GGDB2) +gb_LinkTarget_CFLAGS += $(GGDB2) endif # note that `cat $(extraobjectlist)` is needed to build with older gcc versions, e.g. 4.1.2 on SLED10 -- cgit