Xcode compatibility with third party compilers
Xcode compatibility with third party compilers
- Subject: Xcode compatibility with third party compilers
- From: Jonas Maebe <email@hidden>
- Date: Sat, 5 Sep 2009 11:36:15 +0200
Hello,
I would really, really pretty please like to ask that future changes
to the Xcode tool chain (specifically, the assembler and the linker)
would be made with backwards compatibility in mind for non-Apple
compilers. Specifically:
a) do not activate new features by default with only an option to
deactivate them (such as LD's -no_order_inits and -no_order_data), but
do it the other way around (such as when dead code stripping was
introduced: it was inactive unless -dead_strip was specified).
Reason: our compiler cannot unconditionally pass -no_order_inits
(necessary because of a linker bug) -no_order_data (necessary because
of an incompatibility) to the linker, because then it will break on
all Mac OS X releases < 10.6. We could detect the OS version at
install time and add the appropriate command line switches to the
config file, but this will still break when people upgrade their OS
(and obviously it can only work for future releases, since the
installers of our current releases have no idea about these issues).
b) when introducing new linker features, make sure they can be
influenced via annotations in the assembler code. Again, when dead
code stripping was introduced, at the same time several assembler
directives were introduced to inhibit dead stripping (.reference, the
no_dead_strip attribute).
Reason: The new data reordering feature is incompatible with a feature
of our compiler (see <http://lists.apple.com/archives/Xcode-users/2009/Sep/msg00207.html
> for the details). I'm not aware of a way to annotate the assembler
code to specify that only particular pieces of data must be left in
their original order (although the assembler manual has not been
updated, so maybe the feature is there and I just don't know about it).
I'll file a radar for this.
c) when introducing new assembler directives that may be necessary
regardless of which linker features are explicitly activated, make
sure that support for them can be detected by checking a conditional
inside the assembler code, so that the compiler can generate assembler
that will assemble with any version of the Xcode tool chain.
Reason: if the compiler is required to add certain assembler
directives because otherwise the assembler or linker will generate
wrong code under some circumstances, we're again stuck with the
problem of ensuring backwards compatibility.
I'm of course willing to file a radar on the "general backwards
compatibility request for future versions" if that would help.
And if you have any suggestions on how to best deal with different
Xcode tool chain versions requiring different code generation or
command line parameters (a separate installer for each OS, auto-
detection in the compiler based on the output of some tool or the
contents of a file, ...), by all means, please share them.
Note that the majority of our users does not use Xcode itself, but
other IDEs or the command line (although tips that only work inside
Xcode are also welcome, since we also distribute Xcode project
templates).
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