This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Your patch: don't configure libobjc on Darwin


Of course, you have to pass a -fxxx-runtime flag to the compiler,
depending what runtime you want to use. When compiling gnustep, this is done
automatically by the makefile system.
For (orginal gnu) gcc, I often change the standard runtime on darwin to
gnu, as described here:
http://gcc.gnu.org/ml/gcc/2002-11/msg00812.html
(changing config/darwin.h)

However, I think that gcc's standard behaviour makes sence:
Without any flags, you compile for the Apple (Next-)Runtime, which is
installed anyway, if you want to compile for the gnu-runtime, it works,
you just have to pass a (as I think, standard) compiler flag.
You are right, one should not have to pass a flag to make the compiler
work on any system: But that isn't necessary anyway - the compiler works
nicely for the Apple-runtime, but without your patch, I can easily use it
for the gnu-runtime as well.

BWT, yesterday I forgot to mention that threading works for the
gnu-runtime on darwin. AFAIK, you have to use the Foundation library
with Apples compiler for threading, so that's even a (small) advantage.
(Of course, unfortunately, you have to pass --enable-threads=posix to
configure)

I tried (VERY) often to compile gnustep-base under the NeXT runtime, but
although some people write about doing it, I can hardly compile it, and I
never managed to produce a working (i.e. not crashing) executable, so I
really believe it doesn't work!

Sorry, I don't know how to autoconfig, so I can't write the patch you
proposed, but I think, it's not such a good idea anyway: The compiler
should, in my opinion, be able to compile code for both runtimes!
The only thing I can think of is a flag for configure to change the
default runtime.

Thanks for your answer, Carl Eugen Hoyos


On 17 Jul 2003, Geoff Keating wrote:

> Carl Eugen Hoyos <ce@hoyos.ws> writes:
>
> > Dear Geoffrey!
> > Sorry for not writing any sooner, but since I don't read
> > gcc-patches often, I didn't see your mail and patch earlier.
> >
> > It's absolutely wrong that the gnu-objc-runtime isn't working properly on OSX!
> >
> > I'm using it to compile (and run) gnustep-base library to do DO messaging
> > with linux, solaris, irix and windows machines. I have two compilers
> > (actually more) on my system, (Apples) /usr/bin/gcc and gnu
> > /usr/local/bin/gcc, both work, and both have their objc-runtime (one
> > statically, one dynamically linked - so what?).
> >
> > The gnu runtime runs absolutely nice:
> > You just have to link ln -s libobjc.a libobjc.dylib to
> > force the linker to use the statically linked gnu objc runtime lib.
> >
> > PLEASE revert your patch, it doesn't make anything easier, but only
> > destroys a working feature!
>
> Are you sure it really works?  You aren't passing any special flags to
> the compiler (like, say -fgnu-runtime)?
>
> I think that by default, the compiler should work.  You should not
> need to pass special flags to the compiler just to make it work on
> some system.
>
> Have you tried building gnustep-base under the NEXT runtime?
>
> Note that I said:
> > I wouldn't object to a patch that let you say --enable-gnu-objc-runtime
> > (or whatever) and would both build the GNU runtime and change the default,
> > if anyone wants to write one.
>
> --
> - Geoffrey Keating <geoffk@geoffk.org>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]