From: kub Date: Sat, 5 Dec 2020 14:11:06 +0000 (+0100) Subject: make, improve detection of gcc X-Git-Tag: v2.00~653 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9511ffd153b78ea4745ab5d094efe7e19ff17e8a;p=picodrive.git make, improve detection of gcc --- diff --git a/Makefile b/Makefile index 567fbfc9..b51199b0 100644 --- a/Makefile +++ b/Makefile @@ -34,10 +34,11 @@ gperf ?= 0 ifneq ("$(PLATFORM)", "libretro") CFLAGS += -Wall -g -ifneq ($(findstring gcc,$(CC)),) +ifneq ($(findstring gcc,$(shell $(CC) -v 2>&1)),) CFLAGS += -ffunction-sections -fdata-sections LDFLAGS += -Wl,--gc-sections endif + ifeq "$(DEBUG)" "0" CFLAGS += -O3 -DNDEBUG endif