additional compiler hardening flags

Corinna Vinschen vinschen at
Thu Apr 18 19:29:55 EST 2013

On Apr 18 18:22, Darren Tucker wrote:
> On Thu, Apr 18, 2013 at 09:16:22AM +0200, Corinna Vinschen wrote:
> > Does this check also catch the situation that commandline options
> > are only warned about?  On PE/COFF platforms, the -fPIE option is
> > ignored, but the build will then be littered with warnings:
> > 
> >    $ gcc -fPIE -c x.c
> >    x.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
> As long as the compile or link succeeded it'd set the flag.  We could
> add -Werror to the tests to prevent that in those cases, like so:

Sounds good to me, but wouldn't it be simpler to add -Werror by default


Corinna Vinschen
Cygwin Maintainer
Red Hat

More information about the openssh-unix-dev mailing list