From patchwork Wed Mar 19 17:18:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkataramanan Kumar X-Patchwork-Id: 26603 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B45B3203C3 for ; Wed, 19 Mar 2014 17:18:25 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j7sf19227148qaq.2 for ; Wed, 19 Mar 2014 10:18:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:date:message-id :subject:from:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=ft9vTDIgQewg5B+VHEXm7HjJQs4+D0TI1ToLkTsjZHk=; b=hmr6C4Z7gee1AMgpqGWBMwZHx+OHuWT2H9R/4ApOpzTiPlYdWV/6LDay0+wJAu7r4r TFicR/Dv0AO5msGMBklp3me3MG0fj1AedKvncl5Bf1oyKxQVjwtfzFoZfuvMmsjAbHgt AUWGZVjjD1qvMOg4hiNa298Uiqp8C/ggrj5MaKJxJCSCmMLEdQgQ0xie0JeRkzPDYc6F 7C6y227TtDiGYAgiHeT6hg0rDN9LQ7j5qGHtPC0T/0fhmZ84FQDMqVdV/sdl2ZLwzIgN 1BxhUDY05xy0bFHoVs+ysusYDZ59uN4LWT+2yv3QhrGVmfl5FWHbjGE6Hjjy/DYgze2D aeNg== X-Gm-Message-State: ALoCoQlNOMYZSJ8tsUumztuVe6Q9GV7pdeGMcOLn4y/WfNZJDSU4zW7JTKg9fuB7TOOdOrJnT48O X-Received: by 10.58.253.72 with SMTP id zy8mr5371029vec.10.1395249505404; Wed, 19 Mar 2014 10:18:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.42 with SMTP id j39ls195092qge.93.gmail; Wed, 19 Mar 2014 10:18:25 -0700 (PDT) X-Received: by 10.58.38.166 with SMTP id h6mr10382955vek.22.1395249505188; Wed, 19 Mar 2014 10:18:25 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id a15si4621718vew.61.2014.03.19.10.18.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Mar 2014 10:18:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id cz12so9279083veb.35 for ; Wed, 19 Mar 2014 10:18:25 -0700 (PDT) X-Received: by 10.220.188.10 with SMTP id cy10mr988115vcb.36.1395249505075; Wed, 19 Mar 2014 10:18:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp318790vck; Wed, 19 Mar 2014 10:18:24 -0700 (PDT) X-Received: by 10.140.83.138 with SMTP id j10mr15804802qgd.42.1395249504145; Wed, 19 Mar 2014 10:18:24 -0700 (PDT) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx.google.com with ESMTPS id 4si13329822qat.50.2014.03.19.10.18.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Mar 2014 10:18:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.216.47 is neither permitted nor denied by best guess record for domain of venkataramanan.kumar@linaro.org) client-ip=209.85.216.47; Received: by mail-qa0-f47.google.com with SMTP id w5so8768431qac.6 for ; Wed, 19 Mar 2014 10:18:10 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.229.192.7 with SMTP id do7mr44757972qcb.1.1395249490283; Wed, 19 Mar 2014 10:18:10 -0700 (PDT) Received: by 10.140.43.66 with HTTP; Wed, 19 Mar 2014 10:18:09 -0700 (PDT) Date: Wed, 19 Mar 2014 22:48:09 +0530 Message-ID: Subject: [PATCH 2/2, AARCH64] Test case changes: Re: [RFC] [PATCH, AARCH64] : Using standard patterns for stack protection. From: Venkataramanan Kumar To: Marcus Shawcroft Cc: "gcc-patches@gcc.gnu.org" , Patch Tracking X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: venkataramanan.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi Marcus, On 14 March 2014 19:42, Marcus Shawcroft wrote: >>> >>> Do we need a new effective target test, why is the existing >>> "fstack_protector" not appropriate? >> >> "stack_protector" does a run time test. It failed in cross compilation >> environment and these are compile only tests. > > This works fine in my cross environment, how does yours fail? > > >> Also I thought richard suggested me to add a new option for this. >> ref: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg03358.html > > I read that comment to mean use an effective target test instead of > matching triples. I don't see that re-using an existing effective > target test contradicts that suggestion. > > Looking through the test suite I see that there are: > > 6 tests that use dg-do compile with dg-require-effective-target fstack_protector > > 4 tests that use dg-do run with dg-require-effective-target fstack_protector > > 2 tests that use dg-do run {target native} dg-require-effective-target > fstack_protector > > and finally the 2 tests we are discussing that use dg-compile with a > triple test. > > so there are already tests in the testsuite that use dg-do compile > with the existing effective target test. > > I see no immediately obvious reason why the two tests that require > target native require the native constraint... but I guess that is a > different issue. > I used the existing dg-require-effective-target check, "stack_protector" and added it in a separate line. ChangeLog. 2014-03-19 Venkataramanan Kumar * g++.dg/fstack-protector-strong.C: Add effetive target check for stack protection. * gcc.dg/fstack-protector-strong.c: Likewise. These two tests are passing now for aarch64-none-linux-gnu target under QEMU. Let me know if I can upstream these two patches. regards, Venkat. Index: gcc/testsuite/g++.dg/fstack-protector-strong.C =================================================================== --- gcc/testsuite/g++.dg/fstack-protector-strong.C (revision 208609) +++ gcc/testsuite/g++.dg/fstack-protector-strong.C (working copy) @@ -1,7 +1,8 @@ /* Test that stack protection is done on chosen functions. */ -/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-do compile } */ /* { dg-options "-O2 -fstack-protector-strong" } */ +/* { dg-require-effective-target fstack_protector } */ class A { Index: gcc/testsuite/gcc.dg/fstack-protector-strong.c =================================================================== --- gcc/testsuite/gcc.dg/fstack-protector-strong.c (revision 208609) +++ gcc/testsuite/gcc.dg/fstack-protector-strong.c (working copy) @@ -1,7 +1,8 @@ /* Test that stack protection is done on chosen functions. */ -/* { dg-do compile { target i?86-*-* x86_64-*-* rs6000-*-* s390x-*-* } } */ +/* { dg-do compile } */ /* { dg-options "-O2 -fstack-protector-strong" } */ +/* { dg-require-effective-target fstack_protector } */ #include