Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704784 - toolchain.eclass: pass --with-eabi=elfv2 on powerpc64-*-musl
Summary: toolchain.eclass: pass --with-eabi=elfv2 on powerpc64-*-musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR93157
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-04 18:40 UTC by Georgy Yakovlev
Modified: 2023-11-21 20:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2020-01-04 18:40:58 UTC
Adding bug for history purposes.
Original discussion here https://github.com/gentoo/gentoo/pull/14234

from musl INSTALL file:
* PowerPC64
    * Both little and big endian variants are supported
    * Compiler toolchain must provide 64-bit long double, not IBM
      double-double or IEEE quad
    * Compiler toolchain must use the new (ELFv2) ABI regardless of
      whether it is for little or big endian
Comment 1 Larry the Git Cow gentoo-dev 2020-01-04 18:45:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5136179f9356f0bcb34fa5b8c5d0d0817f316ec9

commit 5136179f9356f0bcb34fa5b8c5d0d0817f316ec9
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-01-04 09:07:30 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-01-04 18:45:09 +0000

    toolchain.eclass: enable elfv2 abi on powerpc64-*-musl unconditionally
    
    on ppc64 gcc assumes the following:
    from gcc ppc64 manual:
    -mabi=elfv1
    
        Change the current ABI to use the ELFv1 ABI. This is the default ABI
        for big-endian PowerPC 64-bit Linux. Overriding the default ABI
        requires special system support and is likely to fail in spectacular
        ways.
    -mabi=elfv2
    
        Change the current ABI to use the ELFv2 ABI. This is the default
        ABI for little-endian PowerPC 64-bit Linux. Overriding the
        default ABI requires special system support and is likely to
        fail in spectacular ways.
    
    Since we are taking gcc defaults, let's pass --with-abi=elfv2 on musl
    targets
    without it it will fail, since musl does not support elfv1 at all.
    from musl INSTALL file:
    
    * PowerPC64
        * Both little and big endian variants are supported
        * Compiler toolchain must provide 64-bit long double, not IBM
          double-double or IEEE quad
        * Compiler toolchain must use the new (ELFv2) ABI regardless of
          whether it is for little or big endian
    
    https://git.musl-libc.org/cgit/musl/tree/INSTALL
    Closes: https://github.com/gentoo/gentoo/pull/14234
    Closes: https://bugs.gentoo.org/704784
    Revieved-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 eclass/toolchain.eclass | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-04 21:36:22 UTC
Let's keep it open until at least upstream gcc bug is created.
Comment 3 Georgy Yakovlev archtester gentoo-dev 2020-01-05 05:03:14 UTC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93157
Comment 4 Larry the Git Cow gentoo-dev 2020-01-05 11:02:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e70608c04f6660aaad10c5e38bfc5ba316ec728b

commit e70608c04f6660aaad10c5e38bfc5ba316ec728b
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-01-05 11:01:10 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-01-05 11:01:10 +0000

    toolchain.eclass: add an upstream bug reference to ELFv2 ABI
    
    Closes: https://bugs.gentoo.org/704784
    Bug: https://gcc.gnu.org/PR93157
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/toolchain.eclass | 1 +
 1 file changed, 1 insertion(+)