Skip to contentSkip to conversation

tools: Various build flags fixes

PATCH Superseded Jiri Olsa 8 participants 35 messages Oct 16, 2018 – Dec 20, 2018

Subsystems (6)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

cover tools: Various build flags fixes

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.

thanks,
jirka

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Len Brown <[email protected]>
Cc Markus Mayer <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Signed-off-by: Len Brown <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Zhang Rui <[email protected]>

---
Jiri Olsa (10):
tools lib traceevent: Use LDFLAGS in the build commands
tools perf: Pass build flags to traceevent build
tools cpupower debug: Allow to use outside build flags
tools cpupower: Override CFLAGS assignments
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/lib/traceevent/Makefile                   |  4 ++--
 tools/perf/Makefile.perf                        |  2 +-
 tools/power/cpupower/Makefile                   | 12 ++++++------
 tools/power/cpupower/debug/x86_64/Makefile      |  4 ++--
 tools/power/x86/turbostat/Makefile              |  8 ++++----
 tools/power/x86/x86_energy_perf_policy/Makefile |  6 +++---
 tools/thermal/tmon/Makefile                     |  8 ++++----
 9 files changed, 24 insertions(+), 24 deletions(-)
author reviewer
#1 lore raw

PATCH 1/10 tools lib traceevent: Use LDFLAGS in the build commands

So user could specify outside LDFLAGS values.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +2 -2
index 0b4e833088a4..e535073c94ce 100644
@@ -174,7 +174,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 
@@ -193,7 +193,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) -shared $(LDFLAGS) -nostartfiles -o $@ $^
 
 define make_version.h
   (echo '/* This file is automatically generated. Do not modify. */';		\
Signature · 1 line
2.17.2
#2 lore raw

Re: [PATCH 01/10] tools lib traceevent: Use LDFLAGS in the build commands

Quoted 23 lines · On Tue, 16 Oct 2018 17:06:06 +0200 Jiri Olsa <[email protected]> wrote:

So user could specify outside LDFLAGS values.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +1 -1
index 0b4e833088a4..e535073c94ce 100644
@@ -174,7 +174,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 

tools/lib/traceevent/Makefile $(PLUGINS_IN): force · line 196

Quoted 5 lines
tools/lib/traceevent/Makefile +1 -1
@@ -193,7 +193,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) -shared $(LDFLAGS) -nostartfiles -o $@ $^

I'm guessing that the CFLAGS are not needed here, but shouldn't that also be mentioned in the change log?

-- Steve

Quoted 3 lines
tools/lib/traceevent/Makefile +0 -0
 define make_version.h
   (echo '/* This file is automatically generated. Do not modify. */';		\
#3 lore raw

PATCH v2 1/10 tools lib traceevent: Use LDFLAGS in the build commands

Quoted 28 lines · Steven Rostedt
Quoted 25 lines · On Tue, 16 Oct 2018 17:06:06 +0200 Jiri Olsa <[email protected]> wrote:

So user could specify outside LDFLAGS values.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +1 -1
index 0b4e833088a4..e535073c94ce 100644
@@ -174,7 +174,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 
@@ -193,7 +193,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
Quoted 7 lines

tools/lib/traceevent/Makefile $(PLUGINS_IN): force · line 196

Quoted 3 lines
tools/lib/traceevent/Makefile +1 -1
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) -shared $(LDFLAGS) -nostartfiles -o $@ $^

I'm guessing that the CFLAGS are not needed here, but shouldn't that also be mentioned in the change log?

yep, sry.. v2 attached

thanks,
jirka

---
So user could specify outside LDFLAGS values.

Also moving out CFLAGS from link command,
because it's not needed there.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +2 -2
index 0b4e833088a4..e535073c94ce 100644
@@ -174,7 +174,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 
@@ -193,7 +193,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) -shared $(LDFLAGS) -nostartfiles -o $@ $^
 
 define make_version.h
   (echo '/* This file is automatically generated. Do not modify. */';		\
Signature · 1 line
2.17.2
Acked-by on v2 1/10
#4 lore raw

Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands

Quoted 37 lines · On Tue, 16 Oct 2018 17:45:26 +0200 Jiri Olsa <[email protected]> wrote:
Quoted 28 lines · Steven Rostedt
Quoted 25 lines · On Tue, 16 Oct 2018 17:06:06 +0200 Jiri Olsa <[email protected]> wrote:

So user could specify outside LDFLAGS values.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +1 -1
index 0b4e833088a4..e535073c94ce 100644
@@ -174,7 +174,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 
@@ -193,7 +193,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
Quoted 7 lines

tools/lib/traceevent/Makefile $(PLUGINS_IN): force · line 196

Quoted 3 lines
tools/lib/traceevent/Makefile +1 -1
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) -shared $(LDFLAGS) -nostartfiles -o $@ $^  

