bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] build: avoid build warn/failure due to -Wstack-protector


From: Pádraig Brady
Subject: Re: [PATCH] build: avoid build warn/failure due to -Wstack-protector
Date: Thu, 9 Jul 2009 15:33:58 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Jim Meyering wrote:
> I got this build failure on i686/ubuntu-9.04:
> 
>     cc1: warnings being treated as errors
>     df.c: In function 'find_mount_point':
>     df.c:524: error: not protecting local variables: variable length buffer 
> [-Wstack-protector]
>     make[3]: *** [df.o] Error 1

I noted that on the list a couple of days ago,
and it's due to the ASSIGN_STRDUPA macro.
I agree that it's not worth warning about.

Note it should only be an issue if your CFLAGS has -fstack-protector enabled,
like the coreutils build on Fedora 11 for example:
$ rpm -q --qf %{OPTFLAGS} coreutils
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic 
-fasynchronous-unwind-tables -D_GNU_SOURCE=1

cheers,
Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]