develooper Front page | perl.perl5.porters | Postings from November 2010

Re: [perl #79838] -fstack-protector enabled without any way todisable, even on platforms not supporting it

Thread Previous | Thread Next
Andy Dougherty
November 28, 2010 11:28
Re: [perl #79838] -fstack-protector enabled without any way todisable, even on platforms not supporting it
Message ID:
On Fri, 26 Nov 2010, perlbug @ plan9 . de wrote:

> # New Ticket Created by 
> # Please include the string:  [perl #79838]
> # in the subject line of all future correspondence about this issue. 
> # <URL: >

> beginning with 5.10.something, perl enforces the use of -fstack-protector,
> even when Configure was explicitly told the compiler flags, and there is
> no way to switch it off.

I agree with your general premise that it should be possible to get 
Configure to do what you need it to do in order to build perl the way you 
want to build it.

I should point out, however, that while it isn't easy, it is possible to 
turn it off by running Configure interactively and removing it when 

> unfortunately, gcc supports this flag on most platforms, even if the
> underlying support is missing. simple test programs (sucha s the one
> used by Configure) might pass, but the generated programs might segfault
> or worse (for exmaple, on uclibc systems, all the cast to float tests
> segfault).

I wasn't aware that gcc might be misleading us this way.  If you could 
supply us with a better test program, that would be very helpful.

> besides, it would be nice not to enforce the use of certain compiler
> flags that are absoltuely unnecessary (perl works fine without
> -fstack-protector).
> so... please please please make -fstack-protector configurable somehow,
> better yet, don't override user-specified flags and/or improve the tets
> for platform support.

Unfortunately, other users do rely on us supplementing the user-specified 
C flags, so I don't think we can win there no matter what we do.  There 
might be some clever approach, but it's not occurring to me at the moment.

Meanwhile, yes, an improved test program would likely be a very good idea.

    Andy Dougherty

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About