Bug#629861: closed by Sylvestre Ledru <sylvestre at debian.org> (Bug#629861: fixed in clang 2.9-4)

Sylvestre Ledru sylvestre at debian.org
Mon Jun 13 20:58:33 UTC 2011


Le lundi 13 juin 2011 à 16:47 -0400, Anders Kaseorg a écrit :
> found 629861 2.9-4
> thanks
> 
> 13-multiarch-newpath.patch doesn’t quite work.  First, GccTriple is the 
> empty string, because it’s only set to anything else if the non-multiarch 
> path exists.
> 
>   std::string GccTriple = "";
>   if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) {
>     if (!llvm::sys::fs::exists("/usr/lib/gcc/arm-linux-gnueabi", Exists) &&
>         Exists)
>       GccTriple = "arm-linux-gnueabi";
>   } else if (Arch == llvm::Triple::x86_64) {
>     if (!llvm::sys::fs::exists("/usr/lib/gcc/x86_64-linux-gnu", Exists) &&
>         Exists)
>       GccTriple = "x86_64-linux-gnu";
>   } …
> 
> Second, on i386, the multiarch triple (DEB_HOST_MULTIARCH=i386-linux-gnu) 
> is different from the GCC triple (DEB_HOST_GNU_TYPE=i486-linux-gnu), so 
> you’ll get the wrong path:
> 
> $ dpkg -c gcc-4.6_4.6.0-13_i386.deb | grep crtbegin.o
> -rw-r--r-- root/root      1684 2011-06-11 19:29 ./usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/crtbegin.o
Yes, I noticed this issue under x86 (thanks to the message #65).

I wrote this crappy patch:
http://anonscm.debian.org/viewvc/pkg-llvm/clang/trunk/debian/patches/14-multiarchi386.diff?revision=64&view=markup
it fixes the problem on my system.

I didn't spend much time on writing a nice patch for the issue. I
already did too much uploads to manage the various changes due to the
multiarch stuff.

Sylvestre







More information about the Pkg-llvm-team mailing list