From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 653 invoked by alias); 23 Oct 2013 18:16:53 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 638 invoked by uid 89); 23 Oct 2013 18:16:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: vlsi.csl.cornell.edu Received: from csl.cornell.edu (HELO vlsi.csl.cornell.edu) (128.84.224.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Oct 2013 18:16:51 +0000 Received: from hal-00.csl.cornell.edu (hal-00.csl.cornell.edu [128.84.224.105]) by vlsi.csl.cornell.edu (8.13.4/8.13.4) with ESMTP id r9NIGbXT017595; Wed, 23 Oct 2013 14:16:43 -0400 (EDT) Date: Wed, 23 Oct 2013 18:16:00 -0000 From: David Fang To: Ed Mansky cc: libffi-discuss@sourceware.org, jay.krell@cornell.edu Subject: RE: Problem with darwin_closure.S on 10.4.11/gcc 4.3.3 In-Reply-To: Message-ID: References: <5430341D-132E-4F68-9917-DFB0508D7F96@mindspring.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-IsSubscribed: yes X-SW-Source: 2013/txt/msg00191.txt.bz2 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/