Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/ccache/files: ccache-2.4-profile.patch
Date: Tue, 30 Sep 2008 06:39:55
Message-Id: E1KkYtj-0007CH-Cx@stork.gentoo.org
1 robbat2 08/09/30 06:39:51
2
3 Added: ccache-2.4-profile.patch
4 Log:
5 Exclude any use of -fprofile* from ccache storage, per bug #204810.
6 (Portage version: 2.2_rc11/cvs/Linux 2.6.27-rc1-10246-gca5de40 x86_64)
7
8 Revision Changes Path
9 1.1 dev-util/ccache/files/ccache-2.4-profile.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/ccache/files/ccache-2.4-profile.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/ccache/files/ccache-2.4-profile.patch?rev=1.1&content-type=text/plain
13
14 Index: ccache-2.4-profile.patch
15 ===================================================================
16 GCCs options -fprofile-generate and -fprofile-use are used for
17 profile guided optimization. It depends on the ability to locate
18 the profile data files (.gcda) after running the executable with
19 the training data. However, ccache prevents the compiler from
20 finding the correct profile data file. Therefore the following
21 patch disables the caching when one of the
22 -fprofile-generate
23 -fprofile-use
24 -fprofile-arcs
25 flags is found.
26
27 Signed-off-by: Clemens Rabe <crabe _at_ gmx _dot_ de>
28
29
30 diff -Naur ccache-2.4.orig/ccache.c ccache-2.4/ccache.c
31 --- ccache-2.4.orig/ccache.c 2004-09-13 12:38:30.000000000 +0200
32 +++ ccache-2.4/ccache.c 2008-01-07 20:25:38.000000000 +0100
33 @@ -640,6 +640,9 @@
34
35 /* these are too hard */
36 if (strcmp(argv[i], "-fbranch-probabilities")==0 ||
37 + strcmp(argv[i], "-fprofile-generate")==0 ||
38 + strcmp(argv[i], "-fprofile-use")==0 ||
39 + strcmp(argv[i], "-fprofile-arcs")==0 ||
40 strcmp(argv[i], "-M") == 0 ||
41 strcmp(argv[i], "-MM") == 0 ||
42 strcmp(argv[i], "-x") == 0) {