mirror of
https://github.com/opnsense/src.git
synced 2026-03-02 13:20:37 -05:00
ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in the
default search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. These
need to be prefixed by '=' so that the --sysroot flag is respected. This
is not a problem with buildworld since the TOOLS_PREFIX is baked into the
cross-ld. However it is a problem when trying to use ld(1) with --sysroot
anywhere else as it ends up still reading /lib and /usr/lib despite --sysroot.
The default --sysroot (TARGET_SYSTEM_ROOT) is '/' for /usr/bin/ld.
I found this while building with META MODE with uses only --sysroot with
/usr/bin/ld, and found that libraries that I had not built in its sysroot
directory were leaking in. This didn't happen with ports binutils either. This
would also impact external compiler support.
Reviewed by: bapt, brooks
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4262
|
||
|---|---|---|
| .. | ||
| armelf_fbsd.sh | ||
| armelfb_fbsd.sh | ||
| config.h | ||
| elf32btsmip_fbsd.sh | ||
| elf32btsmipn32_fbsd.sh | ||
| elf32ltsmip_fbsd.sh | ||
| elf32ltsmipn32_fbsd.sh | ||
| elf64btsmip_fbsd.sh | ||
| elf64ltsmip_fbsd.sh | ||
| genscripts.sh | ||
| ld.1 | ||
| Makefile | ||
| Makefile.amd64 | ||
| Makefile.arm | ||
| Makefile.depend.amd64 | ||
| Makefile.depend.host | ||
| Makefile.i386 | ||
| Makefile.mips | ||
| Makefile.powerpc | ||
| Makefile.powerpc64 | ||
| Makefile.sparc64 | ||