target.mk: rework arm architecture level detection
authorFelix Fietkau <nbd@nbd.name>
Thu, 14 Jul 2016 13:41:22 +0000 (15:41 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 15 Jul 2016 12:14:37 +0000 (14:14 +0200)
Use kernel config as input instead of -march CFLAGS.
With this change, -march can be dropped and replaced with more specific
optimization flags for better code generation.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/target.mk
target/Config.in

index b5153ff69c58b83cfa22e7a600cea3df26990cf7..0a42411d17a5f23c7f544ddf71a77d6661893c76 100644 (file)
@@ -259,7 +259,7 @@ ifeq ($(DUMP),1)
     ifneq ($(CONFIG_RTC_CLASS),)
       FEATURES += rtc
     endif
-    FEATURES += $(foreach v,v4 v5 v6 v7,$(if $(filter -march=arm$(v)%,$(CPU_CFLAGS_$(CPU_TYPE))),arm_$(v)))
+    FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v)))
 
     # remove duplicates
     FEATURES:=$(sort $(FEATURES))
index 6a29d5332463ed191adbc5cf5e968ee088dc27e0..ee928143ffd508a876a2cc792eceff40764f5d4d 100644 (file)
@@ -117,12 +117,6 @@ config armeb
        select BIG_ENDIAN
        bool
 
-config arm_v4
-       bool
-
-config arm_v5
-       bool
-
 config arm_v6
        bool