All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] toolchain/toolchain-buildroot: PPC64 support in musl requires ALTIVEC
@ 2020-01-31 14:41 Vincent Fazio
  2020-01-31 14:55 ` Romain Naour
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Fazio @ 2020-01-31 14:41 UTC (permalink / raw)
  To: buildroot

musl assumes all PPC64(LE) CPUs support ALTIVEC instructions. However,
the e5500 does not support ALTIVEC so builds targeting this CPU using
musl will generate illegal instructions.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
---
 toolchain/toolchain-buildroot/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index a980f766ac..09a46822c9 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -83,8 +83,10 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
 	bool "musl"
 	depends on BR2_aarch64	   || BR2_arm   || BR2_armeb   || BR2_i386 || \
 		   BR2_microblaze  || BR2_mips  || BR2_mipsel  || BR2_mips64 || \
-		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
-		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
+		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_RISCV_64 || \
+		   BR2_sh	   || BR2_x86_64 || \
+		   ((BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_ALTIVEC)
+		   # musl assumes all PPC64 targets support ALTIVEC instructions
 	depends on !BR2_powerpc_SPE # not supported, build breaks
 	# sh2 nommu is supported by musl, but we don't have support
 	# for it in Buildroot.
-- 
2.25.0

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

* [Buildroot] [PATCH 1/1] toolchain/toolchain-buildroot: PPC64 support in musl requires ALTIVEC
  2020-01-31 14:41 [Buildroot] [PATCH 1/1] toolchain/toolchain-buildroot: PPC64 support in musl requires ALTIVEC Vincent Fazio
@ 2020-01-31 14:55 ` Romain Naour
  2020-01-31 15:11   ` Matthew Weber
  0 siblings, 1 reply; 4+ messages in thread
From: Romain Naour @ 2020-01-31 14:55 UTC (permalink / raw)
  To: buildroot

Hi Vincent,

Le 31/01/2020 ? 15:41, Vincent Fazio a ?crit?:
> musl assumes all PPC64(LE) CPUs support ALTIVEC instructions. However,
> the e5500 does not support ALTIVEC so builds targeting this CPU using
> musl will generate illegal instructions.
> 
> Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

Thanks for this patch.

Can you add these two links from my toolchains-builder instance:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

Also I'm adding Matt in Cc:

Best regards,
Romain

> 
> Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
> ---
>  toolchain/toolchain-buildroot/Config.in | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
> index a980f766ac..09a46822c9 100644
> --- a/toolchain/toolchain-buildroot/Config.in
> +++ b/toolchain/toolchain-buildroot/Config.in
> @@ -83,8 +83,10 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
>  	bool "musl"
>  	depends on BR2_aarch64	   || BR2_arm   || BR2_armeb   || BR2_i386 || \
>  		   BR2_microblaze  || BR2_mips  || BR2_mipsel  || BR2_mips64 || \
> -		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
> -		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
> +		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_RISCV_64 || \
> +		   BR2_sh	   || BR2_x86_64 || \
> +		   ((BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_ALTIVEC)
> +		   # musl assumes all PPC64 targets support ALTIVEC instructions
>  	depends on !BR2_powerpc_SPE # not supported, build breaks
>  	# sh2 nommu is supported by musl, but we don't have support
>  	# for it in Buildroot.
> 

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

* [Buildroot] [PATCH 1/1] toolchain/toolchain-buildroot: PPC64 support in musl requires ALTIVEC
  2020-01-31 14:55 ` Romain Naour
@ 2020-01-31 15:11   ` Matthew Weber
  2020-01-31 15:17     ` Vincent Fazio
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Weber @ 2020-01-31 15:11 UTC (permalink / raw)
  To: buildroot

Vincent,

On Fri, Jan 31, 2020 at 8:56 AM Romain Naour <romain.naour@smile.fr> wrote:
>
> Hi Vincent,
>
> Le 31/01/2020 ? 15:41, Vincent Fazio a ?crit :
> > musl assumes all PPC64(LE) CPUs support ALTIVEC instructions. However,
> > the e5500 does not support ALTIVEC so builds targeting this CPU using
> > musl will generate illegal instructions.
> >
> > Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.
>
> Thanks for this patch.

Thanks as well for the patch.  It actually applies to both LE and BE
e5500 targets

