All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit] package/memtester: fix build with gcc 10
Date: Sun, 13 Sep 2020 16:34:14 +0200	[thread overview]
Message-ID: <20200913142529.768CB8A4B7@busybox.osuosl.org> (raw)

commit: https://git.buildroot.net/buildroot/commit/?id=a68350f039682fbbced9a499f053d22210f5e853
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes:
 - http://autobuild.buildroot.org/results/e1c276603475a952847fd53724e56101cdccbbcb

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/memtester/0002-fix-build-with-gcc-10.patch | 65 ++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/package/memtester/0002-fix-build-with-gcc-10.patch b/package/memtester/0002-fix-build-with-gcc-10.patch
new file mode 100644
index 0000000000..8c9b3945bb
--- /dev/null
+++ b/package/memtester/0002-fix-build-with-gcc-10.patch
@@ -0,0 +1,65 @@
+From acd226cd4073b77abce8783e19c5ef3bbf8074ef Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 11 Sep 2020 21:39:03 +0200
+Subject: [PATCH] fix build with gcc 10
+
+Move mword8 and mword16 from types.h to tests.c to avoid the following
+build failure with gcc 10 (which defaults to -fno-common):
+
+/srv/storage/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: tests.o: in function `.LANCHOR1':
+tests.c:(.bss+0x4): multiple definition of `mword16'; memtester.o:memtester.c:(.bss+0xc): first defined here
+/srv/storage/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: tests.o: in function `.LANCHOR1':
+tests.c:(.bss+0x0): multiple definition of `mword8'; memtester.o:memtester.c:(.bss+0x10): first defined here
+
+Fixes:
+ - http://autobuild.buildroot.org/results/e1c276603475a952847fd53724e56101cdccbbcb
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: sent to charlesc at pyropus.ca]
+---
+ tests.c | 10 ++++++++++
+ types.h | 10 ----------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/tests.c b/tests.c
+index be1b350..d3d25c7 100644
+--- a/tests.c
++++ b/tests.c
+@@ -22,6 +22,16 @@
+ #include "sizes.h"
+ #include "memtester.h"
+ 
++union {
++    unsigned char bytes[UL_LEN/8];
++    ul val;
++} mword8;
++
++union {
++    unsigned short u16s[UL_LEN/16];
++    ul val;
++} mword16;
++
+ char progress[] = "-\\|/";
+ #define PROGRESSLEN 4
+ #define PROGRESSOFTEN 2500
+diff --git a/types.h b/types.h
+index ad7ce73..dca7fc0 100644
+--- a/types.h
++++ b/types.h
+@@ -24,13 +24,3 @@ struct test {
+     char *name;
+     int (*fp)();
+ };
+-
+-union {
+-    unsigned char bytes[UL_LEN/8];
+-    ul val;
+-} mword8;
+-
+-union {
+-    unsigned short u16s[UL_LEN/16];
+-    ul val;
+-} mword16;
+-- 
+2.28.0
+

                 reply	other threads:[~2020-09-13 14:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200913142529.768CB8A4B7@busybox.osuosl.org \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.