[Rtai] Default -D_FORTIFY_SOURCE=0 cflag

Zijad.Maksuti.Extern at diehl-aerospace.de Zijad.Maksuti.Extern at diehl-aerospace.de
Fri Jun 6 10:26:13 CEST 2014


I compiled a simple "Hello World" kernel module for RTAI from this 
tutorial www.cs.ru.nl/lab/rtai/experiments/2.Tasking/Experiment-2.html

During compilation however I get: <command-line>:0:0: warning: 
"_FORTIFY_SOURCE" redefined [enabled by default]. This is because I 
compile the module with the gcc-flags from rtai-config --module-cflags. 
One of these flags is -D_FORTIFY_SOURCE=0. I am using x86_64 Lubuntu 14.04 
with 3.8.13 Kernel and gcc 4.8. In (L)ubuntu the compiler has by default 
-D_FORTIFY_SOURCE=2 and does not let me override it. Basically the warning 
tells me that the code will be compiled with the default 

Is there any special reason for -D_FORTIFY_SOURCE=0 in RTAIs cflags? From 
what I read, it is better to use -D_FORTIFY_SOURCE=2 (or at least 1) 
because it helps preventing overflows.

Kind regards

Der Inhalt dieser E-Mail ist für den Absender rechtlich nicht verbindlich.
Informieren Sie uns bitte, wenn Sie diese E-Mail fälschlicherweise erhalten haben (Fax: +49-7551-891-4001). Bitte löschen Sie in diesem Fall die Nachricht. Jede Form der weiteren Benutzung ist untersagt.
The content of this e-mail is not legally binding upon the sender.
If this e-mail was transmitted to you by error, then please inform us accordingly (Fax: +49-7551-891-4001). In such case you are requested to erase the message. Any use of such e-mail message is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.rtai.org/pipermail/rtai/attachments/20140606/942bd2d4/attachment.html>

More information about the Rtai mailing list