public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Alan Modra <amodra@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	"Joseph S. Myers" <joseph@codesourcery.com>
Subject: PING^2: [PATCH] PR driver/81523: Make -static override -pie
Date: Mon, 07 Aug 2017 16:02:00 -0000	[thread overview]
Message-ID: <CAMe9rOrdAxhJ-_PY1WOcJipfbpDrAwk_=gE98izmUtVOhT-EHA@mail.gmail.com> (raw)

On Mon, Jul 31, 2017 at 7:04 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Jul 31, 2017 at 5:37 PM, Alan Modra <amodra@gmail.com> wrote:
>> On Mon, Jul 31, 2017 at 08:04:13AM -0700, H.J. Lu wrote:
>>> On Mon, Jul 24, 2017 at 10:24 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> > On Sun, Jul 23, 2017 at 8:14 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> >> -static and -pie together behave differently depending on whether GCC is
>>> >> configured with --enable-default-pie.  On x86, "-static -pie" fails to
>>> >> create executable when --enable-default-pie isn't used, but creates a
>>> >> static executable when --enable-default-pie is used.  This patch makes
>>> >> -static completely override -pie to create a static executable, regardless
>>> >> if --enable-default-pie is used to configure GCC.
>>> >>
>>> >> OK for master?
>>> >>
>>> >> H.J.
>>> >> --
>>> >> 2017-07-23  Alan Modra  <amodra@gmail.com>
>>> >>             H.J. Lu  <hongjiu.lu@intel.com>
>>> >>
>>> >> gcc/
>>> >>
>>> >>         PR driver/81523
>>> >>         * gcc.c (NO_PIE_SPEC): Delete.
>>> >>         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
>>> >>         exclusion..
>>> >>         (LINK_PIE_SPEC): ..to here.
>>> >>         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
>>> >>         chain of crtbegin*.o selection, update for PIE_SPEC changes and
>>> >>         format.
>>> >>         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
>>> >>         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
>>> >>         (ENDFILE_CRTEND_SPEC): Similarly.
>>> >>
>>> >
>>> > We need to add %{no-pie:} to LINK_COMMAND_SPEC to prevent an error
>>> > message when PIE isn't enabled by default.   Here is the updated patch with
>>> > a testcase.
>>> >
>>>
>>> PING.  I am enclosing the patch here.
>>
>> For anyone looking at this, the patch enclosed here is mine from
>> https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01678.html minus some PR
>> numbers and the powerpc specific part, plus testsuite (which looks to
>> me like HJ copied pie-static-1.c to pie-static-2.c then forgot to
>> change the order of -pie and -static), plus a tweak to
>> LINK_COMMAND_SPEC.  The LINK_COMMAND_SPEC change looks good to me,
>> except for the comment which doesn't exactly match the code.  That
>> change is necessary because I ignorantly removed %{no-pie:} from
>> LINK_PIE_SPEC without adding it back elsewhere.
>
> Here is the updated patch.
>

Hi Joseph,

Can you take a look at this patch:

https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00011.html

Thanks.

-- 
H.J.

             reply	other threads:[~2017-08-07 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 16:02 H.J. Lu [this message]
2017-08-08 21:46 ` Joseph Myers
2017-08-12 16:03   ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOrdAxhJ-_PY1WOcJipfbpDrAwk_=gE98izmUtVOhT-EHA@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=amodra@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).