Gentoo Archives: gentoo-dev

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] proposed update to toolchain.eclass
Date: Sun, 18 Jan 2015 21:49:27
Message-Id: 54BC2AC0.7040807@gentoo.org
1 Hi everyone, I'd like to make a commit to toolchain.eclass in a few
2 days. mgorny noticed some code which can be improved. Basically gcc
3 creates "fixed" include files from system headers because of the
4 requirement that it have ansi c compliant headers. These are fixed via
5 shells scripts during the build process, but we just delete them
6 afterwards. Rather than generate and then delete them, just don't
7 generate them in the first place. Its bug number #536878. I've tested
8 on gcc-3 to the latest and both approaches yield the same results.
9 Here's the patch so you don't have to go hunting for it:
10
11 diff -u -B -r1.647 toolchain.eclass
12 --- toolchain.eclass 15 Nov 2014 08:45:33 -0000 1.647
13 +++ toolchain.eclass 18 Jan 2015 20:36:08 -0000
14 @@ -595,6 +595,13 @@
15 einfo " ${f%%...}"
16 done
17 fi
18 +
19 + # we don't want fixed includes :)
20 + if tc_version_is_at_least 4.0; then
21 + echo : > "${S}"/fixincludes/fixinc.in || die
22 + else
23 + echo : > "${S}"/gcc/fixinc/fixincl.sh || die
24 + fi
25 }
26
27 guess_patch_type_in_dir() {
28 @@ -1598,9 +1605,6 @@
29 toolchain_src_install() {
30 cd "${WORKDIR}"/build
31
32 - # Do allow symlinks in private gcc include dir as this can break the build
33 - find gcc/include*/ -type l -delete
34 -
35 # Copy over the info pages. We disabled their generation earlier, but the
36 # build system only expects to install out of the build dir, not the source. #464008
37 mkdir -p gcc/doc
38 @@ -1611,13 +1615,6 @@
39 fi
40 done
41
42 - # Remove generated headers, as they can cause things to break
43 - # (ncurses, openssl, etc).
44 - while read x ; do
45 - grep -q 'It has been auto-edited by fixincludes from' "${x}" \
46 - && rm -f "${x}"
47 - done < <(find gcc/include*/ -name '*.h')
48 -
49 # Do the 'make install' from the build directory
50 S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install || die
51
52
53
54 --
55 Anthony G. Basile, Ph.D.
56 Gentoo Linux Developer [Hardened]
57 E-Mail : blueness@g.o
58 GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
59 GnuPG ID : F52D4BBA

Replies

Subject Author
Re: [gentoo-dev] proposed update to toolchain.eclass "Diego Elio Pettenò" <flameeyes@×××××××××.eu>
Re: [gentoo-dev] proposed update to toolchain.eclass "Paweł Hajdan