riscv64-none-elf-ld fails with "unrecognised emulation mode: acosx_version_min" on macOS #83141
Labels
0.kind: bug
Something is broken
6.topic: cross-compilation
Building packages on a different platform than they will be used on
6.topic: darwin
Running or building packages on Darwin
Describe the bug
When trying to use the
riscv64-none-elf
toolchain to cross compile on macOS (10.15.1), the linker (riscv64-none-elf-ld
) fails with error:unrecognised emulation mode: acosx_version_min
.To Reproduce
shell.nix
file with the following:$ nix-shell
, and wait for the cross compiler derivations to build.[nix-shell]$ riscv64-none-elf-ld
Expected behavior
I expect the linker to output
ld: no object files specified
(or something similar).Instead, I'm seeing the following output:
Additional context
I suspect that there is something going on where the native macOS linker (
/usr/bin/ld
) is being invoked under the hood. I ran some analysis withdtruss
, but couldn't find anything definitive.Note that this error occurs no matter what flags are passed -- including
riscv64-none-elf-ld --version
.Metadata
"x86_64-darwin"
Darwin 19.0.0, macOS 10.15.1
no
no
nix-env (Nix) 2.3.3
"nixpkgs-20.09pre216412.04d6123309f"
/Users/johnmurphy/.nix-defexpr/channels/nixpkgs
Maintainer information:
I'm not too sure who the maintainer is, or how the cross compiling setup works. (I'm fairly new to nix). Any help here would be greatly appreciated! Thank you :)
The text was updated successfully, but these errors were encountered: