All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [meta-oe][PATCH 1/3] memtester: Fix build with -fno-common
Date: Thu, 13 Aug 2020 11:12:50 -0700	[thread overview]
Message-ID: <20200813181252.805078-1-raj.khem@gmail.com> (raw)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-Define-mword16-and-mword8-once.patch | 57 +++++++++++++++++++
 .../memtester/memtester_4.3.0.bb              |  7 ++-
 2 files changed, 61 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch

diff --git a/meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch b/meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch
new file mode 100644
index 0000000000..ffd9b9f266
--- /dev/null
+++ b/meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch
@@ -0,0 +1,57 @@
+From 01f1c05702eb534271777648c976ab6402a5145b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 12 Aug 2020 23:18:30 -0700
+Subject: [PATCH] Define mword16 and mword8 once
+
+Defining them in .h meant they are defined in all .c files including
+this .h file
+
+Fixes build with gcc 10+
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests.c | 9 +++++++++
+ types.h | 9 ---------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/tests.c b/tests.c
+index be1b350..4305bed 100644
+--- a/tests.c
++++ b/tests.c
+@@ -27,6 +27,15 @@ char progress[] = "-\\|/";
+ #define PROGRESSOFTEN 2500
+ #define ONE 0x00000001L
+ 
++union {
++    unsigned char bytes[UL_LEN/8];
++    ul val;
++} mword8;
++
++union {
++    unsigned short u16s[UL_LEN/16];
++    ul val;
++} mword16;
+ /* Function definitions. */
+ 
+ int compare_regions(ulv *bufa, ulv *bufb, size_t count) {
+diff --git a/types.h b/types.h
+index ad7ce73..e14ea32 100644
+--- a/types.h
++++ b/types.h
+@@ -25,12 +25,3 @@ struct test {
+     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
+
diff --git a/meta-oe/recipes-benchmark/memtester/memtester_4.3.0.bb b/meta-oe/recipes-benchmark/memtester/memtester_4.3.0.bb
index 0964c04874..3d29055781 100644
--- a/meta-oe/recipes-benchmark/memtester/memtester_4.3.0.bb
+++ b/meta-oe/recipes-benchmark/memtester/memtester_4.3.0.bb
@@ -5,9 +5,10 @@ LICENSE = "GPLv2"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
 
-SRC_URI = "http://pyropus.ca/software/memtester/old-versions/${BP}.tar.gz"
-SRC_URI += "file://Makefile.patch"
-
+SRC_URI = "http://pyropus.ca/software/memtester/old-versions/${BP}.tar.gz \
+           file://Makefile.patch \
+           file://0001-Define-mword16-and-mword8-once.patch \
+           "
 SRC_URI[md5sum] = "598f41b7308e1f736164bca3ab84ddbe"
 SRC_URI[sha256sum] = "f9dfe2fd737c38fad6535bbab327da9a21f7ce4ea6f18c7b3339adef6bf5fd88"
 
-- 
2.28.0


             reply	other threads:[~2020-08-13 18:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 18:12 Khem Raj [this message]
2020-08-13 18:12 ` [meta-oe][PATCH 2/3] read-edid: Fix build with gcc-10+ Khem Raj
2020-08-13 18:12 ` [meta-filesystems][PATCH 3/3] owfs: Fix build with -fno-common Khem Raj

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=20200813181252.805078-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /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.