[llvm-commits] [PATCH] Clang fails to find correct lib path from GNU binutils for ARM supporting multi-arch folder
Jiangning Liu
jiangning.liu at arm.com
Tue Jul 10 18:45:24 PDT 2012
> -----Original Message-----
> From: Chad Rosier [mailto:mcrosier at apple.com]
> Sent: Wednesday, July 11, 2012 1:00 AM
> To: Jiangning Liu
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm-commits] [PATCH] Clang fails to find correct lib path
> from GNU binutils for ARM supporting multi-arch folder
>
> Jiangning,
> LGTM. If you have commit access please commit. Otherwise, let me know
> and I'll do it on your behalf.
Hi Chad,
I don't have commit access, so could you please help me to do it? Thanks a
lot!
> Also, not a big deal, but this should have been sent to the cfe-commits
> list.
OK, I see. I'll send this kind of patch to cfe-commits mail list next time.
Thanks for your kindly reminding me.
-Jiangning
>
> Chad
>
> On Jul 10, 2012, at 3:06 AM, Jiangning Liu wrote:
>
> > Hi,
> >
> > This patch is to fix a simple bug in Clang driver. Clang fails to find
> > correct path prefix for libc object files from GNU binutils supporting
> > multi-arch folder for ARM target. For example, on Ubuntu 11.10 for
> > ARM, Clang driver doesn't find and path prefix for crt1.o, crti.o and
> > crtn.o when passing command line options to GNU linker. The fix
> > completely follows the implementation of other targets.
> >
> > diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
> > index 93df747..b858c3e 100644
> > --- a/lib/Driver/ToolChains.cpp
> > +++ b/lib/Driver/ToolChains.cpp
> > @@ -1905,6 +1905,11 @@ static std::string getMultiarchTriple(const
> > llvm::Triple TargetTriple,
> > // common linux triples that don't quite match the Clang triple
> > for both
> > // 32-bit and 64-bit targets. Multiarch fixes its install triples
> > to these
> > // regardless of what the actual target triple is.
> > + case llvm::Triple::arm:
> > + case llvm::Triple::thumb:
> > + if (llvm::sys::fs::exists(SysRoot + "/lib/arm-linux-gnueabi"))
> > + return "arm-linux-gnueabi";
> > + return TargetTriple.str();
> > case llvm::Triple::x86:
> > if (llvm::sys::fs::exists(SysRoot + "/lib/i386-linux-gnu"))
> > return "i386-linux-gnu";
> >
> > Thanks,
> > -Jiangning<multi_arch_1.patch>________________________________________
> > _______
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
More information about the llvm-commits
mailing list