Add a patch for GCC 10 builds
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
This commit is contained in:
parent
c54167db54
commit
eb3e4634f2
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,3 +26,4 @@
|
|||||||
/ndctl-65.tar.gz
|
/ndctl-65.tar.gz
|
||||||
/ndctl-66.tar.gz
|
/ndctl-66.tar.gz
|
||||||
/ndctl-67.tar.gz
|
/ndctl-67.tar.gz
|
||||||
|
/0001-ndctl-lib-fix-symbol-redefinitions-reported-by-GC.patch
|
||||||
|
76
0001-ndctl-lib-fix-symbol-redefinitions-reported-by-GC.patch
Normal file
76
0001-ndctl-lib-fix-symbol-redefinitions-reported-by-GC.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
From 0b35822caa1b8468e1a0349ccf971b600be3c03e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vishal Verma <vishal.l.verma@intel.com>
|
||||||
|
Date: Thu, 30 Jan 2020 11:51:14 -0700
|
||||||
|
Subject: [ndctl PATCH v3] ndctl/lib: fix symbol redefinitions reported by
|
||||||
|
GCC10
|
||||||
|
|
||||||
|
A toolchain update in Fedora 32 caused new compile errors due to
|
||||||
|
multiple definitions of dimm_ops structures. The declarations in
|
||||||
|
'private.h' for the various NFIT families are present so that libndctl
|
||||||
|
can find all the per-family dimm-ops. However they need to be declared
|
||||||
|
as extern because the actual definitions are in <family>.c.
|
||||||
|
Additionally, 'param' instances in list.c and monitor.c need to be
|
||||||
|
marked as static.
|
||||||
|
|
||||||
|
Cc: Dan Williams <dan.j.williams@intel.com>
|
||||||
|
Cc: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
Suggested-by: Dan Williams <dan.j.williams@intel.com>
|
||||||
|
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
|
||||||
|
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
v3: Remove unrelated changes to Makefile.am from this patch (Eric).
|
||||||
|
|
||||||
|
ndctl/lib/private.h | 8 ++++----
|
||||||
|
ndctl/list.c | 2 +-
|
||||||
|
ndctl/monitor.c | 2 +-
|
||||||
|
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ndctl/lib/private.h b/ndctl/lib/private.h
|
||||||
|
index e445301..16bf8f9 100644
|
||||||
|
--- a/ndctl/lib/private.h
|
||||||
|
+++ b/ndctl/lib/private.h
|
||||||
|
@@ -343,10 +343,10 @@ struct ndctl_dimm_ops {
|
||||||
|
int (*xlat_firmware_status)(struct ndctl_cmd *);
|
||||||
|
};
|
||||||
|
|
||||||
|
-struct ndctl_dimm_ops * const intel_dimm_ops;
|
||||||
|
-struct ndctl_dimm_ops * const hpe1_dimm_ops;
|
||||||
|
-struct ndctl_dimm_ops * const msft_dimm_ops;
|
||||||
|
-struct ndctl_dimm_ops * const hyperv_dimm_ops;
|
||||||
|
+extern struct ndctl_dimm_ops * const intel_dimm_ops;
|
||||||
|
+extern struct ndctl_dimm_ops * const hpe1_dimm_ops;
|
||||||
|
+extern struct ndctl_dimm_ops * const msft_dimm_ops;
|
||||||
|
+extern struct ndctl_dimm_ops * const hyperv_dimm_ops;
|
||||||
|
|
||||||
|
static inline struct ndctl_bus *cmd_to_bus(struct ndctl_cmd *cmd)
|
||||||
|
{
|
||||||
|
diff --git a/ndctl/list.c b/ndctl/list.c
|
||||||
|
index 125a9fe..12d78d8 100644
|
||||||
|
--- a/ndctl/list.c
|
||||||
|
+++ b/ndctl/list.c
|
||||||
|
@@ -59,7 +59,7 @@ static unsigned long listopts_to_flags(void)
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
-struct util_filter_params param;
|
||||||
|
+static struct util_filter_params param;
|
||||||
|
|
||||||
|
static int did_fail;
|
||||||
|
|
||||||
|
diff --git a/ndctl/monitor.c b/ndctl/monitor.c
|
||||||
|
index b8ee27f..1755b87 100644
|
||||||
|
--- a/ndctl/monitor.c
|
||||||
|
+++ b/ndctl/monitor.c
|
||||||
|
@@ -45,7 +45,7 @@ struct monitor_dimm {
|
||||||
|
struct list_node list;
|
||||||
|
};
|
||||||
|
|
||||||
|
-struct util_filter_params param;
|
||||||
|
+static struct util_filter_params param;
|
||||||
|
|
||||||
|
static int did_fail;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.1
|
||||||
|
|
@ -1,11 +1,13 @@
|
|||||||
Name: ndctl
|
Name: ndctl
|
||||||
Version: 67
|
Version: 67
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
|
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Url: https://github.com/pmem/ndctl
|
Url: https://github.com/pmem/ndctl
|
||||||
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: 0001-ndctl-lib-fix-symbol-redefinitions-reported-by-GC.patch
|
||||||
|
|
||||||
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
|
Requires: ndctl-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
|
Requires: daxctl-libs%{?_isa} = %{version}-%{release}
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -82,6 +84,7 @@ control API for these devices.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q ndctl-%{version}
|
%setup -q ndctl-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
echo %{version} > version
|
echo %{version} > version
|
||||||
@ -143,6 +146,9 @@ make check
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 31 2020 Vishal Verma <vishal.l.verma@intel.com> - 67-3
|
||||||
|
- Add fix for GCC10 builds
|
||||||
|
|
||||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 67-2
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 67-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
1
sources
1
sources
@ -1 +1,2 @@
|
|||||||
SHA512 (ndctl-67.tar.gz) = a923510468f540ac84fca5c562096b02eb3827c57e87ac36641f5ce129114ba583ce5ac5d71b45d7be876e880ad7e4fe38678350480d8974745120c7e0161435
|
SHA512 (ndctl-67.tar.gz) = a923510468f540ac84fca5c562096b02eb3827c57e87ac36641f5ce129114ba583ce5ac5d71b45d7be876e880ad7e4fe38678350480d8974745120c7e0161435
|
||||||
|
SHA512 (0001-ndctl-lib-fix-symbol-redefinitions-reported-by-GC.patch) = 9115afcd67c675b5fe0c3e84a6d88166d38a4747312a757b7dac8a3d6f2e04968c642b4f62146a05432015ec4f92c2978ee4e2da0ddc6970d0b8c245509d82b8
|
||||||
|
Loading…
Reference in New Issue
Block a user