[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 4 06:48:35 PST 2019
arichardson added a comment.
In D56215#1346061 <https://reviews.llvm.org/D56215#1346061>, @mgorny wrote:
> For the record, another option is to actually fix other software not to call LD directly.
Or if you really need to call the linker directly without specifying search paths you could also install a shell script as /usr/bin/ld that passes the appropriate flags to /usr/bin/ld.lld?
I don't think ifdefs in the source code are a good idea. Cross linking should just work as expected. But you could look at the OS field in the first input ELF file to choose default config options/a different emulation for NetBSD.
The approach we are using in CheriBSD to differentiate between MIPS and CHERI pure-capability to either pass an explicitly `-m elf_btsmip_cheri_fbsd`/ `-m elf_btsmip_fbsd` or infer whether it is CHERI or MIPS based on the e_flags field of the first input file.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56215/new/
https://reviews.llvm.org/D56215
More information about the llvm-commits
mailing list