summaryrefslogtreecommitdiff
path: root/tools/power/x86/x86_energy_perf_policy
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2018-09-16 16:06:10 +0100
committerLen Brown <len.brown@intel.com>2019-08-31 14:48:34 -0400
commit6ac1730f7db86f0a92d4de0f2b4ca9cd124080fe (patch)
treedd10a04ed690c7ebfbcb4b7aab3ed450b2698f4e /tools/power/x86/x86_energy_perf_policy
parentadb8049097a9ec4acd09fbd3aa8636199a78df8a (diff)
tools/power/x86: Enable compiler optimisations and Fortify by default
Compiling without optimisations is silly, especially since some warnings depend on the optimiser. Use -O2. Fortify adds warnings for unchecked I/O (among other things), which seems to be a good idea for user-space code. Enable that too. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power/x86/x86_energy_perf_policy')
-rw-r--r--tools/power/x86/x86_energy_perf_policy/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/power/x86/x86_energy_perf_policy/Makefile b/tools/power/x86/x86_energy_perf_policy/Makefile
index 1fdeef864e7c..666b325a62a2 100644
--- a/tools/power/x86/x86_energy_perf_policy/Makefile
+++ b/tools/power/x86/x86_energy_perf_policy/Makefile
@@ -9,8 +9,9 @@ ifeq ("$(origin O)", "command line")
endif
x86_energy_perf_policy : x86_energy_perf_policy.c
-override CFLAGS += -Wall -I../../../include
+override CFLAGS += -O2 -Wall -I../../../include
override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
+override CFLAGS += -D_FORTIFY_SOURCE=2
%: %.c
@mkdir -p $(BUILD_OUTPUT)