Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make
Date: Tue, 29 Nov 2022 22:15:11
Message-Id: 9d77f3c0be43dc38a30c1c8024db9c784529547d.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make by Mike Gilbert
1 On Tue, 2022-11-29 at 13:55 -0500, Mike Gilbert wrote:
2 > This avoids some unnecessary Makefile logic and gives a nice speed up.
3 >
4 > Before the change, linux-info_pkg_setup takes 11 to 15 seconds on my
5 > AMD Phenom II. After, it takes 3 to 4 seconds.
6 >
7 > Signed-off-by: Mike Gilbert <floppym@g.o>
8 > ---
9 > eclass/linux-info.eclass | 4 +++-
10 > 1 file changed, 3 insertions(+), 1 deletion(-)
11 >
12 > diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
13 > index fc125b0d751..3e64cb9457a 100644
14 > --- a/eclass/linux-info.eclass
15 > +++ b/eclass/linux-info.eclass
16 > @@ -238,7 +238,9 @@ getfilevar() {
17 > # Pass dot-config=0 to avoid the config check in kernels prior to 5.4.
18 > [[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; }
19 > echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
20 > - nonfatal emake -C "${basedname}" --no-print-directory M="${T}" dot-config=0 need-config= ${BUILD_FIXES} -s -f - 2>/dev/null
21 > + nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \
22 > + dot-config=0 need-config= need-compiler= \
23 > + ${BUILD_FIXES} -s -f - 2>/dev/null
24 >
25 > ARCH=${myARCH}
26 > fi
27
28 I'm confused. Breaking up the line makes it faster?

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies