In my project, option '--sysroot' is widely used. When I specified CCACHE_BASEDIR variable, I found ccache does not substitute this path to a relative path. I made the following patch and it seems work well. Index: /home/yeb/test/ccache-3.1/ccache.c =================================================================== --- /home/yeb/test/ccache-3.1/ccache.c +++ /home/yeb/test/ccache-3.1/ccache.c 2010-09-17 01:01:09.000000000 +0800 @@ -1365,15 +1365,6 @@ cc_process_args(struct args *orig_args, continue; } } - if (str_startswith(argv[i], "--sysroot=")) { - free(output_dep); - char *relpath = make_relative_path(x_strdup(argv[i] + 10)); - char *option = format("--sysroot=%s", relpath); - args_add(stripped_args, option); - free(relpath); - free(option); - continue; - } if (str_startswith(argv[i], "-Wp,")) { if (str_startswith(argv[i], "-Wp,-MD,") && !strchr(argv[i] + 8, ',')) { generating_dependencies = true;
Thanks! Committed in 1c70e25cb57eb813707cec996ef557e80203de1a with a bug fix and a test case.
Included in v3.1.6.