From patchwork Thu May 21 20:01:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Tobler X-Patchwork-Id: 475126 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B854E140D60 for ; Fri, 22 May 2015 06:02:20 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=lAlK6zLn; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=IRilIKBct2JK9ySi5sa3E4ah4jqraYqke/+VzA3w2nzGNYXK+gLus oAIg8bBswfEHEyc1ZqtYGzvklcz+R+j/NCb3c6pIvjItRY77Mb3JiINDlOFFJiqL 4YmnyC38Q55FNmxqjHXEbNwoggel7dd7B9lIlCKG/Hsl3rISgqJajI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=default; bh=xrVayOSkfS6uu4eWEFAdH7Cj29k=; b=lAlK6zLn+hptxz/MuB2rFlBo3dGs /zcomGfTI3o+yt4Oyx1ADvx3vEebzf+QEKUKQ5cEpu5Fi3vZljkcRVJojqsz8Pfq oMSidId1aygKpkslefnp0yVZ8wxRdXHcs3DVrdVn+Q1cIa8hsSgdSQ3beJ1nBjOJ yp+YS9w16zQAWb4= Received: (qmail 49821 invoked by alias); 21 May 2015 20:02:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 49811 invoked by uid 89); 21 May 2015 20:02:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: smtp.fgznet.ch Received: from mail.fgznet.ch (HELO smtp.fgznet.ch) (81.92.96.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 21 May 2015 20:02:11 +0000 Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id t4LK1mUo038523; Thu, 21 May 2015 22:02:05 +0200 (CEST) (envelope-from andreast-list@fgznet.ch) Message-ID: <555E39AD.5040906@fgznet.ch> Date: Thu, 21 May 2015 22:01:49 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jeff Law , GCC Patches Subject: Re: [patch] testsuite enable PIE tests on FreeBSD References: <555CBE89.5020500@fgznet.ch> <555CEEEE.50902@redhat.com> <555E2078.9000503@fgznet.ch> In-Reply-To: <555E2078.9000503@fgznet.ch> X-IsSubscribed: yes On 21.05.15 20:14, Andreas Tobler wrote: > On 20.05.15 22:30, Jeff Law wrote: >> On 05/20/2015 11:04 AM, Andreas Tobler wrote: >>> Hi, >>> >>> the attached patch enables some PIE tests on FreeBSD. >>> >>> Ok for trunk? >>> >>> Thanks, >>> Andreas >>> >>> 2015-05-20 Andreas Tobler >>> >>> * gcc.target/i386/pr32219-1.c: Enable test on FreeBSD. >>> * gcc.target/i386/pr32219-2.c: Likewise. >>> * gcc.target/i386/pr32219-3.c: Likewise. >>> * gcc.target/i386/pr32219-4.c: Likewise. >>> * gcc.target/i386/pr32219-5.c: Likewise. >>> * gcc.target/i386/pr32219-6.c: Likewise >>> * gcc.target/i386/pr32219-7.c: Likewise. >>> * gcc.target/i386/pr32219-8.c: Likewise. >>> * gcc.target/i386/pr39013-1.c: Likewise. >>> * gcc.target/i386/pr39013-2.c: Likewise. >>> * gcc.target/i386/pr64317.c: Likewise. >> Wouldn't it be better to remove the target selector and instead add: >> >> /* { dg-require-effective-target pie } */ >> >> In each of those tests? >> >> While the net effect is the same today, it means there's only one place >> to change if another x86 target gains PIE support in the future. >> >> Pre-approved using that style. > > Thanks! > > Tested on amd64-freebsd and CentOS. > > Andreas > > > This is what I committed: > > 2015-05-21 Andreas Tobler > > * gcc.target/i386/pr32219-1.c: Use 'dg-require-effective-target pie' > instead of listing several targets on its own. > * gcc.target/i386/pr64317.c: Likewise. Yes, I know. The comment and the content for this test case do not match. Is this ok: /* { dg-final { scan-assembler "movl\[ \\t\]+c@GOTOFF\[(\]%ebx\[)\]" } } */ or do you prefer instead of /* { dg-do compile { target ia32 } } */ this one: /* { dg-do compile } */ /* { dg-require-effective-target ia32 } */ Btw, all three variants run on i386. Thanks, Andreas Index: gcc.target/i386/pr64317.c =================================================================== --- gcc.target/i386/pr64317.c (revision 223498) +++ gcc.target/i386/pr64317.c (working copy) @@ -1,4 +1,5 @@ -/* { dg-do compile { target { { *-*-freebsd* *-*-linux* } && ia32 } } } */ +/* { dg-do compile { target ia32 } } */ +/* { dg-require-effective-target pie } */ /* { dg-options "-O2 -fpie" } */ /* { dg-final { scan-assembler "addl\[ \\t\]+\[$\]_GLOBAL_OFFSET_TABLE_, %ebx" } } */