[Buildroot] [PATCH] package/clang: default linker to GNU
Romain Naour
romain.naour at gmail.com
Sun Oct 21 11:58:37 UTC 2018
Le 21/10/2018 à 13:53, Matthew Weber a écrit :
> Romain, Valentin,
>
> On Sun, Oct 21, 2018 at 10:49 AM Romain Naour <romain.naour at gmail.com> wrote:
>>
>> Hi Matt,
>>
>> Adding Valentin in Cc.
>>
>> Le 21/10/2018 à 11:09, Matt Weber a écrit :
>>> By default clang is assuming the system linker /usr/bin/ld. This
>>> patchset updates the default to point at the cross toolchain ld.
>>>
>>> Previously clang had been used on target only, this update is
>>> required for host clang/clang++ to be used as a frontend for
>>> cross-compiling.
>>
>> As we discuss during the meeting, we should probably wrap clang and clang++ in
>> order to pass the path to the sysroot like we do in the toolchain wrapper for
>> gcc (and other options when needed).
>
> Since there isn't a package yet that has the need for this wrapper,
> would it be something that we could add to toolchain/helpers.mk?
> For this patch, maybe I just updated the commit message with and
> example of how you'd call clang w/o the wrapper?
Ok, It's fine for me.
Best regards,
Romain
>
>>
>>>
>>> Signed-off-by: Matthew Weber <matthew.weber at rockwellcollins.com>
>>> ---
>>> package/clang/clang.mk | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/package/clang/clang.mk b/package/clang/clang.mk
>>> index 52e0b98..e2d4a08 100644
>>> --- a/package/clang/clang.mk
>>> +++ b/package/clang/clang.mk
>>> @@ -42,7 +42,8 @@ CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON
>>> HOST_CLANG_CONF_OPTS += \
>>> -DCLANG_BUILD_EXAMPLES=OFF \
>>> -DCLANG_INCLUDE_DOCS=OFF \
>>> - -DCLANG_INCLUDE_TESTS=OFF
>>> + -DCLANG_INCLUDE_TESTS=OFF \
>>> + -DCLANG_DEFAULT_LINKER=$(TARGET_LD)
>>
>> I would put it with this line:
>> HOST_CLANG_CONF_OPTS += -DLLVM_CONFIG:FILEPATH=$(HOST_DIR)/bin/llvm-config
>>
>
> Sounds good.
>
>> Otherwise:
>> Reviewed-by: Romain Naour <romain.naour at gmail.com>
>>
>> Best regards,
>> Romain
>>
>>>
>>> CLANG_CONF_OPTS += \
>>> -DCLANG_BUILD_EXAMPLES=OFF \
>>>
>>
>
>
More information about the buildroot
mailing list