From 8258232b7beaf48330eb522a78fe320bb636d59b Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 27 Aug 2014 22:01:54 +0100 Subject: Fix unit-cc not loading configure cache when building files. --- make/unit-cc.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'make/unit-cc.pl') diff --git a/make/unit-cc.pl b/make/unit-cc.pl index 7474365aa..a494fb74b 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -30,6 +30,22 @@ my $type = shift; my $out = shift; my $verbose = ($type =~ s/-v$//); +## BEGIN HACK: REMOVE IN 2.2! +sub read_config_cache { + my %cfg = (); + open(CACHE, '../.config.cache') or return %cfg; + while (my $line = ) { + next if $line =~ /^\s*($|\#)/; + my ($key, $value) = ($line =~ /^(\S+)="(.*)"$/); + $cfg{$key} = $value; + } + close(CACHE); + return %cfg; +} + +our %config = read_config_cache(); +## END HACK + if ($type eq 'gen-ld') { do_static_find(@ARGV); } elsif ($type eq 'static-ld') { -- cgit v1.2.3