build: add config symbols for different ARM arch levels
build: add config symbols for different ARM arch levels

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36620 3c298f89-4303-0410-b956-a3cf2f4a3e73

--- a/include/target.mk
+++ b/include/target.mk
@@ -186,6 +186,7 @@
     ifneq ($(CONFIG_RTC_CLASS),)
       FEATURES += rtc
     endif
+    FEATURES += $(foreach v,v4 v5 v6 v7,$(if $(findstring -march=arm$(v),$(CFLAGS)),arm_$(v)))
 
     # remove duplicates
     FEATURES:=$(sort $(FEATURES))

--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -153,6 +153,7 @@
 	my $ret;
 
 	while ($_ = shift @_) {
+		/arm_v(\w+)/ and $ret .= "\tselect arm_v$1\n";
 		/broken/ and $ret .= "\tdepends on BROKEN\n";
 		/audio/ and $ret .= "\tselect AUDIO_SUPPORT\n";
 		/display/ and $ret .= "\tselect DISPLAY_SUPPORT\n";

--- a/target/Config.in
+++ b/target/Config.in
@@ -80,6 +80,18 @@
 
 config armeb
 	select BIG_ENDIAN
+	bool
+
+config arm_v4
+	bool
+
+config arm_v5
+	bool
+
+config arm_v6
+	bool
+
+config arm_v7
 	bool
 
 config avr32

comments