summaryrefslogtreecommitdiff
path: root/make/unit-cc.pl
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2014-08-27 22:01:54 +0100
committerPeter Powell <petpow@saberuk.com>2014-08-27 22:01:54 +0100
commit8258232b7beaf48330eb522a78fe320bb636d59b (patch)
tree52eb65060dcbd767f96d20977db8200a3017db66 /make/unit-cc.pl
parent2ddee67dc28afe12b1cde61a32bcc1c403ae8185 (diff)
Fix unit-cc not loading configure cache when building files.
Diffstat (limited to 'make/unit-cc.pl')
-rwxr-xr-xmake/unit-cc.pl16
1 files changed, 16 insertions, 0 deletions
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 = <CACHE>) {
+ 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') {