public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@gnu.org>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: Roland McGrath <roland@hack.frob.com>,
	bug-hurd@gnu.org,	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] hurd: align -p and -pg behavior on Linux
Date: Wed, 24 Feb 2016 23:18:00 -0000	[thread overview]
Message-ID: <20160224231821.GD2843@var.home> (raw)
In-Reply-To: <87bn75ybeb.fsf@kepler.schwinge.homeip.net>

Thomas Schwinge, on Wed 24 Feb 2016 23:46:36 +0100, wrote:
> I guess getting -D_REENTRANT for -pthread won't do us any harm?

It won't.

> > --- gcc/config/i386/gnu.h.orig	2015-09-17 21:41:13.000000000 +0000
> > +++ gcc/config/i386/gnu.h	2015-09-17 23:03:57.000000000 +0000
> > @@ -27,11 +27,11 @@
> >  #undef	STARTFILE_SPEC
> >  #if defined HAVE_LD_PIE
> >  #define STARTFILE_SPEC \
> > -  "%{!shared: %{pg|p|profile:gcrt0.o%s;pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \
> > +  "%{!shared: %{pg|p:gcrt1.o%s;profile:gcrt0.o%s;pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \
> >     crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
> >  #else
> >  #define STARTFILE_SPEC \
> > -  "%{!shared: %{pg|p|profile:gcrt0.o%s;static:crt0.o%s;:crt1.o%s}} \
> > +  "%{!shared: %{pg|p:gcrt1.o%s;profile:gcrt0.o%s;static:crt0.o%s;:crt1.o%s}} \
> >     crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
> >  #endif
> 
> I think I understand what you're trying to do (avoid gcrt0.o being used
> for -pg or -p, and instead use gcrt1.o),

Yes.

> Likewise, for -pg or -p, I would assume that we
> still need gcrt0.o for static linking, and gcrt1.o for dynamic linking.

Mmm, probably indeed.

> -  "%{!shared: %{pg|p|profile:gcrt0.o%s;pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \
> +  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \

Yes, that looks reasonable.

Samuel

  reply	other threads:[~2016-02-24 23:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-19 12:33 Samuel Thibault
2015-09-28 21:51 ` Samuel Thibault
2015-10-11 18:29 ` Samuel Thibault
2016-01-14  0:10   ` Samuel Thibault
2015-10-12  8:37 ` Thomas Schwinge
2016-02-24 22:47 ` Thomas Schwinge
2016-02-24 23:18   ` Samuel Thibault [this message]
2016-02-26  0:56     ` Samuel Thibault
2016-03-29 22:00   ` Thomas Schwinge
2016-03-29 22:04     ` Samuel Thibault

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=20160224231821.GD2843@var.home \
    --to=samuel.thibault@gnu.org \
    --cc=bug-hurd@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=roland@hack.frob.com \
    --cc=thomas@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).