This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] darwin fix wrt -static/shared-libgcc
Mike Stump <mrs@apple.com> writes:
> On Oct 31, 2006, at 11:49 AM, Arnaud Charlet wrote:
> > On darwin, -shared-libgcc or -static-libgcc must be explicitly
> > provided
> > at link time with GCC 4 for any program to work.
>
> Sounds like a bug. Sounds like it should be fixed where the bug
> lies, not worked around in gnatlink.adb. I don't have any clue what
> a testcase for this might look like. I'm not aware of any issues or
> problems in this area for any language. Can you describe it or show
> us a C/C++ testcase?
It's not a bug. The issue is that -shared-libgcc requires, obviously,
a shared libgcc to be installed on your system, but the default
deployment target is 10.1 which didn't have one; but -static-libgcc
creates programs which may be binary incompatible with future OS
releases if you use certain features (including pthread_cancel, throw
from qsort, and throw from signal handlers). If you use exceptions,
you need to choose one or the other, but I felt it wasn't safe to make
this choice by default for C programs, especially since very few C
programs use exceptions and the rest can be oblivious to the whole
problem. The C++ compiler defaults to -shared-libgcc (and so does not
support targetting system versions before 10.3.9), but Ada didn't want
to do that. In the future, the default deployment target will change,
so -shared-libgcc will be the default.