gcc compiles assert() to code that requires linking with gcc
Alexandre Oliva
aoliva@redhat.com
Sun Jun 25 21:22:00 GMT 2000
On Jun 26, 2000, Martin Buchholz <martin@xemacs.org> wrote:
> Think about what you're saying. The policy of requiring libgcc for
> the C linking stage is an *exclusionary* one.
Why? You can always have libgcc and link it with your programs, even
when you're linking using a proprietary toolchain.
> If the proprietary Unix system vendors had such a policy for their
> native compilers, you would never have been able to have a gcc on
> these platforms
Nope, GCC could always link with their own support libraries, if it
had to. In fact, on several systems, it *does* use a couple of object
files provided with the system. Also, on a couple of platforms, many
of the functions that go in libgcc are generated by the native
compiler, to perform certain arithmetic operations GCC doesn't know
how to generate code for.
Therefore, aiming at a libgcc-independent GCC is much more work than
you might think.
> When compiling with -Omake-it-fast-not-portable, you can call the
> external __eprintf from libgcc.
__eprintf is the simplest of the problems. You can always compile
with -DNDEBUG to get rid of calls to it :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-bugs
mailing list