This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problem with darwin_closure.S on 10.4.11/gcc 4.3.3


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]