public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make
@ 2022-11-29 18:55 Mike Gilbert
  2022-11-29 22:14 ` James Le Cuirot
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Gilbert @ 2022-11-29 18:55 UTC (permalink / raw
  To: gentoo-dev; +Cc: Mike Gilbert

This avoids some unnecessary Makefile logic and gives a nice speed up.

Before the change, linux-info_pkg_setup takes 11 to 15 seconds on my
AMD Phenom II. After, it takes 3 to 4 seconds.

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
 eclass/linux-info.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index fc125b0d751..3e64cb9457a 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -238,7 +238,9 @@ getfilevar() {
 		# Pass dot-config=0 to avoid the config check in kernels prior to 5.4.
 		[[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; }
 		echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
-			nonfatal emake -C "${basedname}" --no-print-directory M="${T}" dot-config=0 need-config= ${BUILD_FIXES} -s -f - 2>/dev/null
+			nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \
+			dot-config=0 need-config= need-compiler= \
+			${BUILD_FIXES} -s -f - 2>/dev/null
 
 		ARCH=${myARCH}
 	fi
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make
  2022-11-29 18:55 [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make Mike Gilbert
@ 2022-11-29 22:14 ` James Le Cuirot
  2022-11-29 22:26   ` Alexey Sokolov
  2022-11-29 22:31   ` Mike Gilbert
  0 siblings, 2 replies; 5+ messages in thread
From: James Le Cuirot @ 2022-11-29 22:14 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]

On Tue, 2022-11-29 at 13:55 -0500, Mike Gilbert wrote:
> This avoids some unnecessary Makefile logic and gives a nice speed up.
> 
> Before the change, linux-info_pkg_setup takes 11 to 15 seconds on my
> AMD Phenom II. After, it takes 3 to 4 seconds.
> 
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
>  eclass/linux-info.eclass | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
> index fc125b0d751..3e64cb9457a 100644
> --- a/eclass/linux-info.eclass
> +++ b/eclass/linux-info.eclass
> @@ -238,7 +238,9 @@ getfilevar() {
>  		# Pass dot-config=0 to avoid the config check in kernels prior to 5.4.
>  		[[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; }
>  		echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
> -			nonfatal emake -C "${basedname}" --no-print-directory M="${T}" dot-config=0 need-config= ${BUILD_FIXES} -s -f - 2>/dev/null
> +			nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \
> +			dot-config=0 need-config= need-compiler= \
> +			${BUILD_FIXES} -s -f - 2>/dev/null
>  
>  		ARCH=${myARCH}
>  	fi

I'm confused. Breaking up the line makes it faster?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 858 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make
  2022-11-29 22:14 ` James Le Cuirot
@ 2022-11-29 22:26   ` Alexey Sokolov
  2022-11-29 22:31   ` Mike Gilbert
  1 sibling, 0 replies; 5+ messages in thread
From: Alexey Sokolov @ 2022-11-29 22:26 UTC (permalink / raw
  To: gentoo-dev

29.11.2022 22:14, James Le Cuirot пишет:
> On Tue, 2022-11-29 at 13:55 -0500, Mike Gilbert wrote:
>> This avoids some unnecessary Makefile logic and gives a nice speed up.
>>
>> Before the change, linux-info_pkg_setup takes 11 to 15 seconds on my
>> AMD Phenom II. After, it takes 3 to 4 seconds.
>>
>> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
>> ---
>>   eclass/linux-info.eclass | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
>> index fc125b0d751..3e64cb9457a 100644
>> --- a/eclass/linux-info.eclass
>> +++ b/eclass/linux-info.eclass
>> @@ -238,7 +238,9 @@ getfilevar() {
>>   		# Pass dot-config=0 to avoid the config check in kernels prior to 5.4.
>>   		[[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; }
>>   		echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
>> -			nonfatal emake -C "${basedname}" --no-print-directory M="${T}" dot-config=0 need-config= ${BUILD_FIXES} -s -f - 2>/dev/null
>> +			nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \
>> +			dot-config=0 need-config= need-compiler= \
>> +			${BUILD_FIXES} -s -f - 2>/dev/null
>>   
>>   		ARCH=${myARCH}
>>   	fi
> 
> I'm confused. Breaking up the line makes it faster?

It adds need-compiler= which was not there, but yeah, this is somewhat 
hidden in breaking the line

-- 
Best regards,
Alexey "DarthGandalf" Sokolov



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make
  2022-11-29 22:14 ` James Le Cuirot
  2022-11-29 22:26   ` Alexey Sokolov
@ 2022-11-29 22:31   ` Mike Gilbert
  2022-11-29 22:35     ` James Le Cuirot
  1 sibling, 1 reply; 5+ messages in thread
From: Mike Gilbert @ 2022-11-29 22:31 UTC (permalink / raw
  To: gentoo-dev

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

The change is stated in the email subject.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make
  2022-11-29 22:31   ` Mike Gilbert
@ 2022-11-29 22:35     ` James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2022-11-29 22:35 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

On Tue, 2022-11-29 at 17:31 -0500, Mike Gilbert wrote:
> On Tue, Nov 29, 2022 at 5:14 PM James Le Cuirot <chewi@gentoo.org> wrote:
> > 
> > On Tue, 2022-11-29 at 13:55 -0500, Mike Gilbert wrote:
> > > This avoids some unnecessary Makefile logic and gives a nice speed up.
> > > 
> > > Before the change, linux-info_pkg_setup takes 11 to 15 seconds on my
> > > AMD Phenom II. After, it takes 3 to 4 seconds.
> > > 
> > > Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> > > ---
> > >  eclass/linux-info.eclass | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
> > > index fc125b0d751..3e64cb9457a 100644
> > > --- a/eclass/linux-info.eclass
> > > +++ b/eclass/linux-info.eclass
> > > @@ -238,7 +238,9 @@ getfilevar() {
> > >               # Pass dot-config=0 to avoid the config check in kernels prior to 5.4.
> > >               [[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; }
> > >               echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
> > > -                     nonfatal emake -C "${basedname}" --no-print-directory M="${T}" dot-config=0 need-config= ${BUILD_FIXES} -s -f - 2>/dev/null
> > > +                     nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \
> > > +                     dot-config=0 need-config= need-compiler= \
> > > +                     ${BUILD_FIXES} -s -f - 2>/dev/null
> > > 
> > >               ARCH=${myARCH}
> > >       fi
> > 
> > I'm confused. Breaking up the line makes it faster?
> 
> The change is stated in the email subject.
> 
Heh, sorry. I need more sleep.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 858 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-29 22:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29 18:55 [gentoo-dev] [PATCH] linux-info.eclass: getfilevar: pass 'need-compiler=' to make Mike Gilbert
2022-11-29 22:14 ` James Le Cuirot
2022-11-29 22:26   ` Alexey Sokolov
2022-11-29 22:31   ` Mike Gilbert
2022-11-29 22:35     ` James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox