Hi Changqing Li, Bruce!

My understanding is that CGO is disabled directly in the build script
because building statically can fail on certain environments that don’t
have all the required static libraries. However, for meta-layer builds
with Yocto, could we enable CGO and set -extldflags "-static"
so that we can apply some default security flags from Yocto, such as PIE and 
RELRO?

https://git.yoctoproject.org/poky/plain/meta/conf/distro/include/security_flags.inc?h=scarthgap

Could there be any runtime issues when enabling CGO and building statically?
I hope to receive your feedback.
Hieu
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9440): 
https://lists.yoctoproject.org/g/meta-virtualization/message/9440
Mute This Topic: https://lists.yoctoproject.org/mt/105816435/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to