The sysroot has to point to the toolchain directory. The directory includes libraries like libm. However, the STAGING_DIR needs to be added to the CFLAGS. Fixes #15773 [As suggested by jow] Signed-off-by: Nick Hainke <vincent@systemli.org>