Now I am using clang and llvm to do cross compiling. My target architecture is arm and the host is x86-64. I am trying to compile coreutils and SPEC2006(Anyone who ever has the same experience, please tell me. Really need your help)
At the same time, I hope to generate the LLVM IR, which I can write PASS to extract some information. I would also need the dwarf debug information.
I briefly describe my requirements above. I use the -save-temps option to save the LLVM IR(please tell me whether this is the best solution). I try to use -target arm-none-eabi to specify the architecture. However, when I was compiling the coreutils, I come across such exceptions.
/usr/bin/ld.gold: fatal error: --plugin-opt requires --plugin.
clang-7: error: ld.lld command failed with exit code 1 (use -v to see invocation)
make: *** [src/chroot] Error 1
make: Leaving directory
/home/linux/share/coreutils-8.28-old' make: *** [all-recursive] Error 1 make: Leaving directory /home/linux/share/coreutils-8.28-old’
make: *** [all] Error 2
I haven’t try SPEC2006 since the configuration is not so familiar for me. It would be great if anyone can give me some references. Or you have the same experiences, please tell me your configuration and setup. Thank everyone so much~~