Remove any trailing directory separator from ld_canon_sysroot and adjust ld_canon_sys...
authorDouglas B Rupp <rupp@adacore.com>
Wed, 28 Feb 2018 11:44:26 +0000 (11:44 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 28 Feb 2018 11:44:26 +0000 (11:44 +0000)
commit889be5dbd230ee47a90d4a83f682b13ed7e3faae
tree7c4623776aa822c8320d6b7cbe134e5a9492078e
parenteef104664efb52965d85a28bc3fc7c77e52e48e2
Remove any trailing directory separator from ld_canon_sysroot and adjust ld_canon_sysroot_len.

The problem was the ld expect libiberty/lrealpath() to always return a
path, but in some cases it returns a prefix. It seemed like too much of
an earthquake to propose a fix to lrealpath.

* ldmain.c (main): Remove directory separator, if any, from the
end of the canonicalized sysroot.
ld/ChangeLog
ld/ldmain.c