Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fabric/infinipath-psm/, sys-fabric/infinipath-psm/files/
Date: Sat, 28 Nov 2020 23:10:15
Message-Id: 1606604958.ac8f2fc430322b1a6caa125e93cac120da24db62.soap@gentoo
1 commit: ac8f2fc430322b1a6caa125e93cac120da24db62
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Sat Nov 28 23:09:18 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 28 23:09:18 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac8f2fc4
7
8 sys-fabric/infinipath-psm: fix build with gcc-10
9
10 * Thanks to Sam James for providing the patch link
11
12 Closes: https://bugs.gentoo.org/706398
13 Package-Manager: Portage-3.0.9, Repoman-3.0.1
14 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
15 Signed-off-by: David Seifert <soap <AT> gentoo.org>
16
17 .../files/infinipath-psm-3.2-fno-common.patch | 79 ++++++++++++++++++++++
18 .../infinipath-psm/infinipath-psm-3.2.ebuild | 6 +-
19 2 files changed, 82 insertions(+), 3 deletions(-)
20
21 diff --git a/sys-fabric/infinipath-psm/files/infinipath-psm-3.2-fno-common.patch b/sys-fabric/infinipath-psm/files/infinipath-psm-3.2-fno-common.patch
22 new file mode 100644
23 index 00000000000..7f376f009e7
24 --- /dev/null
25 +++ b/sys-fabric/infinipath-psm/files/infinipath-psm-3.2-fno-common.patch
26 @@ -0,0 +1,79 @@
27 +Taken From: https://build.opensuse.org/package/view_file/science:HPC:Head/infinipath-psm/Add-missing-extern-keywords.patch?expand=1
28 +Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@××××.com>
29 +
30 +--- psm_error.h
31 ++++ psm_error.h
32 +@@ -42,7 +42,7 @@
33 + #define PSMI_EP_NORETURN ((psm_ep_t) -2)
34 + #define PSMI_EP_LOGEVENT ((psm_ep_t) -3)
35 +
36 +-psm_ep_errhandler_t psmi_errhandler_global;
37 ++extern psm_ep_errhandler_t psmi_errhandler_global;
38 +
39 + psm_error_t psmi_handle_error(psm_ep_t ep, psm_error_t error,
40 + const char *buf, ...)
41 +--- psm_user.h
42 ++++ psm_user.h
43 +@@ -100,7 +100,7 @@ psm_error_t psmi_mq_wait_internal(psm_mq_req_t *ireq);
44 + #endif
45 +
46 + #ifdef PSMI_PLOCK_IS_SPINLOCK
47 +- psmi_spinlock_t psmi_progress_lock;
48 ++ extern psmi_spinlock_t psmi_progress_lock;
49 + #define PSMI_PLOCK_INIT() psmi_spin_init(&psmi_progress_lock)
50 + #define PSMI_PLOCK_TRY() psmi_spin_trylock(&psmi_progress_lock)
51 + #define PSMI_PLOCK() psmi_spin_lock(&psmi_progress_lock)
52 +@@ -109,8 +109,8 @@ psm_error_t psmi_mq_wait_internal(psm_mq_req_t *ireq);
53 + #define PSMI_PUNLOCK_ASSERT()
54 + #define PSMI_PLOCK_DISABLED 0
55 + #elif defined(PSMI_PLOCK_IS_MUTEXLOCK_DEBUG)
56 +- pthread_mutex_t psmi_progress_lock;
57 +- pthread_t psmi_progress_lock_owner;
58 ++ extern pthread_mutex_t psmi_progress_lock;
59 ++ extern pthread_t psmi_progress_lock_owner;
60 + #define PSMI_PLOCK_NO_OWNER ((pthread_t)(-1))
61 +
62 + PSMI_ALWAYS_INLINE(
63 +--- psm_utils.h
64 ++++ psm_utils.h
65 +@@ -254,7 +254,7 @@ int psmi_diags(void);
66 + * Fault injection
67 + */
68 + struct psmi_faultinj_spec;
69 +-int psmi_faultinj_enabled; /* use macro to test */
70 ++extern int psmi_faultinj_enabled; /* use macro to test */
71 + #if 1 /* possible to disable at compile time */
72 + #define PSMI_FAULTINJ_ENABLED() (!!psmi_faultinj_enabled)
73 + #else
74 +--- ptl_am/ptl_fwd.h
75 ++++ ptl_am/ptl_fwd.h
76 +@@ -47,7 +47,7 @@
77 + #endif
78 +
79 + /* Symbol in am ptl */
80 +-struct ptl_ctl_init psmi_ptl_amsh;
81 ++extern struct ptl_ctl_init psmi_ptl_amsh;
82 +
83 + /* Special non-ptl function exposed to pre-attach to shm segment */
84 + psm_error_t psmi_shm_attach(psm_ep_t ep, int *shmidx_o);
85 +--- ptl_ips/ptl_fwd.h
86 ++++ ptl_ips/ptl_fwd.h
87 +@@ -38,5 +38,5 @@
88 + typedef struct ptl_epaddr ips_epaddr_t;
89 +
90 + /* Symbol in ips ptl */
91 +-struct ptl_ctl_init psmi_ptl_ips;
92 ++extern struct ptl_ctl_init psmi_ptl_ips;
93 + #endif /* _PTL_FWD_IPS_H */
94 +--- ptl_self/ptl_fwd.h
95 ++++ ptl_self/ptl_fwd.h
96 +@@ -35,7 +35,7 @@
97 + #define _PTL_FWD_SELF_H
98 +
99 + /* Symbol in am ptl */
100 +-struct ptl_ctl_init psmi_ptl_self;
101 ++extern struct ptl_ctl_init psmi_ptl_self;
102 +
103 + #endif
104 +
105 +
106
107 diff --git a/sys-fabric/infinipath-psm/infinipath-psm-3.2.ebuild b/sys-fabric/infinipath-psm/infinipath-psm-3.2.ebuild
108 index 0654f652690..3df69cc34f9 100644
109 --- a/sys-fabric/infinipath-psm/infinipath-psm-3.2.ebuild
110 +++ b/sys-fabric/infinipath-psm/infinipath-psm-3.2.ebuild
111 @@ -1,4 +1,4 @@
112 -# Copyright 1999-2018 Gentoo Foundation
113 +# Copyright 1999-2020 Gentoo Authors
114 # Distributed under the terms of the GNU General Public License v2
115
116 EAPI="5"
117 @@ -10,11 +10,10 @@ OFED_SUFFIX="2_ga8c3e3e_open"
118 OFED_SNAPSHOT="1"
119 OFED_SRC_SNAPSHOT="1"
120
121 -inherit openib udev
122 +inherit epatch openib udev
123
124 DESCRIPTION="OpenIB userspace driver for the PathScale InfiniBand HCAs"
125 KEYWORDS="amd64 ~x86 ~amd64-linux"
126 -IUSE=""
127
128 RDEPEND="sys-fabric/libibverbs:${SLOT}"
129 DEPEND="${RDEPEND}
130 @@ -26,6 +25,7 @@ src_prepare() {
131 sed -e 's:uname -p:uname -m:g' \
132 -e 's:-Werror::g' \
133 -i buildflags.mak || die
134 + epatch "${FILESDIR}"/${P}-fno-common.patch
135 }
136
137 src_install() {