Bug 1492341 - Add riscv64 architecture (upstreamed in GCC 7.1.0)
Summary: Add riscv64 architecture (upstreamed in GCC 7.1.0)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cross-gcc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Howells
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1491955
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-16 14:44 UTC by David Abdurachmanov
Modified: 2018-03-18 16:40 UTC (History)
4 users (show)

Fixed In Version: cross-gcc-7.2.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-09 13:13:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
0001-Add-riscv32-architecture.patch (1.86 KB, text/plain)
2018-03-18 16:38 UTC, Richard W.M. Jones
no flags Details
0001-Fix-broken-case-statement.patch (627 bytes, text/plain)
2018-03-18 16:40 UTC, Richard W.M. Jones
no flags Details
0002-Add-riscv32-architecture.patch (1.81 KB, text/plain)
2018-03-18 16:40 UTC, Richard W.M. Jones
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.