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:21:33 +0200
On 28 apr 2006, at 22:09, Jonas Maebe wrote:
Is there a way to specify that a custom build rule will produce ppc
and i386 assembler files for all specified variants? I.e.,
something like $(DERIVED_FILES_DIR)/$(build_variant)/$(arch)/$
(INPUT_FILE_BASE).s
There are variables called $(BUILD_VARIANTS) and $(ARCHS), but they
contain all variants/architectures you are building for. I can
easily extract the individual elements from those variables in my
build script and put the output any place I want, but can't find a
way to specify the potentially multiple outputs in the "with output
files" list.
I'm trying to solve at least the arch problem by putting putting all
the assembler code in a single file, separated by ifdef's. But it
doesn't work. The file looks like this:
---
#ifdef __ppc__
...
.text
.align 4
.globl BACKENDS_TBACKEND_$__CREATE$ANSISTRING$$TBACKEND
BACKENDS_TBACKEND_$__CREATE$ANSISTRING$$TBACKEND:
mflr r0
...
#endif
#ifdef __i386__
...
.text
.align 4
.globl BACKENDS_TBACKEND_$__CREATE$ANSISTRING$$TBACKEND
BACKENDS_TBACKEND_$__CREATE$ANSISTRING$$TBACKEND:
pushl ëp
...
endif
---
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?
(Xcode 2.2.1)
Thanks,
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