1 |
commit: d5a627d73e0f4a62ec635c71b7a8734fb224b77b |
2 |
Author: Hinnerk van Bruinehsen <h.v.bruinehsen <AT> fu-berlin <DOT> de> |
3 |
AuthorDate: Sun Aug 31 16:32:36 2014 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 31 16:59:05 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=d5a627d7 |
7 |
|
8 |
sys-devel/gcc-4.8.3-r99: fix build |
9 |
|
10 |
libsanitizer/tsan/tsan_platform_linux.cc uses __res_state * which would |
11 |
have to be either struct __res_state * or the typedef: res_state. The |
12 |
patch uses the latter. |
13 |
|
14 |
Signed-of-by: Hinnerk van Bruinehsen <h.v.bruinehsen <AT> fu-berlin.de> |
15 |
|
16 |
--- |
17 |
sys-devel/gcc/files/gcc-4.8.3-musl-res_state.patch | 12 ++++++++++++ |
18 |
sys-devel/gcc/gcc-4.8.3-r99.ebuild | 1 + |
19 |
2 files changed, 13 insertions(+) |
20 |
|
21 |
diff --git a/sys-devel/gcc/files/gcc-4.8.3-musl-res_state.patch b/sys-devel/gcc/files/gcc-4.8.3-musl-res_state.patch |
22 |
new file mode 100644 |
23 |
index 0000000..7757c38 |
24 |
--- /dev/null |
25 |
+++ b/sys-devel/gcc/files/gcc-4.8.3-musl-res_state.patch |
26 |
@@ -0,0 +1,12 @@ |
27 |
+diff -ENwbur gcc-4.8.3.orig/libsanitizer/tsan/tsan_platform_linux.cc gcc-4.8.3/libsanitizer/tsan/tsan_platform_linux.cc |
28 |
+--- gcc-4.8.3.orig/libsanitizer/tsan/tsan_platform_linux.cc 2014-08-31 12:50:18.381689906 +0000 |
29 |
++++ gcc-4.8.3/libsanitizer/tsan/tsan_platform_linux.cc 2014-08-31 13:12:19.838446253 +0000 |
30 |
+@@ -292,7 +292,7 @@ |
31 |
+ #ifndef TSAN_GO |
32 |
+ int ExtractResolvFDs(void *state, int *fds, int nfd) { |
33 |
+ int cnt = 0; |
34 |
+- __res_state *statp = (__res_state*)state; |
35 |
++ res_state statp = (res_state)state; |
36 |
+ for (int i = 0; i < MAXNS && cnt < nfd; i++) { |
37 |
+ if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1) |
38 |
+ fds[cnt++] = statp->_u._ext.nssocks[i]; |
39 |
|
40 |
diff --git a/sys-devel/gcc/gcc-4.8.3-r99.ebuild b/sys-devel/gcc/gcc-4.8.3-r99.ebuild |
41 |
index 4a64149..b96acf6 100644 |
42 |
--- a/sys-devel/gcc/gcc-4.8.3-r99.ebuild |
43 |
+++ b/sys-devel/gcc/gcc-4.8.3-r99.ebuild |
44 |
@@ -57,6 +57,7 @@ src_prepare() { |
45 |
mv libitm/config/linux/x86 libitm/config/linux/x86_glibc |
46 |
cp -r libitm/config/generic libitm/config/linux/x86 |
47 |
epatch "${FILESDIR}"/${PN}-4.7.3-musl-linker-path.patch |
48 |
+ epatch "${FILESDIR}"/${PN}-4.8.3-musl-res_state.patch |
49 |
fi |
50 |
|
51 |
use vanilla && return 0 |