I'm guessing that the CFLAGS are not needed here, but shouldn't that also be mentioned in the change log?

Quoted 2 lines

yep, sry.. v2 attached

-- Steve

#5 lore raw

Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands

Quoted 40 lines · Steven Rostedt
Quoted 37 lines · On Tue, 16 Oct 2018 17:45:26 +0200 Jiri Olsa <[email protected]> wrote:
Quoted 35 lines · Steven Rostedt
Quoted 23 lines · On Tue, 16 Oct 2018 17:06:06 +0200 Jiri Olsa <[email protected]> wrote:

So user could specify outside LDFLAGS values.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +1 -1
index 0b4e833088a4..e535073c94ce 100644
@@ -174,7 +174,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 

tools/lib/traceevent/Makefile $(PLUGINS_IN): force · line 196

Quoted 5 lines
tools/lib/traceevent/Makefile +1 -1
@@ -193,7 +193,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) -shared $(LDFLAGS) -nostartfiles -o $@ $^  

I'm guessing that the CFLAGS are not needed here, but shouldn't that also be mentioned in the change log?

Quoted 4 lines
Quoted 2 lines

yep, sry.. v2 attached

Arnaldo,
could you pull in this one?

thanks,
jirka

#6 lore raw

Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands

Quoted 41 lines · Jiri Olsa
Quoted 40 lines · Steven Rostedt
Quoted 37 lines · On Tue, 16 Oct 2018 17:45:26 +0200 Jiri Olsa <[email protected]> wrote:
Quoted 35 lines · Steven Rostedt
Quoted 23 lines · On Tue, 16 Oct 2018 17:06:06 +0200 Jiri Olsa <[email protected]> wrote:

So user could specify outside LDFLAGS values.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +1 -1
index 0b4e833088a4..e535073c94ce 100644
@@ -174,7 +174,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 

tools/lib/traceevent/Makefile $(PLUGINS_IN): force · line 196

Quoted 5 lines
tools/lib/traceevent/Makefile +1 -1
@@ -193,7 +193,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) -shared $(LDFLAGS) -nostartfiles -o $@ $^  

I'm guessing that the CFLAGS are not needed here, but shouldn't that also be mentioned in the change log?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

yep, sry.. v2 attached

Arnaldo,
could you pull in this one?

ping, thanks

jirka

maintainer Applied
#7 lore raw

Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands

Em Thu, Nov 22, 2018 at 10:30:06AM +0100, Jiri Olsa escreveu:

Quoted 8 lines · Jiri Olsa
Quoted 6 lines · Steven Rostedt
Quoted 5 lines
Quoted 3 lines · On Tue, 16 Oct 2018 17:45:26 +0200 Jiri Olsa <[email protected]> wrote:
Quoted 2 lines · Steven Rostedt

I'm guessing that the CFLAGS are not needed here, but shouldn't that also be mentioned in the change log?

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

yep, sry.. v2 attached

Arnaldo,
could you pull in this one?

ping, thanks

Applied, thanks,

- Arnaldo

#8 lore raw

Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands

In reply to Jiri Olsa

Em Thu, Nov 22, 2018 at 10:30:06AM +0100, Jiri Olsa escreveu:

Quoted 45 lines · Jiri Olsa
Quoted 44 lines · Steven Rostedt
Quoted 43 lines
Quoted 39 lines · On Tue, 16 Oct 2018 17:45:26 +0200 Jiri Olsa <[email protected]> wrote:
Quoted 28 lines · Steven Rostedt
Quoted 25 lines · On Tue, 16 Oct 2018 17:06:06 +0200 Jiri Olsa <[email protected]> wrote:

So user could specify outside LDFLAGS values.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +1 -1
index 0b4e833088a4..e535073c94ce 100644
@@ -174,7 +174,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 
@@ -193,7 +193,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
Quoted 7 lines

tools/lib/traceevent/Makefile $(PLUGINS_IN): force · line 196

Quoted 3 lines
tools/lib/traceevent/Makefile +1 -1
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) -shared $(LDFLAGS) -nostartfiles -o $@ $^  

