develooper Front page | perl.perl5.porters | Postings from May 2008

Re: Change 33843: [perl #54120] [PATCH] [metaconfig] Need more -fstack-protector

Thread Next
From:
Nicholas Clark
Date:
May 20, 2008 08:00
Subject:
Re: Change 33843: [perl #54120] [PATCH] [metaconfig] Need more -fstack-protector
Message ID:
20080520145952.GA6478@plum.flirble.org
On Sat, May 17, 2008 at 07:00:03AM -0700, H. Merijn Brand wrote:
> Change 33843 by merijn@merijn-nb09 on 2008/05/17 13:56:26
> 
> 	Subject: [perl #54120] [PATCH] [metaconfig] Need more -fstack-protector 
> 	From: Andy Dougherty (via RT) <perlbug-followup@perl.org>
> 	Date: Tue, 13 May 2008 09:37:07 -0700
> 	Message-ID: <rt-3.6.HEAD-9992-1210696625-331.54120-75-0@perl.org>


> @@ -5258,6 +5258,10 @@
>  	case "$ccflags" in
>  	*-posix*) dflt="$dflt -posix" ;;
>  	esac
> +	# See note above about -fstack-protector
> +	case "$ccflags" in
> +	*-fstack-protector*) dflt="$dflt -fstack-protector" ;;
> +	esac
>  	;;
>  *) dflt="$ldflags";;
>  esac

this isn't perfect, because it's in this:


: flags used in final linking phase
case "$ldflags" in
'') if ./venix; then
		dflt='-i -z'
	else
		dflt=''
	fi
	case "$ccflags" in
	*-posix*) dflt="$dflt -posix" ;;
	esac
	# See note above about -fstack-protector
	case "$ccflags" in
	*-fstack-protector*) dflt="$dflt -fstack-protector" ;;
	esac
	;;
*) dflt="$ldflags";;
esac


I find that as soon as I use -Aldflags, I don't get -fstack-protector added.
Which is somewhat daft, at least as an "end user", as I was using *A* not *D*.
I don't understand the implementation of Configure enough to know when -A
processing is done, but is it done early enough that ldflags is already set by
the time that that code above is reached?

Nicholas Clark

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About