About rtems compilation
Mohammed Khoory
mkhoory at eiast.ae
Thu Aug 14 00:34:15 UTC 2014
>
>>Hi!
>>
>>I need to compile rtems without any optimization flags, how can I set
>this?
>>
>>Best Regards,
>>
>>
>>Nicolás Alvarez
>>
>>
>
>I'm not sure if this is the best way to do it but it works for me. The way
>I do it is, before performing the RTEMS compilation, I set the following
>environment variables using the export command in the shell:
>
>CFLAGS_FOR_BUILD="-O0"
>CFLAGS_FOR_TARGET="-O0"
>
>I then configure, make, and make install as usual. I assume this also works
>if you're using the source builder. You can also add "-g" in those
>variables to enable debugging symbols, which can be very useful.
Just a small correction. It seems that you only need to set CFLAGS_FOR_TARGET. CFLAGS_FOR_BUILD doesn't need to be set if you only want to disable optimization for the target build.
I've realized this after noticing that CFLAGS_FOR_BUILD was used for the host compiler, not for the cross-compiler.
More information about the users
mailing list