<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello,<br><br>I'm trying to cross compile the MiBench benchmarks using LLC and ARM cross compiler the binaries generated will be used on pandaboard or the qemu-arm emulator.<br><br>I have faced multiple issues during the compilation process, here are the commands used.<br><br># generate LLVM-IR for dijkstra_large.c<br>$gcc -S -flto -o dijkstra_large.bc -fplugin=${DRAGONEGG} dijkstra_large.c<br># generate TARGET object file for dijkstra_large.bc<br>$./llc -march=arm -mcpu=cortex-a9 dijkstra_large.bc -o dijkstra_large.o -filetype=obj -O3<br># Generate executalbe using Target's toolchain<br>$arm-linux-gcc -static dijkstra_large.o -o dijkstra_large<br><br>The first issue is that the arguments that I use as an input to dijkstra benchmark do not get inserted in their appropriate position in the [argv] array. In order to run the benchmark the command is ./dijkstra_large input.dat. using this command I got the argv[1] = null which should be input.dat. If I add another extra argument between the benchmark binary name and the input.dat arugment like (./dijkstra_large xxx input.dat) the benchmark works without any error and the argv[1] equals the input.dat. This issue is preventing me from using other benchmarks which needs multiple arguments to run. <br><br>The second issue is that when I use "arm-linux-gnueabihf-gcc" cross compiler instead of the arm-linux-gcc I get the following error<br><br> "/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../../arm-linux-gnueabihf/bin/ld: error: a.out uses VFP register arguments, dijkstra_large.o does not<br>/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../../arm-linux-gnueabihf/bin/ld: failed to merge target specific data of file dijkstra_large.o<br>collect2: ld returned 1 exit status"<br><br>I have tried to change the -mfloat-abi to hard or soft but still getting the same error message. Is there any other options that forces the llvm to use VFP registers?<br><br>Also it would be nice if anyone can point me to a tutorial which shows how to build LLVM cross compiler using the clang.<br><br>Thanks,<br>Najem.<br>                                          </div></body>
</html>