freebsd-nq/gnu/usr.bin
Bryan Drewery 8b2b71b415 Fix ld not respecting --sysroot.
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
2015-11-24 00:49:29 +00:00
..
binutils Fix ld not respecting --sysroot. 2015-11-24 00:49:29 +00:00
cc Add more SUBDIR_PARALLEL. 2015-10-15 22:55:08 +00:00
dialog Add META_MODE support. 2015-06-13 19:20:56 +00:00
diff Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
diff3 Add META_MODE support. 2015-06-13 19:20:56 +00:00
dtc META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
gdb Use PCB/LR from PCB rather from stack on armv7-gdb 2015-10-30 12:37:40 +00:00
gperf META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
grep Include "system.h" for isdir() prototype. 2015-11-04 05:38:08 +00:00
groff Remove disconnected xditview. 2015-10-21 01:34:51 +00:00
rcs Add more SUBDIR_PARALLEL. 2015-10-15 22:55:08 +00:00
sdiff Add META_MODE support. 2015-06-13 19:20:56 +00:00
tests Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
Makefile - Record dependencies of gdb/gdbtui/kgdb on binutils/lib{bfd,iberty,opcodes}, 2015-07-19 00:38:19 +00:00
Makefile.inc