Gentoo Archives: gentoo-dev

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] proposed update to toolchain.eclass
Date: Mon, 19 Jan 2015 21:20:43
Message-Id: 54BD7588.40807@gentoo.org
In Reply to: Re: [gentoo-dev] proposed update to toolchain.eclass by "Paweł Hajdan
1 On 01/19/15 13:34, "Paweł Hajdan, Jr." wrote:
2 > On 1/18/15 10:50 PM, Anthony G. Basile wrote:
3 >> Hi everyone, I'd like to make a commit to toolchain.eclass in a few
4 >> days. mgorny noticed some code which can be improved. Basically gcc
5 >> creates "fixed" include files from system headers because of the
6 >> requirement that it have ansi c compliant headers. These are fixed via
7 >> shells scripts during the build process, but we just delete them
8 >> afterwards. Rather than generate and then delete them, just don't
9 >> generate them in the first place. Its bug number #536878. I've tested
10 >> on gcc-3 to the latest and both approaches yield the same results.
11 > Sounds good.
12 >
13 >> Here's the patch so you don't have to go hunting for it:
14 >>
15 >> diff -u -B -r1.647 toolchain.eclass
16 >> --- toolchain.eclass 15 Nov 2014 08:45:33 -0000 1.647
17 >> +++ toolchain.eclass 18 Jan 2015 20:36:08 -0000
18 >> @@ -595,6 +595,13 @@
19 >> einfo " ${f%%...}"
20 >> done
21 >> fi
22 >> +
23 >> + # we don't want fixed includes :)
24 > Please consider summarizing above in the comment (mostly to the effect
25 > that fixed headers are deleted afterwards and are not needed on modern
26 > systems). It's obvious it's just disabling the logic in given shell
27 > scripts, but from the code itself it's not obvious why.
28 >
29 > Paweł
30
31 Okay a more detailed comment will go in that will make it clear to
32 future maintainers.
33
34 >
35 >> + if tc_version_is_at_least 4.0; then
36 >> + echo : > "${S}"/fixincludes/fixinc.in || die
37 >> + else
38 >> + echo : > "${S}"/gcc/fixinc/fixincl.sh || die
39 >> + fi
40 >> }
41 >>
42 >> guess_patch_type_in_dir() {
43 >
44
45
46 --
47 Anthony G. Basile, Ph.D.
48 Gentoo Linux Developer [Hardened]
49 E-Mail : blueness@g.o
50 GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
51 GnuPG ID : F52D4BBA