diff --git a/source/Makefile.deps.mk b/source/Makefile.deps.mk index 40042778b..992dae07e 100644 --- a/source/Makefile.deps.mk +++ b/source/Makefile.deps.mk @@ -55,6 +55,18 @@ endif # BSD # --------------------------------------------------------------------------------------------------------------------- # Auto-detect the processor +COMPILER_VERSION := $(shell $(CC) --version) + +ifneq (,$(findstring clang,$(COMPILER_VERSION))) +CLANG = true +endif +ifneq (,$(findstring gcc,$(COMPILER_VERSION))) +GCC = true +endif + +# --------------------------------------------------------------------------------------------------------------------- +# Auto-detect the processor + TARGET_PROCESSOR := $(firstword $(subst -, ,$(TARGET_MACHINE))) ifneq (,$(filter i%86,$(TARGET_PROCESSOR))) diff --git a/source/Makefile.mk b/source/Makefile.mk index 3692b9f45..c6d547fcb 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -85,7 +85,7 @@ CXXFLAGS += -fvisibility-inlines-hidden endif ifneq ($(MACOS_OR_WASM_OR_WINDOWS),true) -ifneq ($(BSD),true) +ifeq ($(GCC),true) BASE_FLAGS += -fno-gnu-unique endif endif