1 |
commit: 1b76343af3ea4da0cf9dba731990a57c38a8cb85 |
2 |
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 31 11:04:37 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 31 12:46:33 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b76343a |
7 |
|
8 |
sys-devel/distcc: gcc-10 fix from upstream |
9 |
|
10 |
Closes: https://bugs.gentoo.org/707502 |
11 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/16029 |
13 |
|
14 |
sys-devel/distcc/distcc-3.3.3-r1.ebuild | 2 ++ |
15 |
.../distcc/files/distcc-3.3.3-gcc-10-fix.patch | 28 ++++++++++++++++++++++ |
16 |
2 files changed, 30 insertions(+) |
17 |
|
18 |
diff --git a/sys-devel/distcc/distcc-3.3.3-r1.ebuild b/sys-devel/distcc/distcc-3.3.3-r1.ebuild |
19 |
index e3911a71f50..700f331aa62 100644 |
20 |
--- a/sys-devel/distcc/distcc-3.3.3-r1.ebuild |
21 |
+++ b/sys-devel/distcc/distcc-3.3.3-r1.ebuild |
22 |
@@ -48,6 +48,8 @@ src_prepare() { |
23 |
eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" |
24 |
# backport py3.8 fixes |
25 |
eapply "${FILESDIR}/${P}-py38.patch" |
26 |
+ # gcc-10 fix, #707502 |
27 |
+ eapply "${FILESDIR}/${P}-gcc-10-fix.patch" |
28 |
eapply_user |
29 |
|
30 |
# Bugs #120001, #167844 and probably more. See patch for description. |
31 |
|
32 |
diff --git a/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch b/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch |
33 |
new file mode 100644 |
34 |
index 00000000000..2c0bce6c82b |
35 |
--- /dev/null |
36 |
+++ b/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch |
37 |
@@ -0,0 +1,28 @@ |
38 |
+From 377969cc762569f4a5ec409a1e7ad6a7be3e51b3 Mon Sep 17 00:00:00 2001 |
39 |
+From: Romain Geissler <romain.geissler@×××××××.com> |
40 |
+Date: Mon, 27 Jan 2020 09:28:43 +0000 |
41 |
+Subject: [PATCH] Fix build with gcc 10 which defaults to -fno-common (cf |
42 |
+ https://gcc.gnu.org/gcc-10/porting_to.html) |
43 |
+ |
44 |
+This fixes the following link error I see when I use the latest gcc 10 |
45 |
+git branch: |
46 |
+/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/serve.o:(.bss+0x0): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here |
47 |
+/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/stats.o:(.data+0x20): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here |
48 |
+collect2: error: ld returned 1 exit status |
49 |
+--- |
50 |
+ src/stats.h | 2 +- |
51 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
52 |
+ |
53 |
+diff --git a/src/stats.h b/src/stats.h |
54 |
+index 9bde285..74d4690 100644 |
55 |
+--- a/src/stats.h |
56 |
++++ b/src/stats.h |
57 |
+@@ -33,7 +33,7 @@ enum stats_e { STATS_TCP_ACCEPT, STATS_REJ_BAD_REQ, STATS_REJ_OVERLOAD, |
58 |
+ STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT, |
59 |
+ STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX }; |
60 |
+ |
61 |
+-const char *stats_text[20]; |
62 |
++extern const char *stats_text[20]; |
63 |
+ |
64 |
+ int dcc_stats_init(void); |
65 |
+ void dcc_stats_init_kid(void); |