[Bug libgcc/77470] libssp may have bad includes

2016-09-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77470

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
The ssp headers are meant to be used together with -D_FORTIFY_SOURCE{,=2}
-isystem .../include/ssp/
They are meant to override the system stdio.h, string.h and/or unistd.h
headers, which they include as #include_next.
So this looks like a user error, or maybe NetBSD header bug.
Of course, if _FORTIFY_SOURCE support is in your C library, you don't need any
of the libssp headers.

[Bug libgcc/77470] libssp may have bad includes

2016-09-05 Thread coypu at sdf dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77470

--- Comment #1 from coypu  ---
Created attachment 39560
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39560=edit
Correct includes for libssp

This gets me a bit further, but I still have trouble using it.

For netbsd we have in stdio.h:
 #if _FORTIFY_SOURCE > 0
 #include 
 #endif

for non-netbsd, you can likely achieve the same failure by attempting
to compile this code:
 #define _FORTIFY_SOURCE
 #include 
 #include 
 void main() { printf("Hello!"); }