Re: [meta-networking][PATCH 2/4] ot-daemon: add recipe for OpenThread daemon


Khem Raj
 

On Thu, Apr 7, 2022 at 3:28 PM Stefan Schmidt <stefan@...> wrote:


Hello Khem.

On 05.04.22 20:08, Khem Raj wrote:


On Tue, Apr 5, 2022 at 4:39 AM Stefan Schmidt <stefan@...
<mailto:stefan@...>> wrote:


Hello Khem.

On 05.04.22 05:16, Khem Raj wrote:
> fails on x86_64/glibc see
>
https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/1610
<https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/1610>

Ah, its not x86_64/glibc (I tested this) but the fact that the
autobuilder uses poky and I tested here without DISTRO in
openembedded core.

Seems the code base it not happy about the gcc changes to warn on the
combination of _FORTIFY_SOURCE and non-optimized code:

error: #warning _FORTIFY_SOURCE requires compiling with optimization
(-O) [-Werror=cpp]


Hmm so you are not using security flags ?
You mean Oniro is not using them? Not sure I can follow you train of
thoughts here. :-)
poky defaults now a days include security_flags.inc which enables
fortify and other
good security stuff from compiler's point of view. So it seems your
distro is not inheriting
all the default distro policies was what I was trying to point at.


That’s not good :) you should inherit good defaults
The problem above was from the autobuilder error you pointed me to,
building with Poky not Oniro.

-O2 -D_FORTIFY_SOURCE=2 itself works on the upstream code base, but it
needs optimization enabled (as the error message states). No idea why
that went wrong on the autobuilder.
-O2 is also poky default via SELECTED_OPTIMIZATION. So unless recipe is doing
something exotic to ignore these flags then it might happen because
SECURITY_FLAGS
are passed via CC not CFLAGS unlike SELECTED_OPTIMIZATION which is passed via
CFLAGS.


regards
Stefan Schmidt

Join {openembedded-devel@lists.openembedded.org to automatically receive all group messages.