1
0
Fork 0
alistair23-linux/tools/power/cpupower
Mike Gilbert dda4fca309 cpupower: avoid multiple definition with gcc -fno-common
[ Upstream commit 2de7fb60a4 ]

Building cpupower with -fno-common in CFLAGS results in errors due to
multiple definitions of the 'cpu_count' and 'start_time' variables.

./utils/idle_monitor/snb_idle.o:./utils/idle_monitor/cpupower-monitor.h:28:
multiple definition of `cpu_count';
./utils/idle_monitor/nhm_idle.o:./utils/idle_monitor/cpupower-monitor.h:28:
first defined here
...
./utils/idle_monitor/cpuidle_sysfs.o:./utils/idle_monitor/cpuidle_sysfs.c:22:
multiple definition of `start_time';
./utils/idle_monitor/amd_fam14h_idle.o:./utils/idle_monitor/amd_fam14h_idle.c:85:
first defined here

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>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-01 11:01:51 +02:00
..
bench cpupower: Add missing newline at end of file 2019-08-29 09:49:26 -06:00
debug kbuild: create *.mod with full directory path and remove MODVERDIR 2019-07-18 02:19:31 +09:00
lib cpupower: Revert library ABI changes from commit ae2917093f 2020-02-11 04:35:24 -08:00
man cpupower: correct spelling of interval 2019-06-04 09:04:08 -06:00
po cpupower: update German translation 2019-08-29 10:18:52 -06:00
utils cpupower: avoid multiple definition with gcc -fno-common 2020-04-01 11:01:51 +02:00
.gitignore tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore 2017-11-09 10:52:22 -07:00
Makefile tools/power/cpupower: fix 64bit detection when cross-compiling 2019-08-29 09:50:54 -06:00
README cpupower: Remove dead link to homepage, and update the targets built. 2014-05-17 00:36:36 +02:00
ToDo cpupower: Remove dead link to homepage, and update the targets built. 2014-05-17 00:36:36 +02:00
cpupower-completion.sh cpupower : Auto-completion for cpupower tool 2018-12-05 07:52:45 -07:00

README

The cpupower package consists of the following elements:

requirements
------------

On x86 pciutils is needed at runtime (-lpci).
For compilation pciutils-devel (pci/pci.h) and a gcc version
providing cpuid.h is needed.
For both it's not explicitly checked for (yet).


libcpupower
----------

"libcpupower" is a library which offers a unified access method for userspace
tools and programs to the cpufreq core and drivers in the Linux kernel. This
allows for code reduction in userspace tools, a clean implementation of
the interaction to the cpufreq core, and support for both the sysfs and proc
interfaces [depending on configuration, see below].


compilation and installation
----------------------------

make
su
make install

should suffice on most systems. It builds libcpupower to put in
/usr/lib; cpupower, cpufreq-bench_plot.sh to put in /usr/bin; and
cpufreq-bench to put in /usr/sbin. If you want to set up the paths
differently and/or want to configure the package to your specific
needs, you need to open "Makefile" with an editor of your choice and
edit the block marked CONFIGURATION.


THANKS
------
Many thanks to Mattia Dongili who wrote the autotoolization and
libtoolization, the manpages and the italian language file for cpupower;
to Dave Jones for his feedback and his dump_psb tool; to Bruno Ducrot for his
powernow-k8-decode and intel_gsic tools as well as the french language file;
and to various others commenting on the previous (pre-)releases of 
cpupower.


        Dominik Brodowski