[OE-core] [OE-Core][PATCH 00/13] powerpc/powerpc64: Support build with musl as libc

Serhey Popovych serhe.popovych at gmail.com
Mon Dec 17 09:56:19 UTC 2018


Khem Raj wrote:
> Serhey
> 
> Thanks for doing this work and really a clean pull request with good
> explanation that I have seen lately. Good work, For most parts
> everything is in order except few places where I have replied
> specifically to the patches

Khem, thank you for quick review! I will try to address your comments
with upstream even after this series already merged.

But at the moment I'm working on series intended to improve situation
with ppc64le support (inluding musl).

There is more places to address. For example build w/o altivec support.
Currently tune actually does nothing to avoid Altivec/VSX instructions
in binary. This is however only may be a problem for some embedded stuff
or very old POWER machines (i.e. before POWER6 I guess).

> 
> On Fri, Dec 14, 2018 at 9:55 AM Serhey Popovych
> <serhe.popovych at gmail.com> wrote:
>>
>> 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
>>
>> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181217/f5c2be7b/attachment.sig>


More information about the Openembedded-core mailing list