Enforce a minimum architecture for ARM.

This was added in 558ee7 to master.
This commit is contained in:
Yamagi 2020-03-18 15:58:22 +01:00
parent c904880dc9
commit 142690e164
1 changed files with 17 additions and 10 deletions

View File

@ -147,6 +147,23 @@ endif
# ----------
# ARM needs a sane minimum architecture. We need the `yield`
# opcode, arm6k is the first iteration that supports it. arm6k
# is also the first Raspberry PI generation and older hardware
# is likely too slow to run the game. We're not enforcing the
# minimum architecture, but if you're build for something older
# like arm5 you need to remove the `yield` opcode. It's set in
# Qcommon_Mainloop() in frame.c via inline assmebly.
ifeq ($(YQ2_ARCH), arm)
CFLAGS += -march=armv6k
endif
ifeq ($(YQ2_ARCH), aarch64)
CFLAGS += -march=armv8.0-a
endif
# ----------
# Switch of some annoying warnings.
ifeq ($(COMPILER), clang)
# -Wno-missing-braces because otherwise clang complains
@ -191,16 +208,6 @@ ifeq ($(YQ2_ARCH), x86_64)
override CFLAGS += -mfpmath=sse
endif
# In ARM mode it cannot generate yield instruction
# to cool down the CPU in busy mode
ifeq ($(YQ2_ARCH), arm)
CFLAGS += -march=armv6k
endif
ifeq ($(YQ2_ARCH), aarch64)
CFLAGS += -march=armv8-a
endif
# ----------
# Systemwide installation.