This is the mail archive of the
mailing list for the GCC project.
Re: at exit alternative for AIX
On Aug 8, 2012, at 3:32 PM, David Edelsohn wrote:
> On Tue, Aug 7, 2012 at 1:42 PM, Perry Smith <email@example.com> wrote:
>> Thanks. You just provide what I wanted / needed which is a sanity check.
>> I'll open a bug report and that might get me some help.
>> I think I've concocted a plan to get __cxa_atexit to work. I am going to try that
>> first. That may have utility in other ways.
> You also might want to look at PR 33704, as well as PRs 17053, 13391
> and 2413. It would be good to figure out a way to utilize the patch in
> PR 33704.
I'm having an unforeseen issue. Hopefully I'm just doing something wrong.
I'm on gcc 4.5.2. I started with a fresh build tree. I'm passing in --enable-__cxa_atexit:
"--enable-__cxa_atexit" \ <<<<<
config.log confirms this:
$ /usr/work/src/gcc-4.5.2/configure --prefix=/gsa/ausgsa/projects/r/ruby --with-gmp=/gsa/ausgsa/projects/r/ruby --with-mpfr=/gsa/ausgsa/projects/r/ruby --with-mpc=/gsa/ausgsa/projects/r/ruby --disable-nls --enable-threads=aix --with-libiconv-prefix=/usr --enable-__cxa_atexit --enable-languages=c,c++
But when I look at
nm -Bx powerpc-ibm-aix126.96.36.199/pthread/libstdc++-v3/src/.libs/future.o
There is still a reference to atexit. mt_allocator.o also has a reference to atexit. It is coming from the destructor.
If I explicitly add the -fuse-cxa-atexit, then it uses cxa_atexit. I got the idea (perhaps mistaken) that the config time option flipped the default.
I will continue this tomorrow but thought (hoped) someone might have a helpful suggestion.