Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 580614 - sys-devel/binutils: ld: LE ppc64 targets do not include BE emulations
Summary: sys-devel/binutils: ld: LE ppc64 targets do not include BE emulations
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC64 Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/bugzilla/show_...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-20 09:38 UTC by Leno Hou
Modified: 2016-11-12 07:32 UTC (History)
2 users (show)

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


Attachments
enable target powerpc-linux-gnu for ppc64 (0001-eclass-toolchain-bintuils-enable-targets-powerpc-lin.patch,909 bytes, patch)
2016-04-20 09:42 UTC, Leno Hou
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leno Hou 2016-04-20 09:38:16 UTC
When building binutils in ppc64le by powerpc64le-unknown-gnu-gcc, lack of supported emulations. e.g. elf64ppc.


Reproducible: Always

Steps to Reproduce:
1. emerge binutils in ppc64le environment
2. #ld -V
livecd eclass # ld -V
GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
  Supported emulations:
   elf64lppc
   elf32lppc
   elf32lppclinux
   elf32lppcsim

Actual Results:  
# ld -V
GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
  Supported emulations:
   elf64lppc
   elf32lppc
   elf32lppclinux
   elf32lppcsim
 


Expected Results:  
# ld -V
GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
  Supported emulations:
   elf64lppc
   elf32lppc
   elf32lppclinux
   elf32lppcsim
   elf32ppclinux
   elf32ppc
   elf32ppcsim
   elf64ppc
Comment 1 Leno Hou 2016-04-20 09:42:04 UTC
Created attachment 431344 [details, diff]
enable target powerpc-linux-gnu for ppc64
Comment 2 SpanKY gentoo-dev 2016-04-21 05:34:45 UTC
i think this is a patch you should & send to the binutils guys.  the ld/configure.tgt should include big & little endian emulations for ppc targets.  since it's need to build the bootloader, i think you have a strong case for merging.  please follow up with the binutils project and we can pull back in the patch that gets merged there.
Comment 3 Leno Hou 2016-04-23 15:42:09 UTC
Reported the bug in binutils upstream. Thanks
https://sourceware.org/bugzilla/show_bug.cgi?id=19985
Comment 4 Leno Hou 2016-05-14 08:26:17 UTC
Hi Mike Frysinger,

Could you bump binutils to version 2.26 ? Thanks

Binutils-2.26 includes ppc64le patches.


Patch 1.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=731bb67af7ba357164095a035749e3aaa9ac1f4f

commit 731bb67af7ba357164095a035749e3aaa9ac1f4f
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Apr 25 17:25:27 2016 +0100

    Allow powerpc64le-linux-gnu toolchain to support big endian targets as
well.

        PR target/19985
        * configure.tgt: Include big endian PPC64 emulations with little
        endian PPC64 targets.


Patch 2.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=13b8c3356bc76abc3624ea9348cc8e834594dfe0

commit 13b8c3356bc76abc3624ea9348cc8e834594dfe0
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Apr 27 16:51:15 2016 +0930

    Fix powerpc64 ld testsuite fail

        PR target/19985
        * configure.tgt: Don't use var+=.

Other patches.

                                                                                                         
leno@localhost ~/binutils-gdb $ git log | grep ppc64le                                                   │
    gdb.trace/tfind.exp: Force call via global entry point on ppc64le.                                   │    app-crypt/pgpdump: Version bump to 0.31
    entry point on ppc64le, and won't be hit, since the call uses                                        │    
    [ppc64le] Use skip_entrypoint for skip_trampoline_code                                               │    Package-Manager: portage-2.2.28
    ppc64le loses control when stepping between two PLT-called functions inside                          │
    This patch fixes the routines to collect and supply ptrace registers on ppc64le                      │commit 051ad56052005c12401cfa3cea3b321d9a20f5f6
    the testsuite dropped from 263 to 72 on ppc64le.                                                     │Author: Manuel R<C3><BC>ger <mrueg@gentoo.org>
        * testsuite/defsym_test.sh: Allow ppc64le localentry annotation.
Comment 5 SpanKY gentoo-dev 2016-11-12 07:32:17 UTC
the fix is in binutils-2.27.  i was going to include it in 2.26.1, but someone merged that update while it was in development, so it missed out.