What is -ffreestanding option in gcc?

A freestanding environment is one in which the standard library may not exist, and program startup may not necessarily be at “main”. The option -ffreestanding directs the compiler to not assume that standard functions have their usual definition. By default, GCC will act as the compiler for a hosted implementation, defining __STDC_HOSTED__ as 1 and … Read more

Is there a meaningful distinction between freestanding and hosted implementations?

The cited paragraph already states it quite well. A hosted execution environment is also a freestanding, but not vice versa. A compiler need only provide a freestanding implementation. gcc, for example, is strictly speaking freestanding only, as the standard library is not included. However, it assumes it is available when compiling for a hosted environment … Read more