* [gentoo-commits] repo/gentoo:master commit in: net-misc/bfgminer/, net-misc/bfgminer/files/
@ 2021-01-09 22:18 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2021-01-09 22:18 UTC (permalink / raw
To: gentoo-commits
commit: 686fb76ffda2943cfd8adab9b1c738bb84e11635
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 9 22:18:24 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 9 22:18:28 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=686fb76f
net-misc/bfgminer: add gcc 10 patch
Thanks-to: Luke-Jr <luke-jr+gentoobugs <AT> utopios.org>
Bug: https://bugs.gentoo.org/727008
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/bfgminer/bfgminer-5.5.0.ebuild | 6 +-
.../bfgminer/files/bfgminer-5.5.0-fno-common.patch | 83 ++++++++++++++++++++++
2 files changed, 88 insertions(+), 1 deletion(-)
diff --git a/net-misc/bfgminer/bfgminer-5.5.0.ebuild b/net-misc/bfgminer/bfgminer-5.5.0.ebuild
index 1f145b5ad19..e58b26ba420 100644
--- a/net-misc/bfgminer/bfgminer-5.5.0.ebuild
+++ b/net-misc/bfgminer/bfgminer-5.5.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -120,6 +120,10 @@ DEPEND="${DEPEND}
)
"
+PATCHES=(
+ "${FILESDIR}/${PN}-5.5.0-fno-common.patch"
+)
+
src_configure() {
local CFLAGS="${CFLAGS}"
local with_curses
diff --git a/net-misc/bfgminer/files/bfgminer-5.5.0-fno-common.patch b/net-misc/bfgminer/files/bfgminer-5.5.0-fno-common.patch
new file mode 100644
index 00000000000..bd804e17390
--- /dev/null
+++ b/net-misc/bfgminer/files/bfgminer-5.5.0-fno-common.patch
@@ -0,0 +1,83 @@
+https://bugs.gentoo.org/727008
+--- a/adl.h
++++ b/adl.h
+@@ -4,10 +4,10 @@
+
+ #include <stdbool.h>
+
+-bool adl_active;
+-bool opt_reorder;
+-const int opt_targettemp;
+-const int opt_overheattemp;
++extern bool adl_active;
++extern bool opt_reorder;
++extern const int opt_targettemp;
++extern const int opt_overheattemp;
+ void init_adl(int nDevs);
+ float gpu_temp(int gpu);
+ int gpu_engineclock(int gpu);
+--- a/driver-cpu.c
++++ b/driver-cpu.c
+@@ -43,6 +43,8 @@
+
+ BFG_REGISTER_DRIVER(cpu_drv)
+
++struct cgpu_info *cpus;
++
+ #if defined(__linux) && defined(CPU_ZERO) /* Linux specific policy and affinity management */
+ #include <sched.h>
+ static inline void drop_policy(void)
+--- a/driver-opencl.c
++++ b/driver-opencl.c
+@@ -795,7 +795,6 @@ char *print_ndevs_and_exit(int *ndevs)
+
+
+ struct cgpu_info gpus[MAX_GPUDEVICES]; /* Maximum number apparently possible */
+-struct cgpu_info *cpus;
+
+
+ /* In dynamic mode, only the first thread of each device will be in use.
+--- a/miner.c
++++ b/miner.c
+@@ -3762,10 +3762,6 @@ static int statusy;
+ static int devsummaryYOffset;
+ static int total_lines;
+ #endif
+-#ifdef USE_OPENCL
+-struct cgpu_info gpus[MAX_GPUDEVICES]; /* Maximum number apparently possible */
+-#endif
+-struct cgpu_info *cpus;
+
+ bool _bfg_console_cancel_disabled;
+ int _bfg_console_prev_cancelstate;
+--- a/sha256_sse2_amd64.c
++++ b/sha256_sse2_amd64.c
+@@ -48,7 +48,6 @@ static uint32_t g_sha256_k[]__attribute__((aligned(0x100))) = {
+ const uint32_t sha256_init_sse2[8]__asm__("sha256_init_sse2")__attribute__((aligned(0x100))) =
+ {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19};
+
+-__m128i g_4sha256_k[64];
+ __m128i sha256_consts_m128i[64]__asm__("sha256_consts_m128i")__attribute__((aligned(0x1000)));
+
+ bool scanhash_sse2_64(struct thr_info * const thr, struct work * const work,
+--- a/sha256_sse2_i386.c
++++ b/sha256_sse2_i386.c
+@@ -48,7 +48,6 @@ static uint32_t g_sha256_k[]__attribute__((aligned(0x100))) = {
+ const uint32_t sha256_32init[8]__attribute__((aligned(0x100))) =
+ {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19};
+
+-__m128i g_4sha256_k[64];
+ __m128i sha256_consts_m128i[64]__asm__("sha256_consts_m128i")__attribute__((aligned(0x1000)));
+
+ bool scanhash_sse2_32(struct thr_info * const thr, struct work * const work,
+--- a/util.h
++++ b/util.h
+@@ -217,7 +217,7 @@ void cgsleep_us(int64_t us);
+ #define cgtimer_time(ts_start) timer_set_now(ts_start)
+ #define cgsleep_prepare_r(ts_start) cgtimer_time(ts_start)
+ void cgsleep_ms_r(cgtimer_t *ts_start, int ms);
+-void (*cgsleep_us_r)(cgtimer_t *ts_start, int64_t us);
++extern void (*cgsleep_us_r)(cgtimer_t *ts_start, int64_t us);
+
+ static inline
+ int cgtimer_to_ms(cgtimer_t *cgt)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-09 22:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-09 22:18 [gentoo-commits] repo/gentoo:master commit in: net-misc/bfgminer/, net-misc/bfgminer/files/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox