1 |
On 20 Apr 2016 13:52, Leno Hou wrote: |
2 |
> Authored-by: Linda Jiang <linda.qj25@×××××.com> |
3 |
> --- |
4 |
> eclass/toolchain-binutils.eclass | 1 + |
5 |
> 1 file changed, 1 insertion(+) |
6 |
|
7 |
when you submit a patch that is not extremely obvious, you must provide |
8 |
details/justification in the commit message. otherwise we're forced to |
9 |
try and guess what/why it is you want to do things, and ultimately we |
10 |
tend to start of just saying "no". |
11 |
|
12 |
> --- a/eclass/toolchain-binutils.eclass |
13 |
> +++ b/eclass/toolchain-binutils.eclass |
14 |
> @@ -271,6 +271,7 @@ toolchain-binutils_src_configure() { |
15 |
> # We used to do it for everyone, but it's slow on 32bit arches. #438522 |
16 |
> case $(tc-arch) in |
17 |
> ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; |
18 |
> + ppc64) myconf+=( --enable-targets="powerpc-linux-gnu" ) ;; |
19 |
> esac |
20 |
|
21 |
why ? we don't normally do this (as you can see in the file, there is no |
22 |
other arch-specific handling like this). instead, binutils itself handles |
23 |
things by selecting a default set of supported targets based on the active |
24 |
host. and when i glance in there, this seems to already be done for you. |
25 |
|
26 |
bfd/config.bfd: |
27 |
powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \ |
28 |
powerpc64-*-*bsd*) |
29 |
targ_defvec=powerpc_elf64_vec |
30 |
targ_selvecs="powerpc_elf64_le_vec powerpc_elf32_vec powerpc_elf32_le_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec" |
31 |
want64=true |
32 |
;; |
33 |
powerpc64le-*-elf* | powerpcle-*-elf64* | powerpc64le-*-linux* | \ |
34 |
powerpc64le-*-*bsd*) |
35 |
targ_defvec=powerpc_elf64_le_vec |
36 |
targ_selvecs="powerpc_elf64_vec powerpc_elf32_le_vec powerpc_elf32_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec" |
37 |
want64=true |
38 |
;; |
39 |
|
40 |
ld/configure.tgt: |
41 |
powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \ |
42 |
| powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \ |
43 |
| powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*) |
44 |
case "${targ}" in |
45 |
*64*) targ_emul=elf64ppc |
46 |
targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" |
47 |
targ_extra_libpath="elf32ppc elf32ppclinux" |
48 |
td=tdir_elf32ppc |
49 |
case "${targ}" in |
50 |
powerpc*le-*) td=tdir_elf32lppc;; |
51 |
esac |
52 |
eval ${td}=`echo "${targ_alias}" | sed -e 's/64//'` |
53 |
eval ${td}linux=\$${td} |
54 |
eval ${td}sim=\$${td} |
55 |
;; |
56 |
|
57 |
and indeed, when i query a default ppc64 linker, it says it already |
58 |
supports both 32bit & 64bit targets: |
59 |
$ powerpc64-unknown-linux-gnu-ld --help | grep supported |
60 |
powerpc64-unknown-linux-gnu-ld: supported targets: elf64-powerpc elf64-powerpcle elf32-powerpc elf32-powerpcle aixcoff-rs6000 aixcoff64-rs6000 aix5coff64-rs6000 elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex |
61 |
powerpc64-unknown-linux-gnu-ld: supported emulations: elf64ppc elf32ppc elf32ppclinux elf32ppcsim |
62 |
|
63 |
it would have to of course in order for biarch support (which works) |
64 |
which is how we build 64-bit kernels in a 32-bit userland. |
65 |
-mike |