From: IainS <developer@sandoe-acoustics.co.uk>
To: Mike Stump <mikestump@comcast.net>
Cc: Jack Howarth <howarth@bromo.med.uc.edu>,
gcc-patches List <gcc-patches@gcc.gnu.org>,
Java Patches <java-patches@gcc.gnu.org>
Subject: Re: [PATCH]: Pass -no_pie on SYSTEMSPEC for darwin11
Date: Sat, 18 Jun 2011 07:51:00 -0000 [thread overview]
Message-ID: <9E917AE9-4F43-44E0-9599-C85AC4F284D9@sandoe-acoustics.co.uk> (raw)
In-Reply-To: <20110617192406.GA27136@bromo.med.uc.edu>
Hi Mike, Jack,
On 17 Jun 2011, at 20:24, Jack Howarth wrote:
> On Fri, Jun 17, 2011 at 10:43:07AM -0700, Mike Stump wrote:
>> On Jun 16, 2011, at 7:21 PM, Jack Howarth wrote:
>>> The gcj compiler needs to pass -no_pie for linkage on darwin11 due
>>> to the new -pie
>>> default of the linker. The attached patch accomplishes this by
>>> passing -no_pie on SYSTEMSPEC
>>> for *-*-darwin[12]*. Since Darwin10 supports -no_pie in its
>>> linker, I included it in the
>>> triplet match to simplify the syntax. Bootstrap and tested on
>>> x86_64-apple-darwin11.
>>> Okay for gcc trunk?
>>
>> The darwin aspects of this seem right to me. I'm less familiar
>> with the SYSTEMSPEC bit in libjava, someone want to give a quick
>> comment on if this is the right knob to twist?
>
> Since SYSTEMSPEC in configure.ac is setting system specific
> options for libgcj.spec.in, it seemed
> the most rational place to append -no_pie to (and we already had a
> darwin entry in the case statement).
> FYI, I also tried a different approach of not appending -no_pie
> SYSTEMSPEC on darwin but instead using...
maybe I need more coffee .. and the gcc gathering was very sociable...
but...
... It seems to me that switching pie off in libjava spec == switching
pie off for every java program.
(i.e. it doesn't seem equivalent to BOOT_CFLAGS, but maybe I'm still
missing something).
>> Roughly, there are unresolved issues with position independent code
>> with the garbage collector (or was it a problem with some unknown
>> bit in the compiler), and this just turns off a new OS default for
>> java to work around the issue. I hope that's an at least half way
>> accurate description. We're aiming to have the default for C be -
>> fpie, but for java, no pie. For the C compiler, we must build the
>> compiler without -pie in order for PCH to work. It is reasonable
>> to turn off pie in the java compiler as well.
>>
>> Jack, do we have a PR number for this? If so, please include in
>> the changelog in the usual spot.
>
> I plan on opening a PR shortly, but I was hoping to be able to
> reproduce the same failures under linux
> using a bootstrap with the compiler defaulted to -fPIC code
> generation and the inverse change applied
> to linux of...
The thing that is not clear is this.
libjava (and boehm-gc) with pie passes on d9 and d10 (modulo a test-
suite related kludge); so it doesn't seem that there's a fundamental
problem.
(c.f. PCH, which won't work with pie, by definition from its design).
AFAIR ecj1 is not involved in the libjava tests - because they don't
actually compile from .java.
(I'm not debating that there is a problem with ecj1 - but maybe that
needs to be solved in the explicit build instructions for that
executable).
----
So is this 'fix' a work-around for a tool bug... or is there really a
lurking problem in boehm-gc/libjava that is uncovered by darwin11?
we seem to be switching off pie without actually pointing at the
reason for doing so...
Iain
next prev parent reply other threads:[~2011-06-18 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110617022132.GA18745@bromo.med.uc.edu>
2011-06-17 17:43 ` Mike Stump
2011-06-17 19:24 ` Jack Howarth
2011-06-18 7:51 ` IainS [this message]
2011-06-17 2:23 Jack Howarth
2011-06-17 8:29 ` Andrew Haley
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=9E917AE9-4F43-44E0-9599-C85AC4F284D9@sandoe-acoustics.co.uk \
--to=developer@sandoe-acoustics.co.uk \
--cc=gcc-patches@gcc.gnu.org \
--cc=howarth@bromo.med.uc.edu \
--cc=java-patches@gcc.gnu.org \
--cc=mikestump@comcast.net \
/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).