Skip to content
Snippets Groups Projects
Unverified Commit d038e90d authored by Joakim Eriksson's avatar Joakim Eriksson Committed by GitHub
Browse files

Merge pull request #1804 from pjonsson/right-compiler

native: configure according to $(CC)
parents 03f66acb 120be585
No related branches found
No related tags found
No related merge requests found
......@@ -25,15 +25,15 @@ CFLAGS += $(CFLAGSNO)
SMALL ?= 0
# The optimizations on native platform cannot be enabled in GCC (not Clang) versions less than 7.2
GCC_IS_CLANG := $(shell gcc --version 2> /dev/null | grep clang)
GCC_IS_CLANG := $(shell $(CC) --version 2> /dev/null | grep clang)
ifneq ($(GCC_IS_CLANG),)
NATIVE_CAN_OPTIIMIZE = 1
else
GCC_VERSION := $(shell gcc -dumpfullversion -dumpversion | cut -b1-3)
GCC_VERSION := $(shell $(CC) -dumpfullversion -dumpversion | cut -b1-3)
ifeq ($(shell expr $(GCC_VERSION) \>= 7.2), 1)
NATIVE_CAN_OPTIIMIZE = 1
NATIVE_CAN_OPTIIMIZE = 1
else
NATIVE_CAN_OPTIIMIZE = 0
NATIVE_CAN_OPTIIMIZE = 0
endif
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment