* [PATCH] Makefile: evaluate LDFLAGS_BUILD_ID only once
@ 2017-04-30 16:16 Rabin Vincent
2017-05-03 4:49 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Rabin Vincent @ 2017-04-30 16:16 UTC (permalink / raw)
To: yamada.masahiro, mmarek; +Cc: linux-kbuild, linux-kernel, Rabin Vincent
Evaluate LDFLAGS_BUILD_ID (which involves invoking the compiler) only
once instead of over and over.
This provides a ~20% reduction in null build time with x86 allnoconfig:
$ make allnoconfig && make -j8
$ perf stat -r5 -e sched:sched_process_exec make -j8
- 2 119 sched:sched_process_exec
+ 1 878 sched:sched_process_exec
- 1,238817018 seconds time elapsed
+ 0,971020553 seconds time elapsed
Signed-off-by: Rabin Vincent <rabin@rab.in>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 779302695453..c78a266594c1 100644
--- a/Makefile
+++ b/Makefile
@@ -815,7 +815,7 @@ KBUILD_AFLAGS += $(ARCH_AFLAGS) $(KAFLAGS)
KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS)
# Use --build-id when available.
-LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
+LDFLAGS_BUILD_ID := $(patsubst -Wl$(comma)%,%,\
$(call cc-ldoption, -Wl$(comma)--build-id,))
KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Makefile: evaluate LDFLAGS_BUILD_ID only once
2017-04-30 16:16 [PATCH] Makefile: evaluate LDFLAGS_BUILD_ID only once Rabin Vincent
@ 2017-05-03 4:49 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2017-05-03 4:49 UTC (permalink / raw)
To: Rabin Vincent
Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List
2017-05-01 1:16 GMT+09:00 Rabin Vincent <rabin@rab.in>:
> Evaluate LDFLAGS_BUILD_ID (which involves invoking the compiler) only
> once instead of over and over.
>
> This provides a ~20% reduction in null build time with x86 allnoconfig:
>
> $ make allnoconfig && make -j8
> $ perf stat -r5 -e sched:sched_process_exec make -j8
> - 2 119 sched:sched_process_exec
> + 1 878 sched:sched_process_exec
>
> - 1,238817018 seconds time elapsed
> + 0,971020553 seconds time elapsed
>
> Signed-off-by: Rabin Vincent <rabin@rab.in>
Applied to linux-kbuild/kbuild. Thanks!
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-03 4:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-30 16:16 [PATCH] Makefile: evaluate LDFLAGS_BUILD_ID only once Rabin Vincent
2017-05-03 4:49 ` Masahiro Yamada
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).