Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602476

[PATCH] kbuild: fix compile time regression

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH] kbuild: fix compile time regression
Date 2017-03-16 16:10 +0100
Message-ID <tlFco-97-59@gated-at.bofh.it> (permalink)
References <tlEzE-80N-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


I noticed that a patch I did causes the time for a clean rebuild to
go up significantly, from 13 to 18 seconds on ARM defconfig, and
in the worst case forcing a rebuild of every file each time.

The fix is very simple, using a ':=' assignment instead of '='
to force the cc-disable-warning call to only be evaluated once
instead of every time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 3a964fa3a787..e7d4d20deb4e 100644
--- a/Makefile
+++ b/Makefile
@@ -381,7 +381,7 @@ LDFLAGS_MODULE  =
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
 LDFLAGS_vmlinux =
-CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,)
+CFLAGS_GCOV	:= -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,)
 CFLAGS_KCOV	:= $(call cc-option,-fsanitize-coverage=trace-pc,)
 
 ifeq ($(COMPILER),clang)
-- 
2.9.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-14 17:20 +0100
  Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2017-03-14 22:00 +0100
    Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2017-03-16 15:30 +0100
      [PATCH] kbuild: fix compile time regression Arnd Bergmann <arnd@arndb.de> - 2017-03-16 16:10 +0100
        Re: [PATCH] kbuild: fix compile time regression Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-16 18:50 +0100
      Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-16 18:40 +0100
    Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-16 18:40 +0100

csiph-web