Bug 1492341

Summary: Add riscv64 architecture (upstreamed in GCC 7.1.0)
Product: [Fedora] Fedora Reporter: David Abdurachmanov <david.abdurachmanov>
Component: cross-gccAssignee: David Howells <dhowells>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan, dhowells, lkundrak, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cross-gcc-7.2.1-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-09 13:13:53 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: 1491955    
Bug Blocks:    
Attachments:
Description Flags
0001-Add-riscv32-architecture.patch
none
0001-Fix-broken-case-statement.patch
none
0002-Add-riscv32-architecture.patch none

Description David Abdurachmanov 2017-09-16 14:44:50 UTC
Description of problem:

riscv64 support was upstreamed in GCC 7.1.0, which (or higher version) is available in Fedora.

Pull request is available here: https://src.fedoraproject.org/rpms/cross-gcc/pull-request/1#

Fedora RISC-V efforts are described here: https://fedoraproject.org/wiki/Architectures/RISC-V

Comment 1 David Abdurachmanov 2017-10-15 11:47:07 UTC
ping

Comment 2 David Howells 2017-11-06 15:39:36 UTC
Is arch support slated to go into the upstream kernel?

Comment 3 David Abdurachmanov 2017-11-06 16:38:02 UTC
Yes, it's already in linux-next and should land in 4.15.

linux-next: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/riscv?h=next-20171106

glibc changes should land in 2.27 (assuming nothing goes terrible wrong).

Comment 4 David Howells 2017-11-06 16:49:25 UTC
Okay.  Anyway, I've added riscv64 support to my local repos; should be in rawhide soon and f27 in a couple of days.

Comment 5 Richard W.M. Jones 2018-03-17 14:28:41 UTC
I wonder if you could also do riscv32?  My particular interest is
compiling programs for PicoRV32, but there's also a reasonable chance
that in the next year we'll have 64 bit RISC-V hardware which will have
RV32 special-purpose cores included (for doing firmware-ish things
like power management) and we'd like to compile software for those.

I am currently doing a local build which was made using the obvious changes
(ie. searching the spec files of cross-binutils & cross-gcc for
/riscv64/ and adding similar lines for riscv32).

Comment 6 Richard W.M. Jones 2018-03-18 16:38:44 UTC
Created attachment 1409528 [details]
0001-Add-riscv32-architecture.patch

Patch to cross-binutils.

Comment 7 Richard W.M. Jones 2018-03-18 16:40:23 UTC
Created attachment 1409530 [details]
0001-Fix-broken-case-statement.patch

Patch to cross-gcc to fix broken case statement in spec file.

Comment 8 Richard W.M. Jones 2018-03-18 16:40:56 UTC
Created attachment 1409531 [details]
0002-Add-riscv32-architecture.patch

Patch to cross-gcc to add riscv32 architecture.