[PATCH] rtems: Add support for building with Clang/LLVM

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Mar 18 05:44:59 UTC 2020


On 18/03/2020 06:10, Chris Johns wrote:

> On 17/3/20 4:50 pm, Sebastian Huber wrote:
>> On 17/03/2020 03:09, Chris Johns wrote:
>>
>>>> That follows the rtems/waf (new build system) convention by default.
>>> Do you mean the work Sebastian is doing? If you are, it currently might but that
>>> work is not finished and it may change, partially to make it consistent with
>>> this package. This has not been discussed.
>> We discussed the way to find tools during the waf configure phase. See bottom of
>> this email:
>>
>> https://lists.rtems.org/pipermail/devel/2019-December/056291.html
>>
> Oh we did, I am sorry.
>
>> Maybe I misinterpreted your steps 1. to 3.
> I am not sure if you have, I have not tested it.
>
>> In the waf configure output you see
>> the absolute paths of the tools. So you can check if they are the right ones.
> The way rtems_waf works is due to the paths passed to the tool check? My reading
> of Hesham's change is only the env path is checked for clang and this is what I
> am questioning, i.e. does the --prefix, --rtems-tools etc work with clang just
> like gcc?

In the new build system, the path list is created like this:

def get_path_list(conf):
     path_list = []
     tools = conf.options.rtems_tools
     if tools is not None:
         for t in tools.split(","):
             path_list.extend([t + "/bin", t])
     path_list.append(conf.env.PREFIX + "/bin")
     path_list.extend(os.environ.get("PATH", "").split(os.pathsep))
     return path_list

>
> I think we should be consistent what ever the specifics are and this should
> before across different packages and for tools within a package.
Yes, we should have a copy and paste routine which is used across the 
waf based build systems.


More information about the devel mailing list