aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts/sysroot-prefix.exp
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/testsuite/ld-scripts/sysroot-prefix.exp
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/testsuite/ld-scripts/sysroot-prefix.exp')
-rw-r--r--ld/testsuite/ld-scripts/sysroot-prefix.exp9
1 files changed, 8 insertions, 1 deletions
diff --git a/ld/testsuite/ld-scripts/sysroot-prefix.exp b/ld/testsuite/ld-scripts/sysroot-prefix.exp
index 0fc322e..e08429f 100644
--- a/ld/testsuite/ld-scripts/sysroot-prefix.exp
+++ b/ld/testsuite/ld-scripts/sysroot-prefix.exp
@@ -76,16 +76,23 @@ set sysroot_prefix_tests {
{7 "root-anchored but -Lpath" "/sysroot/" {} "cannot find"}
{7 "full-path" "@cwd@/sysroot/" {} ""}
{7 "root-anchored =-prefixed -Lpath" "=/sysroot/" {} "cannot find"}
- {7 "full-path =-prefixed with empty" "=@cwd@/sysroot/" "--sysroot=" ""}
+ {7 "root-anchored $SYSROOT-prefixed -Lpath" "$SYSROOT/sysroot/" {} "cannot find"}
{7 "plain =-prefixed with empty" "=sysroot/" "--sysroot=" ""}
+ {7 "plain $SYSROOT-prefixed with empty" "$SYSROOTsysroot/" "--sysroot=" ""}
{6 "root-anchored but script outside sysroot" "/" "--sysroot=@cwd@/sysroot" "cannot find"}
{6 "root-anchored and script inside sysroot" "/sysroot/" "--sysroot=@cwd@" ""}
{6 "root-anchored =-prefixed script outside" "=/" "--sysroot=@cwd@/sysroot" ""}
+ {6 "root-anchored $SYSROOT-prefixed script outside" "$SYSROOT/" "--sysroot=@cwd@/sysroot" ""}
{6 "root-anchored =-prefixed script inside" "=/sysroot/" "--sysroot=@cwd@" ""}
+ {6 "root-anchored $SYSROOT-prefixed script inside" "$SYSROOT/sysroot/" "--sysroot=@cwd@" ""}
{2 "plain =-prefixed without but -Lpath" "=sysroot/" {} "cannot find"}
+ {2 "plain $SYSROOT-prefixed without but -Lpath" "$SYSROOTsysroot/" {} "cannot find"}
{2 "full-path =-prefixed without" "=@cwd@/sysroot/" {} "cannot find"}
+ {2 "full-path $SYSROOT-prefixed without" "$SYSROOT@cwd@/sysroot/" {} "cannot find"}
{1 "plain =-prefixed -Lpath" "=sysroot/" {} ""}
+ {1 "plain $SYSROOT-prefixed -Lpath" "$SYSROOTsysroot/" {} ""}
{1 "full-path =-prefixed without" "=@cwd@/sysroot/" {} ""}
+ {1 "full-path $SYSROOT-prefixed without" "$SYSROOT@cwd@/sysroot/" {} ""}
}
# May have to provide a target-specific assembler option for some targets.