I'm guessing that the CFLAGS are not needed here, but shouldn't that also be mentioned in the change log?

yep, sry.. v2 attached

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Arnaldo,
could you pull in this one?

ping, thanks

   9    11.28 android-ndk:r12b-arm          : FAIL arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10    15.53 android-ndk:r15c-arm          : FAIL arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)

LD /tmp/build/perf/libtraceevent-in.o

  MKDIR    /tmp/build/perf/util/
  LINK     /tmp/build/perf/libtraceevent.a
  CC       /tmp/build/perf/util/block-range.o
  MKDIR    /tmp/build/perf/arch/
  CC       /tmp/build/perf/arch/common.o
  LD       /tmp/build/perf/plugin_mac80211-in.o
  CC       /tmp/build/perf/plugin_sched_switch.o
  LD       /tmp/build/perf/plugin_sched_switch-in.o
  CC       /tmp/build/perf/plugin_function.o
  LD       /tmp/build/perf/plugin_function-in.o
  CC       /tmp/build/perf/plugin_xen.o
  MKDIR    /tmp/build/perf/arch/arm/util/
  CC       /tmp/build/perf/arch/arm/util/pmu.o
  LD       /tmp/build/perf/plugin_xen-in.o
  CC       /tmp/build/perf/plugin_scsi.o
  CC       /tmp/build/perf/plugin_cfg80211.o
  LD       /tmp/build/perf/plugin_scsi-in.o
  LD       /tmp/build/perf/plugin_cfg80211-in.o
  MKDIR    /tmp/build/perf/arch/arm/util/
  CC       /tmp/build/perf/arch/arm/util/auxtrace.o
  CC       /tmp/build/perf/arch/arm/util/cs-etm.o
  LINK     /tmp/build/perf/plugin_jbd2.so

/opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc /opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
Makefile:196: recipe for target '/tmp/build/perf/plugin_jbd2.so' failed
make[3]: *** [/tmp/build/perf/plugin_jbd2.so] Error 1
Makefile.perf:669: recipe for target 'libtraceevent_plugins' failed
make[2]: *** [libtraceevent_plugins] Error 2
make[2]: *** Waiting for unfinished jobs....

[root@seventh fedora]# cat /tmp/dm.log*/android*12* android-ndk:r12b-arm
Downloading http://192.168.86.9/perf/perf-4.20.0-rc3.tar.xz...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100 1423k 100 1423k 0 0 71.4M 0 --:--:-- --:--:-- --:--:-- 77.2M
e1326b0cc430443c4560ff3079c8c10159743ae5
Using built-in specs.
COLLECT_GCC=/opt/android-ndk-r12b//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
COLLECT_LTO_WRAPPER=/opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../libexec/gcc/arm-linux-androideabi/4.9.x/lto-wrapper
Target: arm-linux-androideabi
Configured with: /usr/local/google/buildbot/src/android/gcc/toolchain/build/../gcc/gcc-4.9/configure --prefix=/tmp/59719db9ae19ff43aef46bbcb79596b6 --target=arm-linux-androideabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/buildbot/tmp/build/toolchain/temp-install --with-mpfr=/buildbot/tmp/build/toolchain/temp-install --with-mpc=/buildbot/tmp/build/toolchain/temp-install --with-cloog=/buildbot/tmp/build/toolchain/temp-install --with-isl=/buildbot/tmp/build/toolchain/temp-install --with-ppl=/buildbot/tmp/build/toolchain/temp-install --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-bionic-libs --enable-libatomic-ifuncs=no --enable-initfini-array --disable-nls --prefix=/tmp/59719db9ae19ff43aef46bbcb79596b6 --with-sysroot=/tmp/59719db9ae19ff43aef46bbcb79596b6/sysroot --with-binutils-version=2.25 --with-mpfr-version=3.1.1 --with-mpc-version=1.0.1 --with-gmp-version=5.0.5 --with-gcc-version=4.9 --with-gdb-version=none --with-gxx-include-dir=/tmp/59719db9ae19ff43aef46bbcb79596b6/include/c++/4.9.x --with-bugurl=http://source.android.com/source/report-bugs.html --enable-languages=c,c++ --disable-bootstrap --enable-plugins --enable-libgomp --enable-gnu-indirect-function --disable-libsanitizer --enable-gold --enable-threads --enable-eh-frame-hdr-for-static --enable-graphite=yes --with-isl-version=0.11.1 --with-cloog-version=0.18.0 --with-arch=armv5te --program-transform-name='s&^&arm-linux-androideabi-&' --enable-gold=default Thread model: posix
gcc version 4.9.x 20150123 (prerelease) (GCC)
make: Entering directory '/git/linux/tools/perf'

