Enable OpenMP for powerpcle to match the rest of powerpc*.
Bdragon28 on Dec 1 2020, 6:45 PM.Authored by
There are a very large number of changes, so older changes are hidden. Show Older Changes
On FreeBSD, the main use of this will be on the new powerpc64le arch, where we need to build a 32-bit LE bootloader for use with pseries. (it is easier to retarget LLVM than make a cross-endian bootloader, as it would involve rewriting filesystem code etc.)
On Linux, I suspect the primary use will be with user-space CPU emulation tools that do syscall translation from foreign LE architectures.
On Linux, I set the defaults assuming that this target would primarily be used as a multiarch instead of the "native" arch for an install (i.e. assume lib32 instead of lib). If there are any existing powerpcle userlands out there that do not do this, it can be changed.
Note: I do not have commit access yet.
This seems problematic to me for a few reasons:
Since this seems to be for a very specific use case, can we perhaps severely restrict the support for 32-bit little endian mode (perhaps BSD only, no Altivec/VSX, etc.)?
Technically, 32 bit PowerPC systems are neither ELFv1 nor ELFv2, they are Power Architecture 32-bit ABI (which has various extensions) that does not have the complexities that plagued ELFv1 and is a relatively "normal" ABI.
I have not seen any places that this is problematic that I am not already addressing with this patch.
I would be fine with restricting this to FreeBSD and/or limiting it to freestanding. I mainly added the Linux support as there was recent interest in 32-bit LE and it is a possibility there will be some experimental userlands at some point in the future. https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-May/211669.html
Regarding things like Altivec and VSX:
Regarding Book-III support for powerpcle:
Regarding cpu support for powerpcle:
Regarding hosted use:
Excuse my ignorance, but what are there technical limitations preventing writing n 64-bit LE boot loader and avoid having a 32-bit LE target all-together?
LoPAPR client binding requirements, section B.10.
FreeBSD loader on pseries is an OF client, and as such, while it is free to be either BE or LE (OF is required to adapt itself), it MUST be a 32-bit image.
I am interested in this, since we are currently bootstrapping an entire ppcle userland in our distribution (glibc and musl) - we already have everything generally working (on ppc64le host), with llvm being a notable blocker for some things - so i will be testing this in near future
I've tested the patch (applied to LLVM11) and can confirm it works. There have been some changes/fixes I needed to do, which I already reported on IRC, so I will not include them here (Bdragon28 should just be able to apply them and push them out)
Right now, I have a full ppcle Linux userland (which can fully compile itself, so it's self-hosted), I will be making binary packages available soon (source is already available through the Void Linux project) so anyone with a ppc64le kernel with a couple of fixes (also available through Void) should be able to run a full 32-bit LE environment