[Bug ld/19985] New: ld/configure.tgt: enable BE support for ppc64le

2016-04-23 Thread lenohou at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19985

Bug ID: 19985
   Summary: ld/configure.tgt: enable BE support for ppc64le
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: lenohou at gmail dot com
  Target Milestone: ---

Sorry, We described details in Gentoo Bugzilla#580614. 

1) When use CHOST="powerpc64le-unknown-linux-gnu" to build binutils. there is
no biarch support.See current supported emulations
leno@localhost ~ $ powerpc64le-unknown-linux-gnu-ld -V
GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
  Supported emulations:
   elf64lppc
   elf32lppc
   elf32lppclinux
   elf32lppcsim

   But we want elf64ppc for building grub2. If we there is no elf64ppc
emulation, we can't compiling grub2 and grub2-install
for ppc64le platform.

2) Following are the emulations what we want
leno@localhost ~ $ powerpc64le-unknown-linux-gnu-ld -V
GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
  Supported emulations:
   elf64lppc
   elf32lppc
   elf32lppclinux
   elf32lppcsim
   elf32ppclinux
   elf32ppc
   elf32ppcsim
   elf64ppc

3) We found that --enable-targets=all make on sense to build the above
emulations what we want, Workaround solution is
--enable-targets="powerpc-linux-gnu" built the targets we want. But, there is
no other arch-specific handling like this.  Instead, binutils itself handles
things by selecting a default set of supported targets based on the active
host.and when i glance in there, 

ld/configure.tgt:
powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
  | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \
  | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*)
 case "${targ}" in
*64*)   targ_emul=elf64ppc
targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
targ_extra_libpath="elf32ppc elf32ppclinux"
td=tdir_elf32ppc
case "${targ}" in
powerpc*le-*) td=tdir_elf32lppc;;
esac
eval ${td}=`echo "${targ_alias}" | sed -e 's/64//'`
eval ${td}linux=\$${td}
eval ${td}sim=\$${td}
;;

seems there is big-endian support for powerpc64le-unknown-linux-gnu

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19985] ld/configure.tgt: enable BE support for ppc64le

2016-04-23 Thread lenohou at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19985

--- Comment #1 from Leno Hou  ---
>>> seems there is big-endian support for powerpc64le-unknown-linux-gnu

There is no big-endian support for ppc64le

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19985] ld/configure.tgt: there is no BE support for ppc64le

2016-04-23 Thread lenohou at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19985

Leno Hou  changed:

   What|Removed |Added

 CC||vapier at gentoo dot org
Summary|ld/configure.tgt: enable BE |ld/configure.tgt: there is
   |support for ppc64le |no BE support for ppc64le

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19985] ld/configure.tgt: LE ppc64 targets do not include BE emulations

2016-04-23 Thread lenohou at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19985

Leno Hou  changed:

   What|Removed |Added

Summary|ld/configure.tgt: there is  |ld/configure.tgt: LE ppc64
   |no BE support for ppc64le   |targets do not include BE
   ||emulations

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19985] ld/configure.tgt: LE ppc64 targets do not include BE emulations

2016-04-23 Thread lenohou at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19985

--- Comment #3 from Leno Hou  ---
Srry for the incorrect description, 

Again,

we can't get elf64ppc emulation on powerpc64 little-endian( abbrev. ppc64le)
when building binutils. If there is no elf64ppc emulations, we can't build
grub2 for ppc64le.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19985] ld/configure.tgt: LE ppc64 targets do not include BE emulations

2016-04-25 Thread lenohou at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19985

--- Comment #6 from Leno Hou  ---
Thanks Nick, This is works fine with me, Great.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19985] ld/configure.tgt: LE ppc64 targets do not include BE emulations

2016-04-26 Thread lenohou at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19985

--- Comment #13 from Leno Hou  ---
Hi Alan,

>> makefiles that wrongly passed -melf64ppc caused powerpc64le-linux-ld to give 
>> an >>obvious error relating to its command line rather than something more 
>> obscure.

aclocal -> automake -> libtoolize -> autoconf -> configure -> Makefile

 During this work flow, we've patched libtool.m4 as below which is make sure
generate correct Makefile and passed correct $LD="ld -m elf64lppc' to
powerpc64le-linux-ld


>> I suppose most of those package problems have been fixed nowadays, so 
>> perhaps making the big-endian targets available isn't such a bad thing.

   So I must make sure that all packages with -melf64ppc was updated by
elibtoolize or eautoreconf. Then we'll enable big-endian targets on gentoo
ppc64le.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19985] ld/configure.tgt: LE ppc64 targets do not include BE emulations

2016-05-15 Thread lenohou at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19985

--- Comment #15 from Leno Hou  ---
Hi Alan Modra,

When used your patch, below is not we expected. 

localhost files # ld -V 
GNU ld (Gentoo 2.25.1 p1.1) 2.25.1  
  Supported emulations: 
   elf64lppc
   elf32lppc
   elf32lppclinux   
   elf32lppcsim 
   elf64ppc   


What we expect is 
localhost files # ld -V 
GNU ld (Gentoo 2.25.1 p1.1) 2.25.1  
  Supported emulations: 
   elf64lppc
   elf32ppc 
   elf32ppclinux
   elf32ppcsim  
   elf32lppc
   elf32lppclinux   
   elf32lppcsim 
   elf64ppc   

Could you help to me what happened ? Thanks.

Nick Clifton's patch works well with me.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils