aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2020-10-02 08:42:33 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2020-10-05 08:02:53 +0200
commit300e1976d89843a1fceb37362344eb3a01b11e24 (patch)
treeb503915d659cc6d1ea5d4c4a4f04a6eae9fef58a
parentb2f6b73c6a3abaca638509355714002681689f7b (diff)
downloadbuildroot-300e1976d89843a1fceb37362344eb3a01b11e24.tar.gz
buildroot-300e1976d89843a1fceb37362344eb3a01b11e24.tar.bz2
package/xfsprogs: fix build with gcc 10
Fixes: - http://autobuild.buildroot.org/results/18455090605f3691282778b6a64a624b109037d6 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commit 62ef85fce97e749be170bde426f273539fd064bd) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/xfsprogs/0003-xfsprogs-do-not-redeclare-globals-provided-by-libraries.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/package/xfsprogs/0003-xfsprogs-do-not-redeclare-globals-provided-by-libraries.patch b/package/xfsprogs/0003-xfsprogs-do-not-redeclare-globals-provided-by-libraries.patch
new file mode 100644
index 0000000000..ef2053e9bb
--- /dev/null
+++ b/package/xfsprogs/0003-xfsprogs-do-not-redeclare-globals-provided-by-libraries.patch
@@ -0,0 +1,83 @@
+From 123b851389ef9a012a469ef982ac7b819db59342 Mon Sep 17 00:00:00 2001
+From: Eric Sandeen <sandeen@redhat.com>
+Date: Thu, 30 Jan 2020 13:34:17 -0500
+Subject: xfsprogs: do not redeclare globals provided by libraries
+
+In each of these cases, db, logprint, and mdrestore are redeclaring
+as a global variable something which was already provided by a
+library they link with.
+
+gcc now defaults to -fno-common and trips over these global variables
+which are declared in utilities as well as in libxfs and libxlog, and
+it causes the build to fail.
+
+Signed-off-by: Eric Sandeen <sandeen@redhat.com>
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
+
+[Retrieved from:
+https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=123b851389ef9a012a469ef982ac7b819db59342]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ db/init.c | 1 -
+ logprint/logprint.c | 4 ++--
+ mdrestore/xfs_mdrestore.c | 1 -
+ 3 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/db/init.c b/db/init.c
+index 455220a86..0ac373685 100644
+--- a/db/init.c
++++ b/db/init.c
+@@ -27,7 +27,6 @@ static int force;
+ static struct xfs_mount xmount;
+ struct xfs_mount *mp;
+ static struct xlog xlog;
+-libxfs_init_t x;
+ xfs_agnumber_t cur_agno = NULLAGNUMBER;
+
+ static void
+diff --git a/logprint/logprint.c b/logprint/logprint.c
+index 7754a2a6e..511a32aca 100644
+--- a/logprint/logprint.c
++++ b/logprint/logprint.c
+@@ -24,7 +24,6 @@ int print_buffer;
+ int print_overwrite;
+ int print_no_data;
+ int print_no_print;
+-int print_exit = 1; /* -e is now default. specify -c to override */
+ static int print_operation = OP_PRINT;
+
+ static void
+@@ -132,6 +131,7 @@ main(int argc, char **argv)
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+ memset(&mount, 0, sizeof(mount));
++ print_exit = 1; /* -e is now default. specify -c to override */
+
+ progname = basename(argv[0]);
+ while ((c = getopt(argc, argv, "bC:cdefl:iqnors:tDVv")) != EOF) {
+@@ -152,7 +152,7 @@ main(int argc, char **argv)
+ case 'e':
+ /* -e is now default
+ */
+- print_exit++;
++ print_exit = 1;
+ break;
+ case 'C':
+ print_operation = OP_COPY;
+diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
+index 3375e0806..1cd399dbc 100644
+--- a/mdrestore/xfs_mdrestore.c
++++ b/mdrestore/xfs_mdrestore.c
+@@ -7,7 +7,6 @@
+ #include "libxfs.h"
+ #include "xfs_metadump.h"
+
+-char *progname;
+ static int show_progress = 0;
+ static int show_info = 0;
+ static int progress_since_warning = 0;
+--
+cgit 1.2.3-1.el7
+