Skip to content

riscv64-embedded fails to link anything, discovered as spike build failure #267859

@widlarizer

Description

@widlarizer

Describe the bug

riscv64-none-elf-gcc fails to link basic file. This breaks the build of spike. . You will see riscv64-none-elf-ld: cannot find crt0.o: No such file or directory cannot find -lgloss: No such file or directory

Steps To Reproduce

Steps to reproduce the behavior:
nix-shell -p pkgs.spike, or nix-shell -p pkgsCross.riscv64-embedded.stdenv.cc followed by touch nothing.c && riscv64-none-elf-gcc nothing.c

Expected behavior

Spike builds, or linker errors are only related to the empty C file, not to default linking options failing.

Notify maintainers

team gcc:

@Synthetica9
@vcunat
@Ericson2314

Metadata

emil@fridge ~> nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.62, NixOS, 23.11 (Tapir), 23.11pre546599.e44462d6021b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos, nixos-23.05-23.05"`
 - channels(emil): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: riscv64RISC-V is an open standard instruction set architecture
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions