aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-05-18 15:07:59 +0100
committerNick Clifton <nickc@redhat.com>2017-05-18 15:07:59 +0100
commit3aa2d05a728216bbb99dbb5718be9bb36429cf41 (patch)
tree634ea00884160b88e1c0c55154b963ab3652e077 /ld/ld.texinfo
parent59cc050d893d1e8c75547de950a35e809588f12f (diff)
downloadgdb-3aa2d05a728216bbb99dbb5718be9bb36429cf41.zip
gdb-3aa2d05a728216bbb99dbb5718be9bb36429cf41.tar.gz
gdb-3aa2d05a728216bbb99dbb5718be9bb36429cf41.tar.bz2
Treat a prefix of "$SYSROOT" in the same way as "=" when parsing linker search paths.
PR ld/21251 * ldfile.c (ldfile_add_library_path): If the path starts with $SYSROOT then use the sysroot as the real prefix. * ldlang.c (lang_add_input_file): Treat $SYSROOT in the same way as =. * ldlex.l: Add $SYSROOT as allow prefix for a filename. * ld.texinfo (-L): Document that $SYSROOT acts like = when prefixing a library search path. (INPUT): Likewise. * testsuite/ld-scripts/sysroot-prefix.exp: Add $SYSROOT prefix tests.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo11
1 files changed, 6 insertions, 5 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 653bfb8..9a72cb9 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -705,9 +705,9 @@ order in which the options appear. @option{-L} options do not affect
how @command{ld} searches for a linker script unless @option{-T}
option is specified.
-If @var{searchdir} begins with @code{=}, then the @code{=} will be replaced
-by the @dfn{sysroot prefix}, controlled by the @samp{--sysroot} option, or
-specified when the linker is configured.
+If @var{searchdir} begins with @code{=} or @code{$SYSROOT}, then this
+prefix will be replaced by the @dfn{sysroot prefix}, controlled by the
+@samp{--sysroot} option, or specified when the linker is configured.
@ifset UsesEnvVars
The default set of paths searched (without being specified with
@@ -3393,8 +3393,9 @@ for in the @dfn{sysroot prefix}. Otherwise, the linker will try to
open the file in the current directory. If it is not found, the
linker will search through the archive library search path.
The @dfn{sysroot prefix} can also be forced by specifying @code{=}
-as the first character in the filename path. See also the
-description of @samp{-L} in @ref{Options,,Command Line Options}.
+as the first character in the filename path, or prefixing the filename
+path with @code{$SYSROOT}. See also the description of @samp{-L} in
+@ref{Options,,Command Line Options}.
If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the
name to @code{lib@var{file}.a}, as with the command line argument