[ccache] Profile not supported

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Mon Mar 27 06:56:40 GMT 2006


I noted that gcc profile options are not supported. The reason is that
profile option generate additional files which are not handled by
ccache. Files are create in temporary directory and not moved. Is also
not easy to implement such move cause when you enable profiling a full
name of profile file is stored in object file so the only viable
solution I found is to compile file in original destination and cache it
instead of using a temporary directory and move however this is not that
easy... The easier solution is to disable ccache if it found profile
options.. here you are my patch.

diff -ru ccache-2.4/ccache.c ccache-2.4.my/ccache.c
--- ccache-2.4/ccache.c 2004-09-13 12:38:30.000000000 +0200
+++ ccache-2.4.my/ccache.c      2006-03-27 08:46:24.860824332 +0200
@@ -642,7 +642,9 @@
                if (strcmp(argv[i], "-fbranch-probabilities")==0 ||
                    strcmp(argv[i], "-M") == 0 ||
                    strcmp(argv[i], "-MM") == 0 ||
-                   strcmp(argv[i], "-x") == 0) {
+                   strcmp(argv[i], "-x") == 0 ||
+                   strcmp(argv[i], "-fprofile-arcs") == 0 ||
+                   strcmp(argv[i], "-ftest-coverage") == 0) {
                        cc_log("argument %s is unsupported\n", argv[i]);
                        stats_update(STATS_UNSUPPORTED);
                        failed();

Frediano Ziglio


More information about the ccache mailing list