Bug 1794343 - [PATCH] Add support for riscv64 in SPEC file
Summary: [PATCH] Add support for riscv64 in SPEC file
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 32
Hardware: riscv64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-fedora-riscv64
TreeView+ depends on / blocked
 
Reported: 2020-01-23 10:51 UTC by David Abdurachmanov
Modified: 2021-05-25 15:17 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 15:17:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
SPEC file changes (4.01 KB, patch)
2020-01-23 10:51 UTC, David Abdurachmanov
no flags Details | Diff
SPEC file changes v2 (4.14 KB, patch)
2020-01-26 08:14 UTC, David Abdurachmanov
no flags Details | Diff

Description David Abdurachmanov 2020-01-23 10:51:14 UTC
Created attachment 1654808 [details]
SPEC file changes

It's time to upstream our Fedora/RISCV GCC spec changes. The patch is attached and it hasn't changed much over 1-2 years now.

A few notes:
- We only support RV64GC in Fedora/RISCV. That's known as riscv64 with LP64D ABI.
- RISC-V use different paths for libraries compared to other architectures. Instead of /lib64 or /usr/lib64 we have /lib64/lp64d or /usr/lib64/lp64d. Basically we have a subdirectory with an ABI name. We solve this issue in Fedora/RISCV by having symlinks thus standard (i.e. expected by software and users) paths still work.
- Note that RISC-V paths by default feel like multilib. We are compiling with multilib enabled, but only one ABI selected (LP64D). This allows us to get desired install paths.
- We have profiledbootstrap disabled due to extra time it takes. We can try enabling it again with the next GCC build.

The 1st GCC 10 build in Fedora/RISCV is done: http://fedora.riscv.rocks/koji/buildinfo?buildID=133222

I am now recompiling glibc as a test (http://fedora.riscv.rocks/koji/buildinfo?buildID=133227). After that I will start building GCC 10 again (gcc-10.0.1-0.4.fc32) for Fedora/RISCV.

It takes ~14 hours to compile GCC on SiFive Unleashed board, but it takes 2-3 days with all the tests enabled (%check). We are using our fastest hardware for GCC builds.

Comment 1 David Abdurachmanov 2020-01-26 07:57:35 UTC
gcc-10.0.1-0.4.fc32 is now built: http://fedora.riscv.rocks/koji/buildinfo?buildID=133229

There was only one change: enabling profiledbootstrap

Here are buildArch times for GCC on the same board. 

# buildArch for 0.3

Task time 	56:57:19

# buildArch for 0.4

Task time 	52:03:53

I have started building gcc-10.0.1-0.5.fc32: http://fedora.riscv.rocks/koji/taskinfo?taskID=327051

I made one more change: added BuildRequires for autogen

I noticed:

  [..]
  Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.Scs6Sw
  + umask 022
  + cd /builddir/build/BUILD
  + cd gcc-10.0.1-20200121
  + cd obj-riscv64-redhat-linux
  + LC_ALL=C
  + make -j4 -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ 'RUNTESTFLAGS=--target_board=unix/'\''{,-fstack-
  protector-strong}'\'''
  make[1]: Entering directory '/builddir/build/BUILD/gcc-10.0.1-20200121/obj-riscv64-redhat-linux'
  make[2]: Entering directory '/builddir/build/BUILD/gcc-10.0.1-20200121/obj-riscv64-redhat-linux/fixincludes'
  autogen -T ../../fixincludes/check.tpl ../../fixincludes/inclhack.def
  BUILDSTDERR: make[2]: autogen: Command not found
  make[2]: Leaving directory '/builddir/build/BUILD/gcc-10.0.1-20200121/obj-riscv64-redhat-linux/fixincludes'
  BUILDSTDERR: make[2]: *** [Makefile:176: check] Error 127
  BUILDSTDERR: make[1]: *** [Makefile:3831: check-fixincludes] Error 2
  [..]

I will prepare an update to the patch.

Comment 2 David Abdurachmanov 2020-01-26 08:14:38 UTC
Created attachment 1655360 [details]
SPEC file changes v2

Comment 3 Ben Cotton 2020-02-11 17:25:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 4 Fedora Program Management 2021-04-29 16:02:42 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2021-05-25 15:17:50 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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