Without it, so far:

   1    59.08 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2    68.75 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3    79.67 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4    48.69 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   5    46.89 alpine:3.8                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   6    46.46 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   7    38.46 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   8    44.69 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   9    41.88 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10    46.24 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  11    22.22 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  12    35.54 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)

- Arnaldo

#9 lore raw

PATCH v3 1/10 tools lib traceevent: Use LDFLAGS in the build commands

On Wed, Nov 28, 2018 at 10:56:41AM -0300, Arnaldo Carvalho de Melo wrote:

SNIP

Quoted 33 lines

LD /tmp/build/perf/libtraceevent-in.o

  MKDIR    /tmp/build/perf/util/
  LINK     /tmp/build/perf/libtraceevent.a
  CC       /tmp/build/perf/util/block-range.o
  MKDIR    /tmp/build/perf/arch/
  CC       /tmp/build/perf/arch/common.o
  LD       /tmp/build/perf/plugin_mac80211-in.o
  CC       /tmp/build/perf/plugin_sched_switch.o
  LD       /tmp/build/perf/plugin_sched_switch-in.o
  CC       /tmp/build/perf/plugin_function.o
  LD       /tmp/build/perf/plugin_function-in.o
  CC       /tmp/build/perf/plugin_xen.o
  MKDIR    /tmp/build/perf/arch/arm/util/
  CC       /tmp/build/perf/arch/arm/util/pmu.o
  LD       /tmp/build/perf/plugin_xen-in.o
  CC       /tmp/build/perf/plugin_scsi.o
  CC       /tmp/build/perf/plugin_cfg80211.o
  LD       /tmp/build/perf/plugin_scsi-in.o
  LD       /tmp/build/perf/plugin_cfg80211-in.o
  MKDIR    /tmp/build/perf/arch/arm/util/
  CC       /tmp/build/perf/arch/arm/util/auxtrace.o
  CC       /tmp/build/perf/arch/arm/util/cs-etm.o
  LINK     /tmp/build/perf/plugin_jbd2.so

/opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc /opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
Makefile:196: recipe for target '/tmp/build/perf/plugin_jbd2.so' failed
make[3]: *** [/tmp/build/perf/plugin_jbd2.so] Error 1
Makefile.perf:669: recipe for target 'libtraceevent_plugins' failed
make[2]: *** [libtraceevent_plugins] Error 2
make[2]: *** Waiting for unfinished jobs....

SNIP

Quoted 4 lines
   1    59.08 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2    68.75 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3    79.67 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4    48.69 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
Quoted 8 lines
   5    46.89 alpine:3.8                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   6    46.46 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   7    38.46 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   8    44.69 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   9    41.88 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10    46.24 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  11    22.22 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  12    35.54 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)

ok, I shouldn't have taken out the CFLAGS,
some build scripts depends on it already

attaching v2

thanks,
jirka

---
So user could specify outside LDFLAGS values.

Keeping the CFLAGS in there as well, so we don't break existing script.

Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +2 -2
index 67fe5d7ef190..941761d9923d 100644
@@ -177,7 +177,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 
@@ -196,7 +196,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) $(CFLAGS) -shared $(LDFLAGS) -nostartfiles -o $@ $^
 
 define make_version.h
   (echo '/* This file is automatically generated. Do not modify. */';		\
Signature · 1 line
2.17.2
maintainer Applied
#10 lore raw

Re: [PATCHv3 01/10] tools lib traceevent: Use LDFLAGS in the build commands

Em Wed, Dec 12, 2018 at 10:12:14AM +0100, Jiri Olsa escreveu:

Quoted 25 lines · Arnaldo Carvalho de Melo
Quoted 8 lines

/opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc /opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
Makefile:196: recipe for target '/tmp/build/perf/plugin_jbd2.so' failed
make[3]: *** [/tmp/build/perf/plugin_jbd2.so] Error 1
Makefile.perf:669: recipe for target 'libtraceevent_plugins' failed
make[2]: *** [libtraceevent_plugins] Error 2
make[2]: *** Waiting for unfinished jobs....

SNIP

Quoted 4 lines
   1    59.08 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2    68.75 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3    79.67 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4    48.69 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
Quoted 8 lines
   5    46.89 alpine:3.8                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   6    46.46 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   7    38.46 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   8    44.69 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   9    41.88 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10    46.24 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  11    22.22 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  12    35.54 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
Quoted 4 lines

ok, I shouldn't have taken out the CFLAGS,
some build scripts depends on it already

attaching v2

[acme@quaco arm]$ export PERF_TARBALL=http://192.168.124.1/perf/perf-4.20.0-rc3.tar.xz [acme@quaco arm]$ dm android-ndk:{r12b,r15c}-arm

   1    29.58 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   2    37.19 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)

