try to detect the PHI cross compiler in make.
This commit is contained in:
parent
5a2973af25
commit
a31c936c5a
1 changed files with 7 additions and 0 deletions
7
Makefile
7
Makefile
|
@ -92,6 +92,8 @@ CC := riscv64-unknown-linux-gnu-gcc
|
|||
CXX := riscv64-unknown-linux-gnu-g++
|
||||
endif
|
||||
|
||||
K1OM := $( shell echo | $CC -dM -E - | grep __k1om__ )
|
||||
|
||||
#
|
||||
# Compile flags
|
||||
#
|
||||
|
@ -274,6 +276,9 @@ endif
|
|||
ifndef RISCV
|
||||
|
||||
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64))
|
||||
|
||||
ifeq "$(K1OM)" ""
|
||||
|
||||
# Use all CPU extensions that are available:
|
||||
MK_CFLAGS += -march=native -mtune=native
|
||||
HOST_CXXFLAGS += -march=native -mtune=native
|
||||
|
@ -287,6 +292,8 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64))
|
|||
#MK_CXXFLAGS += -mssse3
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifneq '' '$(findstring mingw,$(shell $(CC) -dumpmachine))'
|
||||
# The stack is only 16-byte aligned on Windows, so don't let gcc emit aligned moves.
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue