* [PATCH] RISC-V: Allow 32-bit BFD to handle 64-bit objects
@ 2017-05-01 20:33 Palmer Dabbelt
2017-05-01 22:05 ` Jeff Law
2017-05-02 1:31 ` Alan Modra
0 siblings, 2 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2017-05-01 20:33 UTC (permalink / raw)
To: binutils; +Cc: patches, Palmer Dabbelt
We've been telling people that the riscv32-* and riscv64-* toolchains
are exactly the same, but it turns out we were lying: the riscv32-* BFD
doesn't handle 64-bit objects. This fixes that difference, so the ports
are actually the same.
bfd/ChangeLog
2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
* config.bfd (riscv32-*): Enable unconditionally.
(riscv64-*): Likewise.
---
bfd/ChangeLog | 5 +++++
bfd/config.bfd | 5 +----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index dff6a59..478bd99 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
+
+ * config.bfd (riscv32-*): Enable unconditionally.
+ (riscv64-*): Likewise.
+
2017-04-29 Alan Modra <amodra@gmail.com>
PR 21432
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 151de95..c8f9b48 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1438,19 +1438,16 @@ case "${targ}" in
targ_underscore=yes
;;
-#ifdef BFD64
riscv32-*-*)
targ_defvec=riscv_elf32_vec
- targ_selvecs="riscv_elf32_vec"
+ targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
want64=true
;;
-
riscv64-*-*)
targ_defvec=riscv_elf64_vec
targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
want64=true
;;
-#endif
rl78-*-elf)
targ_defvec=rl78_elf32_vec
--
2.10.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] RISC-V: Allow 32-bit BFD to handle 64-bit objects
2017-05-01 20:33 [PATCH] RISC-V: Allow 32-bit BFD to handle 64-bit objects Palmer Dabbelt
@ 2017-05-01 22:05 ` Jeff Law
2017-05-02 1:31 ` Alan Modra
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Law @ 2017-05-01 22:05 UTC (permalink / raw)
To: Palmer Dabbelt, binutils; +Cc: patches
On 05/01/2017 02:33 PM, Palmer Dabbelt wrote:
> We've been telling people that the riscv32-* and riscv64-* toolchains
> are exactly the same, but it turns out we were lying: the riscv32-* BFD
> doesn't handle 64-bit objects. This fixes that difference, so the ports
> are actually the same.
>
> bfd/ChangeLog
>
> 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
>
> * config.bfd (riscv32-*): Enable unconditionally.
> (riscv64-*): Likewise.
This is obviously a decision for the binutils maintainers, but I can
confirm that with the patch installed, GCC is able to build through
target-libgcc for riscv32, which it couldn't previously do because the
riscv32 BFD bits would blow up assembling the 64bit multilib code
produced by GCC.
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] RISC-V: Allow 32-bit BFD to handle 64-bit objects
2017-05-01 20:33 [PATCH] RISC-V: Allow 32-bit BFD to handle 64-bit objects Palmer Dabbelt
2017-05-01 22:05 ` Jeff Law
@ 2017-05-02 1:31 ` Alan Modra
2017-05-02 22:20 ` Palmer Dabbelt
1 sibling, 1 reply; 4+ messages in thread
From: Alan Modra @ 2017-05-02 1:31 UTC (permalink / raw)
To: Palmer Dabbelt; +Cc: binutils, patches
On Mon, May 01, 2017 at 01:33:03PM -0700, Palmer Dabbelt wrote:
> -#ifdef BFD64
> riscv32-*-*)
> targ_defvec=riscv_elf32_vec
> - targ_selvecs="riscv_elf32_vec"
> + targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
> want64=true
> ;;
> -
> riscv64-*-*)
> targ_defvec=riscv_elf64_vec
> targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
> want64=true
> ;;
> -#endif
Removing the #ifdef isn't correct. To see why, configure binutils
with --enable-targets=all on a 32-bit host. OK without that change.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] RISC-V: Allow 32-bit BFD to handle 64-bit objects
2017-05-02 1:31 ` Alan Modra
@ 2017-05-02 22:20 ` Palmer Dabbelt
0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2017-05-02 22:20 UTC (permalink / raw)
To: amodra; +Cc: binutils, patches
On Mon, 01 May 2017 18:31:44 PDT (-0700), amodra@gmail.com wrote:
> On Mon, May 01, 2017 at 01:33:03PM -0700, Palmer Dabbelt wrote:
>> -#ifdef BFD64
>> riscv32-*-*)
>> targ_defvec=riscv_elf32_vec
>> - targ_selvecs="riscv_elf32_vec"
>> + targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
>> want64=true
>> ;;
>> -
>> riscv64-*-*)
>> targ_defvec=riscv_elf64_vec
>> targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
>> want64=true
>> ;;
>> -#endif
>
> Removing the #ifdef isn't correct. To see why, configure binutils
> with --enable-targets=all on a 32-bit host. OK without that change.
Thanks. Committed as
commit 763a5fa4f330d6d3859c94a69ba1fcab09330cf9
Author: Palmer Dabbelt <palmer@dabbelt.com>
Date: Mon May 1 10:26:32 2017 -0700
RISC-V: Allow 32-bit BFD to handle 64-bit objects
We've been telling people that the riscv32-* and riscv64-* toolchains
are exactly the same, but it turns out we were lying: the riscv32-* BFD
doesn't handle 64-bit objects. This fixes that difference, so the ports
are actually the same.
bfd/ChangeLog
2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
* config.bfd (riscv32-*): Enable rv64.
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c62cf13..530ec1d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
+
+ * config.bfd (riscv32-*): Enable rv64.
+
2017-05-02 Alan Modra <amodra@gmail.com>
PR 21384
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 151de95..eb6a958 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1441,10 +1441,9 @@ case "${targ}" in
#ifdef BFD64
riscv32-*-*)
targ_defvec=riscv_elf32_vec
- targ_selvecs="riscv_elf32_vec"
+ targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
want64=true
;;
-
riscv64-*-*)
targ_defvec=riscv_elf64_vec
targ_selvecs="riscv_elf32_vec riscv_elf64_vec"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-02 22:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-01 20:33 [PATCH] RISC-V: Allow 32-bit BFD to handle 64-bit objects Palmer Dabbelt
2017-05-01 22:05 ` Jeff Law
2017-05-02 1:31 ` Alan Modra
2017-05-02 22:20 ` Palmer Dabbelt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).