[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 18/26] rumprun: ts-rumprun-build: set up ccache



Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ts-rumprun-build | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/ts-rumprun-build b/ts-rumprun-build
index 24e54e1..26f2f2c 100755
--- a/ts-rumprun-build
+++ b/ts-rumprun-build
@@ -54,6 +54,7 @@ END
 
 my $bindir;
 my $gnutriplet;
+my $ccachedir;
 
 sub findtools() {
     my $gcc = target_cmd_output($ho, "echo $rux/rumprun/bin/*-gcc");
@@ -63,8 +64,19 @@ sub findtools() {
     $gnutriplet = $2;
 }
 
+sub setupccache() {
+    $ccachedir = "$bindir.ccache";
+    target_cmd_build($ho, 600, $rux, <<END);
+        mkdir $ccachedir
+        ccache=\$(type -p ccache)
+        for f in $bindir/$gnutriplet-*; do
+            ln -s \$ccache $ccachedir/\${f##*/}
+        done
+END
+}
+
 sub recordtools() {
-    my $prefix = "PATH=$bindir:\$PATH ";
+    my $prefix = "PATH=$ccachedir:$bindir:\$PATH ";
     $prefix .= "CROSS_COMPILE=$gnutriplet- HOSTCC=gcc ";
     store_runvar('cmdprefix_configure', $prefix);
     store_runvar('cmdprefix_make',      $prefix);
@@ -81,6 +93,7 @@ checkout();
 massage();
 build();
 findtools();
+setupccache();
 recordtools();
 install();
 built_stash($ho, $builddir, 'rumprun', 'rumprundist');
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.