• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Build mysteriously excludes G3s [Solved, but not understood]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build mysteriously excludes G3s [Solved, but not understood]


  • Subject: Re: Build mysteriously excludes G3s [Solved, but not understood]
  • From: James Bucanek <email@hidden>
  • Date: Sat, 20 Mar 2010 09:09:38 -0700

Greg Guerin <mailto:email@hidden> wrote (Friday, March 19, 2010 7:09 PM -0700):

James Bucanek wrote:

To date, no one I've discussed this with has any clear idea why this happens.


http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man1/gcc.1.html

- - - - The subtype of the file created (like ppc7400 or ppc970 or i686) is
determined by the flags that specify the ISA that GCC is targetting, like
-mcpu or -march.  The -force_cpusubtype_ALL option can be used to override
this.

The Darwin tools vary in their behavior when presented with an ISA mismatch. The assembler, as, will only permit instructions to be used that are valid for
the subtype of the file it is generating, so you cannot put 64-bit
instructions in an ppc750 object file. The linker for shared libraries,
/usr/bin/libtool, will fail and print an error if asked to create a shared
library with a less restrictive subtype than its input files (for instance,
trying to put a ppc970 object file in a ppc7400 library). The linker for
executables, ld, will quietly give the executable the most restrictive subtype
of any of its input files. - - - -

Greg,

That all makes perfect sense. The question here is why does the linker spontaneously promote the final executable to ppc7400 when all of the source object files are ppc and I'm not linking to any static libraries.

I'm assuming the problem is the linker, because I've run 'lipo' on all of the .o files produced by the target and all are either i386 or ppc.

The linker (ld) is being passed -arch ppc, yet produces a ppc7400 executable for one, and only one, target in the project. The linker does have a -force_cpusubtype_ALL option, which will mark the executable as ppc even though it detects a mixture of architectures in the input files. If I was sure that this is a bug in ld, I'd be willing to try that flag. But I'm concerned that there's actually a G4 or G5 instruction lurking somewhere that's going to crash a G3.



James Bucanek
____________________________________________________________________
Author of Professional Xcode 3                   ISBN: 9780470525227
<http://www.proxcode3.com/>
and Learn Objective-C for Java Developers        ISBN: 9781430223696
<http://objectivec4java.com/>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Build mysteriously excludes G3s [Solved, but not understood]
      • From: Chris Suter <email@hidden>
    • Re: Build mysteriously excludes G3s [Solved, but not understood]
      • From: Chris Ridd <email@hidden>
References: 
 >Re: Build mysteriously excludes G3s [Solved, but not understood] (From: Greg Guerin <email@hidden>)

  • Prev by Date: Re: Build mysteriously excludes G3s [Solved, but not understood]
  • Next by Date: Re: Build mysteriously excludes G3s [Solved, but not understood]
  • Previous by thread: Re: Build mysteriously excludes G3s [Solved, but not understood]
  • Next by thread: Re: Build mysteriously excludes G3s [Solved, but not understood]
  • Index(es):
    • Date
    • Thread