Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 780465

Summary: sys-devel/crossdev-99999999: riscv64-unknown-linux-gnu target fails on glibc
Product: Gentoo Linux Reporter: Steve Arnold <nerdboy>
Component: Current packagesAssignee: Gentoo Crossdev team <crossdev>
Status: RESOLVED NEEDINFO    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: riscv workaround patch

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.