Skip to contentSkip to conversation

CC option -mmusl in SDK env script but not in default do_compile task

musl Antoine MANACHE 1 participant 1 message Nov 20, 2019 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi all,

I've recently noticed a mismatch between CC options

- set by the SDK environment script

- set by the do_compile task for any 'target' class recipes when the DISTRO is configured with TCLIBC = "musl"

The SDK env script adds "-mmusl" when exporting CC while do_compile doesn't.

We can see TARGET_CC_ARCH_append_libc-musl = " -mmusl" in file meta/classes/toolchain-scripts.bbclass, this class is inherited when building the meta-environment-<MACHINE> recipe (dependancy of the populate_sdk task of core images).

Can anyone explain what is the aim of this -mmusl option and if required why this option is not set on both sides ?

I fear this could lead to some situations where applications built from the SDK and then built with the full Yocto stack don't behave exactly the same.

Thanks

Antoine