I tried ldd-ing my binary on my build machine since it doesn't work on my image 
and it was built on glibc indeed. Since yocto is based on ulibc so it won't 
work even my target platform is roughly the same as my build platform. I wonder 
what options should I specify to get llvm to build against the Yocto's 
libraries rather than my build machine's.

As I said in IRC yesterday I found 
https://lists.yoctoproject.org/pipermail/yocto/2014-June/020358.html which 
should suit my needs but I get stupid errors on uint32_t:

/work/corei7-64-poky-linux/llvm/3.3-r0/llvm
-3.3.src/include/llvm/Support/BranchProbability.h:27:3: error: 'uint32_t' does 
not name a type
   uint32_t N;

I tried adding #include <cstdint> to that header but no luck.

-----Original Message-----
From: Paul Eggleton [mailto:paul.eggle...@linux.intel.com] 
Sent: Monday, December 22, 2014 7:22 PM
To: Yu, Chan KitX
Cc: 'Liviu Gheorghisan'; 'Jim Rafert'; yocto@yoctoproject.org
Subject: Re: [yocto] Building clang with Yocto

Hi Chan Kit,

On Monday 22 December 2014 03:33:17 Yu, Chan KitX wrote:
> Here's an update FYI. I have managed to get clang sort of working. It 
> compiles my sample code but I can't get the binary to execute. ./a.out 
> simply returns:
> 
> 
> ./a.out: No such file or directory.
> 
> I'm sure that a.out exists and weirdly I could get the same binary 
> file to run on my build machine. So I guess it could be because of 
> some architecture difference but both target and build platform are 
> quite the same (Intel x64 in build machine and BayleyBay for target 
> platform) I used
> valleyisland-64 for the target platform so both should be able to 
> execute
> 64 bit binaries. I suppose I can specify some other configuration 
> options there but I have no idea what to specify the configure 
> parameter --target=<TARGET> . x64 did not do any good. So any idea?

That sounds a bit like the binary has been linked to libraries in the host 
libdir rather than the correct one for the target. You may be able to verify 
that using ldd.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to