Don't override -mcpu with -march on ARM (#353)

* Use -mcpu for ARM
See the GCC doc about -march, -mtune, and -mpu and maybe
https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu

* Fix typo in flags

* Fix typo in cortexa9 flags

* Modify cortexa53 compilation flags to fix failing BLAS check (#341)
This commit is contained in:
Dave Love
2020-08-07 20:11:18 +00:00
committed by GitHub
parent 5d653a11a0
commit 9c5b485d35
5 changed files with 11 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ endif
# Flags specific to optimized kernels.
CKOPTFLAGS := $(COPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CKVECFLAGS := -march=armv7-a
CKVECFLAGS := -mcpu=cortex-a15
else
$(error gcc is required for this configuration.)
endif

View File

@@ -57,19 +57,21 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O3 -ftree-vectorize -mtune=cortex-a53
# Use -O2 here to avoid issue #341 -- BLAS check failing, using GCC 8.
# (It's at least -ftree-loop-vectorize which causes the trouble.)
COPTFLAGS := -O2 -mcpu=cortex-a53
endif
# Flags specific to optimized kernels.
CKOPTFLAGS := $(COPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CKVECFLAGS := -march=armv8-a+fp+simd -mcpu=cortex-a53
CKVECFLAGS := -mcpu=cortex-a53
else
$(error gcc is required for this configuration.)
endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
CROPTFLAGS := $(CKOPTFLAGS) -O3
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-math-optimizations -ffp-contract=fast
else

View File

@@ -57,13 +57,13 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O3 -ftree-vectorize -mtune=cortex-a57
COPTFLAGS := -O3 -mcpu=cortex-a57
endif
# Flags specific to optimized kernels.
CKOPTFLAGS := $(COPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CKVECFLAGS := -march=armv8-a+fp+simd -mcpu=cortex-a57
CKVECFLAGS := -mcpu=cortex-a57
else
$(error gcc is required for this configuration.)
endif

View File

@@ -63,7 +63,7 @@ endif
# Flags specific to optimized kernels.
CKOPTFLAGS := $(COPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CKVECFLAGS := -march=armv7-a
CKVECFLAGS := -mcpu=cortex-a9
else
$(error gcc is required for this configuration.)
endif

View File

@@ -57,13 +57,13 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O3 -ftree-vectorize -mtune=thunderx2t99
COPTFLAGS := -O3 -mcpu=thunderx2t99
endif
# Flags specific to optimized kernels.
CKOPTFLAGS := $(COPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CKVECFLAGS := -march=armv8.1-a+fp+simd -mcpu=thunderx2t99
CKVECFLAGS := -mcpu=thunderx2t99
else
$(error gcc is required for this configuration.)
endif