[acme@quaco arm]$

Applied,

Thanks

- Arnaldo

#11 lore raw

[tip:perf/core] tools lib traceevent: Use LDFLAGS in the build commands

In reply to Jiri Olsa
tools lib traceevent: Use LDFLAGS in the build commands
Commit-ID:  41fa483aeee567cc34f9fc4c2e7035f2df25299d
Gitweb:     https://git.kernel.org/tip/41fa483aeee567cc34f9fc4c2e7035f2df25299d
Author:     Jiri Olsa <[email protected]>
AuthorDate: Wed, 12 Dec 2018 10:12:14 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 18 Dec 2018 12:23:57 -0300

tools lib traceevent: Use LDFLAGS in the build commands

So that the user can specify outside LDFLAGS values.

Keeping the CFLAGS in there as well, so we don't break existing scripts.

---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +2 -2
index 67fe5d7ef190..941761d9923d 100644
@@ -177,7 +177,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 
@@ -196,7 +196,7 @@ $(PLUGINS_IN): force
 	$(Q)$(MAKE) $(build)=$(plugin_obj)
 
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
-	$(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^
+	$(QUIET_LINK)$(CC) $(CFLAGS) -shared $(LDFLAGS) -nostartfiles -o $@ $^
 
 define make_version.h
   (echo '/* This file is automatically generated. Do not modify. */';		\
author reviewer
#12 lore raw

PATCH 2/10 tools perf: Pass build flags to traceevent build

In reply to Jiri Olsa

So the extra user build flags are propagated to libtraceevent.

Cc Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.perf +1 -1
index b3006e9666d0..b71e0b50c09f 100644
@@ -630,7 +630,7 @@ endif
 
 $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h)
 
-LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ)
+LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) 'EXTRA_CFLAGS=$(EXTRA_CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
 
 $(LIBTRACEEVENT): FORCE
 	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a
Signature · 1 line
2.17.2
#13 lore raw

[tip:perf/urgent] perf tools: Pass build flags to traceevent build

perf tools: Pass build flags to traceevent build
Commit-ID:  298faf53200fc02af38d32715697df6e661c1257
Gitweb:     https://git.kernel.org/tip/298faf53200fc02af38d32715697df6e661c1257
Author:     Jiri Olsa <[email protected]>
AuthorDate: Tue, 16 Oct 2018 17:06:07 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 16 Oct 2018 14:57:59 -0300

perf tools: Pass build flags to traceevent build

So the extra user build flags are propagated to libtraceevent.

Cc "Herton R. Krzesinski" <[email protected]>
Cc Steven Rostedt (VMware) <[email protected]>
Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Yordan Karadzhov (VMware) <[email protected]>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.perf +1 -1
index 5224ade3d5af..0be411695379 100644
@@ -635,7 +635,7 @@ $(LIBPERF_IN): prepare FORCE
 $(LIB_FILE): $(LIBPERF_IN)
 	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIBPERF_IN) $(LIB_OBJS)
 
-LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ)
+LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) 'EXTRA_CFLAGS=$(EXTRA_CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
 
 $(LIBTRACEEVENT): FORCE
 	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a
#14 lore raw

Re: [PATCH 02/10] tools perf: Pass build flags to traceevent build

In reply to Jiri Olsa

PING

Quoted 24 lines · Jiri Olsa

So the extra user build flags are propagated to libtraceevent.

Cc Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.perf +1 -1
index b3006e9666d0..b71e0b50c09f 100644
@@ -630,7 +630,7 @@ endif
 
 $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h)
 
-LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ)
+LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) 'EXTRA_CFLAGS=$(EXTRA_CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
 
 $(LIBTRACEEVENT): FORCE
 	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a
Signature · 1 line
2.17.2
author reviewer
#15 lore raw

