[gtkada] patch to support Mac OS X

Arnaud Charlet charlet at ACT-Europe.FR
Tue Dec 16 09:24:15 CET 2003


A few comment on your patch:

> 1. -shared is used in a couple of link lines.  since so_opts is used in 
> every case it is, and so_opts can be set up to do port specific things 
> (i added darwin branch for the mac stuff).  is it possible to move that 
> to there?

The proper fix here is to teach gcc to do the proper thing when using
-shared on darwin.

Also, using 2.2.2 in configure will cause trouble for new versions.
Note that configure is regenerated automatically: you need to modify
configure.in and/or aclocal.m4

config.sub is part of the GNU auto* stuff, so we do not want to patch
this file ourselves. Instead, if there's an official version of config.sub
that recognizes darwin, we can incorporate this version.

Otherwise, please coordinate with the GNU maintainers so that config.sub
will recognize darwin properly.

> 2. i added ...CFLAGS = -fno-common   ... and .. GNATFLAGS = -fno-common 
> and ..GNATFLAGS_DEVEL = -fno-common..
> 
>    in most of the make files I don't know how to special case this so 
> only darwin sees it.

Why is it needed ? Why isn't the compiler doing this automatically if it
is needed ? You could probably use the FPIC variable in aclocal.m4, although
I suspect this option is more a work around of a gcc bug rather than a
proper fix (in which case the proper approach is to fix gcc).

> 3. is added ! GTK_LIBS = @GTK_LIBS@  -L/usr/X11R6/lib -lX11 
> -flat_namespace -undefined suppress again i don't know how to make that 
> darwin specific.

The first part (-L/usr/X11R6/lib -lX11) should be handled by pkg-config
and the gtk+ install directly, so I'd suggest working with the Gtk+
maintainers of the darwin port to find out why this is not the case.

What does the last part do ? If it's not another work around of a gcc
bug/limitation (in which case...) you could probably use the
OS_SPECIFIC_LINK_OPTIONS variable in aclocal.m4

Hope this helps,

Arno 



More information about the gtkada mailing list