]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
distcc: Fix build with -fno-common
authorKhem Raj <raj.khem@gmail.com>
Wed, 5 Aug 2020 17:50:11 +0000 (10:50 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Aug 2020 14:12:34 +0000 (15:12 +0100)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/distcc/distcc_3.3.3.bb
meta/recipes-devtools/distcc/files/0001-Fix-build-with-gcc-10-which-defaults-to-fno-common-c.patch [new file with mode: 0644]

index c52f136be8cb6aded91fa91b72e1af7a55d9fce0..d92b9c3046424dd0dfa2481861cd87edd5f3aa14 100644 (file)
@@ -17,6 +17,7 @@ RRECOMMENDS_${PN}-server = "avahi-daemon"
 SRC_URI = "git://github.com/distcc/distcc.git \
            file://fix-gnome.patch \
            file://separatebuilddir.patch \
+           file://0001-Fix-build-with-gcc-10-which-defaults-to-fno-common-c.patch \
            file://default \
            file://distcc \
            file://distcc.service"
diff --git a/meta/recipes-devtools/distcc/files/0001-Fix-build-with-gcc-10-which-defaults-to-fno-common-c.patch b/meta/recipes-devtools/distcc/files/0001-Fix-build-with-gcc-10-which-defaults-to-fno-common-c.patch
new file mode 100644 (file)
index 0000000..86c07c1
--- /dev/null
@@ -0,0 +1,34 @@
+From 98530865795300008fe06bb647a6fc2dddfc7967 Mon Sep 17 00:00:00 2001
+From: Romain Geissler <romain.geissler@amadeus.com>
+Date: Mon, 27 Jan 2020 09:28:43 +0000
+Subject: [PATCH] Fix build with gcc 10 which defaults to -fno-common (cf
+ https://gcc.gnu.org/gcc-10/porting_to.html)
+
+This fixes the following link error I see when I use the latest gcc 10
+git branch:
+/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
+/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
+collect2: error: ld returned 1 exit status
+
+Upstream-Status: Backport [https://github.com/distcc/distcc/pull/373]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/stats.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/stats.h b/src/stats.h
+index 9bde285..74d4690 100644
+--- a/src/stats.h
++++ b/src/stats.h
+@@ -33,7 +33,7 @@ enum stats_e { STATS_TCP_ACCEPT, STATS_REJ_BAD_REQ, STATS_REJ_OVERLOAD,
+                 STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT,
+                 STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX };
+-const char *stats_text[20];
++extern const char *stats_text[20];
+ int  dcc_stats_init(void);
+ void dcc_stats_init_kid(void);
+-- 
+2.28.0
+