History

scripts: get_abi.pl: make undefined search more deterministic

Sort keys on hashes during undefined search, in order to make the script more deterministic.

Mauro Carvalho Chehab committed 5 years ago

Commit e5c044c1 parent 654e4d51 file · +5 −3Browse files

Unified · Split

scripts/get_abi.pl+5−3
@@ -775,6 +775,8 @@ sub check_undefined_symbols { · 774 unmodified lines
775775 my $next_i = 0;
776776 my $start_time = times;
777777
778+ @files = sort @files;
779+
778780 my $last_time = $start_time;
779781
780782 # When either debug or hint is enabled, there's no sense showing
@@ -909,16 +911,16 @@ sub undefined_symbols { · 128 unmodified lines
909911 }
910912 }
911913 # Compile regexes
912− foreach my $l (keys %leaf) {
914+ foreach my $l (sort keys %leaf) {
913915 my @expr;
914− foreach my $w(split /\xac/, $leaf{$l}->{what}) {
916+ foreach my $w(sort split /\xac/, $leaf{$l}->{what}) {
915917 push @expr, qr /^$w$/;
916918 }
917919 $leaf{$l}->{expr} = \@expr;
918920 }
919921
920922 # Take links into account
921− foreach my $link (keys %aliases) {
923+ foreach my $link (sort keys %aliases) {
922924 my $abs_file = $aliases{$link};
923925 graph_add_link($abs_file, $link);
924926 }