make, improve detection of gcc

This commit is contained in:
kub
2020-12-05 15:11:06 +01:00
parent edf8866572
commit bb23959060

View File

@@ -33,7 +33,7 @@ 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