aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/metadata.pl
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-03-14 03:17:06 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-03-14 03:17:06 +0000
commit019e6e2d31c2ca7ee9619e999bc2ccd8ae23e9b9 (patch)
tree6c94165b9cfec5329ff554b23efbaa04b1d7bb86 /scripts/metadata.pl
parentbf1673f285dd397f8f18a4d7ee1c8c4ccb784535 (diff)
downloadupstream-019e6e2d31c2ca7ee9619e999bc2ccd8ae23e9b9.tar.gz
upstream-019e6e2d31c2ca7ee9619e999bc2ccd8ae23e9b9.tar.bz2
upstream-019e6e2d31c2ca7ee9619e999bc2ccd8ae23e9b9.zip
move cflags default setting to target makefiles
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14866 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-xscripts/metadata.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 7496f33a7d..4002559007 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -52,6 +52,7 @@ sub parse_target_metadata() {
/^Target-Features:\s*(.+)\s*$/ and $target->{features} = [ split(/\s+/, $1) ];
/^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;
/^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;
@@ -325,6 +326,16 @@ EOF
foreach my $target (@target) {
$target->{subtarget} or print "\t\tdefault \"".$target->{board}."\" if TARGET_".$target->{conf}."\n";
}
+ print <<EOF;
+
+config DEFAULT_TARGET_OPTIMIZATION
+ string
+EOF
+ foreach my $target (@target) {
+ next if @{$target->{subtargets}} > 0;
+ print "\tdefault \"".$target->{cflags}."\" if TARGET_".$target->{conf}."\n";
+ }
+ print "\tdefault \"-Os -pipe -funit-at-a-time\"\n";
my %kver;
foreach my $target (@target) {
@@ -332,8 +343,10 @@ EOF
next if $kver{$v};
$kver{$v} = 1;
print <<EOF;
+
config LINUX_$v
bool
+
EOF
}
foreach my $def (sort keys %defaults) {