[PATCH] D26887: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 19 00:39:01 PST 2016
mgorny created this revision.
mgorny added reviewers: chandlerc, bruno, bkramer.
mgorny added a subscriber: cfe-commits.
Herald added subscribers: srhines, danalbert.
Fix the gcc-config code to support multilib gcc installs properly. This
solves two problems: -mx32 using the 64-bit gcc directory (due to matching
installation triple), and -m32 not respecting gcc-config at all (due to
mismatched installation triple).
In order to fix the former issue, split the multilib scan out of
Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple() (the code
is otherwise unchanged), and call it for each installation found via
gcc-config.
In order to fix the latter issue, split the gcc-config processing out of
Generic_GCC::GCCInstallationDetector::init() and repeat it for all
triples, including extra and biarch triples. The only change
in the gcc-config code itself is adding the call to multilib scan.
Convert the gentoo_linux_gcc_multi_version_tree test input to multilib
x86_64+32+x32 install, and add appropriate tests to linux-header-search
and linux-ld.
https://reviews.llvm.org/D26887
Files:
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
test/Driver/Inputs/gentoo_linux_gcc_multi_version_tree/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/32/crtbegin.o
test/Driver/Inputs/gentoo_linux_gcc_multi_version_tree/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/x32/crtbegin.o
test/Driver/Inputs/gentoo_linux_gcc_multi_version_tree/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/32/crtbegin.o
test/Driver/Inputs/gentoo_linux_gcc_multi_version_tree/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/x32/crtbegin.o
test/Driver/linux-header-search.cpp
test/Driver/linux-ld.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26887.78623.patch
Type: text/x-patch
Size: 14493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161119/c49aef32/attachment.bin>
More information about the cfe-commits
mailing list