aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-09-26 17:53:32 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-09-26 17:53:32 +0000
commite0189ccef433f01304b97f89ffd52d1c3b48498b (patch)
tree0ca4ccd943142e324dc59f2732eb92ab9dce680c /scripts
parent0db91251574fd221641a5d89564d244e5406e44f (diff)
downloadupstream-e0189ccef433f01304b97f89ffd52d1c3b48498b.tar.gz
upstream-e0189ccef433f01304b97f89ffd52d1c3b48498b.tar.bz2
upstream-e0189ccef433f01304b97f89ffd52d1c3b48498b.zip
build: include the cpu type as part of the toolchain/target directory name
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 38214
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/metadata.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 498456ea4d..ddcf50bf32 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -53,6 +53,7 @@ sub parse_target_metadata() {
/^Target-Depends:\s*(.+)\s*$/ and $target->{depends} = [ split(/\s+/, $1) ];
/^Target-Description:/ and $target->{desc} = get_multiline(*FILE);
/^Target-Optimization:\s*(.+)\s*$/ and $target->{cflags} = $1;
+ /^CPU-Type:\s*(.+)\s*$/ and $target->{cputype} = $1;
/^Linux-Version:\s*(.+)\s*$/ and $target->{version} = $1;
/^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1;
/^Linux-Kernel-Arch:\s*(.+)\s*$/ and $target->{karch} = $1;
@@ -372,6 +373,16 @@ EOF
print "\tdefault \"".$target->{cflags}."\" if TARGET_".$target->{conf}."\n";
}
print "\tdefault \"-Os -pipe -funit-at-a-time\"\n";
+ print <<EOF;
+
+config CPU_TYPE
+ string
+EOF
+ foreach my $target (@target) {
+ next if @{$target->{subtargets}} > 0;
+ print "\tdefault \"".$target->{cputype}."\" if TARGET_".$target->{conf}."\n";
+ }
+ print "\tdefault \"\"\n";
my %kver;
foreach my $target (@target) {