Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 780465 - sys-devel/crossdev-99999999: riscv64-unknown-linux-gnu target fails on glibc
Summary: sys-devel/crossdev-99999999: riscv64-unknown-linux-gnu target fails on glibc
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-05 22:35 UTC by Steve Arnold
Modified: 2021-06-06 08:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
riscv workaround patch (0001-crossdev-add-riscv-case-with-binutils-env-and-no-hea.patch,719 bytes, patch)
2021-04-05 22:35 UTC, Steve Arnold
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Arnold archtester gentoo-dev 2021-04-05 22:35:13 UTC
Created attachment 697833 [details, diff]
riscv workaround patch

Different failures with host linker set to bfd or gold; cross-binutils ends up without a riscv64-unknown-linux-gnu-ld sometimes, other times it can't find gcc libs.  Not sure what the "right" fix is, but the cleanest workaround so far is a small patch:

@@ -247,6 +247,11 @@ parse_target() {
                      STAGE_DEFAULT=${STAGE_C_ONLY}
                      WITH_DEF_HEADERS="no";;
 
+                riscv*)
+                     BUSE+=" -default-gold";
+                     WITH_DEF_HEADERS="no";
+                     ;;
+
                # added in bug #609602
                mmix*)
                      KPKG="[none]"
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-06 06:36:44 UTC
(In reply to Steve Arnold from comment #0)
> Created attachment 697833 [details, diff] [details, diff]
> riscv workaround patch
> 
> Different failures with host linker set to bfd or gold; cross-binutils ends
> up without a riscv64-unknown-linux-gnu-ld sometimes, other times it can't
> find gcc libs.

Probably default lib path should be set explicitly in binutils ebuild (but gcc is expected to have up to date path). Hard to say without seeing an error.

> Not sure what the "right" fix is, but the cleanest workaround so far is a small patch:

> @@ -247,6 +247,11 @@ parse_target() {
>                       STAGE_DEFAULT=${STAGE_C_ONLY}
>                       WITH_DEF_HEADERS="no";;
>  
> +                riscv*)

> +                     BUSE+=" -default-gold";
This looks wrong. Should be -gold as well. Do you have an example failure reproducer?

> +                     WITH_DEF_HEADERS="no";
This is already a crossdev's default: bug #686248
Comment 2 Steve Arnold archtester gentoo-dev 2021-05-29 20:21:31 UTC
You're right, riscv does need to have gold disabled (at least for now).
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-06 08:11:51 UTC
Closing as NEEDINFO as we need to have at least some logs to evaluate the change.