diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-02-16 18:51:14 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-02-16 18:51:14 +0000 |
commit | b65a3b0d1288d731ccb011c3c8cee178ca54c257 (patch) | |
tree | 14ca084f21a10a78c57e5d887ce64eea29983a5e /core | |
parent | 65b88074c4ae34450033751586a9674f1a6ae6c5 (diff) | |
download | aports-b65a3b0d1288d731ccb011c3c8cee178ca54c257.tar.bz2 aports-b65a3b0d1288d731ccb011c3c8cee178ca54c257.tar.xz |
core/distcc: add a patch that allows distcc compile kernel modules
Diffstat (limited to 'core')
-rw-r--r-- | core/distcc/APKBUILD | 5 | ||||
-rw-r--r-- | core/distcc/distcc-hardened.patch | 24 |
2 files changed, 28 insertions, 1 deletions
diff --git a/core/distcc/APKBUILD b/core/distcc/APKBUILD index 54a373efd2..002885ea05 100644 --- a/core/distcc/APKBUILD +++ b/core/distcc/APKBUILD @@ -1,6 +1,7 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=distcc pkgver=3.1 -pkgrel=0 +pkgrel=1 pkgdesc="A distributed C, C++, Obj C compiler" url="http://distcc.org" license="GPL-2" @@ -8,6 +9,7 @@ depends="popt" makedepends="popt-dev" source="http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.bz2 distcc-3.1-clone.patch + distcc-hardened.patch distccd.initd distccd.confd" subpackages="$pkgname-doc" @@ -39,5 +41,6 @@ build () md5sums="a1a9d3853df7133669fffec2a9aab9f3 distcc-3.1.tar.bz2 29fe296aa2985eea7af7402f421db187 distcc-3.1-clone.patch +351ca958ff4869f8a2795d8ca6647de1 distcc-hardened.patch 5cf566965873279fedc16934a2ba6cd0 distccd.initd e9e0ccc9f5813b9c3c88c8687b2ebc73 distccd.confd" diff --git a/core/distcc/distcc-hardened.patch b/core/distcc/distcc-hardened.patch new file mode 100644 index 0000000000..69b3a65169 --- /dev/null +++ b/core/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]) |