public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Neil Gierman <crossgcc-list@roadrunn.com>
To: crossgcc@sourceware.org
Subject: Re: lwsync used in generic ppc crosstool-NG
Date: Sat, 10 Aug 2013 13:45:00 -0000	[thread overview]
Message-ID: <CACZVN6gXbC0BHSzcKH1BDWGJs5LZ4Lqu2w=BqPWPpG0_-YCT-A@mail.gmail.com> (raw)
In-Reply-To: <22cb66a0$6fb6caae$796c4e01$@com>

Thanks for the information. I'll try the newer versions of gcc and
binutils. I doubt we will be able to move from glibc to eglibc.
Keeping with a generic toolchain that produces binaries for both CPU's
I think is going to be a hard requirement. I am almost debating
patching gcc so when the generic "powerpc" CPU is specified, lwsync is
disabled (like it is in rs6000.h, but no other file).

On Sat, Aug 10, 2013 at 5:21 AM, Titus von Boxberg <titus@v9g.de> wrote:
> -------- Original Message --------
>> From: "Neil Gierman" <crossgcc-list@roadrunn.com>
>> Sent: Freitag, 9. August 2013 22:47
>> To: crossgcc@sourceware.org
>> Subject: lwsync used in generic ppc crosstool-NG
>>
>> I am upgrading our toolchain from:
>>
>> crosstool-NG 1.3.1
>> binutils-2.17
>> gcc-4.2.1
>>
>> To:
>>
>> crosstool-NG 1.18.0
>> binutils-2.20.1
>> gcc-4.4.6
>>
>> Using the attached CT_NG config.
>>
>> We create a generic PPC toolchain because we want a single toolchain
>> to create binaries that will run on both an e300 and e500 CPU. We do
>> realize that we will lose some efficiency but we are willing to deal
>> with that.
>>
>> The problem is that a test program crashes with Illegal instruction.
>> Upon researching that, I found that the instruction "lwsync" is used
>> and one of our CPU's (e500) does not support that instruction. That
>> lwsync instruction is coming from libstdc++ (verified with "objdump -d
>> -M ppc libstdc++.so|grep lwsync"). Our 4.2.1 based toolchain does not
>> have any instances of lwsync in libstdc++. We have tried passing
>> __NO_LWSYNC__ and _TARGET_NO_LWSYNC in the config, but libstdc++ still
>> has lwsync in it. Is there a place I am missing to create a toolchain
>> for generic PPC without any instances of lwsync? Additionally, on the
>> 4.2.1 based toolchain, I don't have to pass "-M ppc" to objdump to
>> resolve the instruction names, however on the 4.4.6 based toolchain I
>> have to pass "-M ppc" otherwise I don't get the instruction names in
>> the disassembler output. I don't know if this is another symptom of
>> the same root cause. I do have "powerpc" in both the ARCH and CPU
>> values of the CT-NG configuration.
>>
>> I have tried to create a test program that exhibits the problem
>> without company proprietary information but the simple test programs
>> always run without issue, so the only information I can forward
>> publicly is the use of objdump.
>
> Neil,
>
> I don't have specific advice:
> I'm using (dedicated) toolchains for an e500v2 and an e300
> (gcc 4.7.2, binutils 2.22, glibc 2.13 for e300, eglibc 2.13 for e500v2)
>
> I only faintly remember the pain building an e500v2 toolchain with
> tools as old as your "new" versions.
> From that memory I'd recommend
> - use toolchains dedicated to each arch
> - use gcc >= 4.7
> - use at least binutils 2.22
> - maybe try using eglibc (2.13) for the e500
>
> I doubt that a unified e300+e500 toolchain can be reached without much
> pain.
>
> HTH.
> Regards,
> Titus
>
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq

  reply	other threads:[~2013-08-10 13:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-10 10:21 Titus von Boxberg
2013-08-10 13:45 ` Neil Gierman [this message]
2013-08-19 15:43   ` Bill Pringlemeir
  -- strict thread matches above, loose matches on Subject: below --
2013-08-09 20:46 Neil Gierman

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='CACZVN6gXbC0BHSzcKH1BDWGJs5LZ4Lqu2w=BqPWPpG0_-YCT-A@mail.gmail.com' \
    --to=crossgcc-list@roadrunn.com \
    --cc=crossgcc@sourceware.org \
    /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).