You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-util/ccache/files/ccache-2.4-profile.patch

28 lines
1.0 KiB

GCCs options -fprofile-generate and -fprofile-use are used for
profile guided optimization. It depends on the ability to locate
the profile data files (.gcda) after running the executable with
the training data. However, ccache prevents the compiler from
finding the correct profile data file. Therefore the following
patch disables the caching when one of the
-fprofile-generate
-fprofile-use
-fprofile-arcs
flags is found.
Signed-off-by: Clemens Rabe <crabe _at_ gmx _dot_ de>
diff -Naur ccache-2.4.orig/ccache.c ccache-2.4/ccache.c
--- ccache-2.4.orig/ccache.c 2004-09-13 12:38:30.000000000 +0200
+++ ccache-2.4/ccache.c 2008-01-07 20:25:38.000000000 +0100
@@ -640,6 +640,9 @@
/* these are too hard */
if (strcmp(argv[i], "-fbranch-probabilities")==0 ||
+ strcmp(argv[i], "-fprofile-generate")==0 ||
+ strcmp(argv[i], "-fprofile-use")==0 ||
+ strcmp(argv[i], "-fprofile-arcs")==0 ||
strcmp(argv[i], "-M") == 0 ||
strcmp(argv[i], "-MM") == 0 ||
strcmp(argv[i], "-x") == 0) {