PATCH 3/10 tools cpupower debug: Allow to use outside build flags

In reply to Jiri Olsa

Adding CFLAGS and LDFLAGS to be used during the build.

Cc Thomas Renninger <[email protected]>
Cc Shuah Khan <[email protected]>
---
 tools/power/cpupower/debug/x86_64/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/power/cpupower/debug/x86_64/Makefile +2 -2
index 59af84b8ef45..b1b6c43644e7 100644
@@ -13,10 +13,10 @@ INSTALL = /usr/bin/install
 default: all
 
 $(OUTPUT)centrino-decode: ../i386/centrino-decode.c
-	$(CC) $(CFLAGS) -o $@ $<
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
 
 $(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c
-	$(CC) $(CFLAGS) -o $@ $<
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
 
 all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
 
Signature · 1 line
2.17.2
author reviewer
#16 lore raw

PATCH 4/10 tools cpupower: Override CFLAGS assignments

In reply to Jiri Olsa

So user could specify outside CFLAGS values.

Cc Thomas Renninger <[email protected]>
Cc Shuah Khan <[email protected]>
---
 tools/power/cpupower/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
tools/power/cpupower/Makefile +6 -6
index 1dd5f4fcffd5..db66a952c173 100644
@@ -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 \
@@ -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)
@@ -175,7 +175,7 @@ ifeq ($(strip $(STATIC)),true)
         UTIL_SRC += $(LIB_SRC)
 endif
 
-CFLAGS += $(WARNINGS)
+override CFLAGS += $(WARNINGS)
 
 ifeq ($(strip $(V)),false)
 	QUIET=@
@@ -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
 
Signature · 1 line
2.17.2
author reviewer
#17 lore raw

PATCH 5/10 tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command

In reply to Jiri Olsa

So user could specify outside CFLAGS/LDFLAGS values.

Cc Signed-off-by: Len Brown <[email protected]>
---
 tools/power/x86/x86_energy_perf_policy/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/power/x86/x86_energy_perf_policy/Makefile +3 -3
index f4534fb8b951..ae7a0e09b722 100644
@@ -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 :
Signature · 1 line
2.17.2
#18 lore raw

Re: [PATCH 05/10] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command

ping

thanks,
jirka

Quoted 31 lines · Jiri Olsa

So user could specify outside CFLAGS/LDFLAGS values.

Cc Signed-off-by: Len Brown <[email protected]>
---
 tools/power/x86/x86_energy_perf_policy/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/power/x86/x86_energy_perf_policy/Makefile +3 -3
index f4534fb8b951..ae7a0e09b722 100644
@@ -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 :
Signature · 1 line
2.17.2
author reviewer
#19 lore raw

PATCH 6/10 tools thermal tmon: Override CFLAGS assignments

In reply to Jiri Olsa

So user could specify outside CFLAGS values.

Cc Zhang Rui <[email protected]>
Cc Markus Mayer <[email protected]>
---
 tools/thermal/tmon/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/thermal/tmon/Makefile +4 -4
index 735a510230c3..89a2444c1df2 100644
@@ -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
Signature · 1 line
2.17.2
#20 lore raw

Re: [PATCH 06/10] tools thermal tmon: Override CFLAGS assignments

ping

thanks,
jirka

Quoted 42 lines · Jiri Olsa

So user could specify outside CFLAGS values.

Cc Zhang Rui <[email protected]>
Cc Markus Mayer <[email protected]>
---
 tools/thermal/tmon/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/thermal/tmon/Makefile +4 -4
index 735a510230c3..89a2444c1df2 100644
@@ -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
Signature · 1 line
2.17.2
author reviewer
#21 lore raw

PATCH 7/10 tools thermal tmon: Use -O3 instead of -O1 if available

In reply to Jiri Olsa

Using -O3 instead of -O1 if it's supported by compiler.

Cc Zhang Rui <[email protected]>
Cc Markus Mayer <[email protected]>
---
 tools/thermal/tmon/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/thermal/tmon/Makefile +1 -1
index 89a2444c1df2..59e417ec3e13 100644
@@ -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
Signature · 1 line
2.17.2
author reviewer
#22 lore raw

PATCH 8/10 tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command

In reply to Jiri Olsa

So user could specify outside CFLAGS/LDFLAGS values.

---
 tools/power/x86/turbostat/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/power/x86/turbostat/Makefile +4 -4
index 2ab25aa38263..1598b4fa0b11 100644
@@ -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 :
Signature · 1 line
2.17.2
#23 lore raw

