1 |
commit: 8a72d2fc6f757b617683dd0a993b542549b8e839 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 1 18:00:02 2020 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 1 18:00:02 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a72d2fc |
7 |
|
8 |
sys-power/cpupower: fix build with gcc 10 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/707462 |
11 |
Package-Manager: Portage-2.3.86_p1, Repoman-2.3.20_p43 |
12 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
13 |
|
14 |
sys-power/cpupower/cpupower-5.4.ebuild | 3 +- |
15 |
sys-power/cpupower/files/cpupower-5.4-gcc-10.patch | 57 ++++++++++++++++++++++ |
16 |
2 files changed, 59 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/sys-power/cpupower/cpupower-5.4.ebuild b/sys-power/cpupower/cpupower-5.4.ebuild |
19 |
index d45b53b560a..331b5b96131 100644 |
20 |
--- a/sys-power/cpupower/cpupower-5.4.ebuild |
21 |
+++ b/sys-power/cpupower/cpupower-5.4.ebuild |
22 |
@@ -1,4 +1,4 @@ |
23 |
-# Copyright 1999-2019 Gentoo Authors |
24 |
+# Copyright 1999-2020 Gentoo Authors |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI=7 |
28 |
@@ -24,6 +24,7 @@ DEPEND="${RDEPEND} |
29 |
|
30 |
PATCHES=( |
31 |
"${FILESDIR}/cpupower-5.4-cflags.patch" |
32 |
+ "${FILESDIR}/cpupower-5.4-gcc-10.patch" |
33 |
) |
34 |
|
35 |
S="${WORKDIR}/linux-${PV}" |
36 |
|
37 |
diff --git a/sys-power/cpupower/files/cpupower-5.4-gcc-10.patch b/sys-power/cpupower/files/cpupower-5.4-gcc-10.patch |
38 |
new file mode 100644 |
39 |
index 00000000000..56540d2bc56 |
40 |
--- /dev/null |
41 |
+++ b/sys-power/cpupower/files/cpupower-5.4-gcc-10.patch |
42 |
@@ -0,0 +1,57 @@ |
43 |
+From 8db4ea3227554fb80ad766936a4c21cc901beb29 Mon Sep 17 00:00:00 2001 |
44 |
+From: Mike Gilbert <floppym@g.o> |
45 |
+Date: Sat, 1 Feb 2020 12:44:30 -0500 |
46 |
+Subject: [PATCH] cpupower: avoid multiple definition with gcc -fno-common |
47 |
+ |
48 |
+The -fno-common option will be enabled by default in GCC 10. |
49 |
+ |
50 |
+Bug: https://bugs.gentoo.org/707462 |
51 |
+Signed-off-by: Mike Gilbert <floppym@g.o> |
52 |
+--- |
53 |
+ tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c | 2 +- |
54 |
+ tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 2 ++ |
55 |
+ tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h | 2 +- |
56 |
+ 3 files changed, 4 insertions(+), 2 deletions(-) |
57 |
+ |
58 |
+diff --git a/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c b/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c |
59 |
+index 33dc34db4f3c..1b69f25a1281 100644 |
60 |
+--- a/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c |
61 |
++++ b/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c |
62 |
+@@ -82,7 +82,7 @@ static struct pci_access *pci_acc; |
63 |
+ static struct pci_dev *amd_fam14h_pci_dev; |
64 |
+ static int nbp1_entered; |
65 |
+ |
66 |
+-struct timespec start_time; |
67 |
++extern struct timespec start_time; |
68 |
+ static unsigned long long timediff; |
69 |
+ |
70 |
+ #ifdef DEBUG |
71 |
+diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c |
72 |
+index 6d44fec55ad5..7c77045fef52 100644 |
73 |
+--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c |
74 |
++++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c |
75 |
+@@ -27,6 +27,8 @@ struct cpuidle_monitor *all_monitors[] = { |
76 |
+ 0 |
77 |
+ }; |
78 |
+ |
79 |
++int cpu_count; |
80 |
++ |
81 |
+ static struct cpuidle_monitor *monitors[MONITORS_MAX]; |
82 |
+ static unsigned int avail_monitors; |
83 |
+ |
84 |
+diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h |
85 |
+index 5b5eb1da0cce..c559d3115330 100644 |
86 |
+--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h |
87 |
++++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h |
88 |
+@@ -25,7 +25,7 @@ |
89 |
+ #endif |
90 |
+ #define CSTATE_DESC_LEN 60 |
91 |
+ |
92 |
+-int cpu_count; |
93 |
++extern int cpu_count; |
94 |
+ |
95 |
+ /* Hard to define the right names ...: */ |
96 |
+ enum power_range_e { |
97 |
+-- |
98 |
+2.25.0 |
99 |
+ |