• 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: Specify multi-variant/arch output in custom build rule
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specify multi-variant/arch output in custom build rule


  • Subject: Re: Specify multi-variant/arch output in custom build rule
  • From: Eric Albert <email@hidden>
  • Date: Wed, 3 May 2006 12:27:21 -0700

On May 3, 2006, at 12:21 PM, Jonas Maebe wrote:

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
---

I assume that last endif is a typo and is actually #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?

What you've shown should work. We do this a lot. Can you narrow this down to a single-file test case that I could try?


Thanks,
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


  • Follow-Ups:
    • Re: Specify multi-variant/arch output in custom build rule
      • From: Jonas Maebe <email@hidden>
References: 
 >Re: Specify multi-variant/arch output in custom build rule (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: Specify multi-variant/arch output in custom build rule
  • Next by Date: Re: RTTI and exceptions between plugins (solution)
  • Previous by thread: Re: Specify multi-variant/arch output in custom build rule
  • Next by thread: Re: Specify multi-variant/arch output in custom build rule
  • Index(es):
    • Date
    • Thread