1
0
Fork 0
alistair23-linux/tools/power/cpupower/utils/idle_monitor
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
..
amd_fam14h_idle.c cpupower: avoid multiple definition with gcc -fno-common 2020-04-01 11:01:51 +02:00
cpuidle_sysfs.c cpupower: avoid multiple definition with gcc -fno-common 2020-04-01 11:01:51 +02:00
cpupower-monitor.c cpupower: avoid multiple definition with gcc -fno-common 2020-04-01 11:01:51 +02:00
cpupower-monitor.h cpupower: avoid multiple definition with gcc -fno-common 2020-04-01 11:01:51 +02:00
hsw_ext_idle.c tools/power/cpupower: Fix initializer override in hsw_ext_cstates 2019-12-31 16:43:26 +01:00
idle_monitors.def cpupower: Add Haswell family 0x45 specific idle monitor to show PC8,9,10 states 2013-07-05 01:52:19 +02:00
idle_monitors.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
mperf_monitor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
nhm_idle.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00
snb_idle.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166 2019-05-30 11:26:39 -07:00