public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: David Fang <fang@csl.cornell.edu>
To: Ed Mansky <mansky@mindspring.com>
Cc: libffi-discuss@sourceware.org, jay.krell@cornell.edu
Subject: RE: Problem with darwin_closure.S on 10.4.11/gcc 4.3.3
Date: Wed, 23 Oct 2013 18:16:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1310231409190.19905@hal-00.csl.cornell.edu> (raw)
In-Reply-To: <p0621020fce8dba9dce61@[66.178.162.114]>

Hi,
 	It might also help to direct gcc (-B) to use a newer assembler, 
or in this case directly invoke a newer assembler.  I often have to use 
odcctools' "as" (circa 2009-08-08) on powerpc-darwin8.  It should be 
available through fink (package I maintain) or macports.
 	In fink, we've never been able to get libffi tests to pass after 
3.0.4 on powerpc-darwin8.  I have a bug report here:
https://github.com/atgreen/libffi/issues/53
 	I suspect there are some incompatibilities with the 
system libunwind and unwind info, which changed from darwin9 to darwin10. 
I have not investigated further.

Fang

> Thanks Jay, that tip was very helpful. I didn't think about the define coming 
> from cc.
>
> In my case, it is indeed __ppc__ that is defined as expected for my PPC 7450 
> G4.
>
> I have narrowed down the issue to version 3.0.10.
>
> I downloaded 3.0.4 of libffi. Builds fine on Darwin 8.11.0 on my G4
> version 3.0.9 builds too, some warnings from ffi_darwin.c in function 
> ffi_call.
> version 3.0.10 build fails with the same errors in darwin_closure.S I noted 
> earlier.
>
> So, the code that was added in 3.0.10 to darwin_closure.S, specifically the 
> SAVE_SIZE define used in LCFI1 label in the sgu command seems to be a 
> problem.
>
> I'd be happy to look into these, if anyone could point me to the right OSX 
> assembler manual that has sg and sgu commands in it, that would be great.
>
> For now, I'll fall back to 3.0.4 and go with that version.
>
> --Ed
>
>> ---------------------------------------- > CC: mansky@mindspring.com > 
>> From: mansky@mindspring.com > >... > Where is the constant __ppc64__ 
>> defined in the code? Is it defined in > libffi code itself somewhere, or in 
>> the OSX system headers ? I > compared my G4 with my G5 and could not find 
>> __ppc64__ defined in the > system headers there either. >... > > Thanks, > 
>> --Ed  #defines often come from within cc.   Try this:    echo> 1.c 
>> echo> 1.s cc -dM -c  1.s -E         cc -dM -c  1.c -E       or       cc 
>> -arch ppc -dM -c  1.s -E  | grep ppc       cc -m64 -arch ppc -dM -c  1.s -E 
>> | grep ppc   (man gcc> 1.txt ; edit 1.txt)   - Jay
>> 
>
>
>

-- 
David Fang
http://www.csl.cornell.edu/~fang/

      reply	other threads:[~2013-10-23 18:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 13:13 mansky
2013-10-23 16:03 ` Jay K
2013-10-23 17:51   ` Ed Mansky
2013-10-23 18:16     ` David Fang [this message]

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=Pine.LNX.4.64.1310231409190.19905@hal-00.csl.cornell.edu \
    --to=fang@csl.cornell.edu \
    --cc=jay.krell@cornell.edu \
    --cc=libffi-discuss@sourceware.org \
    --cc=mansky@mindspring.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).