lowRISC / lowrisc-toolchains

UNSUPPORTED INTERNAL toolchain builds
32 stars 14 forks source link

Fix Cross-compile Linking Args #26

Closed lenary closed 4 years ago

lenary commented 4 years ago

I was seeing some path resolution issues when using the clang cross file on a system that had a system install of the risc-v toolchain. Debugging this further, it seems like we need to pass these toolchain arguments down to <lang>_link_args as well as <lang>_args so that the clang driver picks up the right libraries to use.

Additionally, meson v0.53.1 introduced some per-language linker specification options, so I'm protecting us from getting bitten by that by explicitly setting those to the same as the ld option.

lenary commented 4 years ago

Verified on morty that these arguments now mean the clang driver finds the right libgcc to link to.