This is the mail archive of the
mailing list for the GCC project.
Re: [HEAD] Teach testsuite/lib/objc.exp about Darwin frameworks
- From: Nicola Pero <nicola at brainstorm dot co dot uk>
- To: David Ayers <d dot ayers at inode dot at>
- Cc: Ziemowit Laski <zlaski at apple dot com>, "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Jun 2004 12:42:32 +0100 (BST)
- Subject: Re: [HEAD] Teach testsuite/lib/objc.exp about Darwin frameworks
> >>Could you please make the linking against Foundation conditional for the
> >>Apple runtime?
> > Even this wouldn't be entirely satisfactory, as there are people trying to
> > compile and use gnustep-base with the Apple runtime, in which cases you'd
> > need the Apple runtime + linking against gnustep-base.
> > I suppose the solution would be to #include a trivial implementation of
> > NSConstantString in the tests when compiled with the Apple runtime. That
> > way you don't depend on anything external and it just works, and you can
> > test with multiple library combinations.
> > If you want to do this (I don't have an Apple runtime at hand), it would
> > be good - should be quite easy (and little bit of fun) to write a trivial
> > NSConstantString implementation.
> > Else, I don't think we should be too picky and prevent improvements - I
> > think Zem's change is an improvement over what we have, so it's a good
> > change -- I'd just suggest adding comments to it about how to make it
> > better, so that if there is someone interested in that stuff (eg running
> > the tests on Darwin without Foundation) in the future, they'll know from
> > the comments how/what to do to extend the tests to support that.
> :-), the minimal NSConstantString implementation was the first thing on
> my mind also. But I wasn't looking for perfection. The problem I have,
> is that on non OS X Darwin with the GNU runtime these test should pass
> and now would fail.
> It would be nice if the gcc testsuite could be testing the Apple runtime
> in the absence of Foundation, but that hasn't worked before either which
> is why I didn't ask for the minimal NSConstantString implementation.
> Yet if there is interest, I could hack up patch for test cases which
> should make linking against Foundation obsolete.
I personally think this (patches providing the minimal NSConstantString
implementation to make linking against foundation libraries obsolete)
would be best and if you had the time to produce such patches that would
Otherwise, adding -framework Foundation, but only if the Apple runtime is
used, and a short comment saying a minimal NSConstantString implementation
would be the real fix rather than that hack, would be my second choice (I
suppose if you supply a patch for that to Zem he'd like it).
Thanks for looking into this.