Gentoo Archives: gentoo-commits

From: "Ryan Hill (dirtyepic)" <dirtyepic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-devel/gcc/files: gcc-spec-env.patch
Date: Sat, 01 Jan 2011 00:59:31
Message-Id: 20110101005922.04FC020054@flycatcher.gentoo.org
1 dirtyepic 11/01/01 00:59:22
2
3 Modified: gcc-spec-env.patch
4 Log:
5 GET_ENVIRONMENT is poisoned in 4.6. Use getenv() instead. No functional
6 changes.
7
8 (Portage version: 2.2.0_alpha10/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.6 sys-devel/gcc/files/gcc-spec-env.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/gcc-spec-env.patch?rev=1.6&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/gcc-spec-env.patch?rev=1.6&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/gcc-spec-env.patch?r1=1.5&r2=1.6
16
17 Index: gcc-spec-env.patch
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/gcc-spec-env.patch,v
20 retrieving revision 1.5
21 retrieving revision 1.6
22 diff -u -r1.5 -r1.6
23 --- gcc-spec-env.patch 2 Oct 2006 01:11:25 -0000 1.5
24 +++ gcc-spec-env.patch 1 Jan 2011 00:59:21 -0000 1.6
25 @@ -1,8 +1,9 @@
26 Add support for external spec file via the GCC_SPECS env var. This
27 allows us to easily control pie/ssp defaults with gcc-config profiles.
28
29 - Original patch by Rob Holland. Extended to support multiple
30 - entries separated by ':' by Kevin F. Quinn
31 + Original patch by Rob Holland
32 + Extended to support multiple entries separated by ':' by Kevin F. Quinn
33 + Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
34
35 --- gcc-4/gcc/gcc.c
36 +++ gcc-4/gcc/gcc.c
37 @@ -15,7 +16,7 @@
38 + * each spec listed, the string is overwritten at token boundaries
39 + * (':') with '\0', an effect of strtok_r().
40 + */
41 -+ GET_ENVIRONMENT (specs_file, "GCC_SPECS");
42 ++ specs_file = getenv ("GCC_SPECS");
43 + if (specs_file && (strlen(specs_file) > 0))
44 + {
45 + char *spec, *saveptr;