Subject: Re: Building without SSP (was: CVS commit: src/include (_FORTIFY_SOURCE))
To: None <current-users@NetBSD.org>
From: Krister Walfridsson <cato@df.lth.se>
List: current-users
Date: 08/04/2007 19:51:26
On Sat, 4 Aug 2007, Bernd Ernesti wrote:

> On Fri, Aug 03, 2007 at 01:40:03AM +0000, Geoff Wing wrote:
>> Krister Walfridsson <kristerw@netbsd.org> typed:
>> : Module Name:	src
>> : Committed By:	kristerw
>> : Date:		Thu Aug  2 21:49:10 UTC 2007
>> :
>> : Modified Files:
>> : 	src/include: stdio.h string.h strings.h unistd.h
>> :
>> : Log Message:
>> : Do not include SSP files unless _FORTIFY_SOURCE > 0.
>>
>> If the aim is to completely not include SSP stuff, then you need to do
>> more in libc, otherwise this won't work.

No, the aim is to prevent problems when building 3rd party programs
(e.g. gcc) that is not using SSP.  It should not affect building of
the NetBSD distribution.


> You mean a build fails like this now?
>
> /src/lib/libc/ssp/fgets_chk.c:53: warning: no previous prototype for '__fgets_chk'
>
> Applying your patch fixed this.
>
> IMHO this should be commited and I would like to do it by the next weekend if
> nobody objects.

This is wrong, as it affects what get included in libc.  I'll fix it
the correct way.

    /Krister