[llvm-commits] [patch] Fix PR5094: -fstack-protector fails to link on Linux/x86

Nelson Elhage nelhage at nelhage.com
Mon Jul 5 18:29:18 PDT 2010


Here's a patch which splits the test out for ARM, X86, and PPC.

For ARM and PPC, I'm leaving a single test (triple unspecified). From
browsing glibc, it looks like PPC has a weird stack cookie on Linux,
too, but I don't have a build env set up to verify, so I'll let someone
who knows more about PPC deal if appropriate.

FileCheck didn't seem to be necessary for these tests; Did you intend
that I check something more complex than the simple grep's that were
already there?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: stack-protector-linux.diff
Type: text/x-diff
Size: 9491 bytes
Desc: Fix -fstack-protector on Linux/x86
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100705/2e6a7a66/attachment.diff>
-------------- next part --------------

On Mon, 5 Jul 2010 17:06:01 -0700, Bill Wendling <wendling at apple.com> wrote:
> On Jul 5, 2010, at 4:08 PM, Eric Christopher wrote:
> 
> > On Jul 5, 2010, at 4:07 PM, Nelson Elhage wrote:
> > 
> >> Ok, I can split this into arch-specific tests. Would you prefer if I
> >> make a (nearly-identical) copy of this test for each architecture, or
> >> just pick one or a handful, and let developers add more if appropriate
> >> if and when they implement glibc stack cookie support for those targets?
> >> 
> >> I guess I should also add a case to the X86 test with
> >> -mtriple=x86_64-apple-darwin or such, to check that we still use
> >> __stack_chk_guard in that case.
> > 
> > x86(-64) and ppc would probably be sufficient.  But yes, one for
> > each of the linux and darwin options.
> > 
> Ditto. The use of FileCheck will help in that of course. :)
> 
> Please include ARM in the list of architectures.
> 
> Thanks!
> -bw
> 
> 


More information about the llvm-commits mailing list