[PATCH] D97894: [Driver] Drop $sysroot/usr special case from Gentoo gcc-config detection
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 11 10:13:22 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8d8a9190db19: [Driver] Drop $sysroot/usr special case from Gentoo gcc-config detection (authored by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97894/new/
https://reviews.llvm.org/D97894
Files:
clang/lib/Driver/ToolChains/Gnu.cpp
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -1934,13 +1934,10 @@
// Typically /usr.
AddDefaultGCCPrefixes(TargetTriple, Prefixes, D.SysRoot);
}
- }
- // Try to respect gcc-config on Gentoo. However, do that only
- // if --gcc-toolchain is not provided or equal to the Gentoo install
- // in /usr. This avoids accidentally enforcing the system GCC version
- // when using a custom toolchain.
- if (GCCToolchainDir == "" || GCCToolchainDir == D.SysRoot + "/usr") {
+ // Try to respect gcc-config on Gentoo if --gcc-toolchain is not provided.
+ // This avoids accidentally enforcing the system GCC version when using a
+ // custom toolchain.
SmallVector<StringRef, 16> GentooTestTriples;
// Try to match an exact triple as target triple first.
// e.g. crossdev -S x86_64-gentoo-linux-gnu will install gcc libs for
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97894.330010.patch
Type: text/x-patch
Size: 1012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210311/191322f7/attachment.bin>
More information about the cfe-commits
mailing list