forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ccache-2.4-profile.patch
27 lines (23 loc) · 1.04 KB
/
ccache-2.4-profile.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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) {