summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark/memtester/files
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-08-12 23:26:01 -0700
committerKhem Raj <raj.khem@gmail.com>2020-08-13 22:32:08 -0700
commit4c116285814af6d833dbe8caeaf6981022904ca9 (patch)
treef917e6a2d454b4707932673ca91d34a9905dd97a /meta-oe/recipes-benchmark/memtester/files
parent178a52005111c971b46f8c7d6ffca2ffa5092e8e (diff)
downloadmeta-openembedded-4c116285814af6d833dbe8caeaf6981022904ca9.tar.gz
memtester: Fix build with -fno-common
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-benchmark/memtester/files')
-rw-r--r--meta-oe/recipes-benchmark/memtester/files/0001-Define-mword16-and-mword8-once.patch57
1 files changed, 57 insertions, 0 deletions
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 @@
1From 01f1c05702eb534271777648c976ab6402a5145b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 12 Aug 2020 23:18:30 -0700
4Subject: [PATCH] Define mword16 and mword8 once
5
6Defining them in .h meant they are defined in all .c files including
7this .h file
8
9Fixes build with gcc 10+
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 tests.c | 9 +++++++++
15 types.h | 9 ---------
16 2 files changed, 9 insertions(+), 9 deletions(-)
17
18diff --git a/tests.c b/tests.c
19index be1b350..4305bed 100644
20--- a/tests.c
21+++ b/tests.c
22@@ -27,6 +27,15 @@ char progress[] = "-\\|/";
23 #define PROGRESSOFTEN 2500
24 #define ONE 0x00000001L
25
26+union {
27+ unsigned char bytes[UL_LEN/8];
28+ ul val;
29+} mword8;
30+
31+union {
32+ unsigned short u16s[UL_LEN/16];
33+ ul val;
34+} mword16;
35 /* Function definitions. */
36
37 int compare_regions(ulv *bufa, ulv *bufb, size_t count) {
38diff --git a/types.h b/types.h
39index ad7ce73..e14ea32 100644
40--- a/types.h
41+++ b/types.h
42@@ -25,12 +25,3 @@ struct test {
43 int (*fp)();
44 };
45
46-union {
47- unsigned char bytes[UL_LEN/8];
48- ul val;
49-} mword8;
50-
51-union {
52- unsigned short u16s[UL_LEN/16];
53- ul val;
54-} mword16;
55--
562.28.0
57