summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/asprintf.c
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-11-24 00:49:29 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-11-24 00:49:29 +0000
commit2995bb889e2e3d76c244bcd6f58322bc33117871 (patch)
treef835cdb869b62313bad215c29cfdad2940fde14c /lib/libc/stdio/asprintf.c
parent464700478881c433707f3256886a2ddbeae0de2c (diff)
downloadFreeBSD-src-2995bb889e2e3d76c244bcd6f58322bc33117871.zip
FreeBSD-src-2995bb889e2e3d76c244bcd6f58322bc33117871.tar.gz
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
Diffstat (limited to 'lib/libc/stdio/asprintf.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud