-ffreestanding option of GCC

Andi Hellmund mail@andihellmund.com
Tue Jan 4 08:53:00 GMT 2011


On 01/04/2011 06:11 AM, ali hagigat wrote:
> What is the effect of -ffreestanding option? Is it like -fno-builtin exactly?
>
>    
Hey Ali,

here's a quote from the man page:

"Assert that compilation takes place in a freestanding environment.  
This implies -fno-builtin.  A freestanding environment is one in which 
the standard library may not exist, and program startup may not 
necessarily be at "main".  The most obvious example is an OS kernel.  
This is equivalent to -fno-hosted."

 From the code-level, the -ffreestanding option just sets -fno-hosted 
and the -fno-bulitin option.

Andi



More information about the Gcc-help mailing list