]> granicus.if.org Git - clang/commit
Enable generic multilib support on 32bit hosts. Previously this was only
authorChandler Carruth <chandlerc@gmail.com>
Mon, 3 Oct 2011 09:00:50 +0000 (09:00 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 3 Oct 2011 09:00:50 +0000 (09:00 +0000)
commit38ec546a56a267320f8f6c86141a7b0f7d6493c4
tree2c10fe32065d399ffbdc58446e3aac1e6d7993f3
parentb6fdf8ff44fab3474fbd0ea37d2670ad57db2781
Enable generic multilib support on 32bit hosts. Previously this was only
enabled for debian hosts, which is quite odd. I think all restriction on
when Clang attempts to use a multilib installation should go away. Clang
is fundamentally a cross compiler. It behaves more like GCC when built
as a cross compiler, and so it should just use multilib installs when
they are present on the system. However, there is a very specific
exemption for Exherbo, which I can't test on, so I'm leaving that in
place.

With this, check in a generic test tree for multilib on a 32-bit host.
This stubs out many directories that most distributions don't use but
that uptsream GCC supports. This is intended to be an agnostic test that
the driver behaves properly compared with the GCC driver it aims for
compatibility with.

Also, fix a bug in the driver that this testing exposed (see!) where it
was incorrectly testing the target architecture rather than the host
architecture.

If anyone is having trouble with the tree-structure stubs I'm creating
to test this, let me know and I can revisit the design. I chose this
over (for example) a tar-ball in order to make tests run faster at the
small, hopefully amortized VCS cost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140999 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/Driver/ToolChains.cpp
test/Driver/Inputs/multilib_32bit_linux_tree/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/lib32/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/lib64/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/usr/i386-unknown-linux/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/usr/i386-unknown-linux/lib32/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/usr/i386-unknown-linux/lib64/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/usr/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/64/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/usr/lib32/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_32bit_linux_tree/usr/lib64/.keep [new file with mode: 0644]
test/Driver/linux-ld.c