powerpc/powerpc64: Support build with musl as libc
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest13 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | lib/oe/elf.py: Add powerpc64 architecture definition for muslmeta/ | +1 | 0 replies | |
| 2/13 | tune-power[5-7].inc: Fix DEFAULTTUNE valuesmeta/ meta/ meta/ | +3 | 0 replies | |
| 3/13 | tune-power[5-7].inc: Disable QEMU usermode usagemeta/ meta/ meta/ | +9 | 0 replies | |
| 4/13 | qemuwrapper: Explicitly exit in case of no qemu supported for targetmeta/ | +2 | 0 replies | |
| 5/13 | arch-powerpc64.inc: Use elfv2 ABI when building with muslmeta/ | +3 | 3 replies | |
| 6/13 | musl: Create default library search path based on configurationmeta/ meta/ | +62 | 2 replies | |
| 7/13 | musl: Ensure GLIBC_LDSO symlink target does not exist on reinstallmeta/ | +1 | 5 replies | |
| 8/13 | openssl: Skip assembler optimized code for powerpc64 with muslmeta/ meta/ | +2 | 0 replies | |
| 9/13 | python3: Fix do_configure check platform triplet error (2)meta/ meta/ | +41 | 0 replies | |
| 10/13 | gcc: Fix preprocessor redefines for header pathesmeta/ meta/ | +0 | 0 replies | |
| 11/13 | gcc: More places to patch to disable ldbl 128 for musl on PPCmeta/ meta/ | +731 | 2 replies | |
| 12/13 | gcc: Enable secureplt for powerpc64 target toometa/ | +1 | 0 replies | |
| 13/13 | gcc-7.3, gcc-8.2: Use variable SYSTEMLIBS_DIR instead of hardcoding it for ppc64meta/ meta/ meta/ +1 more | +64 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/13] powerpc/powerpc64: Support build with musl as libc
Musl has support for ppc (32bit) and ppc64 (64bit). OE still missing several tricks in configuration to make builds possible:
1) Most important part is that musl implements elfv2 ABI only for 64bit PowerPC. That ABI is default for little-endian but supports big-endian too. Historically elfv1 ABI is used for big-endian PowerPC.
2) Using uncommon elfv2 ABI for big-endian requires to disable all assembler optimizations in openssl: unfortunately I can't find more smart way at the moment.
3) LDSO path need to be adjusted to support /lib64 path which is default for powerpc64 (see bitbake.conf) instead of $baselibdir.
4) Default library search path is hardcoded to "/lib:/usr/local/lib:/usr/lib": pass -DSYSLIBDIR and -DLIBDIR and use them to set path.
5) Need to add more tweaks to patch that adds --with-ldbl-128 knob to gcc configure: there is a set of functions that use TFtype in ppc64-fp.c in libgcc. This should be compatible with glibc.
6) Disable qemu-userspace for powerpc64 bit: there is no support. While there change qemuwrapper to exit explicitly to fix infinite execution in do_rootfs() task when building on IBM POWER8 machine.
7) Misc fixes that map powerpc-linux-musl python3 triplet to powerpc-linux-gnu, remove conflicting sed in do_configure() vs patch settings in gcc and fix DEFAULTTUNE settings for various IBM POWER platforms.
Build is done on IBM POWER8 machine running RHEL7:
Images:
-------
core-image-sato
core-image-full-cmdline
For powerpc64:
--------------
glibc musl
systemd sysvinit systemd sysvinit
gcc-7.3 y y y y gcc-8.2 y y y y
For powerpc:
------------
glibc musl
systemd sysvinit systemd sysvinit
gcc-7.3 n x x x (*) gcc-8.2 y y y y
Note that gcc-7.3 builds for 32bit powerpc fail due to:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=11754
Kernel/images are boot tested using KVM-HV on IBM POWER8.
Serhey Popovych (13):
lib/oe/elf.py: Add powerpc64 architecture definition for musl tune-power[5-7].inc: Fix DEFAULTTUNE values tune-power[5-7].inc: Disable QEMU usermode usage
qemuwrapper: Explicitly exit in case of no qemu supported for target arch-powerpc64.inc: Use elfv2 ABI when building with musl
musl: Create default library search path based on configuration
musl: Ensure GLIBC_LDSO symlink target does not exist on reinstall
openssl: Skip assembler optimized code for powerpc64 with musl
python3: Fix do_configure check platform triplet error (2)
gcc: Fix preprocessor redefines for header pathes
gcc: More places to patch to disable ldbl 128 for musl on PPC
gcc: Enable secureplt for powerpc64 target too gcc-7.3,gcc-8.2: Use variable SYSTEMLIBS_DIR instead of hardcoding it
for ppc64
.../machine/include/powerpc/arch-powerpc64.inc | 3 + meta/conf/machine/include/tune-power5.inc | 5 +- meta/conf/machine/include/tune-power6.inc | 5 +- meta/conf/machine/include/tune-power7.inc | 5 +- meta/lib/oe/elf.py | 1 + .../openssl/openssl10_1.0.2q.bb | 1 + .../recipes-connectivity/openssl/openssl_1.1.1a.bb | 1 + ...slibdir-and-libdir-as-default-pathes-to-l.patch | 61 ++++ meta/recipes-core/musl/musl_git.bb | 3 +- meta/recipes-devtools/gcc/gcc-7.3.inc | 1 + ...Ensure-target-gcc-headers-can-be-included.patch | 36 -- ...44-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 391 ++++++++++++++++++++- ...werpc-powerpc64-Add-support-for-musl-ldso.patch | 31 ++ meta/recipes-devtools/gcc/gcc-8.2.inc | 1 + ...Ensure-target-gcc-headers-can-be-included.patch | 36 -- ...34-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 342 +++++++++++++++++- ...werpc-powerpc64-Add-support-for-musl-ldso.patch | 31 ++ meta/recipes-devtools/gcc/gcc-common.inc | 2 +- .../tweak-MULTIARCH-for-powerpc-linux-musl.patch | 40 +++ meta/recipes-devtools/python/python3_3.5.6.bb | 1 + .../recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 3 +- 21 files changed, 920 insertions(+), 80 deletions(-) create mode 100644 meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0050-powerpc-powerpc64-Add-support-for-musl-ldso.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/0042-powerpc-powerpc64-Add-support-for-musl-ldso.patch create mode 100644 meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-musl.patch
Signature · 1 line
2.7.4