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]

Your patch: don't configure libobjc on Darwin


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!

This is the link to your patch:

http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01296.html

Yours, Carl Eugen Hoyos

On Sat, 15 Feb 2003 17:59:52 -0800, Geoffrey Keating wrote:

First, I'd like to disclaim all true knowledge. I don't know enough objc
to be able to test any of these statements; they're just how I think
things work.

On Saturday, February 15, 2003, at 05:34 PM, Nicola Pero wrote:

>>The Apple compiler has for a long time had a local patch to libobjc to
>>build but not install it.  This patch prevents both building and
>>installation on Darwin.  (I believe that if you did actually try to use
>>the GNU libobjc with the Darwin compiler, you'd discover that it didn't
>>work anyway---but haven't checked).
>
>I'm confused.  Can you explain why this patch is a good idea, in your
>opinion ?

If you try to actually build and install FSF GCC on Darwin, you get a
non-working objc compiler, because it will default to the NEXT runtime but
will be installed with the GNU one in $prefix/lib masking the NEXT one in
/usr/lib.

>What's wrong with using the GNU ObjC runtime on Darwin ?

Nothing, it's just not the default. From Apple's point of view, we would
rather than when the compiler is configured with --prefix=/usr, that
libobjc.a in /usr/lib is not replaced with GNU libobjc, though.

>I would have thought that one reason to install the FSF GCC ObjC compiler
>on Darwin was precisely to get the GNU ObjC runtime ... in case you want
>(or need) to use that instead of the Apple one (for example, for copyright
>reasons). There should be a command line switch to switch between the two
>runtimes anyway.

Right, but you have to pick the runtime that's actually on your system,
right? You can't say "gcc -fgnu-runtime foo.m -o foo -lobjc" if -lobjc is
the NEXT runtime.

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.


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