This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: add .cc files to libgcc.a
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Perry Smith <pedzsan at gmail dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Mon, 29 Oct 2012 10:08:56 -0400
- Subject: Re: add .cc files to libgcc.a
- References: <FE2943E3-6940-4AE3-B5FA-9ECF819BD152@gmail.com>
On Mon, Oct 29, 2012 at 9:54 AM, Perry Smith <pedzsan@gmail.com> wrote:
> This is on my quest to add __cxa_atexit to AIX's GCC. I'm trying to port my patches to trunk.
>
> David said I should move my two files to libgcc.a instead of libstdc++.a which is where I put them before.
>
> These files define __cxa_finalize and __cxa_atexit. These files are mostly from GNU's libc.
>
> What I did was I added:
>
> LIB2ADD += $(srcdir)/config/rs6000/cxa_atexit.cc $(srcdir)/config/rs6000/cxa_finalize.cc
>
> to t-slibgcc-aix (mostly guessing what to do). This resulted in:
>
> Makefile:798: *** Unsupported files in LIB2ADD or LIB2ADD_ST.. Stop.
>
> I'm assuming this is because they are C++ and not C but perhaps there is a different way to add them in.
>
> My original logic in adding them to libstdc++.a is they are only used (called) by code automatically produced by g++ and not gcc.
>
> But I'm happy to do / try whatever.
Perry,
Some of the support you are adding is equivalent to code in
libgcc/crtstuff.c. My question was if it is possible to re-use some
of that code for the new AIX support.
Is the code really C++? Both cxa_atexit.cc and cxa_finalize.cc are
providing C interfaces.
Thanks, David