Re: [PATCH] kbuild: allow to use GCC toolchain not in Clang search path

From: Masahiro Yamada
Date: Tue Sep 18 2018 - 03:44:46 EST


Hi Stefan,

2018-09-18 12:11 GMT+09:00 Stefan Agner <stefan@xxxxxxxx>:
> On 17.09.2018 20:06, Masahiro Yamada wrote:
>> Hi Stefan,
>>
>> 2018-09-18 11:31 GMT+09:00 Stefan Agner <stefan@xxxxxxxx>:
>>> When using a GCC cross toolchain which is not in a compiled in
>>> Clang search path, Clang reverts to the system assembler and
>>> linker. This leads to assembler or linker errors, depending on
>>> which tool is first used for a given architecture.
>>>
>>> It seems that Clang is not searching $PATH for a matching
>>> assembler or linker.
>>
>>
>> The current code passes the absolute path of toolchains
>> to --gcc-toolchain option.
>> In my understanding, this is enough for Clang
>> to find the proper linker and the assembler.
>>
>>
>> Why is the --prefix option also needed ?
>>
>
> It seems that Clang makes a difference between "toolchain" and search path for toolchain binaries.
>
> Without this patch building fails for the described use case, see the github link for more context.


OK, I confirmed this patch fixed the problem.


I will wait a little more just in case Nick has comments about this.



Thanks.



--
Best Regards
Masahiro Yamada