From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13103 invoked by alias); 19 Jul 2017 05:12:01 -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 13076 invoked by uid 89); 19 Jul 2017 05:11:59 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1670, rocket, simple!, joseph X-HELO: mail-pf0-f175.google.com Received: from mail-pf0-f175.google.com (HELO mail-pf0-f175.google.com) (209.85.192.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Jul 2017 05:11:58 +0000 Received: by mail-pf0-f175.google.com with SMTP id s70so12622211pfs.0 for ; Tue, 18 Jul 2017 22:11:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vSgJH5fDQwfCWeowUm4UomWjT+KHbEuimc+0BjxUlZ8=; b=lhEh2yDUlwfpses1/9YhB8AdfblkyM1qlVas1o/1oNlCHIfLLm8qR8VPbiLoIh3n1G dSd3Gnl0U4FnDTl91H4x9tlwvtyVEe/ePW9OKTI63d1ZvlirN9q/8ONTRFFJw8H0X/6D jHACDESbwWLUD1TU1/deUm76SUpAtmbbb5l2QN4+b/kUt0ex+Fh9qJy6catE+vF0UP63 fUW4QomX63sfaVfqdVKbHN+sFc6RbLr//dw1GzaCCWkYoD9lXEjUq8RcUs5oG/SqMU54 ebNah9mC0bf538tXik/b4QGsiPRGBJkRHzEuLGLcOeU+H2D0rSdPGDT7TfjOeDTOCC/P Rijg== X-Gm-Message-State: AIVw111NzOsjvQ9ig14aVMcptwo9JRR05RbBcejnySfUulyeqPUiQ15/ AsS2OYNq47BspA== X-Received: by 10.98.95.67 with SMTP id t64mr1193475pfb.127.1500441116868; Tue, 18 Jul 2017 22:11:56 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-71-80.tyqh2.lon.bigpond.net.au. [58.160.71.80]) by smtp.gmail.com with ESMTPSA id r27sm8874573pfe.0.2017.07.18.22.11.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 22:11:56 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 5BC2FC04DA; Wed, 19 Jul 2017 14:41:52 +0930 (ACST) Date: Wed, 19 Jul 2017 05:12:00 -0000 From: Alan Modra To: Joseph Myers , "H.J. Lu" Cc: GCC Patches Subject: Re: [PATCH] Fix pr80044, -static and -pie insanity, and pr81170 Message-ID: <20170719051152.GM14520@bubble.grove.modra.org> References: <20170622152859.GG8406@bubble.grove.modra.org> <20170717123325.GG14520@bubble.grove.modra.org> <20170718040219.GH14520@bubble.grove.modra.org> <20170718140953.GL14520@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg01111.txt.bz2 On Tue, Jul 18, 2017 at 07:49:48AM -0700, H.J. Lu wrote: > The difference is with --enable-default-pie, the gcc driver doesn't pass > both -pie and -static ld when "-static -pie" is used. Does your change > pass both -pie and -static ld when "-static -pie" is used? Again, as I said in the original post: "In both cases you now will have -static completely overriding -pie". That means "gcc -pie -static" and "gcc -static -pie" just pass "-static" to ld, and select the appropriate startup files for a static executable, when configured with --disable-default-pie. Which is what happens currently for --enable-default-pie. None of this is rocket science. I know what I'm doing where the linker and startup files are concerned, and I'm comfortable with the gcc specs language. The patch is simple! It should be easy to review, except for trying to understand the "-" lines. Yet it has sat unreviewed for nearly four weeks. And it fixes a powerpc --enable-default-pie bootstrap failure (pr81295). Joseph, would you please take a look? https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01678.html I know there is more to do in this area, for example, it seems to me that the HAVE_LD_PIE definition of GNU_USER_TARGET_STARTFILE_SPEC is good for !HAVE_LD_PIE, and similarly for GNU_USE_TARGET_ENDFILE_SPEC. And yes, I propagated that duplication into rs6000/sysv4.h, which needs some serious tidying. rs6000/sysv4.h linux support ought to be using the gnu-user.h defines rather than copying them, something I've told Segher I'll look at after this patch goes in. -- Alan Modra Australia Development Lab, IBM