[PATCH] RISC-V: Allow 32-bit BFD to handle 64-bit objects

Palmer Dabbelt palmer@dabbelt.com
Mon May 1 20:33:00 GMT 2017


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



More information about the Binutils mailing list