Compiler error with U_FORTIFY_SOURCE, D_FORTIFY_SOURCE options

Amaan Cheval amaan.cheval at gmail.com
Fri May 25 15:09:10 UTC 2018


Hi!

I don't know the specifics of the thing you're talking about here, so
others should definitely weigh in on that if they can, but regarding the
header file; the include syntax used (<ssp.h>, as opposed to "ssp.h") is
the one used for system header files (for eg. <stdio.h> vs "my_header.h").

I see 2 possibilities:
- The project expects these files to be in a standard include directory
(such as /usr/include), which the compiler checks for system headers by
default
- You need to add the directory where ssp.h exists to the command-line
flags for the compiler, for eg. through "gcc -I. ssp.c" (assuming ssp.c
includes ssp.h, which exists in the same directory). See this for more:
https://gcc.gnu.org/onlinedocs/gcc-6.4.0/cpp/Search-Path.html


On Fri, May 25, 2018, 8:08 PM Udit agarwal <dev.madaari at gmail.com> wrote:

> Hi all,
> While cross-compiling fio for RTEMS, by default in the compiler call
>
>>  -U_FORTIFY_SOURCE   -D_FORTIFY_SOURCE=2
>
> options are used which raises the following error:
>
>> /home/uka_in/development/benchmark/sandbox/5/lib/gcc/arm-rtems5/7.3.0/include/ssp/unistd.h:38:10:
>> fatal error: ssp.h: No such file or directory
>>  #include <ssp.h>
>>           ^~~~~~~
>> compilation terminated.
>> make: *** [crc/crc32c-arm64.o] Error 1
>>
>> However, ssp.h is in the same folder.
> Without these options, only sys/unistd.h is included and not the
> ssp/unistd.h. Any idea why these compiler opts are raising these error?
>
> Also, FIO needs a BSP independent method for determining the size of RAM
> for it's internal working.  I'm unable to figure out any such
> implementation. Any help on this too, would be great.
>
> Regards,
> Udit agarwal
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20180525/adcd5983/attachment.html>


More information about the devel mailing list