tools cpupower: Override CFLAGS assignments
So user could specify outside CFLAGS values. Cc: Thomas Renninger <trenn@suse.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
This commit is contained in:
parent
4bf3bd0f15
commit
dbc4ca339c
|
@ -129,7 +129,7 @@ WARNINGS += $(call cc-supports,-Wno-pointer-sign)
|
||||||
WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
|
WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
|
||||||
WARNINGS += -Wshadow
|
WARNINGS += -Wshadow
|
||||||
|
|
||||||
CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
|
override CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
|
||||||
-DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE
|
-DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE
|
||||||
|
|
||||||
UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \
|
UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \
|
||||||
|
@ -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 = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o
|
||||||
LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS))
|
LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS))
|
||||||
|
|
||||||
CFLAGS += -pipe
|
override CFLAGS += -pipe
|
||||||
|
|
||||||
ifeq ($(strip $(NLS)),true)
|
ifeq ($(strip $(NLS)),true)
|
||||||
INSTALL_NLS += install-gmo
|
INSTALL_NLS += install-gmo
|
||||||
COMPILE_NLS += create-gmo
|
COMPILE_NLS += create-gmo
|
||||||
CFLAGS += -DNLS
|
override CFLAGS += -DNLS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(CPUFREQ_BENCH)),true)
|
ifeq ($(strip $(CPUFREQ_BENCH)),true)
|
||||||
|
@ -175,7 +175,7 @@ ifeq ($(strip $(STATIC)),true)
|
||||||
UTIL_SRC += $(LIB_SRC)
|
UTIL_SRC += $(LIB_SRC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += $(WARNINGS)
|
override CFLAGS += $(WARNINGS)
|
||||||
|
|
||||||
ifeq ($(strip $(V)),false)
|
ifeq ($(strip $(V)),false)
|
||||||
QUIET=@
|
QUIET=@
|
||||||
|
@ -188,10 +188,10 @@ export QUIET ECHO
|
||||||
|
|
||||||
# if DEBUG is enabled, then we do not strip or optimize
|
# if DEBUG is enabled, then we do not strip or optimize
|
||||||
ifeq ($(strip $(DEBUG)),true)
|
ifeq ($(strip $(DEBUG)),true)
|
||||||
CFLAGS += -O1 -g -DDEBUG
|
override CFLAGS += -O1 -g -DDEBUG
|
||||||
STRIPCMD = /bin/true -Since_we_are_debugging
|
STRIPCMD = /bin/true -Since_we_are_debugging
|
||||||
else
|
else
|
||||||
CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
|
override CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
|
||||||
STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
|
STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue