Bug 1600938

Summary: Add riscv32 to cross-binutils
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: cross-binutilsAssignee: David Howells <dhowells>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan, dhowells, lkundrak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-13 13:46:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1600939    

Description Richard W.M. Jones 2018-07-13 12:42:07 UTC
Description of problem:

Please add riscv32 to cross-binutils.  This is useful for a couple
of targets:

(1) PicoRV32: I have confirmed that a self-compiled cross-gcc can
build working binaries for this target.

(2) Embedded firmware: Most planned RV64 machines will include
extra RV32 cores for various power management and I/O tasks.
The firmware for these is open source, but we don't have a way
to compile it.

My suggested patch is here, but basically all I did was add
extra lines matching the riscv64 ones.

https://bugzilla.redhat.com/show_bug.cgi?id=1492341#c5

Comment 1 David Howells 2018-07-13 13:16:19 UTC
I presume you can't use the riscv64 tools for riscv32?

Comment 2 David Howells 2018-07-13 13:28:16 UTC
Also, are you okay waiting for binutils-2.31 to come along if that's only a few days?  I could upgrade cross-binutils to that and do this at the same time then.

Comment 3 Richard W.M. Jones 2018-07-13 13:42:32 UTC
(In reply to David Howells from comment #1)
> I presume you can't use the riscv64 tools for riscv32?

This is a very good point.  I'm going to test it and get back.

Comment 4 Richard W.M. Jones 2018-07-13 13:46:59 UTC
Yes we can use the riscv64 compiler, so I'm closing this bug.

For the record you have to add these flags:
-march=rv32i -mabi=ilp32