From patchwork Fri Sep 11 09:08:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 516628 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 B5821140323 for ; Fri, 11 Sep 2015 19:08:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=BFA8R4l9; 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:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=aJCp1flMjhR+Ba5iDRj4+y4CvuaAyzHeIUyKo/K181XAsykrul K1lFN+o3CVncWiIhTjTtrUpWPBGiVTnK8EGTV7TSbqKFfpSWWjf5lSL85vOqKs7M hSPU/QAN6gW6yEUJMWPFRd91FH+32hMc+TocGkwWvyi/jHDSrk5dniY2o= 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:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=R3Af5ecFHEyQyoEENzpfdZAbUKY=; b=BFA8R4l9bC+d8d6IS7Q/ qrHleOjCHj1TW/qEsY3uK+gc1oVrhflug6/FP94lpk1lZsElZz/n3Obx4wDPGXS+ wPe2rLqa8lGXrjn8gK2GyBQ4siA5GVndO18vwfAtF/pyH4/gdSdmXOuLGCPQyYD8 F5MeD6SMf0jyBWuH30mlnEU= Received: (qmail 33208 invoked by alias); 11 Sep 2015 09:08:08 -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 33197 invoked by uid 89); 11 Sep 2015 09:08:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: smtp-relay.CeBiTec.Uni-Bielefeld.DE Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Sep 2015 09:08:07 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id A232FA57; Fri, 11 Sep 2015 11:08:05 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SJQJH8ZuxIsq; Fri, 11 Sep 2015 11:08:03 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id D95CCA55; Fri, 11 Sep 2015 11:08:03 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id t8B983pP013685; Fri, 11 Sep 2015 11:08:03 +0200 (CEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek Subject: [testsuite] Link gcc.dg/pie-link.c with -pie Date: Fri, 11 Sep 2015 11:08:03 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes While starting to develop the patch for Solaris PIE support, the gcc.dg/pie-link.c test succeeded at a point when it shouldn't have, i.e. before I had PIC crt files. In its current form, the test doesn't test what it's supposed to test, namely successfully linking position independent executables, because it compiles with -fpie, but links as a regular executable. The test was added here 2007-06-01 Geoffrey Keating * gcc.dg/pie-link.c: New test. https://gcc.gnu.org/ml/gcc-patches/2007-06/msg00070.html -pie doesn't make a difference on Darwin, but very much so on Linux and Solaris, where it is necessary for PIE creation. Fixed thus, tested on x86_64-unknown-linux-gnu and *-*-solaris2.12 with my upcoming PIE patch. Ok for mainline and gcc-5 branch? Rainer 2015-02-10 Rainer Orth * gcc.dg/pie-link.c: Add -pie to dg-options. # HG changeset patch # Parent 3e8c1a7c7f81ba581f0dd21ef2fc84ba136ec40d Link gcc.dg/pie-link.c with -pie diff --git a/gcc/testsuite/gcc.dg/pie-link.c b/gcc/testsuite/gcc.dg/pie-link.c --- a/gcc/testsuite/gcc.dg/pie-link.c +++ b/gcc/testsuite/gcc.dg/pie-link.c @@ -1,5 +1,5 @@ /* { dg-do link { target pie } } */ -/* { dg-options "-fpie" } */ +/* { dg-options "-fpie -pie" } */ int main(void) {