Re: [PATCH 08/10] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command

ping

thanks,
jirka

Quoted 33 lines · Jiri Olsa

So user could specify outside CFLAGS/LDFLAGS values.

---
 tools/power/x86/turbostat/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/power/x86/turbostat/Makefile +4 -4
index 2ab25aa38263..1598b4fa0b11 100644
@@ -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 :
Signature · 1 line
2.17.2
author reviewer
#24 lore raw

PATCH 9/10 tools iio: Override CFLAGS assignments

In reply to Jiri Olsa

So user could specify outside CFLAGS values.

Cc Jonathan Cameron <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
---
 tools/iio/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/iio/Makefile +1 -1
index 332ed2f6c2c2..e22378dba244 100644
@@ -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))
Signature · 1 line
2.17.2
maintainer
#25 lore raw

Re: [PATCH 09/10] tools iio: Override CFLAGS assignments

Quoted 1 line · On Tue, 16 Oct 2018 17:06:14 +0200 Jiri Olsa <[email protected]> wrote:

So user could specify outside CFLAGS values.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at them.

Thanks

Jonathan

Quoted 22 lines
Cc Jonathan Cameron <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
---
 tools/iio/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/iio/Makefile +1 -1
index 332ed2f6c2c2..e22378dba244 100644
@@ -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))
#26 lore raw

Re: [PATCH 09/10] tools iio: Override CFLAGS assignments

Quoted 6 lines · Jonathan Cameron
Quoted 1 line · On Tue, 16 Oct 2018 17:06:14 +0200 Jiri Olsa <[email protected]> wrote:

So user could specify outside CFLAGS values.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at them.

thanks,
jirka

Quoted 28 lines

Thanks

Jonathan

Quoted 22 lines
Cc Jonathan Cameron <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
---
 tools/iio/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/iio/Makefile +1 -1
index 332ed2f6c2c2..e22378dba244 100644
@@ -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))
#27 lore raw
In reply to Jiri Olsa
Quoted 7 lines · CEST Jiri Olsa

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.

Looks fine for the cpupower patches 3/10 and 4/10. (Feel free to add a Reviewed-by or Acked-by for them if you have to resend).

Thanks,

Thomas

maintainer Acked-by
#28 lore raw
Quoted 5 lines · Thomas Renninger
Quoted 4 lines · CEST Jiri Olsa

hi,
while hardening some of the tools rpm, we noticed we can't pass build flags to some of them.

Quoted 8 lines
Quoted 3 lines

Sending separate tools fixes for what we found. It's mostly override for CFLAGS and adding LDFLAGS to the build commands.

Looks fine for the cpupower patches 3/10 and 4/10. (Feel free to add a Reviewed-by or Acked-by for them if you have to resend).

Thanks Thomas.

Hi Jiri,

Same here for cpupower patches 3/10 and 4/10. Please let me know if you would like me to take these through the cpupower patch flow.

thanks,
-- Shuah

#29 lore raw
Quoted 15 lines · Shuah Khan
Quoted 5 lines · Thomas Renninger
Quoted 4 lines · CEST Jiri Olsa

hi,
while hardening some of the tools rpm, we noticed we can't pass build flags to some of them.

Quoted 8 lines
Quoted 3 lines

Sending separate tools fixes for what we found. It's mostly override for CFLAGS and adding LDFLAGS to the build commands.

Looks fine for the cpupower patches 3/10 and 4/10. (Feel free to add a Reviewed-by or Acked-by for them if you have to resend).

Quoted 6 lines

Thanks Thomas.

Hi Jiri,

Same here for cpupower patches 3/10 and 4/10. Please let me know if you would like me to take these through the cpupower patch flow.

that would be great, any idea about 5/10?:
tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS

it's power related and I haven't got any reply on that one

thanks,
jirka

maintainer
#30 lore raw
Quoted 20 lines · Jiri Olsa
Quoted 19 lines · Shuah Khan
Quoted 5 lines · Thomas Renninger
Quoted 4 lines · CEST Jiri Olsa

hi,
while hardening some of the tools rpm, we noticed we can't pass build flags to some of them.

Quoted 8 lines
Quoted 3 lines

Sending separate tools fixes for what we found. It's mostly override for CFLAGS and adding LDFLAGS to the build commands.

Looks fine for the cpupower patches 3/10 and 4/10. (Feel free to add a Reviewed-by or Acked-by for them if you have to resend).

