LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 00/10] tools: Various build flags fixes
@ 2018-10-16 15:06 Jiri Olsa
2018-10-16 15:06 ` [PATCH 01/10] tools lib traceevent: Use LDFLAGS in the build commands Jiri Olsa
` (10 more replies)
0 siblings, 11 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml
Cc: Arnaldo Carvalho de Melo, Hartmut Knaack, Jonathan Cameron,
Lars-Peter Clausen, Len Brown, Markus Mayer, Shuah Khan,
Steven Rostedt, Thomas Renninger, Tzvetomir Stoyanov, 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.
thanks,
jirka
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
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: Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Renninger <trenn@suse.com>
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
---
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(-)
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-16 15:21 ` Steven Rostedt
2018-10-16 15:06 ` [PATCH 02/10] tools perf: Pass build flags to traceevent build Jiri Olsa
` (9 subsequent siblings)
10 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml; +Cc: Tzvetomir Stoyanov, Steven Rostedt, Herton R. Krzesinski
So user could specify outside LDFLAGS values.
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/lib/traceevent/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 0b4e833088a4..e535073c94ce 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -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. */'; \
--
2.17.2
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 02/10] tools perf: Pass build flags to traceevent build
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
2018-10-16 15:06 ` [PATCH 01/10] tools lib traceevent: Use LDFLAGS in the build commands Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-18 6:20 ` [tip:perf/urgent] perf tools: " tip-bot for Jiri Olsa
2018-10-30 9:25 ` [PATCH 02/10] tools perf: " Jiri Olsa
2018-10-16 15:06 ` [PATCH 03/10] tools cpupower debug: Allow to use outside build flags Jiri Olsa
` (8 subsequent siblings)
10 siblings, 2 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml; +Cc: Arnaldo Carvalho de Melo, Herton R. Krzesinski
So the extra user build flags are propagated to libtraceevent.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index b3006e9666d0..b71e0b50c09f 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -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
--
2.17.2
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 03/10] tools cpupower debug: Allow to use outside build flags
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
2018-10-16 15:06 ` [PATCH 01/10] tools lib traceevent: Use LDFLAGS in the build commands Jiri Olsa
2018-10-16 15:06 ` [PATCH 02/10] tools perf: Pass build flags to traceevent build Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 04/10] tools cpupower: Override CFLAGS assignments Jiri Olsa
` (7 subsequent siblings)
10 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml; +Cc: Thomas Renninger, Shuah Khan, Herton R. Krzesinski
Adding CFLAGS and LDFLAGS to be used during the build.
Cc: Thomas Renninger <trenn@suse.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/power/cpupower/debug/x86_64/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/power/cpupower/debug/x86_64/Makefile b/tools/power/cpupower/debug/x86_64/Makefile
index 59af84b8ef45..b1b6c43644e7 100644
--- a/tools/power/cpupower/debug/x86_64/Makefile
+++ b/tools/power/cpupower/debug/x86_64/Makefile
@@ -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
--
2.17.2
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 04/10] tools cpupower: Override CFLAGS assignments
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
` (2 preceding siblings ...)
2018-10-16 15:06 ` [PATCH 03/10] tools cpupower debug: Allow to use outside build flags Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 05/10] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
` (6 subsequent siblings)
10 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml; +Cc: Thomas Renninger, Shuah Khan, Herton R. Krzesinski
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>
---
tools/power/cpupower/Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index 1dd5f4fcffd5..db66a952c173 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -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
--
2.17.2
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 05/10] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
` (3 preceding siblings ...)
2018-10-16 15:06 ` [PATCH 04/10] tools cpupower: Override CFLAGS assignments Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-30 9:27 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 06/10] tools thermal tmon: Override CFLAGS assignments Jiri Olsa
` (5 subsequent siblings)
10 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml; +Cc: Signed-off-by : Len Brown, Herton R. Krzesinski
So user could specify outside CFLAGS/LDFLAGS values.
Cc: Signed-off-by: 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 [flat|nested] 35+ messages in thread
* [PATCH 06/10] tools thermal tmon: Override CFLAGS assignments
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
` (4 preceding siblings ...)
2018-10-16 15:06 ` [PATCH 05/10] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-30 9:27 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 07/10] tools thermal tmon: Use -O3 instead of -O1 if available Jiri Olsa
` (4 subsequent siblings)
10 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml; +Cc: Zhang Rui, Markus Mayer, Herton R. Krzesinski
So user could specify outside CFLAGS values.
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 [flat|nested] 35+ messages in thread
* [PATCH 07/10] tools thermal tmon: Use -O3 instead of -O1 if available
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
` (5 preceding siblings ...)
2018-10-16 15:06 ` [PATCH 06/10] tools thermal tmon: Override CFLAGS assignments Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 08/10] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
` (3 subsequent siblings)
10 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml; +Cc: Zhang Rui, Markus Mayer, Herton R. Krzesinski
Using -O3 instead of -O1 if it's supported by compiler.
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 [flat|nested] 35+ messages in thread
* [PATCH 08/10] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
` (6 preceding siblings ...)
2018-10-16 15:06 ` [PATCH 07/10] tools thermal tmon: Use -O3 instead of -O1 if available Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-30 9:27 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 09/10] tools iio: Override CFLAGS assignments Jiri Olsa
` (2 subsequent siblings)
10 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 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/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 [flat|nested] 35+ messages in thread
* [PATCH 09/10] tools iio: Override CFLAGS assignments
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
` (7 preceding siblings ...)
2018-10-16 15:06 ` [PATCH 08/10] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
@ 2018-10-16 15:06 ` Jiri Olsa
2018-10-21 12:26 ` Jonathan Cameron
2018-10-17 13:23 ` [PATCH 00/10] tools: Various build flags fixes Thomas Renninger
2018-10-22 14:50 ` [PATCH 10/10] tools gpio: Override CFLAGS assignments Jiri Olsa
10 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:06 UTC (permalink / raw)
To: lkml
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Herton R. Krzesinski
So user could specify outside CFLAGS values.
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 [flat|nested] 35+ messages in thread
* Re: [PATCH 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-10-16 15:06 ` [PATCH 01/10] tools lib traceevent: Use LDFLAGS in the build commands Jiri Olsa
@ 2018-10-16 15:21 ` Steven Rostedt
2018-10-16 15:45 ` [PATCHv2 " Jiri Olsa
0 siblings, 1 reply; 35+ messages in thread
From: Steven Rostedt @ 2018-10-16 15:21 UTC (permalink / raw)
To: Jiri Olsa; +Cc: lkml, Tzvetomir Stoyanov, Herton R. Krzesinski
On Tue, 16 Oct 2018 17:06:06 +0200
Jiri Olsa <jolsa@kernel.org> wrote:
> So user could specify outside LDFLAGS values.
>
> Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/lib/traceevent/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> index 0b4e833088a4..e535073c94ce 100644
> --- a/tools/lib/traceevent/Makefile
> +++ b/tools/lib/traceevent/Makefile
> @@ -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 $@ $^
I'm guessing that the CFLAGS are not needed here, but shouldn't that
also be mentioned in the change log?
-- Steve
>
> define make_version.h
> (echo '/* This file is automatically generated. Do not modify. */'; \
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-10-16 15:21 ` Steven Rostedt
@ 2018-10-16 15:45 ` Jiri Olsa
2018-10-17 14:23 ` Steven Rostedt
0 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-10-16 15:45 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Jiri Olsa, lkml, Tzvetomir Stoyanov, Herton R. Krzesinski
On Tue, Oct 16, 2018 at 11:21:36AM -0400, Steven Rostedt wrote:
> On Tue, 16 Oct 2018 17:06:06 +0200
> Jiri Olsa <jolsa@kernel.org> wrote:
>
> > So user could specify outside LDFLAGS values.
> >
> > Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> > tools/lib/traceevent/Makefile | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> > index 0b4e833088a4..e535073c94ce 100644
> > --- a/tools/lib/traceevent/Makefile
> > +++ b/tools/lib/traceevent/Makefile
> > @@ -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 $@ $^
>
>
> 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) <tz.stoyanov@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/lib/traceevent/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 0b4e833088a4..e535073c94ce 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -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. */'; \
--
2.17.2
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/10] tools: Various build flags fixes
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
` (8 preceding siblings ...)
2018-10-16 15:06 ` [PATCH 09/10] tools iio: Override CFLAGS assignments Jiri Olsa
@ 2018-10-17 13:23 ` Thomas Renninger
2018-10-17 15:28 ` Shuah Khan
2018-10-22 14:50 ` [PATCH 10/10] tools gpio: Override CFLAGS assignments Jiri Olsa
10 siblings, 1 reply; 35+ messages in thread
From: Thomas Renninger @ 2018-10-17 13:23 UTC (permalink / raw)
To: Jiri Olsa
Cc: lkml, Markus Mayer, Tzvetomir Stoyanov, Hartmut Knaack,
Steven Rostedt, Len Brown, Zhang Rui, Jonathan Cameron,
Shuah Khan, Lars-Peter Clausen, Arnaldo Carvalho de Melo,
Herton R. Krzesinski
On Tuesday, October 16, 2018 5:06:05 PM CEST Jiri Olsa wrote:
> 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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-10-16 15:45 ` [PATCHv2 " Jiri Olsa
@ 2018-10-17 14:23 ` Steven Rostedt
2018-11-16 13:01 ` Jiri Olsa
0 siblings, 1 reply; 35+ messages in thread
From: Steven Rostedt @ 2018-10-17 14:23 UTC (permalink / raw)
To: Jiri Olsa; +Cc: Jiri Olsa, lkml, Tzvetomir Stoyanov, Herton R. Krzesinski
On Tue, 16 Oct 2018 17:45:26 +0200
Jiri Olsa <jolsa@redhat.com> wrote:
> On Tue, Oct 16, 2018 at 11:21:36AM -0400, Steven Rostedt wrote:
> > On Tue, 16 Oct 2018 17:06:06 +0200
> > Jiri Olsa <jolsa@kernel.org> wrote:
> >
> > > So user could specify outside LDFLAGS values.
> > >
> > > Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> > > Cc: Steven Rostedt <rostedt@goodmis.org>
> > > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > > ---
> > > tools/lib/traceevent/Makefile | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> > > index 0b4e833088a4..e535073c94ce 100644
> > > --- a/tools/lib/traceevent/Makefile
> > > +++ b/tools/lib/traceevent/Makefile
> > > @@ -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 $@ $^
> >
> >
> > 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
>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/10] tools: Various build flags fixes
2018-10-17 13:23 ` [PATCH 00/10] tools: Various build flags fixes Thomas Renninger
@ 2018-10-17 15:28 ` Shuah Khan
2018-10-22 8:51 ` Jiri Olsa
0 siblings, 1 reply; 35+ messages in thread
From: Shuah Khan @ 2018-10-17 15:28 UTC (permalink / raw)
To: Jiri Olsa
Cc: Thomas Renninger, lkml, Markus Mayer, Tzvetomir Stoyanov,
Hartmut Knaack, Steven Rostedt, Len Brown, Zhang Rui,
Jonathan Cameron, Lars-Peter Clausen, Arnaldo Carvalho de Melo,
Herton R. Krzesinski, Shuah Khan
On 10/17/2018 07:23 AM, Thomas Renninger wrote:
> On Tuesday, October 16, 2018 5:06:05 PM CEST Jiri Olsa wrote:
>> 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.
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.
Acked-by: Shuah Khan <shuah@kernel.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 35+ messages in thread
* [tip:perf/urgent] perf tools: Pass build flags to traceevent build
2018-10-16 15:06 ` [PATCH 02/10] tools perf: Pass build flags to traceevent build Jiri Olsa
@ 2018-10-18 6:20 ` tip-bot for Jiri Olsa
2018-10-30 9:25 ` [PATCH 02/10] tools perf: " Jiri Olsa
1 sibling, 0 replies; 35+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-10-18 6:20 UTC (permalink / raw)
To: linux-tip-commits
Cc: rostedt, acme, mingo, tglx, jolsa, linux-kernel, herton,
tz.stoyanov, y.karadz, hpa
Commit-ID: 298faf53200fc02af38d32715697df6e661c1257
Gitweb: https://git.kernel.org/tip/298faf53200fc02af38d32715697df6e661c1257
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Tue, 16 Oct 2018 17:06:07 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
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.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: "Herton R. Krzesinski" <herton@redhat.com>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Link: http://lkml.kernel.org/r/20181016150614.21260-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 5224ade3d5af..0be411695379 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 09/10] tools iio: Override CFLAGS assignments
2018-10-16 15:06 ` [PATCH 09/10] tools iio: Override CFLAGS assignments Jiri Olsa
@ 2018-10-21 12:26 ` Jonathan Cameron
2018-10-22 8:53 ` Jiri Olsa
0 siblings, 1 reply; 35+ messages in thread
From: Jonathan Cameron @ 2018-10-21 12:26 UTC (permalink / raw)
To: Jiri Olsa
Cc: lkml, Hartmut Knaack, Lars-Peter Clausen, Herton R. Krzesinski,
linux-iio
On Tue, 16 Oct 2018 17:06:14 +0200
Jiri Olsa <jolsa@kernel.org> 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
>
> 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))
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/10] tools: Various build flags fixes
2018-10-17 15:28 ` Shuah Khan
@ 2018-10-22 8:51 ` Jiri Olsa
2018-10-23 15:17 ` Shuah Khan
0 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-10-22 8:51 UTC (permalink / raw)
To: Shuah Khan
Cc: Jiri Olsa, Thomas Renninger, lkml, Markus Mayer,
Tzvetomir Stoyanov, Hartmut Knaack, Steven Rostedt, Len Brown,
Zhang Rui, Jonathan Cameron, Lars-Peter Clausen,
Arnaldo Carvalho de Melo, Herton R. Krzesinski
On Wed, Oct 17, 2018 at 09:28:16AM -0600, Shuah Khan wrote:
> On 10/17/2018 07:23 AM, Thomas Renninger wrote:
> > On Tuesday, October 16, 2018 5:06:05 PM CEST Jiri Olsa wrote:
> >> 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.
>
> 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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 09/10] tools iio: Override CFLAGS assignments
2018-10-21 12:26 ` Jonathan Cameron
@ 2018-10-22 8:53 ` Jiri Olsa
0 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-22 8:53 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Jiri Olsa, lkml, Hartmut Knaack, Lars-Peter Clausen,
Herton R. Krzesinski, linux-iio
On Sun, Oct 21, 2018 at 01:26:34PM +0100, Jonathan Cameron wrote:
> On Tue, 16 Oct 2018 17:06:14 +0200
> Jiri Olsa <jolsa@kernel.org> 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
>
> Thanks
>
> Jonathan
>
> >
> > 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))
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 10/10] tools gpio: Override CFLAGS assignments
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
` (9 preceding siblings ...)
2018-10-17 13:23 ` [PATCH 00/10] tools: Various build flags fixes Thomas Renninger
@ 2018-10-22 14:50 ` Jiri Olsa
2018-10-30 9:34 ` Jiri Olsa
10 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-10-22 14:50 UTC (permalink / raw)
To: Jiri Olsa
Cc: lkml, Arnaldo Carvalho de Melo, Hartmut Knaack, Jonathan Cameron,
Lars-Peter Clausen, Len Brown, Markus Mayer, Shuah Khan,
Steven Rostedt, Thomas Renninger, Tzvetomir Stoyanov, Zhang Rui,
Herton R. Krzesinski
On Tue, Oct 16, 2018 at 05:06:05PM +0200, Jiri Olsa wrote:
> 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 <acme@redhat.com>
> 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: Signed-off-by: Len Brown <len.brown@intel.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Thomas Renninger <trenn@suse.com>
> Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> ---
> 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 <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 [flat|nested] 35+ messages in thread
* Re: [PATCH 00/10] tools: Various build flags fixes
2018-10-22 8:51 ` Jiri Olsa
@ 2018-10-23 15:17 ` Shuah Khan
2018-10-23 16:53 ` Shuah Khan
0 siblings, 1 reply; 35+ messages in thread
From: Shuah Khan @ 2018-10-23 15:17 UTC (permalink / raw)
To: Jiri Olsa, Len Brown, Rafael J. Wysocki
Cc: Jiri Olsa, Thomas Renninger, lkml, Markus Mayer,
Tzvetomir Stoyanov, Hartmut Knaack, Steven Rostedt, Zhang Rui,
Jonathan Cameron, Lars-Peter Clausen, Arnaldo Carvalho de Melo,
Herton R. Krzesinski, Shuah Khan
On 10/22/2018 02:51 AM, Jiri Olsa wrote:
> On Wed, Oct 17, 2018 at 09:28:16AM -0600, Shuah Khan wrote:
>> On 10/17/2018 07:23 AM, Thomas Renninger wrote:
>>> On Tuesday, October 16, 2018 5:06:05 PM CEST Jiri Olsa wrote:
>>>> 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.
>>
>> 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
Len Brown <len.brown@intel.com> 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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/10] tools: Various build flags fixes
2018-10-23 15:17 ` Shuah Khan
@ 2018-10-23 16:53 ` Shuah Khan
2018-10-23 17:21 ` Jiri Olsa
0 siblings, 1 reply; 35+ messages in thread
From: Shuah Khan @ 2018-10-23 16:53 UTC (permalink / raw)
To: Jiri Olsa, Len Brown, Rafael J. Wysocki
Cc: Jiri Olsa, Thomas Renninger, lkml, Markus Mayer,
Tzvetomir Stoyanov, Hartmut Knaack, Steven Rostedt, Zhang Rui,
Jonathan Cameron, Lars-Peter Clausen, Arnaldo Carvalho de Melo,
Herton R. Krzesinski, Shuah Khan
On 10/23/2018 09:17 AM, Shuah Khan wrote:
> On 10/22/2018 02:51 AM, Jiri Olsa wrote:
>> On Wed, Oct 17, 2018 at 09:28:16AM -0600, Shuah Khan wrote:
>>> On 10/17/2018 07:23 AM, Thomas Renninger wrote:
>>>> On Tuesday, October 16, 2018 5:06:05 PM CEST Jiri Olsa wrote:
>>>>> 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.
>>>
>>> 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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 00/10] tools: Various build flags fixes
2018-10-23 16:53 ` Shuah Khan
@ 2018-10-23 17:21 ` Jiri Olsa
0 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-23 17:21 UTC (permalink / raw)
To: Shuah Khan
Cc: Len Brown, Rafael J. Wysocki, Jiri Olsa, Thomas Renninger, lkml,
Markus Mayer, Tzvetomir Stoyanov, Hartmut Knaack, Steven Rostedt,
Zhang Rui, Jonathan Cameron, Lars-Peter Clausen,
Arnaldo Carvalho de Melo, Herton R. Krzesinski
On Tue, Oct 23, 2018 at 10:53:42AM -0600, Shuah Khan wrote:
> On 10/23/2018 09:17 AM, Shuah Khan wrote:
> > On 10/22/2018 02:51 AM, Jiri Olsa wrote:
> >> On Wed, Oct 17, 2018 at 09:28:16AM -0600, Shuah Khan wrote:
> >>> On 10/17/2018 07:23 AM, Thomas Renninger wrote:
> >>>> On Tuesday, October 16, 2018 5:06:05 PM CEST Jiri Olsa wrote:
> >>>>> 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.
> >>>
> >>> 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.
cool, thanks
jirka
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 02/10] tools perf: Pass build flags to traceevent build
2018-10-16 15:06 ` [PATCH 02/10] tools perf: Pass build flags to traceevent build Jiri Olsa
2018-10-18 6:20 ` [tip:perf/urgent] perf tools: " tip-bot for Jiri Olsa
@ 2018-10-30 9:25 ` Jiri Olsa
1 sibling, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-30 9:25 UTC (permalink / raw)
To: Jiri Olsa; +Cc: lkml, Arnaldo Carvalho de Melo, Herton R. Krzesinski
PING
On Tue, Oct 16, 2018 at 05:06:07PM +0200, Jiri Olsa wrote:
> So the extra user build flags are propagated to libtraceevent.
>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/perf/Makefile.perf | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index b3006e9666d0..b71e0b50c09f 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -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
> --
> 2.17.2
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 05/10] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command
2018-10-16 15:06 ` [PATCH 05/10] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
@ 2018-10-30 9:27 ` Jiri Olsa
0 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-30 9:27 UTC (permalink / raw)
To: Jiri Olsa; +Cc: lkml, Signed-off-by : Len Brown, Herton R. Krzesinski
ping
thanks,
jirka
On Tue, Oct 16, 2018 at 05:06:10PM +0200, Jiri Olsa wrote:
> So user could specify outside CFLAGS/LDFLAGS values.
>
> Cc: Signed-off-by: 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 [flat|nested] 35+ messages in thread
* Re: [PATCH 06/10] tools thermal tmon: Override CFLAGS assignments
2018-10-16 15:06 ` [PATCH 06/10] tools thermal tmon: Override CFLAGS assignments Jiri Olsa
@ 2018-10-30 9:27 ` Jiri Olsa
0 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-30 9:27 UTC (permalink / raw)
To: Jiri Olsa; +Cc: lkml, Zhang Rui, Markus Mayer, Herton R. Krzesinski
ping
thanks,
jirka
On Tue, Oct 16, 2018 at 05:06:11PM +0200, Jiri Olsa wrote:
> So user could specify outside CFLAGS values.
>
> 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 [flat|nested] 35+ messages in thread
* Re: [PATCH 08/10] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command
2018-10-16 15:06 ` [PATCH 08/10] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
@ 2018-10-30 9:27 ` Jiri Olsa
0 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-30 9:27 UTC (permalink / raw)
To: Jiri Olsa; +Cc: lkml, Len Brown, Herton R. Krzesinski
ping
thanks,
jirka
On Tue, Oct 16, 2018 at 05:06:13PM +0200, Jiri Olsa wrote:
> 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/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 [flat|nested] 35+ messages in thread
* Re: [PATCH 10/10] tools gpio: Override CFLAGS assignments
2018-10-22 14:50 ` [PATCH 10/10] tools gpio: Override CFLAGS assignments Jiri Olsa
@ 2018-10-30 9:34 ` Jiri Olsa
0 siblings, 0 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-10-30 9:34 UTC (permalink / raw)
To: Jiri Olsa
Cc: lkml, Arnaldo Carvalho de Melo, Hartmut Knaack, Jonathan Cameron,
Lars-Peter Clausen, Len Brown, Markus Mayer, Shuah Khan,
Steven Rostedt, Thomas Renninger, Tzvetomir Stoyanov, Zhang Rui,
Herton R. Krzesinski
ping
thanks,
jirka
On Mon, Oct 22, 2018 at 04:50:07PM +0200, Jiri Olsa wrote:
> On Tue, Oct 16, 2018 at 05:06:05PM +0200, Jiri Olsa wrote:
> > 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 <acme@redhat.com>
> > 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: Signed-off-by: Len Brown <len.brown@intel.com>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Cc: Thomas Renninger <trenn@suse.com>
> > Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > ---
> > 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 <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 [flat|nested] 35+ messages in thread
* Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-10-17 14:23 ` Steven Rostedt
@ 2018-11-16 13:01 ` Jiri Olsa
2018-11-22 9:30 ` Jiri Olsa
0 siblings, 1 reply; 35+ messages in thread
From: Jiri Olsa @ 2018-11-16 13:01 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Jiri Olsa, lkml, Tzvetomir Stoyanov, Herton R. Krzesinski
On Wed, Oct 17, 2018 at 10:23:41AM -0400, Steven Rostedt wrote:
> On Tue, 16 Oct 2018 17:45:26 +0200
> Jiri Olsa <jolsa@redhat.com> wrote:
>
> > On Tue, Oct 16, 2018 at 11:21:36AM -0400, Steven Rostedt wrote:
> > > On Tue, 16 Oct 2018 17:06:06 +0200
> > > Jiri Olsa <jolsa@kernel.org> wrote:
> > >
> > > > So user could specify outside LDFLAGS values.
> > > >
> > > > Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> > > > Cc: Steven Rostedt <rostedt@goodmis.org>
> > > > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > > > ---
> > > > tools/lib/traceevent/Makefile | 4 ++--
> > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> > > > index 0b4e833088a4..e535073c94ce 100644
> > > > --- a/tools/lib/traceevent/Makefile
> > > > +++ b/tools/lib/traceevent/Makefile
> > > > @@ -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 $@ $^
> > >
> > >
> > > 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
> >
>
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Arnaldo,
could you pull in this one?
thanks,
jirka
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-11-16 13:01 ` Jiri Olsa
@ 2018-11-22 9:30 ` Jiri Olsa
2018-11-26 18:40 ` Arnaldo Carvalho de Melo
2018-11-28 13:56 ` Arnaldo Carvalho de Melo
0 siblings, 2 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-11-22 9:30 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Jiri Olsa, lkml, Tzvetomir Stoyanov, Herton R. Krzesinski
On Fri, Nov 16, 2018 at 02:01:58PM +0100, Jiri Olsa wrote:
> On Wed, Oct 17, 2018 at 10:23:41AM -0400, Steven Rostedt wrote:
> > On Tue, 16 Oct 2018 17:45:26 +0200
> > Jiri Olsa <jolsa@redhat.com> wrote:
> >
> > > On Tue, Oct 16, 2018 at 11:21:36AM -0400, Steven Rostedt wrote:
> > > > On Tue, 16 Oct 2018 17:06:06 +0200
> > > > Jiri Olsa <jolsa@kernel.org> wrote:
> > > >
> > > > > So user could specify outside LDFLAGS values.
> > > > >
> > > > > Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> > > > > Cc: Steven Rostedt <rostedt@goodmis.org>
> > > > > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > > > > ---
> > > > > tools/lib/traceevent/Makefile | 4 ++--
> > > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> > > > > index 0b4e833088a4..e535073c94ce 100644
> > > > > --- a/tools/lib/traceevent/Makefile
> > > > > +++ b/tools/lib/traceevent/Makefile
> > > > > @@ -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 $@ $^
> > > >
> > > >
> > > > 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
> > >
> >
> > Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> Arnaldo,
> could you pull in this one?
ping, thanks
jirka
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-11-22 9:30 ` Jiri Olsa
@ 2018-11-26 18:40 ` Arnaldo Carvalho de Melo
2018-11-28 13:56 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 35+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-11-26 18:40 UTC (permalink / raw)
To: Jiri Olsa
Cc: Steven Rostedt, Jiri Olsa, lkml, Tzvetomir Stoyanov,
Herton R. Krzesinski
Em Thu, Nov 22, 2018 at 10:30:06AM +0100, Jiri Olsa escreveu:
> On Fri, Nov 16, 2018 at 02:01:58PM +0100, Jiri Olsa wrote:
> > On Wed, Oct 17, 2018 at 10:23:41AM -0400, Steven Rostedt wrote:
> > > On Tue, 16 Oct 2018 17:45:26 +0200
> > > Jiri Olsa <jolsa@redhat.com> wrote:
> > > > On Tue, Oct 16, 2018 at 11:21:36AM -0400, Steven Rostedt wrote:
> > > > > 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
> > > Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> > Arnaldo,
> > could you pull in this one?
> ping, thanks
Applied, thanks,
- Arnaldo
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCHv2 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-11-22 9:30 ` Jiri Olsa
2018-11-26 18:40 ` Arnaldo Carvalho de Melo
@ 2018-11-28 13:56 ` Arnaldo Carvalho de Melo
2018-12-12 9:12 ` [PATCHv3 " Jiri Olsa
1 sibling, 1 reply; 35+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-11-28 13:56 UTC (permalink / raw)
To: Jiri Olsa
Cc: Steven Rostedt, Jiri Olsa, lkml, Tzvetomir Stoyanov,
Herton R. Krzesinski
Em Thu, Nov 22, 2018 at 10:30:06AM +0100, Jiri Olsa escreveu:
> On Fri, Nov 16, 2018 at 02:01:58PM +0100, Jiri Olsa wrote:
> > On Wed, Oct 17, 2018 at 10:23:41AM -0400, Steven Rostedt wrote:
> > > On Tue, 16 Oct 2018 17:45:26 +0200
> > > Jiri Olsa <jolsa@redhat.com> wrote:
> > >
> > > > On Tue, Oct 16, 2018 at 11:21:36AM -0400, Steven Rostedt wrote:
> > > > > On Tue, 16 Oct 2018 17:06:06 +0200
> > > > > Jiri Olsa <jolsa@kernel.org> wrote:
> > > > >
> > > > > > So user could specify outside LDFLAGS values.
> > > > > >
> > > > > > Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> > > > > > Cc: Steven Rostedt <rostedt@goodmis.org>
> > > > > > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > > > > > ---
> > > > > > tools/lib/traceevent/Makefile | 4 ++--
> > > > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > >
> > > > > > diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> > > > > > index 0b4e833088a4..e535073c94ce 100644
> > > > > > --- a/tools/lib/traceevent/Makefile
> > > > > > +++ b/tools/lib/traceevent/Makefile
> > > > > > @@ -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 $@ $^
> > > > >
> > > > >
> > > > > 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
> > > >
> > >
> > > Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> >
> > 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
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCHv3 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-11-28 13:56 ` Arnaldo Carvalho de Melo
@ 2018-12-12 9:12 ` Jiri Olsa
2018-12-12 12:41 ` Arnaldo Carvalho de Melo
2018-12-20 18:07 ` [tip:perf/core] " tip-bot for Jiri Olsa
0 siblings, 2 replies; 35+ messages in thread
From: Jiri Olsa @ 2018-12-12 9:12 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Steven Rostedt, Jiri Olsa, lkml, Tzvetomir Stoyanov,
Herton R. Krzesinski
On Wed, Nov 28, 2018 at 10:56:41AM -0300, Arnaldo Carvalho de Melo wrote:
SNIP
> 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
> 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)
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) <tz.stoyanov@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/lib/traceevent/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 67fe5d7ef190..941761d9923d 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -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. */'; \
--
2.17.2
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCHv3 01/10] tools lib traceevent: Use LDFLAGS in the build commands
2018-12-12 9:12 ` [PATCHv3 " Jiri Olsa
@ 2018-12-12 12:41 ` Arnaldo Carvalho de Melo
2018-12-20 18:07 ` [tip:perf/core] " tip-bot for Jiri Olsa
1 sibling, 0 replies; 35+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-12-12 12:41 UTC (permalink / raw)
To: Jiri Olsa
Cc: Steven Rostedt, Jiri Olsa, lkml, Tzvetomir Stoyanov,
Herton R. Krzesinski
Em Wed, Dec 12, 2018 at 10:12:14AM +0100, Jiri Olsa escreveu:
> On Wed, Nov 28, 2018 at 10:56:41AM -0300, Arnaldo Carvalho de Melo wrote:
> > /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
>
> > 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)
> 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
^ permalink raw reply [flat|nested] 35+ messages in thread
* [tip:perf/core] tools lib traceevent: Use LDFLAGS in the build commands
2018-12-12 9:12 ` [PATCHv3 " Jiri Olsa
2018-12-12 12:41 ` Arnaldo Carvalho de Melo
@ 2018-12-20 18:07 ` tip-bot for Jiri Olsa
1 sibling, 0 replies; 35+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-12-20 18:07 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, tz.stoyanov, herton, tglx, acme, jolsa, hpa, jolsa,
linux-kernel, rostedt
Commit-ID: 41fa483aeee567cc34f9fc4c2e7035f2df25299d
Gitweb: https://git.kernel.org/tip/41fa483aeee567cc34f9fc4c2e7035f2df25299d
Author: Jiri Olsa <jolsa@redhat.com>
AuthorDate: Wed, 12 Dec 2018 10:12:14 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
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.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Herton Krzesinski <herton@redhat.com>
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Link: http://lkml.kernel.org/r/20181212091214.GC17489@krava
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/lib/traceevent/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 67fe5d7ef190..941761d9923d 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -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. */'; \
^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2018-12-20 18:07 UTC | newest]
Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 15:06 [PATCH 00/10] tools: Various build flags fixes Jiri Olsa
2018-10-16 15:06 ` [PATCH 01/10] tools lib traceevent: Use LDFLAGS in the build commands Jiri Olsa
2018-10-16 15:21 ` Steven Rostedt
2018-10-16 15:45 ` [PATCHv2 " Jiri Olsa
2018-10-17 14:23 ` Steven Rostedt
2018-11-16 13:01 ` Jiri Olsa
2018-11-22 9:30 ` Jiri Olsa
2018-11-26 18:40 ` Arnaldo Carvalho de Melo
2018-11-28 13:56 ` Arnaldo Carvalho de Melo
2018-12-12 9:12 ` [PATCHv3 " Jiri Olsa
2018-12-12 12:41 ` Arnaldo Carvalho de Melo
2018-12-20 18:07 ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-10-16 15:06 ` [PATCH 02/10] tools perf: Pass build flags to traceevent build Jiri Olsa
2018-10-18 6:20 ` [tip:perf/urgent] perf tools: " tip-bot for Jiri Olsa
2018-10-30 9:25 ` [PATCH 02/10] tools perf: " Jiri Olsa
2018-10-16 15:06 ` [PATCH 03/10] tools cpupower debug: Allow to use outside build flags Jiri Olsa
2018-10-16 15:06 ` [PATCH 04/10] tools cpupower: Override CFLAGS assignments Jiri Olsa
2018-10-16 15:06 ` [PATCH 05/10] tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
2018-10-30 9:27 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 06/10] tools thermal tmon: Override CFLAGS assignments Jiri Olsa
2018-10-30 9:27 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 07/10] tools thermal tmon: Use -O3 instead of -O1 if available Jiri Olsa
2018-10-16 15:06 ` [PATCH 08/10] tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command Jiri Olsa
2018-10-30 9:27 ` Jiri Olsa
2018-10-16 15:06 ` [PATCH 09/10] tools iio: Override CFLAGS assignments Jiri Olsa
2018-10-21 12:26 ` Jonathan Cameron
2018-10-22 8:53 ` Jiri Olsa
2018-10-17 13:23 ` [PATCH 00/10] tools: Various build flags fixes Thomas Renninger
2018-10-17 15:28 ` Shuah Khan
2018-10-22 8:51 ` Jiri Olsa
2018-10-23 15:17 ` Shuah Khan
2018-10-23 16:53 ` Shuah Khan
2018-10-23 17:21 ` Jiri Olsa
2018-10-22 14:50 ` [PATCH 10/10] tools gpio: Override CFLAGS assignments Jiri Olsa
2018-10-30 9:34 ` 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).