Re: Specify multi-variant/arch output in custom build rule
Re: Specify multi-variant/arch output in custom build rule
- Subject: Re: Specify multi-variant/arch output in custom build rule
- From: Jonas Maebe <email@hidden>
- Date: Wed, 3 May 2006 21:51:34 +0200
On 3 mei 2006, at 21:21, Jonas Maebe wrote:
XCode then assembles it (using an internal build rule) using this
command line:
/usr/bin/gcc-4.0 -x assembler -arch ppc -pipe -Wno-trigraphs -
fpascal-strings -fasm-blocks -g -O0 -Wreturn-type -Wunused-variable
-fmessage-length=0 -mtune=G5 -fvisibility=hidden -mfix-and-continue
-mmacosx-version-min=10.4 -I/Users/jonas/elishome/aop/build/
Javana.build/Debug/Javana.build/Javana.hmap -F/Users/jonas/elishome/
aop/build/Debug -I/Users/jonas/elishome/aop/build/Debug/include -I/
Users/jonas/elishome/aop/build/Javana.build/Debug/Javana.build/
DerivedSources -isysroot /Developer/SDKs/MacOSX10.4u.sdk -c /Users/
jonas/elishome/aop/build/Javana.build/Debug/Javana.build/
DerivedSources/backends.s -o /Users/jonas/elishome/aop/build/
Javana.build/Debug/Javana.build/Objects-normal/ppc/backends.o
backends.pp:1889:FATAL:Symbol BACKENDS_TBACKEND_$__CREATE$ANSISTRING
$$TBACKEND already defined.
That symbol is the first global procedure symbol in the assembler
code, and line 1889 of the assembler file is the start of the i386
assembler version of that function. So my "#ifdef __i386__" doesn't
seem to have any effect. Is there a way to solve this with one or
other #ifdef?
Ok, the reason is the "-x assembler" instead of "-x assembler-with-
cpp". The problem is that if I don't manage to produce something
which can be understood by a built-in Xcode rule, the output will not
be linked in the final binary because it doesn't seem to exist
according to Xcode.
I can also generate two .o files and lipo them together in my script
(and specify $(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).o as output),
but I can't find out how to get Xcode to process those ".o" files
afterwards. If I don't do anything else, Xcode performs the compile
phase and then stops, without linking anything.
Adding a build rule for either "Mach-O files" or "Mach-O object
files" and then specifying as the handler
a) "Mach-O linker" only makes Xcode throw a bunch of unhandled
exceptions
b) "GCC System Version (4.0)" has the same effect as adding no rule
at all
So, my question is,
a) is there a way to distinguish between target architectures in an
assembler file compiled with "-x assembler"?
or
b) is there a way to get Xcode to take on board .o files which are
created by a custom build rule? That is, apart from manually
constructing the appropriate link_file_list name and adding your
files there, because that breaks down if you subsequently try to
recompile without changing any files. The reason is that Xcode
insists on relinking everything again if you modified the
link_file_list during the previous compile (based on a newly
generated link file list, which thus misses all the necessary file
entries), even if you save/restore its access and modification times
during the original compile.
Jonas
_______________________________________________
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