[libbsd] How to install machine header files?

Chris Johns chrisj at rtems.org
Thu Apr 1 04:24:30 UTC 2021

On 1/4/21 6:37 am, Jan.Sommer at dlr.de wrote:
> Hello,
> I stumbled upon some include path problems in libbsd while looking at Chris' ptpd port and I am not sure what is the recommended way to solve it.
> It starts with "freebsd/sys/sys/bus.h" including "machine/_bus.h".
> Currently, this will be the one from within "rtemsbd" which will redirect to "rtemsbsd/include/machine/bus.h" which is amd64 specific.
> For the pc686 BSP this will create a compile error for applications which include "<sys/bus.h>".


> I tried to solve it by removing the "_bus.h" in rtemsbsd and installing the correct one from "freebsd/sys/i386/include/machine/_bus.h", but I am not sure how to tell waf to install the file.
> Is there a way to add a single architecture specific header to the install headers?

Yes ....


> I could add a corresponding path and wildcard to the "header-paths" in libbsd.py, but I am not sure if this is the right place.

I think the PCI module is the place to handle this. I am sorry but I cannot see
the issue clear at the moment and I cannot invest time performing a build.

The addCPUDependentFreeBSDHeaderFiles() on line 2931 of libbsd.py in the PCI
module looks a little suspect because there is no list of archs provided. Could
the issue be as simple as the list of archs is not there and the list is empty?


More information about the devel mailing list