opnsense-src/gnu/usr.bin/binutils/ld
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
..
armelf_fbsd.sh Set the correct relocation type for R_ARM_TARGET2 to R_ARM_GOT_PREL. The 2013-01-06 07:14:04 +00:00
armelfb_fbsd.sh Set the correct relocation type for R_ARM_TARGET2 to R_ARM_GOT_PREL. The 2013-01-06 07:14:04 +00:00
config.h Update config.h for ld. 2010-11-01 19:46:18 +00:00
elf32btsmip_fbsd.sh Push mips support for ld into the tree. 2008-12-11 08:18:45 +00:00
elf32btsmipn32_fbsd.sh Add an alignment of 8 for sections in the n32 ABI. The default alignment 2010-06-25 05:07:42 +00:00
elf32ltsmip_fbsd.sh Push mips support for ld into the tree. 2008-12-11 08:18:45 +00:00
elf32ltsmipn32_fbsd.sh Add an alignment of 8 for sections in the n32 ABI. The default alignment 2010-06-25 05:07:42 +00:00
elf64btsmip_fbsd.sh Push mips support for ld into the tree. 2008-12-11 08:18:45 +00:00
elf64ltsmip_fbsd.sh Push mips support for ld into the tree. 2008-12-11 08:18:45 +00:00
genscripts.sh Avoid warning race with creating 'ldscripts' directory during build. 2015-10-16 05:54:41 +00:00
ld.1 Fix rendering with mandoc 2014-11-23 23:56:01 +00:00
Makefile Fix ld not respecting --sysroot. 2015-11-24 00:49:29 +00:00
Makefile.amd64 Fix subdir -j build after r287983 by adding missing dependencies. 2015-09-25 20:31:04 +00:00
Makefile.arm Merging of projects/armv6, part 3 2012-08-15 03:21:56 +00:00
Makefile.depend.amd64 new depends 2015-06-16 23:37:19 +00:00
Makefile.depend.host Updated depends 2015-10-07 00:43:05 +00:00
Makefile.i386 Fix typo: s/LIBSERACHPATH/LIBSEARCHPATH/g 2011-03-21 04:03:55 +00:00
Makefile.mips Fix subdir -j build after r287983 by adding missing dependencies. 2015-09-25 20:31:04 +00:00
Makefile.powerpc Rename the linker emulation name for powerpc and powerc64. This is needed that 2011-11-19 19:25:57 +00:00
Makefile.powerpc64 Fix subdir -j build after r287983 by adding missing dependencies. 2015-09-25 20:31:04 +00:00
Makefile.sparc64 Fix subdir -j build after r287983 by adding missing dependencies. 2015-09-25 20:31:04 +00:00