This is the mail archive of the
mailing list for the GCC project.
Re: libgcc.a, et. al.
- From: Perry Smith <pedz at easesoftware dot net>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org, gcc-help at gcc dot gnu dot org
- Date: Sun, 8 Jan 2006 12:20:25 -0600
- Subject: Re: libgcc.a, et. al.
- References: <2058C243-1013-4D3A-84BE-3D9D3197AED8@easesoftware.net> <200601081713.k08HDND27180@makai.watson.ibm.com>
I discovered the --disable-hosted-libstdcxx configure option for
libstdc++-v3 and I'm going to build it and see where that takes me.
Right now, my biggest offender as far as dragging in lots of symbols
(like iob, fprintf, etc) is the verbose_terminate_handler. --disable-
hosted-libstdcxx should remove the reference to that routine and
simply call abort (according to the comments). After that, I think I
can plug in my versions for "free", "malloc", "realloc", and "abort"
and be almost home.
I tried a simple driver using exceptions and compiling with xlC but I
got stuck. I fought with it for a day and decided to try the gcc/g++
Maybe you can help on another item. I recall back around 1995 or so,
gcc could not be used for AIX device drivers because it did not
handle the floating point registers properly. I have only a vague
memory of this. Do you recall anything like that?
On Jan 8, 2006, at 11:13 AM, David Edelsohn wrote:
Perry Smith writes:
Perry> I can not find a description of what the different versions
Perry> and libstd++ are for. Some versions are obvious, others are
Perry> In particular, I am trying to determine what these libraries
Perry> for: (this is on AIX version 5.3) (how are they different
Perry> other perhaps is a better way to phrase my question. Or what
Perry> objective do each of these have?)
Perry> To provide some background, I am attempting to write a
Perry> on AIX 5.3 using C++. I want to use the try/catch/throw
Perry> part of C++. I realize this may be an uphill battle but I
Perry> will be worth it. To do this, the driver must be linked
Perry> except for references resolved by exports provided by the
Perry> services. I've been writing drivers using xlc on AIX for 18
Perry> so I am familiar with the AIX environment using C but want
Perry> using C++.
libgcc is a general, low-level runtime support library for GCC.
On AIX, the XLC support routines are provided by the system libc.
libgcc_s is the shared library version of the support library.
provides the standard C++ library. libgcc_eh.a provides general
for exception handling for all GCC languages. libsupc++ is included in
libstdc++. The VAC++ runtime libraries are much like the G++
but the two are incompatible.
GCC, including G++, provides a "-static" option to link an
application staticly. GCC invokes the appropriate options for AIX
(similarly, an AIX shared object can be created with the "-shared"
commandline option). One can examine the options generated for the
with the "-v" commandline option.
Using a C++ applications with exception handling to build a device
driver is complicated, even without using G++. G++ needs all of
and C++-related support libraries for exception handling.