Gentoo Archives: gentoo-commits

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