[PATCH] build: Ensure mandatory compiler/linker flags

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jul 13 05:05:27 UTC 2020


On 13/07/2020 02:09, Chris Johns wrote:
> On 8/7/20 9:37 pm, Sebastian Huber wrote:
>> On 08/07/2020 13:34, Chris Johns wrote:
>>
>>> Are these flags needed for all BSPs?
>> Yes, these flags are needed to build and use libbsd.
> 
> Why not define them for all BSPs 

In the new build system they are the default.

> and for all applications?

I don't think we should mandate any optimization flags for applications. 
These flags affect the code generation.

> 
> What is special about libbsd that it needs these flags over any other type of
> application?

libbsd needs these flags since FreeBSD was not designed as a static 
library. In addition, the porting to RTEMS is less intrusive and labour 
intensive using these flags.

> 
>>> If so why add to here ...
>>>
>>> https://git.rtems.org/rtems/tree/c/src/bsp.pc.in
>> These are optimization flags. I thought the consensus was to export only ABI
>> relevant flags in the new build system.
> 
> In CFLAGS yes. Pkgconfig files (.pc) support variables and I had always thought
> we define a number of RTEMS specific variables and these hold various flags or
> commands needed to handle other things, for example the options to mkimage. A
> user could then test for a variable and if present know this BSP does or has
> extra "what ever".

You mean some sort of recommended optimization flags? We should really 
define what the pkg-config files should export so that I can implement 
this in the new build system.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list