-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
riscv64-embedded fails to link anything, discovered as spike build failure #267859
Comments
Bisected here: 1e47c87 Repro:
I think 1e47c87 may not take into account the fact that, with standalone |
#266364 is the relevant PR. Maybe we can modify the environment of these platforms specifically. The principle behind the fix in the commit in question makes sense to me, but I am not sure how best to proceed. |
I think I know what this is. Getting my builds caught up. |
Yep, it fixes |
This commit adds pkgs.spike, which internally uses pkgsCross.riscv64-embedded.stdenv.cc, as a test case for the issue reported in NixOS#267859
In https://github.com/NixOS/nixpkgs/pull/266364/files I neglected to evade one of newlib's other (annoying) self-disablement checks: when host==target newlib decides it's not in the mood to build itself for some reason. Since we have an entire package for newlib (it's no longer part of gcc) these checks are silly. So I have evadede the second check as well. Closes NixOS#267859
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
, ornix-shell -p pkgsCross.riscv64-embedded.stdenv.cc
followed bytouch 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
The text was updated successfully, but these errors were encountered: