diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-23 18:24:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-23 18:24:11 +0000 |
commit | 2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch) | |
tree | a63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /main/distcc/distcc-hardened.patch | |
parent | e374901731eb35599bd6735de4dd38560e3a79b8 (diff) | |
download | aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2 aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz |
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'main/distcc/distcc-hardened.patch')
-rw-r--r-- | main/distcc/distcc-hardened.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/main/distcc/distcc-hardened.patch b/main/distcc/distcc-hardened.patch new file mode 100644 index 000000000..69b3a6516 --- /dev/null +++ b/main/distcc/distcc-hardened.patch @@ -0,0 +1,24 @@ +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]) |