libgcc.a, et. al.

Perry Smith pedz@easesoftware.net
Sun Jan 8 18:20:00 GMT 2006


Thanks David,

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++  
route.

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?

Thanks
Perry

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  
> of libgcc
> Perry> and libstd++ are for.  Some versions are obvious, others are  
> not.
>
> Perry> In particular, I am trying to determine what these libraries  
> are
> Perry> for:  (this is on AIX version 5.3)  (how are they different  
> from each
> Perry> other perhaps is a better way to phrase my question.  Or what
> Perry> objective do each of these have?)
>
> Perry> gcc/powerpc-ibm-aix5.3.0.0/4.0.2/libgcc_eh.a
> Perry> libgcc_s.a
> Perry> libsupc++.a
> Perry> libstdc++.a
>
> Perry> To provide some background, I am attempting to write a  
> device driver
> Perry> on AIX 5.3 using C++.  I want to use the try/catch/throw  
> exception
> Perry> part of C++.  I realize this may be an uphill battle but I  
> think it
> Perry> will be worth it.  To do this, the driver must be linked  
> statically
> Perry> except for references resolved by exports provided by the  
> AIX kernel
> Perry> services.  I've been writing drivers using xlc on AIX for 18 
> + years
> Perry> so I am familiar with the AIX environment using C but want  
> to start
> 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.   
> libstdc++
> provides the standard C++ library.  libgcc_eh.a provides general  
> support
> for exception handling for all GCC languages. libsupc++ is included in
> libstdc++.  The VAC++ runtime libraries are much like the G++  
> libraries,
> 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  
> linker
> 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  
> its GCC
> and C++-related support libraries for exception handling.
>
> David
>
>




More information about the Gcc mailing list