Files
poky/meta/classes-recipe
Ross Burton 844539e848 classes/cmake: unset LDFLAGS in toolchain-native.bbclass
If a recipe is using toolchain-native.cmake to build native portion in a
non-native build, the target LDFLAGS from the environment will leak into
the native build.

This was noticed as building a SDK with clang means that LDFLAGS contains
a --dynamic-loader argument, so native binaries were trying to use the
target loader.

There are several variables that are set from LDFLAGS[1] so instead of
setting them all, we can simply unset the environment variable in the
toolchain.

[1] https://cmake.org/cmake/help/latest/envvar/LDFLAGS.html

(From OE-Core rev: f9fa240a6788188174c8080a78018ed9ce402f54)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-10-01 10:52:54 +01:00
..
2025-06-09 17:43:41 +01:00