Dear PowerTOP folks,
I do not know if anyone of you has tried it already, so I just share my
result.
Using Debian Sid/unstable with Clang 3.1-8 [1], PowerTOP built without
problems. Here is the log.
$ git describe
v2.1.1-33-g3c71131
$ CC=clang CXX=clang++ ./configure
$ make
make all-recursive
make[1]: Entering directory `~/src/powertop'
Making all in traceevent
make[2]: Entering directory `~/src/powertop/traceevent'
CC event-parse.lo
event-parse.c:5030:12: warning: comparison of unsigned enum expression < 0 is
always false [-Wtautological-compare]
if (type < 0 || type >= PEVENT_FUNC_ARG_MAX_TYPES) {
~~~~ ^ ~
1 warning generated.
CC parse-filter.lo
parse-filter.c:392:17: warning: implicit conversion from enumeration type 'enum
filter_exp_type' to different enumeration type
'enum filter_op_type' [-Wconversion]
arg->op.type = etype;
~ ^~~~~
parse-filter.c:405:17: warning: implicit conversion from enumeration type 'enum
filter_exp_type' to different enumeration type
'enum filter_op_type' [-Wconversion]
arg->op.type = etype;
~ ^~~~~
parse-filter.c:1042:27: warning: implicit conversion from enumeration type 'enum
filter_cmp_type' to different enumeration type
'enum filter_exp_type' [-Wconversion]
arg = create_arg_cmp(ctype);
~~~~~~~~~~~~~~ ^~~~~
3 warnings generated.
CC parse-utils.lo
CC trace-seq.lo
CCLD libtraceevnet.la
make[2]: Leaving directory `~/src/powertop/traceevent'
Making all in src
make[2]: Entering directory `~/src/powertop/src'
CC csstoh.o
CCLD csstoh
./csstoh "."/powertop.css css.h
make all-am
make[3]: Entering directory `~/src/powertop/src'
CXX parameters/powertop-persistent.o
CXX parameters/powertop-learn.o
CXX parameters/powertop-parameters.o
CXX powertop-display.o
CXX cpu/powertop-cpu_core.o
CXX cpu/powertop-cpudevice.o
CXX cpu/powertop-cpu.o
CXX cpu/powertop-cpu_linux.o
CXX cpu/powertop-abstract_cpu.o
CXX cpu/powertop-cpu_package.o
CXX cpu/powertop-intel_cpus.o
CXX powertop-devlist.o
CXX powertop-lib.o
CXX report/powertop-report.o
CXX process/powertop-process.o
CXX process/powertop-processdevice.o
CXX process/powertop-powerconsumer.o
CXX process/powertop-timer.o
CXX process/powertop-work.o
CXX process/powertop-do_process.o
process/do_process.cpp:190:13: warning: unused function
'dbg_printf_pevent_info' [-Wunused-function]
static void dbg_printf_pevent_info(struct event_format *event, struct pevent_record
*rec)
^
1 warning generated.
CXX process/powertop-interrupt.o
CXX perf/powertop-perf.o
CXX perf/powertop-perf_bundle.o
CXX devices/powertop-i915-gpu.o
CXX devices/powertop-device.o
CXX devices/powertop-alsa.o
CXX devices/powertop-runtime_pm.o
CXX devices/powertop-thinkpad-fan.o
CXX devices/powertop-usb.o
CXX devices/powertop-ahci.o
CXX devices/powertop-thinkpad-light.o
CXX devices/powertop-rfkill.o
CXX devices/powertop-backlight.o
CXX devices/powertop-network.o
CXX tuning/powertop-bluetooth.o
tuning/bluetooth.cpp:179:3: warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]
system("/usr/sbin/hciconfig hci0 up &> /dev/null
&");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tuning/bluetooth.cpp:182:2: warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]
system("/usr/sbin/hciconfig hci0 down &> /dev/null");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
CXX tuning/powertop-cpufreq.o
tuning/cpufreq.cpp:118:2: warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]
system("/sbin/modprobe cpufreq_ondemand > /dev/null
2>&1");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
CXX tuning/powertop-tuning.o
CXX tuning/powertop-tuningusb.o
CXX tuning/powertop-ethernet.o
CXX tuning/powertop-tunable.o
CC tuning/powertop-iw.o
CXX tuning/powertop-wifi.o
CXX tuning/powertop-tuningsysfs.o
CXX tuning/powertop-runtime.o
CXX calibrate/powertop-calibrate.o
calibrate/calibrate.cpp:297:3: warning: ignoring return value of function declared
with warn_unused_result attribute [-Wunused-result]
write(fd, buffer, 64*1024);
^~~~~ ~~~~~~~~~~~~~~~~~~~
calibrate/calibrate.cpp:408:2: warning: ignoring return value of function declared
with warn_unused_result attribute [-Wunused-result]
system("DISPLAY=:0 /usr/bin/xset dpms force off");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
calibrate/calibrate.cpp:410:2: warning: ignoring return value of function declared
with warn_unused_result attribute [-Wunused-result]
system("DISPLAY=:0 /usr/bin/xset dpms force on");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
calibrate/calibrate.cpp:416:2: warning: ignoring return value of function declared
with warn_unused_result attribute [-Wunused-result]
system("DISPLAY=:0 /usr/bin/xset dpms force off");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
calibrate/calibrate.cpp:418:2: warning: ignoring return value of function declared
with warn_unused_result attribute [-Wunused-result]
system("DISPLAY=:0 /usr/bin/xset dpms force on");
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
CXX measurement/powertop-measurement.o
CXX measurement/powertop-power_supply.o
CXX measurement/powertop-acpi.o
CXX measurement/powertop-sysfs.o
CXX measurement/powertop-extech.o
measurement/extech.cpp:290:2: warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]
write(fd, " ", 1);
^~~~~ ~~~~~~~~~~
1 warning generated.
CXX report/powertop-report-maker.o
CXX report/powertop-report-formatter-base.o
CXX report/powertop-report-formatter-csv.o
CXX report/powertop-report-formatter-html.o
CXX powertop-main.o
CXX cpu/powertop-intel_gpu.o
CXXLD powertop
make[3]: Leaving directory `~/src/powertop/src'
make[2]: Leaving directory `~/src/powertop/src'
Making all in po
make[2]: Entering directory `~/src/powertop/po'
make[2]: Leaving directory `~/src/powertop/po'
Making all in doc
make[2]: Entering directory `~/src/powertop/doc'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `~/src/powertop/doc'
make[2]: Entering directory `~/src/powertop'
make[2]: Leaving directory `~/src/powertop'
make[1]: Leaving directory `~/src/powertop'
I did not do any other tests like comparing size and speed differences
of the generated code. Maybe somebody else has time to do that.
Thanks,
Paul
[1]
http://packages.debian.org/changelogs/pool/main/c/clang/clang_3.1-8/chang...