From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12552 invoked by alias); 11 Feb 2015 15:19:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 12539 invoked by uid 89); 11 Feb 2015 15:19:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=ham 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; Wed, 11 Feb 2015 15:19:31 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 7BC524D3; Wed, 11 Feb 2015 16:19:29 +0100 (CET) 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 NBZ+hSM3VDPx; Wed, 11 Feb 2015 16:19:27 +0100 (CET) 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 6E09D4D2; Wed, 11 Feb 2015 16:19:27 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.7+Sun/8.14.7/Submit) id t1BFJQeb027282; Wed, 11 Feb 2015 16:19:26 +0100 (CET) From: Rainer Orth To: "H.J. Lu" Cc: Jeff Law , Magnus Granberg , GCC Patches Subject: Re: [testsuite] PATCH: Add check_effective_target_pie References: <20150111235837.GA26961@gmail.com> <54B42880.2040800@redhat.com> <2219602.BYtQkL3Scp@laptop1.gw.ume.nu> <54B444E4.1080700@redhat.com> <20150113125201.GA18558@gmail.com> <54B570D5.4040008@redhat.com> Date: Wed, 11 Feb 2015 15:19:00 -0000 In-Reply-To: (H. J. Lu's message of "Wed, 11 Feb 2015 06:20:53 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00718.txt.bz2 "H.J. Lu" writes: > On Wed, Feb 11, 2015 at 6:10 AM, Rainer Orth > wrote: >> "H.J. Lu" writes: >> >>>> The new proc is bogus, unfortunately: there's already an existing >>>> check_effective_target_pie that checks if a target can support PIE. The >>>> new one just overrides the previous one. On targets supporting PIE >>>> (like Darwin), but not defaulting to it, the PIE tests suddenly turn out >>>> UNSUPPORTED. >>>> >>>> You should rename the new one to >>>> e.g. check_effective_target_pie_default, update the single user, and >>>> document it in sourcebuild.texi. >>> >>> I checked in this as an obvious fix. >> >> I think pie_enabled is not a very descriptive name: >> >> Index: doc/sourcebuild.texi >> =================================================================== >> --- doc/sourcebuild.texi (revision 220617) >> +++ doc/sourcebuild.texi (working copy) >> @@ -1884,6 +1884,9 @@ >> @item nonpic >> Target does not generate PIC by default. >> >> +@item pie_enabled >> +Target generates PIE by default. >> + >> @item pcc_bitfield_type_matters >> Target defines @code{PCC_BITFIELD_TYPE_MATTERS}. >> >> With -fpie, PIE is also enabled, just not the default without any > > I was testing > > # make RUNTESTFLAGS="--target_board='unix{-m32\ -fpie,-fpie}' > > I don't consider PIE is default. It is just enabled. > >> options. Please either go with the pie_default I sugested or wait for >> others to weigh in before rushing in another `obvious' fix. Then the description (both sourcebuild.texi and target-supports.texi) is confusing. What are you trying to achieve here, actually? Even on Solaris 11/x86 (which doesn't support PIE), -fpie lets the check_effective_target_pie_enabled (or whatever it's called) proc pass. Shouldn't it also check if the target can support PIE at all? Please clarify your goals before going forward with this. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University