Search code examples
gccuclibc

uclibc support by GCC


'man gcc' describes a number of machine-dependent options for different platforms and architectures, but I don't understand the purpose of '-muclibc' as it is defined under GNU/Linux options, but not a specific hardware.

Could someone provide more details on it?

Thanks.


Solution

  • The -muclibc is not supported by most GCC toolchains (as in, it doesn't do anything useful) because the person/company/distro/whatever that build GCC does not configure or build a uClibc multilib to go with it.

    In toolchains configurations that are intended for use with uClibc, the option makes some configuration changes that suit uClibc. Of course, if the compiler was built solely for use with uClibc then this option will be enabled by default. If the compiler was configured for use with both uClibc and glibc/newlib/whatever, then the -muclibc option usually does double duty to select the correct libraries for the linker.