pkg-config RTEMS BSP files in master branch cause me problems

Chris Johns chrisj at rtems.org
Tue Feb 25 00:39:58 UTC 2020


On 25/2/20 7:50 am, Peter Dufault wrote:
> The files that get installed (for example as "lib/pkgconfig/arm-rtems5-xilinx_zynq_a9_qemu.pc") are making my life difficult in that they add compile and link flags that are difficult to over-ride and I need to in some situations.

Yes this is true.

> It states clearly in the file "Warning: This stuff is experimental and may be changed at any time".  Am I missing instructions on how to avoid using it in the first place, or how to over-ride it in certain situations?

Unfortunately you are not. The core issue is simple, a BSP config in RTEMS is a
makefile fragment and the flags in those files are joined to together with the
standard RTEMS build flags such as warnings, optimization levels, ete. There is
no easy way to separate these flags in make when exporting these flags to a .pc
file and it was at this point the effort halted many years ago. Some BSPs work
however getting them all to work was too big a task. The new waf build system
will address this by providing a managed set of flags. Until then the rtems_waf
package manages this by filtering the flags using the code ...

https://git.rtems.org/rtems_waf/tree/rtems.py#n839

... and rtems-tool's rtemstoolkit as well with this code ...

https://git.rtems.org/rtems-tools/tree/rtemstoolkit/rld-cc.cpp#n79

Chris


More information about the devel mailing list