[cfe-commits] r148953 - /cfe/trunk/lib/Driver/ToolChains.cpp
dim at FreeBSD.org
Wed Jan 25 05:46:59 PST 2012
On 2012-01-25 12:24, Chandler Carruth wrote:
> Author: chandlerc
> Date: Wed Jan 25 05:24:24 2012
> New Revision: 148953
> URL: http://llvm.org/viewvc/llvm-project?rev=148953&view=rev
> The Linux pattern of adding all the search paths that exist doesn't seem
> to suit the FreeBSD folks. Take them back to something closer to the old
> behavior. We test whether the /usr/lib32 directory exists (within the
> SysRoot), and use it if so, otherwise use /usr/lib.
Unfortunately, this breaks linking on x86_64, since /usr/lib32 always
exists, even if you are linking a 64-bit executable. Actually, this
directory even exists on 32-bit systems, because the basic directory
structure is generated using mtree, from a fixed layout.
Ergo, we really need to figure out what the 'target' architecture is,
and base the decision to use /usr/lib or /usr/lib32 on that. Basically,
always use /usr/lib, unless arch==i386.
More information about the cfe-commits