Skip to content

Commit

Permalink
tools cpupower: Override CFLAGS assignments
Browse files Browse the repository at this point in the history
So user could specify outside CFLAGS values.

Cc: Thomas Renninger <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Acked-by: Thomas Renninger <[email protected]>
Signed-off-by: Shuah Khan (Samsung OSG) <[email protected]>
  • Loading branch information
olsajiri authored and Shuah Khan committed Nov 6, 2018
1 parent 4bf3bd0 commit dbc4ca3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/power/cpupower/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ WARNINGS += $(call cc-supports,-Wno-pointer-sign)
WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
WARNINGS += -Wshadow

CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
override CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
-DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE

UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \
Expand All @@ -156,12 +156,12 @@ LIB_SRC = lib/cpufreq.c lib/cpupower.c lib/cpuidle.c
LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o
LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS))

CFLAGS += -pipe
override CFLAGS += -pipe

ifeq ($(strip $(NLS)),true)
INSTALL_NLS += install-gmo
COMPILE_NLS += create-gmo
CFLAGS += -DNLS
override CFLAGS += -DNLS
endif

ifeq ($(strip $(CPUFREQ_BENCH)),true)
Expand All @@ -175,7 +175,7 @@ ifeq ($(strip $(STATIC)),true)
UTIL_SRC += $(LIB_SRC)
endif

CFLAGS += $(WARNINGS)
override CFLAGS += $(WARNINGS)

ifeq ($(strip $(V)),false)
QUIET=@
Expand All @@ -188,10 +188,10 @@ export QUIET ECHO

# if DEBUG is enabled, then we do not strip or optimize
ifeq ($(strip $(DEBUG)),true)
CFLAGS += -O1 -g -DDEBUG
override CFLAGS += -O1 -g -DDEBUG
STRIPCMD = /bin/true -Since_we_are_debugging
else
CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
override CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
endif

Expand Down

0 comments on commit dbc4ca3

Please sign in to comment.