summaryrefslogtreecommitdiffstats
path: root/tools/power/x86/turbostat/Makefile
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/turbostat/Makefile
parentadb8049097a9ec4acd09fbd3aa8636199a78df8a (diff)
downloadlinux-stable-6ac1730f7db86f0a92d4de0f2b4ca9cd124080fe.tar.gz
linux-stable-6ac1730f7db86f0a92d4de0f2b4ca9cd124080fe.tar.bz2
linux-stable-6ac1730f7db86f0a92d4de0f2b4ca9cd124080fe.zip
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/turbostat/Makefile')
-rw-r--r--tools/power/x86/turbostat/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
index 045f5f7d68ab..13f1e8b9ac52 100644
--- a/tools/power/x86/turbostat/Makefile
+++ b/tools/power/x86/turbostat/Makefile
@@ -9,9 +9,10 @@ ifeq ("$(origin O)", "command line")
endif
turbostat : turbostat.c
-override CFLAGS += -Wall -I../../../include
+override CFLAGS += -O2 -Wall -I../../../include
override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
override CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
+override CFLAGS += -D_FORTIFY_SOURCE=2
%: %.c
@mkdir -p $(BUILD_OUTPUT)