[Driver] Gnu.cpp: remove unneeded -L lib/gcc/$triple/$version/../../../$triple
authorFangrui Song <i@maskray.me>
Sun, 21 Mar 2021 01:50:14 +0000 (18:50 -0700)
committerFangrui Song <i@maskray.me>
Sun, 21 Mar 2021 01:50:14 +0000 (18:50 -0700)
commit06d6b1471eb809aaad0681e1eb88727ac8225d47
tree1a1b8e6ed3b907b4d8f9bfdc334fa5e7c573ec38
parent27bc30c39d62f50fd762a8bcc2dcb0401e7263f7
[Driver] Gnu.cpp: remove unneeded -L lib/gcc/$triple/$version/../../../$triple

After path resolution, it duplicates a subsequent -L entry. The entry below
(lib/gcc/$triple/$version/../../../../$OSLibDir) usually does not exist (e.g.
Arch Linux; Debian cross gcc). When it exists, it typically just has ld.so (e.g.
Debian native gcc) which cannot cause collision. Removing the -L (similar to
reordering it) is therefore justified.
clang/lib/Driver/ToolChains/Gnu.cpp
clang/test/Driver/linux-ld.c
clang/test/Driver/mips-reduced-toolchain.cpp