public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-power/cpupower/files/, sys-power/cpupower/
@ 2020-02-01 18:01 Mike Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2020-02-01 18:01 UTC (permalink / raw
  To: gentoo-commits

commit:     8a72d2fc6f757b617683dd0a993b542549b8e839
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  1 18:00:02 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Feb  1 18:00:02 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a72d2fc

sys-power/cpupower: fix build with gcc 10

Closes: https://bugs.gentoo.org/707462
Package-Manager: Portage-2.3.86_p1, Repoman-2.3.20_p43
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-power/cpupower/cpupower-5.4.ebuild             |  3 +-
 sys-power/cpupower/files/cpupower-5.4-gcc-10.patch | 57 ++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/sys-power/cpupower/cpupower-5.4.ebuild b/sys-power/cpupower/cpupower-5.4.ebuild
index d45b53b560a..331b5b96131 100644
--- a/sys-power/cpupower/cpupower-5.4.ebuild
+++ b/sys-power/cpupower/cpupower-5.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -24,6 +24,7 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
 	"${FILESDIR}/cpupower-5.4-cflags.patch"
+	"${FILESDIR}/cpupower-5.4-gcc-10.patch"
 )
 
 S="${WORKDIR}/linux-${PV}"

diff --git a/sys-power/cpupower/files/cpupower-5.4-gcc-10.patch b/sys-power/cpupower/files/cpupower-5.4-gcc-10.patch
new file mode 100644
index 00000000000..56540d2bc56
--- /dev/null
+++ b/sys-power/cpupower/files/cpupower-5.4-gcc-10.patch
@@ -0,0 +1,57 @@
+From 8db4ea3227554fb80ad766936a4c21cc901beb29 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 1 Feb 2020 12:44:30 -0500
+Subject: [PATCH] cpupower: avoid multiple definition with gcc -fno-common
+
+The -fno-common option will be enabled by default in GCC 10.
+
+Bug: https://bugs.gentoo.org/707462
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+---
+ tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c  | 2 +-
+ tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 2 ++
+ tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h | 2 +-
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c b/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
+index 33dc34db4f3c..1b69f25a1281 100644
+--- a/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
++++ b/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
+@@ -82,7 +82,7 @@ static struct pci_access *pci_acc;
+ static struct pci_dev *amd_fam14h_pci_dev;
+ static int nbp1_entered;
+ 
+-struct timespec start_time;
++extern struct timespec start_time;
+ static unsigned long long timediff;
+ 
+ #ifdef DEBUG
+diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+index 6d44fec55ad5..7c77045fef52 100644
+--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
++++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+@@ -27,6 +27,8 @@ struct cpuidle_monitor *all_monitors[] = {
+ 0
+ };
+ 
++int cpu_count;
++
+ static struct cpuidle_monitor *monitors[MONITORS_MAX];
+ static unsigned int avail_monitors;
+ 
+diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
+index 5b5eb1da0cce..c559d3115330 100644
+--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
++++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
+@@ -25,7 +25,7 @@
+ #endif
+ #define CSTATE_DESC_LEN 60
+ 
+-int cpu_count;
++extern int cpu_count;
+ 
+ /* Hard to define the right names ...: */
+ enum power_range_e {
+-- 
+2.25.0
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/cpupower/files/, sys-power/cpupower/
@ 2020-12-06 20:50 Mike Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2020-12-06 20:50 UTC (permalink / raw
  To: gentoo-commits

commit:     5683b0da671c86041cec2db8c70fc2c9a0a100ce
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  6 20:49:12 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Dec  6 20:50:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5683b0da

sys-power/cpupower: remove old

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-power/cpupower/Manifest                 |  1 -
 sys-power/cpupower/cpupower-4.13.0.ebuild   | 69 -----------------------------
 sys-power/cpupower/files/cflags-strip.patch | 18 --------
 3 files changed, 88 deletions(-)

diff --git a/sys-power/cpupower/Manifest b/sys-power/cpupower/Manifest
index 778c7cda1ae..f23592fdec5 100644
--- a/sys-power/cpupower/Manifest
+++ b/sys-power/cpupower/Manifest
@@ -1,2 +1 @@
-DIST cpupower-4.13.0.tar.xz 67812 BLAKE2B 3b94b18bb57b0499a96d57ca26a48f528bf993e0f1ed7eb6d2949c879de8796501629bd0978946eae925d86dd3204a1cab0c99f1c3a8b51731dfbdb61451e990 SHA512 5e7095e2741eae920a097864926931afb2656e492b504f203c40c24ddc5aee5014c7689b220225171b5ea10c69b70774fb2a979d05ea56ef1fa063f3097626c7
 DIST linux-5.4.tar.xz 109441440 BLAKE2B 193bc4a3147e147d5529956164ec4912fad5d5c6fb07f909ff1056e57235834173194afc686993ccd785c1ff15804de0961b625f3008cca0e27493efc8f27b13 SHA512 9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f

diff --git a/sys-power/cpupower/cpupower-4.13.0.ebuild b/sys-power/cpupower/cpupower-4.13.0.ebuild
deleted file mode 100644
index 28ce7238b73..00000000000
--- a/sys-power/cpupower/cpupower-4.13.0.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 2013-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# eutils: strip-linguas
-inherit eutils systemd toolchain-funcs
-
-DESCRIPTION="Shows and sets processor power related values"
-HOMEPAGE="https://www.kernel.org/"
-SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
-IUSE="nls"
-
-# File collision w/ headers of the deprecated cpufrequtils
-RDEPEND="sys-apps/pciutils
-	!<sys-apps/linux-misc-apps-3.6-r2
-	!sys-power/cpufrequtils"
-DEPEND="${RDEPEND}
-	virtual/os-headers
-	nls? ( sys-devel/gettext )"
-
-PATCHES=(
-	"${FILESDIR}"/cflags-strip.patch
-)
-
-src_configure() {
-	export bindir="${EPREFIX}/usr/bin"
-	export sbindir="${EPREFIX}/usr/sbin"
-	export mandir="${EPREFIX}/usr/share/man"
-	export includedir="${EPREFIX}/usr/include"
-	export libdir="${EPREFIX}/usr/$(get_libdir)"
-	export localedir="${EPREFIX}/usr/share/locale"
-	export docdir="${EPREFIX}/usr/share/doc/${PF}"
-	export confdir="${EPREFIX}/etc"
-	export V=1
-	export NLS=$(usex nls true false)
-}
-
-src_compile() {
-	myemakeargs=(
-		AR="$(tc-getAR)"
-		CC="$(tc-getCC)"
-		LD="$(tc-getCC)"
-		VERSION=${PV}
-	)
-
-	if [[ -n ${LINGUAS+set} ]]; then
-		strip-linguas -i po
-		myemakeargs+=( LANGUAGES="${LINGUAS}" )
-	fi
-
-	emake "${myemakeargs[@]}"
-}
-
-src_install() {
-	emake DESTDIR="${D}" "${myemakeargs[@]}" install
-	doheader lib/cpupower.h
-	dodoc README ToDo
-
-	newconfd "${FILESDIR}"/conf.d-r2 cpupower
-	newinitd "${FILESDIR}"/init.d-r4 cpupower
-
-	systemd_dounit "${FILESDIR}"/cpupower-frequency-set.service
-	systemd_install_serviced "${FILESDIR}"/cpupower-frequency-set.service.conf
-}

diff --git a/sys-power/cpupower/files/cflags-strip.patch b/sys-power/cpupower/files/cflags-strip.patch
deleted file mode 100644
index 6e70fdf38b1..00000000000
--- a/sys-power/cpupower/files/cflags-strip.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -180,14 +180,7 @@
- endif
- export QUIET ECHO
- 
--# if DEBUG is enabled, then we do not strip or optimize
--ifeq ($(strip $(DEBUG)),true)
--	CFLAGS += -O1 -g -DDEBUG
--	STRIPCMD = /bin/true -Since_we_are_debugging
--else
--	CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
--	STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
--endif
-+STRIPCMD = true
- 
- 
- # the actual make rules


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-06 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-06 20:50 [gentoo-commits] repo/gentoo:master commit in: sys-power/cpupower/files/, sys-power/cpupower/ Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2020-02-01 18:01 Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox