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

Bug#644662: Fails to build if GCC does not have libssp support



On Mon, Oct 31, 2011 at 09:44:25AM -0500, Moffett, Kyle D wrote:
> On Oct 30, 2011, at 12:21, Aurelien Jarno wrote:
> > tag 644662 + moreinfo
> > thanks
> > 
> > On Fri, Oct 07, 2011 at 06:12:48PM -0400, Kyle Moffett wrote:
> >> Source: eglibc
> >> Version: 2.13-21
> >> Severity: normal
> >> Tags: upstream patch
> >> 
> >> The attached patch fixes detection of GCC -fstack-protector and libssp.
> >> 
> >> In order to properly detect whether or not GCC has -fstack-protect
> >> support built in, you actually need to link something.  Otherwise
> >> GCC will accept the option and fail during the link due to missing
> >> libssp.
> > 
> > This looks like a broken GCC. Either -fstack-protector support so that
> > the option is disabled (or rather returns a warning, but catched by the
> > configure script), or libssp should be installed properly.
> 
> Well, I personally agree, but the GCC developers seem to think otherwise.
> 
> In the past the use of "AC_TRY_COMPILE" instead of "AC_TRY_LINK" for
> detecting fstack-protector has been considered to be the real bug:
>   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358644

AFAIK there is no GCC developer in this thread. People actually changed
the current code because of lack of answer from the GCC developers.

Also in the GLIBC case -Werror is correctly passed to GCC, so the 
warning emitted when ssp support is disabled in GCC is correctly catched
and ssp support correctly disabled in this case.

> Additionally, it seems like LLVM clang currently has the same issue.
> 
> Other programs have been making this exact same change upstream:
>   http://code.google.com/p/ladvd/source/diff?spec=svn5f6f36a5c9a9207d88a34a21e25f0e339a6de1c7&r=5f6f36a5c9a9207d88a34a21e25f0e339a6de1c7&format=side&path=/m4/gcc_stack_protect.m4

I am still not fully convinced it's the way to go. For me it's really
fixing the bug at the wrong place, ie in the configure script of many
packages instead of configuring/installing GCC properly.

That said I'll forward the bug to upstream, and see what is their 
opinion about that.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net



Reply to: