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
Created attachment 431344 [details, diff] enable target powerpc-linux-gnu for ppc64
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.
Reported the bug in binutils upstream. Thanks https://sourceware.org/bugzilla/show_bug.cgi?id=19985
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.
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.