* [PATCHv2 0/6] tools: Various build flags fixes
@ 2018-12-12 10:25 Jiri Olsa
2018-12-12 10:25 ` [PATCH 1/6] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Jiri Olsa @ 2018-12-12 10:25 UTC (permalink / raw)
To: lkml
Cc: Hartmut Knaack, Jonathan Cameron, Lars-Peter Clausen, Len Brown,
Markus Mayer, Shuah Khan, Thomas Renninger, Zhang Rui,
Herton R. Krzesinski
hi,
while hardening some of the tools rpm, we noticed we
can't pass build flags to some of them.
Sending separate tools fixes for what we found. It's
mostly override for CFLAGS and adding LDFLAGS to the
build commands.
v2 changes:
- 4 patches already accepted, still 6 to go ;-)
- adding more people to cc
Also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
tools/flags
thanks,
jirka
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Len Brown <len.brown@intel.com>
Cc: Markus Mayer <mmayer@broadcom.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.com>
Cc: Zhang Rui <rui.zhang@intel.com>
---
Jiri Olsa (6):
tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command
tools thermal tmon: Override CFLAGS assignments
tools thermal tmon: Use -O3 instead of -O1 if available
tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command
tools iio: Override CFLAGS assignments
tools gpio: Override CFLAGS assignments
tools/gpio/Makefile | 2 +-
tools/iio/Makefile | 2 +-
tools/power/x86/turbostat/Makefile | 8 ++++----
tools/power/x86/x86_energy_perf_policy/Makefile | 6 +++---
tools/thermal/tmon/Makefile | 8 ++++----
5 files changed, 13 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/6] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command
2018-12-12 10:25 [PATCHv2 0/6] tools: Various build flags fixes Jiri Olsa
@ 2018-12-12 10:25 ` Jiri Olsa
2019-01-03 13:20 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-12-12 10:25 ` [PATCH 2/6] tools thermal tmon: Override CFLAGS assignments Jiri Olsa
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Jiri Olsa @ 2018-12-12 10:25 UTC (permalink / raw)
To: lkml; +Cc: Len Brown, Herton R. Krzesinski
So user could specify outside CFLAGS/LDFLAGS values.
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/power/x86/x86_energy_perf_policy/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/power/x86/x86_energy_perf_policy/Makefile b/tools/power/x86/x86_energy_perf_policy/Makefile
index f4534fb8b951..ae7a0e09b722 100644
--- a/tools/power/x86/x86_energy_perf_policy/Makefile
+++ b/tools/power/x86/x86_energy_perf_policy/Makefile
@@ -9,12 +9,12 @@ ifeq ("$(origin O)", "command line")
endif
x86_energy_perf_policy : x86_energy_perf_policy.c
-CFLAGS += -Wall
-CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
+override CFLAGS += -Wall
+override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
%: %.c
@mkdir -p $(BUILD_OUTPUT)
- $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
+ $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS)
.PHONY : clean
clean :
--
2.17.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/6] tools thermal tmon: Override CFLAGS assignments
2018-12-12 10:25 [PATCHv2 0/6] tools: Various build flags fixes Jiri Olsa
2018-12-12 10:25 ` [PATCH 1/6] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
@ 2018-12-12 10:25 ` Jiri Olsa
2019-01-03 13:20 ` [tip:perf/urgent] tools thermal tmon: Allow overriding " tip-bot for Jiri Olsa
2018-12-12 10:25 ` [PATCH 3/6] tools thermal tmon: Use -O3 instead of -O1 if available Jiri Olsa
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Jiri Olsa @ 2018-12-12 10:25 UTC (permalink / raw)
To: lkml; +Cc: Brian Norris, Zhang Rui, Markus Mayer, Herton R. Krzesinski
So user could specify outside CFLAGS values.
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/thermal/tmon/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 735a510230c3..89a2444c1df2 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -6,13 +6,13 @@ VERSION = 1.0
BINDIR=usr/bin
WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
-CFLAGS+= -O1 ${WARNFLAGS}
+override CFLAGS+= -O1 ${WARNFLAGS}
# Add "-fstack-protector" only if toolchain supports it.
-CFLAGS+= $(call cc-option,-fstack-protector)
+override CFLAGS+= $(call cc-option,-fstack-protector-strong)
CC?= $(CROSS_COMPILE)gcc
PKG_CONFIG?= pkg-config
-CFLAGS+=-D VERSION=\"$(VERSION)\"
+override CFLAGS+=-D VERSION=\"$(VERSION)\"
LDFLAGS+=
TARGET=tmon
@@ -29,7 +29,7 @@ TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null
$(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \
echo -lpanel -lncurses)
-CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
+override CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
$(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
OBJS = tmon.o tui.o sysfs.o pid.o
--
2.17.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/6] tools thermal tmon: Use -O3 instead of -O1 if available
2018-12-12 10:25 [PATCHv2 0/6] tools: Various build flags fixes Jiri Olsa
2018-12-12 10:25 ` [PATCH 1/6] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
2018-12-12 10:25 ` [PATCH 2/6] tools thermal tmon: Override CFLAGS assignments Jiri Olsa
@ 2018-12-12 10:25 ` Jiri Olsa
2018-12-12 10:25 ` [PATCH 4/6] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
` (2 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Jiri Olsa @ 2018-12-12 10:25 UTC (permalink / raw)
To: lkml; +Cc: Brian Norris, Zhang Rui, Markus Mayer, Herton R. Krzesinski
Using -O3 instead of -O1 if it's supported by compiler.
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/thermal/tmon/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 89a2444c1df2..59e417ec3e13 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -6,7 +6,7 @@ VERSION = 1.0
BINDIR=usr/bin
WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
-override CFLAGS+= -O1 ${WARNFLAGS}
+override CFLAGS+= $(call cc-option,-O3,-O1) ${WARNFLAGS}
# Add "-fstack-protector" only if toolchain supports it.
override CFLAGS+= $(call cc-option,-fstack-protector-strong)
CC?= $(CROSS_COMPILE)gcc
--
2.17.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/6] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command
2018-12-12 10:25 [PATCHv2 0/6] tools: Various build flags fixes Jiri Olsa
` (2 preceding siblings ...)
2018-12-12 10:25 ` [PATCH 3/6] tools thermal tmon: Use -O3 instead of -O1 if available Jiri Olsa
@ 2018-12-12 10:25 ` Jiri Olsa
2019-01-03 13:21 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-12-12 10:25 ` [PATCH 5/6] tools iio: Override CFLAGS assignments Jiri Olsa
2018-12-12 10:25 ` [PATCH 6/6] tools gpio: " Jiri Olsa
5 siblings, 1 reply; 15+ messages in thread
From: Jiri Olsa @ 2018-12-12 10:25 UTC (permalink / raw)
To: lkml; +Cc: Andy, Len Brown, Herton R. Krzesinski
So user could specify outside CFLAGS/LDFLAGS values.
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/power/x86/turbostat/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
index 2ab25aa38263..1598b4fa0b11 100644
--- a/tools/power/x86/turbostat/Makefile
+++ b/tools/power/x86/turbostat/Makefile
@@ -9,13 +9,13 @@ ifeq ("$(origin O)", "command line")
endif
turbostat : turbostat.c
-CFLAGS += -Wall
-CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
-CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
+override CFLAGS += -Wall
+override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
+override CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
%: %.c
@mkdir -p $(BUILD_OUTPUT)
- $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
+ $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS)
.PHONY : clean
clean :
--
2.17.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/6] tools iio: Override CFLAGS assignments
2018-12-12 10:25 [PATCHv2 0/6] tools: Various build flags fixes Jiri Olsa
` (3 preceding siblings ...)
2018-12-12 10:25 ` [PATCH 4/6] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
@ 2018-12-12 10:25 ` Jiri Olsa
2018-12-12 18:50 ` Jonathan Cameron
2018-12-12 10:25 ` [PATCH 6/6] tools gpio: " Jiri Olsa
5 siblings, 1 reply; 15+ messages in thread
From: Jiri Olsa @ 2018-12-12 10:25 UTC (permalink / raw)
To: lkml
Cc: Andy Shevchenko, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Herton R. Krzesinski
So user could specify outside CFLAGS values.
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/iio/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/iio/Makefile b/tools/iio/Makefile
index 332ed2f6c2c2..e22378dba244 100644
--- a/tools/iio/Makefile
+++ b/tools/iio/Makefile
@@ -12,7 +12,7 @@ endif
# (this improves performance and avoids hard-to-debug behaviour);
MAKEFLAGS += -r
-CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
+override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
ALL_TARGETS := iio_event_monitor lsiio iio_generic_buffer
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
--
2.17.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 6/6] tools gpio: Override CFLAGS assignments
2018-12-12 10:25 [PATCHv2 0/6] tools: Various build flags fixes Jiri Olsa
` (4 preceding siblings ...)
2018-12-12 10:25 ` [PATCH 5/6] tools iio: Override CFLAGS assignments Jiri Olsa
@ 2018-12-12 10:25 ` Jiri Olsa
2018-12-12 13:15 ` Andy Shevchenko
2019-01-03 13:21 ` [tip:perf/urgent] tools gpio: Allow overriding CFLAGS tip-bot for Jiri Olsa
5 siblings, 2 replies; 15+ messages in thread
From: Jiri Olsa @ 2018-12-12 10:25 UTC (permalink / raw)
To: lkml
Cc: Andy Shevchenko, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Herton R. Krzesinski
So user could specify outside CFLAGS values.
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/gpio/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile
index 240eda014b37..6ecdd1067826 100644
--- a/tools/gpio/Makefile
+++ b/tools/gpio/Makefile
@@ -12,7 +12,7 @@ endif
# (this improves performance and avoids hard-to-debug behaviour);
MAKEFLAGS += -r
-CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
+override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
ALL_TARGETS := lsgpio gpio-hammer gpio-event-mon
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
--
2.17.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 6/6] tools gpio: Override CFLAGS assignments
2018-12-12 10:25 ` [PATCH 6/6] tools gpio: " Jiri Olsa
@ 2018-12-12 13:15 ` Andy Shevchenko
2018-12-13 11:23 ` Jiri Olsa
2019-01-03 13:21 ` [tip:perf/urgent] tools gpio: Allow overriding CFLAGS tip-bot for Jiri Olsa
1 sibling, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2018-12-12 13:15 UTC (permalink / raw)
To: Jiri Olsa
Cc: lkml, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Herton R. Krzesinski
On Wed, Dec 12, 2018 at 11:25:37AM +0100, Jiri Olsa wrote:
> So user could specify outside CFLAGS values.
For all three where I'm in Cc list
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Hartmut Knaack <knaack.h@gmx.de>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/gpio/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile
> index 240eda014b37..6ecdd1067826 100644
> --- a/tools/gpio/Makefile
> +++ b/tools/gpio/Makefile
> @@ -12,7 +12,7 @@ endif
> # (this improves performance and avoids hard-to-debug behaviour);
> MAKEFLAGS += -r
>
> -CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
> +override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
>
> ALL_TARGETS := lsgpio gpio-hammer gpio-event-mon
> ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
> --
> 2.17.2
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/6] tools iio: Override CFLAGS assignments
2018-12-12 10:25 ` [PATCH 5/6] tools iio: Override CFLAGS assignments Jiri Olsa
@ 2018-12-12 18:50 ` Jonathan Cameron
2018-12-13 11:24 ` Jiri Olsa
0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Cameron @ 2018-12-12 18:50 UTC (permalink / raw)
To: Jiri Olsa
Cc: lkml, Andy Shevchenko, Hartmut Knaack, Lars-Peter Clausen,
Herton R. Krzesinski
On Wed, 12 Dec 2018 11:25:36 +0100
Jiri Olsa <jolsa@kernel.org> wrote:
> So user could specify outside CFLAGS values.
>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Hartmut Knaack <knaack.h@gmx.de>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Sorry. I must have failed to reply. I applied this from previous
version. It's in Linux next - I just checked.
Jonathan
> ---
> tools/iio/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/iio/Makefile b/tools/iio/Makefile
> index 332ed2f6c2c2..e22378dba244 100644
> --- a/tools/iio/Makefile
> +++ b/tools/iio/Makefile
> @@ -12,7 +12,7 @@ endif
> # (this improves performance and avoids hard-to-debug behaviour);
> MAKEFLAGS += -r
>
> -CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
> +override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
>
> ALL_TARGETS := iio_event_monitor lsiio iio_generic_buffer
> ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 6/6] tools gpio: Override CFLAGS assignments
2018-12-12 13:15 ` Andy Shevchenko
@ 2018-12-13 11:23 ` Jiri Olsa
0 siblings, 0 replies; 15+ messages in thread
From: Jiri Olsa @ 2018-12-13 11:23 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jiri Olsa, lkml, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Herton R. Krzesinski
On Wed, Dec 12, 2018 at 03:15:01PM +0200, Andy Shevchenko wrote:
> On Wed, Dec 12, 2018 at 11:25:37AM +0100, Jiri Olsa wrote:
> > So user could specify outside CFLAGS values.
>
> For all three where I'm in Cc list
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
thanks, I should have cc-ed you on all of them ;-)
any idea who could I ask to pull these in?
thanks,
jirka
>
> >
> > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Cc: Jonathan Cameron <jic23@kernel.org>
> > Cc: Hartmut Knaack <knaack.h@gmx.de>
> > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> > tools/gpio/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile
> > index 240eda014b37..6ecdd1067826 100644
> > --- a/tools/gpio/Makefile
> > +++ b/tools/gpio/Makefile
> > @@ -12,7 +12,7 @@ endif
> > # (this improves performance and avoids hard-to-debug behaviour);
> > MAKEFLAGS += -r
> >
> > -CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
> > +override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
> >
> > ALL_TARGETS := lsgpio gpio-hammer gpio-event-mon
> > ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
> > --
> > 2.17.2
> >
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/6] tools iio: Override CFLAGS assignments
2018-12-12 18:50 ` Jonathan Cameron
@ 2018-12-13 11:24 ` Jiri Olsa
0 siblings, 0 replies; 15+ messages in thread
From: Jiri Olsa @ 2018-12-13 11:24 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Jiri Olsa, lkml, Andy Shevchenko, Hartmut Knaack,
Lars-Peter Clausen, Herton R. Krzesinski
On Wed, Dec 12, 2018 at 06:50:25PM +0000, Jonathan Cameron wrote:
> On Wed, 12 Dec 2018 11:25:36 +0100
> Jiri Olsa <jolsa@kernel.org> wrote:
>
> > So user could specify outside CFLAGS values.
> >
> > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Cc: Jonathan Cameron <jic23@kernel.org>
> > Cc: Hartmut Knaack <knaack.h@gmx.de>
> > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
>
> Sorry. I must have failed to reply. I applied this from previous
> version. It's in Linux next - I just checked.
great, thanks
jirka
^ permalink raw reply [flat|nested] 15+ messages in thread
* [tip:perf/urgent] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command
2018-12-12 10:25 ` [PATCH 1/6] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
@ 2019-01-03 13:20 ` tip-bot for Jiri Olsa
0 siblings, 0 replies; 15+ messages in thread
From: tip-bot for Jiri Olsa @ 2019-01-03 13:20 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, jolsa, mingo, len.brown, tglx, linux-kernel, herton, hpa
Commit-ID: f1770e3ca4ec10ce43825de2f855a1831c711195
Gitweb: https://git.kernel.org/tip/f1770e3ca4ec10ce43825de2f855a1831c711195
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Fri, 12 Oct 2018 07:20:16 -0400
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Dec 2018 16:33:07 -0300
tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command
So user could specify outside CFLAGS/LDFLAGS values.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Herton Krzesinski <herton@redhat.com>
Cc: Len Brown <len.brown@intel.com>
Link: https://lkml.kernel.org/r/20181212102537.25902-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/power/x86/x86_energy_perf_policy/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/power/x86/x86_energy_perf_policy/Makefile b/tools/power/x86/x86_energy_perf_policy/Makefile
index f4534fb8b951..ae7a0e09b722 100644
--- a/tools/power/x86/x86_energy_perf_policy/Makefile
+++ b/tools/power/x86/x86_energy_perf_policy/Makefile
@@ -9,12 +9,12 @@ ifeq ("$(origin O)", "command line")
endif
x86_energy_perf_policy : x86_energy_perf_policy.c
-CFLAGS += -Wall
-CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
+override CFLAGS += -Wall
+override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
%: %.c
@mkdir -p $(BUILD_OUTPUT)
- $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
+ $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS)
.PHONY : clean
clean :
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [tip:perf/urgent] tools thermal tmon: Allow overriding CFLAGS assignments
2018-12-12 10:25 ` [PATCH 2/6] tools thermal tmon: Override CFLAGS assignments Jiri Olsa
@ 2019-01-03 13:20 ` tip-bot for Jiri Olsa
0 siblings, 0 replies; 15+ messages in thread
From: tip-bot for Jiri Olsa @ 2019-01-03 13:20 UTC (permalink / raw)
To: linux-tip-commits
Cc: herton, tglx, mmayer, jolsa, computersforpeace, linux-kernel,
acme, mingo, hpa, rui.zhang
Commit-ID: ad6b474f445e587e9b56ec44241b1639bccf6738
Gitweb: https://git.kernel.org/tip/ad6b474f445e587e9b56ec44241b1639bccf6738
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Wed, 12 Dec 2018 11:25:33 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Dec 2018 16:33:08 -0300
tools thermal tmon: Allow overriding CFLAGS assignments
So that the user can provide, e.g. distro package alternative values.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Herton Krzesinski <herton@redhat.com>
Cc: Markus Mayer <mmayer@broadcom.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Link: http://lkml.kernel.org/r/20181212102537.25902-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/thermal/tmon/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 735a510230c3..89a2444c1df2 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -6,13 +6,13 @@ VERSION = 1.0
BINDIR=usr/bin
WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
-CFLAGS+= -O1 ${WARNFLAGS}
+override CFLAGS+= -O1 ${WARNFLAGS}
# Add "-fstack-protector" only if toolchain supports it.
-CFLAGS+= $(call cc-option,-fstack-protector)
+override CFLAGS+= $(call cc-option,-fstack-protector-strong)
CC?= $(CROSS_COMPILE)gcc
PKG_CONFIG?= pkg-config
-CFLAGS+=-D VERSION=\"$(VERSION)\"
+override CFLAGS+=-D VERSION=\"$(VERSION)\"
LDFLAGS+=
TARGET=tmon
@@ -29,7 +29,7 @@ TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null
$(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \
echo -lpanel -lncurses)
-CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
+override CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
$(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
OBJS = tmon.o tui.o sysfs.o pid.o
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [tip:perf/urgent] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command
2018-12-12 10:25 ` [PATCH 4/6] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
@ 2019-01-03 13:21 ` tip-bot for Jiri Olsa
0 siblings, 0 replies; 15+ messages in thread
From: tip-bot for Jiri Olsa @ 2019-01-03 13:21 UTC (permalink / raw)
To: linux-tip-commits
Cc: herton, len.brown, mingo, hpa, andriy.shevchenko, tglx, jolsa,
acme, linux-kernel
Commit-ID: 6b7f98a37ac63fe94e84a5289962457b4b504a8d
Gitweb: https://git.kernel.org/tip/6b7f98a37ac63fe94e84a5289962457b4b504a8d
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Wed, 12 Dec 2018 11:25:35 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Dec 2018 16:33:08 -0300
tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command
So that the user can specify outside CFLAGS/LDFLAGS values.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Herton Krzesinski <herton@redhat.com>
Cc: Len Brown <len.brown@intel.com>
Link: http://lkml.kernel.org/r/20181212102537.25902-5-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/power/x86/turbostat/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
index 2ab25aa38263..1598b4fa0b11 100644
--- a/tools/power/x86/turbostat/Makefile
+++ b/tools/power/x86/turbostat/Makefile
@@ -9,13 +9,13 @@ ifeq ("$(origin O)", "command line")
endif
turbostat : turbostat.c
-CFLAGS += -Wall
-CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
-CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
+override CFLAGS += -Wall
+override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
+override CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
%: %.c
@mkdir -p $(BUILD_OUTPUT)
- $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
+ $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS)
.PHONY : clean
clean :
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [tip:perf/urgent] tools gpio: Allow overriding CFLAGS
2018-12-12 10:25 ` [PATCH 6/6] tools gpio: " Jiri Olsa
2018-12-12 13:15 ` Andy Shevchenko
@ 2019-01-03 13:21 ` tip-bot for Jiri Olsa
1 sibling, 0 replies; 15+ messages in thread
From: tip-bot for Jiri Olsa @ 2019-01-03 13:21 UTC (permalink / raw)
To: linux-tip-commits
Cc: jolsa, mingo, tglx, andriy.shevchenko, jic23, lars, acme, herton,
linux-kernel, hpa, knaack.h
Commit-ID: 4ccc98a48958da9f89beb71c66a4e05468727951
Gitweb: https://git.kernel.org/tip/4ccc98a48958da9f89beb71c66a4e05468727951
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Wed, 12 Dec 2018 11:25:37 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Dec 2018 16:33:08 -0300
tools gpio: Allow overriding CFLAGS
So that the user can specify outside CFLAGS values.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Hartmut Knaack <knaack.h@gmx.de> <knaack.h@gmx.de>
Cc: Herton Krzesinski <herton@redhat.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Link: http://lkml.kernel.org/r/20181212102537.25902-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/gpio/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile
index 240eda014b37..6ecdd1067826 100644
--- a/tools/gpio/Makefile
+++ b/tools/gpio/Makefile
@@ -12,7 +12,7 @@ endif
# (this improves performance and avoids hard-to-debug behaviour);
MAKEFLAGS += -r
-CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
+override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
ALL_TARGETS := lsgpio gpio-hammer gpio-event-mon
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-01-03 13:22 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-12 10:25 [PATCHv2 0/6] tools: Various build flags fixes Jiri Olsa
2018-12-12 10:25 ` [PATCH 1/6] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
2019-01-03 13:20 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-12-12 10:25 ` [PATCH 2/6] tools thermal tmon: Override CFLAGS assignments Jiri Olsa
2019-01-03 13:20 ` [tip:perf/urgent] tools thermal tmon: Allow overriding " tip-bot for Jiri Olsa
2018-12-12 10:25 ` [PATCH 3/6] tools thermal tmon: Use -O3 instead of -O1 if available Jiri Olsa
2018-12-12 10:25 ` [PATCH 4/6] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
2019-01-03 13:21 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-12-12 10:25 ` [PATCH 5/6] tools iio: Override CFLAGS assignments Jiri Olsa
2018-12-12 18:50 ` Jonathan Cameron
2018-12-13 11:24 ` Jiri Olsa
2018-12-12 10:25 ` [PATCH 6/6] tools gpio: " Jiri Olsa
2018-12-12 13:15 ` Andy Shevchenko
2018-12-13 11:23 ` Jiri Olsa
2019-01-03 13:21 ` [tip:perf/urgent] tools gpio: Allow overriding CFLAGS tip-bot for Jiri Olsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).