Skip to content

Commit

Permalink
[meson] Provide Language-specific Linker Definitions
Browse files Browse the repository at this point in the history
This is a new feature of meson v0.53.1 which chooses the linker in a
language-specific manner. We just set the linker for C and C++ to
explicitly be riscv32-unknown-elf-ld, the linker we normally use.

In the clang builds, this will be passed with `clang -fuse-ld=<path>`
which should work correctly, but uses the clang driver to establish all
the right arguments to pass down to the linker.

Signed-off-by: Sam Elliott <selliott@lowrisc.org>
  • Loading branch information
lenary committed Jun 24, 2020
1 parent 6d66df0 commit a5d052e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generate-clang-meson-cross-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ c = '${toolchain_dest}/bin/${toolchain_target}-clang'
cpp = '${toolchain_dest}/bin/${toolchain_target}-clang++'
ar = '${toolchain_dest}/bin/${toolchain_target}-ar'
ld = '${toolchain_dest}/bin/${toolchain_target}-ld'
c_ld = '${toolchain_dest}/bin/${toolchain_target}-ld'
cpp_ld = '${toolchain_dest}/bin/${toolchain_target}-ld'
objdump = '${toolchain_dest}/bin/${toolchain_target}-objdump'
objcopy = '${toolchain_dest}/bin/${toolchain_target}-objcopy'
strip = '${toolchain_dest}/bin/${toolchain_target}-strip'
Expand Down
2 changes: 2 additions & 0 deletions generate-gcc-meson-cross-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ c = '${toolchain_dest}/bin/${toolchain_target}-gcc'
cpp = '${toolchain_dest}/bin/${toolchain_target}-g++'
ar = '${toolchain_dest}/bin/${toolchain_target}-ar'
ld = '${toolchain_dest}/bin/${toolchain_target}-ld'
c_ld = '${toolchain_dest}/bin/${toolchain_target}-ld'
cpp_ld = '${toolchain_dest}/bin/${toolchain_target}-ld'
objdump = '${toolchain_dest}/bin/${toolchain_target}-objdump'
objcopy = '${toolchain_dest}/bin/${toolchain_target}-objcopy'
strip = '${toolchain_dest}/bin/${toolchain_target}-strip'
Expand Down

0 comments on commit a5d052e

Please sign in to comment.