[source] target.mk: change CPU_CFLAGS to better suit target CPUs
LEDE Commits
lede-commits at lists.infradead.org
Fri Jul 15 05:20:03 PDT 2016
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=f021ea47d322eec759d2f0ee5c15e289939819fd
commit f021ea47d322eec759d2f0ee5c15e289939819fd
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jul 14 15:43:49 2016 +0200
target.mk: change CPU_CFLAGS to better suit target CPUs
-march forces the compiler to generate generic code, whereas -mcpu
allows it to target the specific CPU variant and use instructions that
the generic architecture may not have
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
include/target.mk | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/target.mk b/include/target.mk
index 0a42411..6a0ec97 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -183,19 +183,19 @@ ifeq ($(DUMP),1)
endif
ifneq ($(findstring arm,$(ARCH)),)
CPU_TYPE ?= xscale
- CPU_CFLAGS_arm920t = -march=armv4t -mtune=arm920t
- CPU_CFLAGS_arm926ej-s = -march=armv5te -mtune=arm926ej-s
- CPU_CFLAGS_arm1136j-s = -march=armv6 -mtune=arm1136j-s
- CPU_CFLAGS_arm1176jzf-s = -march=armv6 -mtune=arm1176jzf-s
- CPU_CFLAGS_cortex-a5 = -march=armv7-a -mtune=cortex-a5
- CPU_CFLAGS_cortex-a7 = -march=armv7-a -mtune=cortex-a7
- CPU_CFLAGS_cortex-a8 = -march=armv7-a -mtune=cortex-a8
- CPU_CFLAGS_cortex-a9 = -march=armv7-a -mtune=cortex-a9
- CPU_CFLAGS_cortex-a15 = -march=armv7-a -mtune=cortex-a15
- CPU_CFLAGS_cortex-a53 = -march=armv8-a -mtune=cortex-a53
- CPU_CFLAGS_fa526 = -march=armv4 -mtune=fa526
- CPU_CFLAGS_mpcore = -march=armv6k -mtune=mpcore
- CPU_CFLAGS_xscale = -march=armv5te -mtune=xscale
+ CPU_CFLAGS_arm920t = -mcpu=arm920t
+ CPU_CFLAGS_arm926ej-s = -mcpu=arm926ej-s
+ CPU_CFLAGS_arm1136j-s = -mcpu=arm1136j-s
+ CPU_CFLAGS_arm1176jzf-s = -mcpu=arm1176jzf-s
+ CPU_CFLAGS_cortex-a5 = -mcpu=cortex-a5
+ CPU_CFLAGS_cortex-a7 = -mcpu=cortex-a7
+ CPU_CFLAGS_cortex-a8 = -mcpu=cortex-a8
+ CPU_CFLAGS_cortex-a9 = -mcpu=cortex-a9
+ CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15
+ CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53
+ CPU_CFLAGS_fa526 = -mcpu=fa526
+ CPU_CFLAGS_mpcore = -mcpu=mpcore
+ CPU_CFLAGS_xscale = -mcpu=xscale
ifeq ($(CONFIG_SOFT_FLOAT),)
CPU_CFLAGS_neon = -mfpu=neon
CPU_CFLAGS_vfp = -mfpu=vfp
More information about the lede-commits
mailing list