summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2017-09-25 14:41:16 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-10-01 11:11:41 +0200
commitb9e4d36632393010f190f70e66e4e3a39ec15060 (patch)
tree4786a036127ac39d8161d2df4c1902d2a1bf1647
parent9403f6955e59f6518e151dad48bd58d951c70875 (diff)
downloadptxdist-b9e4d36632393010f190f70e66e4e3a39ec15060.tar.gz
ptxdist-b9e4d36632393010f190f70e66e4e3a39ec15060.tar.xz
kernel: fix building perf with gcc-7.x and icecc
Icecc splits preprocessing and compiling. As a result comments are no longer available at compile time and building fails with: parse-options.c: In function 'get_value': parse-options.c:101:7: error: this statement may fall through [-Werror=implicit-fallthrough=] parse-options.c:104:3: note: here parse-options.c: In function 'print_option_help': parse-options.c:716:6: error: this statement may fall through [-Werror=implicit-fallthrough=] parse-options.c:719:2: note: here Compile with '-C' to preserve comments. This can have side effects, so it cannot be enabled globally. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/kernel.make6
1 files changed, 5 insertions, 1 deletions
diff --git a/rules/kernel.make b/rules/kernel.make
index 3ed90c4ae..a577d5390 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -183,6 +183,10 @@ KERNEL_TOOL_PERF_OPTS := \
NO_LIBBPF=1 \
NO_SDT=1
+KERNEL_PERF_ENV := \
+ $(KERNEL_ENV) \
+ pkg_cflags="-C"
+
$(STATEDIR)/kernel.compile:
@$(call targetinfo)
@rm -f \
@@ -191,7 +195,7 @@ $(STATEDIR)/kernel.compile:
@+cd $(KERNEL_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) \
$(KERNEL_MAKEVARS) $(KERNEL_IMAGE) $(PTXCONF_KERNEL_MODULES_BUILD)
ifdef PTXCONF_KERNEL_TOOL_PERF
- @+cd $(KERNEL_DIR) && $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) \
+ @+cd $(KERNEL_DIR) && $(KERNEL_PATH) $(KERNEL_PERF_ENV) $(MAKE) \
$(KERNEL_MAKEVARS) $(KERNEL_TOOL_PERF_OPTS) -C tools/perf
endif
ifdef PTXCONF_KERNEL_TOOL_IIO