[LLVMdev] [patch] gccld not properly constructing paths when checking for bytecode

Reid Spencer reid at x10sys.com
Thu Jul 28 09:28:17 PDT 2005


Nicholas,

Your patch (more or less) was applied today. Thanks for finding this!
The patch applied is here:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050725/027268.html

Thanks,

Reid.

On Wed, 2005-07-27 at 23:13 -0500, Nicholas Riley wrote:
> I was getting some weird errors from gccld and traced it to path
> construction in isBytecodeLPath.  If the path doesn't end with a /,
> then Path just tries to stick filenames onto it, which is not so good.
> It would be more efficient to just add a "/" to the path once, I
> guess.
> 
> Also, I had to touch lib/System/Path.cpp to get my changes to Path.inc
> noticed; it seems the build system might need a bit of tweaking.
> 
> Here's a patch:
> 
> Index: lib/System/Unix/Path.inc
> ===================================================================
> RCS file: /var/cvs/llvm/llvm/lib/System/Unix/Path.inc,v
> retrieving revision 1.43
> diff -r1.43 Path.inc
> 436c436,439
> <   DIR* direntries = ::opendir(path.c_str());
> ---
> >   std::string dirPath = path;
> >   if (dirPath[dirPath.size() - 1] != '/')
> >     dirPath += '/';
> >   DIR* direntries = ::opendir(dirPath.c_str());
> 444c447
> <       Path aPath(path + (const char*)de->d_name);
> ---
> >       Path aPath(dirPath + (const char*)de->d_name);
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050728/903cad7f/attachment.sig>


More information about the llvm-dev mailing list