All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ltp-testsuite: fix static build
@ 2022-04-26 17:21 Fabrice Fontaine
  2022-04-26 19:54 ` Petr Vorel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2022-04-26 17:21 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following static build failure:

/nvmedata/autobuild/instance-15/output-1/per-package/ltp-testsuite/host/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/10.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: /nvmedata/autobuild/instance-15/output-1/per-package/ltp-testsuite/host/bin/../mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(syslog.os): in function `openlog':
syslog.c:(.text+0x6b8): multiple definition of `openlog'; /tmp/ccvRnqfT.o:/nvmedata/autobuild/instance-15/output-1/build/ltp-testsuite-20220121/testcases/kernel/fs/fs-bench/random-access.c:14: first defined here

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...nel-fs-declare-int-openlog-as-static.patch | 77 +++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 package/ltp-testsuite/0002-testcases-kernel-fs-declare-int-openlog-as-static.patch

diff --git a/package/ltp-testsuite/0002-testcases-kernel-fs-declare-int-openlog-as-static.patch b/package/ltp-testsuite/0002-testcases-kernel-fs-declare-int-openlog-as-static.patch
new file mode 100644
index 0000000000..ae10bfcfdd
--- /dev/null
+++ b/package/ltp-testsuite/0002-testcases-kernel-fs-declare-int-openlog-as-static.patch
@@ -0,0 +1,77 @@
+From 002ca0320cd2c5e1515bf202f470d4becdf01532 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 24 Apr 2022 21:56:36 +0200
+Subject: [PATCH] testcases/kernel/fs: declare int openlog as static
+
+Declare int openlog as static to avoid the following build failure when
+building statically (e.g. on buildroot):
+
+/nvmedata/autobuild/instance-15/output-1/per-package/ltp-testsuite/host/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/10.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: /nvmedata/autobuild/instance-15/output-1/per-package/ltp-testsuite/host/bin/../mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(syslog.os): in function `openlog':
+syslog.c:(.text+0x6b8): multiple definition of `openlog'; /tmp/ccvRnqfT.o:/nvmedata/autobuild/instance-15/output-1/build/ltp-testsuite-20220121/testcases/kernel/fs/fs-bench/random-access.c:14: first defined here
+
+Fixes:
+ - http://autobuild.buildroot.org/results/bfd0d906a05564a4f323db604f3b908abf552b20
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
+[Retrieved from:
+https://github.com/linux-test-project/ltp/commit/002ca0320cd2c5e1515bf202f470d4becdf01532]
+---
+ testcases/kernel/fs/fs-bench/random-access-del-create.c | 2 --
+ testcases/kernel/fs/fs-bench/random-access.c            | 2 +-
+ testcases/kernel/fs/fs-bench/random-del-create.c        | 2 +-
+ testcases/kernel/fs/scsi/ltpfs/main.c                   | 2 +-
+ 4 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/testcases/kernel/fs/fs-bench/random-access-del-create.c b/testcases/kernel/fs/fs-bench/random-access-del-create.c
+index 1f62a76b5e..1878fd78b5 100644
+--- a/testcases/kernel/fs/fs-bench/random-access-del-create.c
++++ b/testcases/kernel/fs/fs-bench/random-access-del-create.c
+@@ -11,8 +11,6 @@
+ #define FAIL 0
+ #define SUCCESS 1
+ 
+-int openlog[2] = { 0, 0 };
+-
+ #define MAXNUM 0x100000
+ 
+ #define  MAXERROR 1024
+diff --git a/testcases/kernel/fs/fs-bench/random-access.c b/testcases/kernel/fs/fs-bench/random-access.c
+index cf41d6e81c..c2f32b86e7 100644
+--- a/testcases/kernel/fs/fs-bench/random-access.c
++++ b/testcases/kernel/fs/fs-bench/random-access.c
+@@ -11,7 +11,7 @@
+ #define FAIL 0
+ #define SUCCESS 1
+ 
+-int openlog[2] = { 0, 0 };
++static int openlog[2] = { 0, 0 };
+ 
+ #define MAXNUM 0x100000
+ 
+diff --git a/testcases/kernel/fs/fs-bench/random-del-create.c b/testcases/kernel/fs/fs-bench/random-del-create.c
+index 0a86f976f3..345031f283 100644
+--- a/testcases/kernel/fs/fs-bench/random-del-create.c
++++ b/testcases/kernel/fs/fs-bench/random-del-create.c
+@@ -11,7 +11,7 @@
+ #define FAIL 0
+ #define SUCCESS 1
+ 
+-int openlog[2] = { 0, 0 };
++static int openlog[2] = { 0, 0 };
+ 
+ #define MAXNUM 0x100000
+ 
+diff --git a/testcases/kernel/fs/scsi/ltpfs/main.c b/testcases/kernel/fs/scsi/ltpfs/main.c
+index 2c67c7a478..90a5531ac3 100644
+--- a/testcases/kernel/fs/scsi/ltpfs/main.c
++++ b/testcases/kernel/fs/scsi/ltpfs/main.c
+@@ -38,7 +38,7 @@ int startc = 0;
+ int showchar[] = { 124, 47, 45, 92, 124, 47, 45, 92 };
+ 
+ int nullFileHandle;
+-int openlog[2] = { 0, 0 };
++static int openlog[2] = { 0, 0 };
+ 
+ int cFileCount, dFileCount, errorCount;
+ static int disk_space_pool = 0;
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-27  9:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 17:21 [Buildroot] [PATCH 1/1] package/ltp-testsuite: fix static build Fabrice Fontaine
2022-04-26 19:54 ` Petr Vorel
2022-04-27 18:55 ` Arnout Vandecappelle
2022-05-27  9:29 ` Peter Korsgaard

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.