Makefile: evaluate LDFLAGS_BUILD_ID only once
authorRabin Vincent <rabin@rab.in>
Sun, 30 Apr 2017 16:16:00 +0000 (18:16 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 3 May 2017 04:43:24 +0000 (13:43 +0900)
commitbd74370b8657fc6fdab7b0d5024d011985183809
treec56e46863c2140258cb93768fd19adbee3f68c8c
parente8a3118e1f5cbe0c26704419390bf074689b349f
Makefile: evaluate LDFLAGS_BUILD_ID only once

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>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile