[cfe-dev] ***SPAM*** Re: Changing the way Clang's driver computes the library search paths on Linux

Marc J. Driftmeyer mjd at reanimality.com
Sun Oct 2 23:41:30 PDT 2011


Should not this change include a fs check for 
/usr/lib/x86_64-linux-gnu/crt1.o as one of the else if options, not to 
mention the rest of the architectures Debian supports and builds clang 
against?

Debian clearly has moved to the /usr/lib/architecture-linux-gnu/ 
approach for i386 and amd64/x86_64.

ARM seems uniquely distinct with their gnu reference:

Armel for Debian is /usr/lib/arm-linux-gnueabi/crt1.0
Armhf for Debian is /usr/lib/arm-linux-gnueabihf/crt1.0

The rest from Alpha to Sparc are as follows

/usr/lib/architecture-linux-gnu/crt1.0... with the exception of FreeBSD 
on Debian:

/usr/lib/architecture-kfreebsd-gnu/crt1.0

Source: 
http://packages.debian.org/search?suite=sid&arch=any&searchon=contents&keywords=crt1.o 
<http://packages.debian.org/search?suite=sid&arch=any&searchon=contents&keywords=crt1.o>


- Marc

On 10/02/2011 04:53 PM, Miles Bader wrote:
> +++ clang-2.9/tools/clang/lib/Driver/ToolChains.cpp
> @@ -1531,6 +1531,14 @@ Linux::Linux(const HostInfo&Host, const
>     Paths.push_back(Base + "/../../..");
>     if (Arch == getArch()&&  IsUbuntu(Distro))
>       Paths.push_back("/usr/lib/" + GccTriple);
> +  if (Distro == DebianWheezy&&  Arch == getArch())
> +  {
> +    if (!llvm::sys::fs::exists("/usr/lib/" + GccTriple + "/crt1.o", Exists)&&  Exists)
> +      Paths.push_back("/usr/lib/" + GccTriple);
> +    else if (Is32Bits&&
> +        !llvm::sys::fs::exists("/usr/lib/i386-linux-gnu/crt1.o", Exists)&&  Exists)
> +      Paths.push_back("/usr/lib/i386-linux-gnu");
> +  }
>   }

-- 
Marc J. Driftmeyer
Email :: mjd at reanimality.com <mailto:mjd at reanimality.com>
Web :: http://www.reanimality.com
Cell :: (509) 435-5212
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111002/dc4c6ac9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mjd.vcf
Type: text/x-vcard
Size: 317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111002/dc4c6ac9/attachment.vcf>


More information about the cfe-dev mailing list