]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
zlib: Enable PIE for native builds
authorYash Shinde <Yash.Shinde@windriver.com>
Thu, 29 Aug 2024 08:33:56 +0000 (01:33 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 29 Aug 2024 20:57:36 +0000 (21:57 +0100)
commit7146d260f655fa924461333c8c2944ebb93b2b3c
tree0a18bb31672e5b5dfcbfe7054a4ebac2fbc6cbbb
parent6721de5a049b245f274081b9b474e81761ea40fd
zlib: Enable PIE for native builds

The zlib crate in rust uses libz.a which comes from the zlib-native build.
Some distros like alma9, fedora etc. do not have PIE enabled by default for system compiler.

This leads to target-rust-ccld linking error for cargo-native as (line no 22936):
error: linking with `/home/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/x86_64-linux/cargo-native/1.79.0/wrapper/target-rust-ccld` failed: exit status: 1

https://autobuilder.yoctoproject.org/typhoon/#/builders/42/builds/9385/steps/13/logs/stdio

Hence, enable PIE option to CFLAGS for native builds.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/zlib/zlib_1.3.1.bb