>
> Can you add these two links from my toolchains-builder instance:
> https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
> https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744
>
> Also I'm adding Matt in Cc:
>
> Best regards,
> Romain
>
> >
> > Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
> > ---
> >  toolchain/toolchain-buildroot/Config.in | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
> > index a980f766ac..09a46822c9 100644
> > --- a/toolchain/toolchain-buildroot/Config.in
> > +++ b/toolchain/toolchain-buildroot/Config.in
> > @@ -83,8 +83,10 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
> >       bool "musl"
> >       depends on BR2_aarch64     || BR2_arm   || BR2_armeb   || BR2_i386 || \
> >                  BR2_microblaze  || BR2_mips  || BR2_mipsel  || BR2_mips64 || \
> > -                BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
> > -                BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
> > +                BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_RISCV_64 || \
> > +                BR2_sh          || BR2_x86_64 || \
> > +                ((BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_ALTIVEC)
> > +                # musl assumes all PPC64 targets support ALTIVEC instructions
> >       depends on !BR2_powerpc_SPE # not supported, build breaks
> >       # sh2 nommu is supported by musl, but we don't have support
> >       # for it in Buildroot.
> >
>


-- 

Matthew Weber | Associate Director Software Engineer | Commercial Avionics

COLLINS AEROSPACE

400 Collins Road NE, Cedar Rapids, Iowa 52498, USA

Tel: +1 319 295 7349 | FAX: +1 319 263 6099

matthew.weber at collins.com | collinsaerospace.com



CONFIDENTIALITY WARNING: This message may contain proprietary and/or
privileged information of Collins Aerospace and its affiliated
companies. If you are not the intended recipient, please 1) Do not
disclose, copy, distribute or use this message or its contents. 2)
Advise the sender by return email. 3) Delete all copies (including all
attachments) from your computer. Your cooperation is greatly
appreciated.


Any export restricted material should be shared using my
matthew.weber at corp.rockwellcollins.com address.

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

* [Buildroot] [PATCH 1/1] toolchain/toolchain-buildroot: PPC64 support in musl requires ALTIVEC
  2020-01-31 15:11   ` Matthew Weber
@ 2020-01-31 15:17     ` Vincent Fazio
  0 siblings, 0 replies; 4+ messages in thread
From: Vincent Fazio @ 2020-01-31 15:17 UTC (permalink / raw)
  To: buildroot

Matthew,

On 1/31/20 9:11 AM, Matthew Weber wrote:
> Vincent,
>
> On Fri, Jan 31, 2020 at 8:56 AM Romain Naour <romain.naour@smile.fr> wrote:
>> Hi Vincent,
>>
>> Le 31/01/2020 ? 15:41, Vincent Fazio a ?crit :
>>> musl assumes all PPC64(LE) CPUs support ALTIVEC instructions. However,
>>> the e5500 does not support ALTIVEC so builds targeting this CPU using
>>> musl will generate illegal instructions.
>>>
>>> Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.
>> Thanks for this patch.
> Thanks as well for the patch.  It actually applies to both LE and BE
> e5500 targets
The config change takes this into account. The e5500 was an example CPU 
but the change is effective for any endianness of PPC64 that does not 
support ALTIVEC (in case a new scenario pops up). As far as i'm aware, 
the e5500 is big endian only.

I will update the commit message & title to be more clear.
>> Can you add these two links from my toolchains-builder instance:
>> https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
>> https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744
>>
>> Also I'm adding Matt in Cc:
>>
>> Best regards,
>> Romain
>>
>>> Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
>>> ---
>>>   toolchain/toolchain-buildroot/Config.in | 6 ++++--
>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
>>> index a980f766ac..09a46822c9 100644
>>> --- a/toolchain/toolchain-buildroot/Config.in
>>> +++ b/toolchain/toolchain-buildroot/Config.in
>>> @@ -83,8 +83,10 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
>>>        bool "musl"
>>>        depends on BR2_aarch64     || BR2_arm   || BR2_armeb   || BR2_i386 || \
>>>                   BR2_microblaze  || BR2_mips  || BR2_mipsel  || BR2_mips64 || \
>>> -                BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
>>> -                BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
>>> +                BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_RISCV_64 || \
>>> +                BR2_sh          || BR2_x86_64 || \
>>> +                ((BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_ALTIVEC)
>>> +                # musl assumes all PPC64 targets support ALTIVEC instructions
>>>        depends on !BR2_powerpc_SPE # not supported, build breaks
>>>        # sh2 nommu is supported by musl, but we don't have support
>>>        # for it in Buildroot.
>>>
>
-- 
Vincent Fazio
Embedded Software Engineer - Linux
Extreme Engineering Solutions, Inc
http://www.xes-inc.com

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

end of thread, other threads:[~2020-01-31 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 14:41 [Buildroot] [PATCH 1/1] toolchain/toolchain-buildroot: PPC64 support in musl requires ALTIVEC Vincent Fazio
2020-01-31 14:55 ` Romain Naour
2020-01-31 15:11   ` Matthew Weber
2020-01-31 15:17     ` Vincent Fazio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.