[Buildroot] [PATCH v4 08/11] package/clang: enable target variant

Valentin Korenblit valentin.korenblit at smile.fr
Fri Mar 30 12:16:00 UTC 2018


Hello Thomas,

On 30/03/2018 11:07, Thomas Petazzoni wrote:
> Hello,
>
> On Thu, 29 Mar 2018 13:33:43 +0200, Valentin Korenblit wrote:
>> This patch provides Clang for the target, tools and libraries.
>>
>> In this package we have to deal with the same kind of problem we encountered
>> when building mesa3d with llvm support: llvm-config (host-version) had to be
>> copied to STAGING_DIR/usr/bin. In this case, we need llvm-tblgen from host
>> to be installed in STAGING_DIR/usr/bin for cross-compiling clang.
>>
>> We need libclang for the target because it is used by all OpenCL implementations.
>> In this series, Clover is provided.
> I'm not sure to understand why you need Clang on the target, and what
> Clover is. Maybe I missed it, but I don't see where the target Clang is
> used in the rest of your series.

What we need is libclang, we don't need the binaries. But as libclang is a tool,
I need to set CLANG_BUILD_TOOLS to ON, what will build everything.

Clover is the OpenCL implementation provided with Mesa. It uses libclang as a frontend
for OpenCL C and libLLVM for code generation.

> In addition, we don't support gcc on the target, so having clang on the
> target raises a red flag for me.
>
> Could you explain a bit more why this is needed/useful ?

As explained above, we don't need it. I could add a hook to erase all unnecessary
binaries from the target if that is ok.

>
> Thanks!
>
> Thomas

Best regards,

Valentin





More information about the buildroot mailing list