tools: Various build flags fixes
v3 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.
Any additional reviews would be great.. ;-)
v3 changes:
- 4 more patches accepted, still 2 to go
- rebased on top of Arnaldo's perf/core
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_v3
thanks,
jirka
---
Jiri Olsa (2):
tools thermal tmon: Use -O3 instead of -O1 if available tools iio: Override CFLAGS assignments
tools/iio/Makefile | 2 +- tools/thermal/tmon/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
PATCH v3 1/2 tools thermal tmon: Use -O3 instead of -O1 if available
Using -O3 instead of -O1 if it's supported by compiler.
--- tools/thermal/tmon/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/thermal/tmon/Makefile +1 -1
@@ -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
tip-bot for Jiri Olsa
merge bot[tip:perf/urgent] tools thermal tmon: Use -O3 instead of -O1 if available
tools thermal tmon: Use -O3 instead of -O1 if available
Commit-ID: 302df34c4e64b9e83ee31cbf508b38b62b428bd6 Gitweb: https://git.kernel.org/tip/302df34c4e64b9e83ee31cbf508b38b62b428bd6 Author: Jiri Olsa <[email protected]> AuthorDate: Thu, 3 Jan 2019 17:13:49 +0100 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 4 Jan 2019 12:54:49 -0300
tools thermal tmon: Use -O3 instead of -O1 if available
Using -O3 instead of -O1 if it's supported by compiler.
--- tools/thermal/tmon/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/thermal/tmon/Makefile +1 -1
@@ -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
PATCH v3 2/2 tools iio: Override CFLAGS assignments
In reply to Jiri OlsaSo user could specify outside CFLAGS values.
--- tools/iio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/iio/Makefile +1 -1
@@ -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
tip-bot for Jiri Olsa
merge bot[tip:perf/urgent] tools iio: Override CFLAGS assignments
tools iio: Override CFLAGS assignments
Commit-ID: 536cdb684d2d5139708d290b9dc124b1420886c1 Gitweb: https://git.kernel.org/tip/536cdb684d2d5139708d290b9dc124b1420886c1 Author: Jiri Olsa <[email protected]> AuthorDate: Thu, 3 Jan 2019 17:13:50 +0100 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 4 Jan 2019 12:54:49 -0300
tools iio: Override CFLAGS assignments
So user could specify outside CFLAGS values.
--- tools/iio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/iio/Makefile +1 -1
@@ -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))