[llvmlinux] [GSoC: Static analysis] Report 1 + PATCH

salvatore benedetto salvatore.benedetto at gmail.com
Thu Jun 27 12:30:57 UTC 2013


On Wed, Jun 26, 2013 at 10:17 PM, Jan-Simon Möller <dl9pf at gmx.de> wrote:

> I did a normal kernel build and then went into src/linux and called:
>
> dl9pf at elrond:~/llvmlinux/targets/vexpress/src/linux>
> '/home/dl9pf/llvmlinux/toolchain/clang/install/bin/clang-3.4' '-cc1'
> '-triple'
> 'armv7-none-linux-gnueabi' '-analyze' '-disable-free'
> '-disable-llvm-verifier'
> .....
> So this works, now the interesting part is how to get that triple properly
> added or propagated to the cc1 stage.
> --
>
>
I don't know if it can be of any help, but when I had to figure out the
correct
triple and flags for cross-compiling I had to dig down into the code since
it is a real mess and not documented.

This is where the conversion takes place (yes, there is duplicated code in
both
files for ARM targets)

https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChains.cpp
https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChain.cpp

the -triple argument in the cc1 stage is influeced by the -target option
of the previous stage.

https://github.com/llvm-mirror/clang/blob/master/lib/Driver/Tools.cpp#L1922

Hope it helps,

Regards,
Salvatore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20130627/ee354338/attachment.html>


More information about the LLVMLinux mailing list