From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21510 invoked by alias); 11 Feb 2015 15:45:53 -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 21482 invoked by uid 89); 11 Feb 2015 15:45:52 -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_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-oi0-f49.google.com Received: from mail-oi0-f49.google.com (HELO mail-oi0-f49.google.com) (209.85.218.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 11 Feb 2015 15:45:51 +0000 Received: by mail-oi0-f49.google.com with SMTP id v63so14774452oia.8 for ; Wed, 11 Feb 2015 07:45:49 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.182.233.202 with SMTP id ty10mr19775406obc.12.1423669549765; Wed, 11 Feb 2015 07:45:49 -0800 (PST) Received: by 10.76.134.102 with HTTP; Wed, 11 Feb 2015 07:45:49 -0800 (PST) In-Reply-To: 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:45:00 -0000 Message-ID: Subject: Re: [testsuite] PATCH: Add check_effective_target_pie From: "H.J. Lu" To: Rainer Orth Cc: Jeff Law , Magnus Granberg , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00722.txt.bz2 On Wed, Feb 11, 2015 at 7:19 AM, Rainer Orth wrote: > "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. That is how other options are described. > 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? > Assembly outputs may be different, depending on if PIE is enabled nor not. When we scan assembly outputs for test results, we have different expected results when PIE is enabled. That is how pie_enabled is used so far. -- H.J.