5.7.1.14 Libc-variant Option
The -mlibc-variant=variant option specified whether speed- or
size-orientated string functions are linked in with the program. Size-orientated functions are
linked in if this option is not used.
Many of the library functions provided by
<string.h> are available in two variants. The size-orientated
functions require less code to implement. These can be explicitly selected by using a
size argument to the option, for example
-mlibc-variant=size. The speed-orientated functions might be larger, but
they execute quickly, resulting in improved program performance. They can be selected by using
a speed argument to the option.
All architectures implement the size-orientated function variants.
Speed-orientated of the following functions are available across all device architectures:
memcmp(), memcpy(), memset(),
strcmp(), strcpy(), and strlen(). For
cases where only the size-orientated variant is available, it will always be selected
regardless of the variant specified by this option.