Thanks Thomas.

Hi Jiri,

Quoted 7 lines
Quoted 2 lines

Same here for cpupower patches 3/10 and 4/10. Please let me know if you would like me to take these through the cpupower patch flow.

that would be great, any idea about 5/10?:
tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS

it's power related and I haven't got any reply on that one

Len Brown <[email protected]> seem to be the right contact? Len is on this thread. Adding Rafael as well. He might be able to help you with 5/10 that touches

tools power x86 x86_energy_perf_policy

thanks,
-- Shuah

maintainer
#31 lore raw
Quoted 17 lines · Shuah Khan
Quoted 16 lines · Jiri Olsa
Quoted 15 lines · Shuah Khan
Quoted 13 lines · Thomas Renninger
Quoted 7 lines · CEST Jiri Olsa

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.

Looks fine for the cpupower patches 3/10 and 4/10. (Feel free to add a Reviewed-by or Acked-by for them if you have to resend).

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

Thanks Thomas.

Hi Jiri,

Same here for cpupower patches 3/10 and 4/10. Please let me know if you would like me to take these through the cpupower patch flow.

that would be great, any idea about 5/10?:

3/10 and 4/10 are now in kernel/git/shuah/linux.git cpupower branch and will be included in my pull request for 4.20-rc1 or rc2 to Rafael.

thanks,
-- Shuah

#32 lore raw
Quoted 22 lines · Shuah Khan
Quoted 21 lines · Shuah Khan
Quoted 20 lines · Jiri Olsa
Quoted 19 lines · Shuah Khan
Quoted 5 lines · Thomas Renninger
Quoted 4 lines · CEST Jiri Olsa

hi,
while hardening some of the tools rpm, we noticed we can't pass build flags to some of them.

Quoted 8 lines
Quoted 3 lines

Sending separate tools fixes for what we found. It's mostly override for CFLAGS and adding LDFLAGS to the build commands.

Looks fine for the cpupower patches 3/10 and 4/10. (Feel free to add a Reviewed-by or Acked-by for them if you have to resend).

Thanks Thomas.

Hi Jiri,

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

Same here for cpupower patches 3/10 and 4/10. Please let me know if you would like me to take these through the cpupower patch flow.

that would be great, any idea about 5/10?:

3/10 and 4/10 are now in kernel/git/shuah/linux.git cpupower branch and will be included in my pull request for 4.20-rc1 or rc2 to Rafael.

cool, thanks

jirka

#33 lore raw

PATCH 10/10 tools gpio: Override CFLAGS assignments

In reply to Jiri Olsa
Quoted 24 lines · Jiri Olsa

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.

thanks,
jirka

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Len Brown <[email protected]>
Cc Markus Mayer <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Signed-off-by: Len Brown <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Zhang Rui <[email protected]>
Quoted 12 lines

---
Jiri Olsa (10):
tools lib traceevent: Use LDFLAGS in the build commands
tools perf: Pass build flags to traceevent build
tools cpupower debug: Allow to use outside build flags
tools cpupower: Override CFLAGS assignments
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

the last one did not get post for some reason, attaching it now

jirka

---
So user could specify outside CFLAGS values.

Cc Jonathan Cameron <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
---
 tools/gpio/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/gpio/Makefile +1 -1
index 240eda014b37..6ecdd1067826 100644
@@ -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))
Signature · 1 line
2.17.2
#34 lore raw

Re: [PATCH 10/10] tools gpio: Override CFLAGS assignments

ping

thanks,
jirka

Quoted 71 lines · Jiri Olsa
Quoted 24 lines · Jiri Olsa

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.

thanks,
jirka

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Len Brown <[email protected]>
Cc Markus Mayer <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Signed-off-by: Len Brown <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Tzvetomir Stoyanov (VMware) <[email protected]>
Cc Zhang Rui <[email protected]>
Quoted 12 lines

---
Jiri Olsa (10):
tools lib traceevent: Use LDFLAGS in the build commands
tools perf: Pass build flags to traceevent build
tools cpupower debug: Allow to use outside build flags
tools cpupower: Override CFLAGS assignments
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

the last one did not get post for some reason, attaching it now

jirka

---
So user could specify outside CFLAGS values.

Cc Jonathan Cameron <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
---
 tools/gpio/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/gpio/Makefile +1 -1
index 240eda014b37..6ecdd1067826 100644
@@ -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))
Signature · 1 line
2.17.2