All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: yocto <yocto@lists.yoctoproject.org>,
	 adrian freihofer <adrian.freihofer@siemens.com>
Subject: Re: [yocto] Issues and questions regarding PowerPC 32-bits e500v2 tuning
Date: Fri, 23 Oct 2026 04:27:42 -0400 (EDT)	[thread overview]
Message-ID: <2100331131.1179227.1792744062637.JavaMail.zimbra@savoirfairelinux.com> (raw)
In-Reply-To: <CAMKF1soAKNqtrd29vRSx7bEvN=JC-2idUiX8_LZghd_W91fDyQ@mail.gmail.com>

----- Original Message -----
> From: "Khem Raj" <raj.khem@gmail.com>
> To: "yocto" <yocto@lists.yoctoproject.org>, "adrian freihofer" <adrian.freihofer@siemens.com>
> Cc: "Elinor Montmasson" <elinor.montmasson@savoirfairelinux.com>
> Sent: Thursday, 22 October, 2026 22:37:25
> Subject: Re: [yocto] Issues and questions regarding PowerPC 32-bits e500v2 tuning

>> On Thu, Oct 22, 2026 at 2:27 AM Adrian Freihofer via [
>> http://lists.yoctoproject.org/ | lists.yoctoproject.org ] <adrian.freihofer= [
>> mailto:siemens.com@lists.yoctoproject.org | siemens.com@lists.yoctoproject.org
>> ] > wrote:

>> Hi Elinor

>> I remember the times when I was working with a MPC5200. Quite a few
>> years ago :-).

>> If you can mix binaries built with different floating point
>> implementations depends on the details of the CPU architecture, at
>> least. We had some discussions related to ARM 32 a few years ago. I
>> just remember that "it depends on the details".

>> With wrynose there is now a TOOLCHAIN variable which can be set to
>> clang globally. But it depends on what you need if a build without gcc
>> is possible or not. For example, there is a patchset which fixes glibc
>> for building with clang (around 50 patches from ARM) somewhere around.
>> With musl it should work as well. Not sure this would allow you to go
>> with clang only for your use case.

>> There are also some discussions with maintaining some LTS branches like
>> dunfell for longer than 4 years unofficially by users who need that.

>> Just some alternative ideas.

> GCC dropped SPE in 9.1 timeframe, so soft-float is the only option. however
> another
> issue is that glibc also dropped it starting 2.30 release, so only option is
> using musl since
> it does support single float (-sf) abi on ppc.

Yes good point thanks

> I added 0019-Re-introduce-spe-commandline-options.patch, back then to keep
> qemuppc working, it simply made gcc to accept -mabi=spe -mspe
> -mfloat-gprs=double
> which are passed from tune-ppce500v2.inc, it then ignores them and falls back to
> classic hard-float FPU instructions, e500v2 has no classic FPU, so the binaries
> crash with SIGILL
> is no surprise. tune-ppce500.inc has the same problem. It has the same spe
> feature with
> -mfloat-gprs=single.
> a performance-compromised fix is to make these tunes use fpu-soft and drop spe

> Using clang is not going to work out of box either, while it does support SPE it
> does have
> some things to take care of e.g. -mfloat-gprs=double is not supported.

Do you know if an equivalent option or options exist with clang for this?
Or if it just not relevant with clang?

> it also will reject
> linux-gnuspe and linux-muslspe triples that OE uses. it needs something like
> powerpcspe-*-*
> or patching llvm sources to do what OE has done in past.

> Some recipes with GCC + fpu-soft, the rest with clang + SPE combo has an ABI
> problem.
> Ordinary calls and returns are compatible, since both pass doubles in pairs of
> general registers.
> The trouble is mixing the two in one process: a libgcc built for soft-float sets
> the FP environment
> differently from SPE code.

I see
So does it means that for a given application/process, the floating point
support (soft or SPE here) must be the same for the runtime used,
the dynamic libraries used and the application itself,
to avoid any ABI compatibility problem?

In that case, I suppose two compiler runtime may be installed,
compiled with their respective compiler?
* libgcc for GCC + fpu-soft compiled programs
* llvm runtime for clang + SPE compiled programs

But then the ABI compatibility constraint will create complexity for
compiling and installing shared libraries.

> Dunfell is not a way to keep SPE; only warrior or older is.


Best regards,
Elinor Montmasson

  reply	other threads:[~2026-10-23  8:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  8:34 Issues and questions regarding PowerPC 32-bits e500v2 tuning Elinor Montmasson
2026-10-21 13:50 ` Marko, Peter
2026-10-21 15:01   ` Elinor Montmasson
2026-10-22  8:21     ` Marko, Peter
2026-10-22  9:27       ` Freihofer, Adrian
2026-10-22 20:37         ` [yocto] " Khem Raj
2026-10-23  8:27           ` Elinor Montmasson [this message]
2026-10-23 14:24             ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2100331131.1179227.1792744062637.JavaMail.zimbra@savoirfairelinux.com \
    --to=elinor.montmasson@savoirfairelinux.com \
    --cc=adrian.freihofer@siemens.com \
    --cc=raj.khem@gmail.com \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.