lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1467052107-26735-1-git-send-email-rabin@rab.in>
Date:	Mon, 27 Jun 2016 20:28:26 +0200
From:	Rabin Vincent <rabin@....in>
To:	mmarek@...e.com
Cc:	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	Rabin Vincent <rabin@....in>
Subject: [PATCH 1/2] 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 on
my machine:

$ make -j8 && perf stat -r5 make -j8
Before: 1,086617617 seconds time elapsed ( +-  0,37% )
 After: 0,864487173 seconds time elapsed ( +-  0,35% )

Signed-off-by: Rabin Vincent <rabin@....in>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 6471f20ca400..91baa282f3fa 100644
--- a/Makefile
+++ b/Makefile
@@ -814,7 +814,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.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