On 01/19/15 13:34, "Paweł Hajdan, Jr." wrote:
On 1/18/15 10:50 PM, Anthony G. Basile wrote:
Hi everyone, I'd like to make a commit to toolchain.eclass in a few
days.  mgorny noticed some code which can be improved.  Basically gcc
creates "fixed" include files from system headers because of the
requirement that it have ansi c compliant headers.  These are fixed via
shells scripts during the build process, but we just delete them
afterwards.  Rather than generate and then delete them, just don't
generate them in the first place.  Its bug number #536878.  I've tested
on gcc-3 to the latest and both approaches yield the same results.
Sounds good.

Here's the patch so you don't have to go hunting for it:

diff -u -B -r1.647 toolchain.eclass
--- toolchain.eclass    15 Nov 2014 08:45:33 -0000    1.647
+++ toolchain.eclass    18 Jan 2015 20:36:08 -0000
@@ -595,6 +595,13 @@
                  einfo "  ${f%%...}"
              done
      fi
+
+    # we don't want fixed includes :)
Please consider summarizing above in the comment (mostly to the effect
that fixed headers are deleted afterwards and are not needed on modern
systems). It's obvious it's just disabling the logic in given shell
scripts, but from the code itself it's not obvious why.

Paweł

Okay a more detailed comment will go in that will make it clear to future maintainers.


+    if tc_version_is_at_least 4.0; then
+        echo : > "${S}"/fixincludes/fixinc.in || die
+    else
+        echo : > "${S}"/gcc/fixinc/fixincl.sh || die
+    fi
  }
guess_patch_type_in_dir() {



--
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail    : bluen...@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA


Reply via email to