Переглянути джерело

build: ensure that reordering of KCONFIG lines are handled properly and that the final result does not depend on the package scan order

SVN-Revision: 32788
Felix Fietkau 13 роки тому
батько
коміт
2335304a08
2 змінених файлів з 5 додано та 1 видалено
  1. 4 1
      scripts/kconfig.pl
  2. 1 0
      scripts/metadata.pl

+ 4 - 1
scripts/kconfig.pl

@@ -73,7 +73,10 @@ sub config_add($$$) {
 		my %cfg = %$_;
 		
 		foreach my $config (keys %cfg) {
-			next if $mod_plus and $config{$config} and $config{$config} eq "y";
+			if ($mod_plus and $config{$config}) {
+				next if $config{$config} eq "y";
+				next if $cfg{$config} eq '#undef';
+			}
 			$config{$config} = $cfg{$config};
 		}
 	}

+ 1 - 0
scripts/metadata.pl

@@ -115,6 +115,7 @@ sub gen_kconfig_overrides() {
 					$val = $2;
 				}
 				if ($config{"CONFIG_PACKAGE_$package"} and ($config ne 'n')) {
+					next if $kconfig{$config} eq 'y';
 					$kconfig{$config} = $val;
 				} elsif (!$override) {
 					$kconfig{$config} or $kconfig{$config} = 'n';