Re: universal binaries
Re: universal binaries
- Subject: Re: universal binaries
- From: Eric Albert <email@hidden>
- Date: Mon, 10 Jul 2006 20:57:36 -0700
On Jul 10, 2006, at 8:06 PM, Syd Polk wrote:
On Jul 10, 2006, at 9:57 PM, David A Rowland wrote:
I have an XCode project which uses some assembler code for
mathematical efficiency. I wonder how to build a universal binary.
If I simply use the "Architectures" target setting and choose
both, the compiler blows up on one branch of the compile because
it sees incompatible assembler code.
This may be a very basic question, but do you have assembler code
for both architectures? If not, do you have C code for the other
architecture? You can't assemble ppc code for intel, nor can you do
the reverse.
Is this assembler code inline, or it is separate assembler files?
If it is the former, you can wrap it with architecture macros. If
it is the latter, then you are probably going to have to play games
with targets and libraries.
If it's the latter, macros should work too. If, for example, your .s
file is entirely x86 assembly, wrap it in
#if __i386__
...code here...
#endif
Xcode compiles .s files with the -x assembler-with-cpp flag, which
runs the C preprocessor on the file before handing it off to the
assembler. Wrapping it in a #if for its architecture will ensure
that the file compiles for all architectures.
Hope this helps,
Eric
_______________________________________________
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