public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-devel/distcc/files: distcc-hardened.patch
@ 2008-11-02 22:24 Gordon Malm (gengor)
  0 siblings, 0 replies; only message in thread
From: Gordon Malm (gengor) @ 2008-11-02 22:24 UTC (permalink / raw
  To: gentoo-commits

gengor      08/11/02 22:24:23

  Added:                distcc-hardened.patch
  Log:
  Add "hardened" USE flag, fixing bugs #120001, #167844 and probably more.
  (Portage version: 2.1.4.5)

Revision  Changes    Path
1.1                  sys-devel/distcc/files/distcc-hardened.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/distcc-hardened.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/distcc-hardened.patch?rev=1.1&content-type=text/plain

Index: distcc-hardened.patch
===================================================================
From: Gordon Malm <gengor@gentoo.org>

Make distcc client pass -D__KERNEL__ macro.  Hardened GCC uses this
macro to determine if code intended to be run in-kernel is being compiled.
If the code is kernel code, certain compile flags are not applied.

When using distcc to build kernel code (modules, etc.) without this patch,
the distccd host doesn't get passed -D__KERNEL__.  Consequently, gcc on
the distccd host applies all kinds of flags that it shouldn't.

--- distcc-2.18.3/src/strip.c
+++ distcc-2.18.3-hardened/src/strip.c
@@ -73,7 +73,10 @@ int dcc_strip_local_args(char **from, ch
     /* skip through argv, copying all arguments but skipping ones that
      * ought to be omitted */
     for (from_i = to_i = 0; from[from_i]; from_i++) {
-        if (str_equal("-D", from[from_i])
+        if (str_equal("-D__KERNEL__", from[from_i])) {
+            to[to_i++] = from[from_i];
+        }
+        else if (str_equal("-D", from[from_i])
             || str_equal("-I", from[from_i])
             || str_equal("-U", from[from_i])
             || str_equal("-L", from[from_i])






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-02 22:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 22:24 [gentoo-commits] gentoo-x86 commit in sys-devel/distcc/files: distcc-hardened.patch Gordon Malm (gengor)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox