Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
- Subject: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
- From: "Andy O'Meara" <email@hidden>
- Date: Sat, 10 Jun 2006 10:03:12 -0400
- Thread-topic: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
I'm happy to report that adding -fno-use-cxo-atexit to my bundle project
made the problem go away as well. Great work, James!
Everything makes more sense now with respect to that release note... I
guess it would have been nicer, however, for that release note to discuss
(or even mention) -fno-use-cxo-atexit, but that's the way it goes--I'm just
glad we resolved it. Hopefully others that run into this issue should be
able to find this thread with a sensible search.
You saved me days worth of pain and time wasted!
Thanks,
Andy
On 6/10/06 2:36 AM, "James W. Walker" <email@hidden> wrote:
> On Jun 9, 2006, at 9:44 PM, Andy O'Meara wrote:
>
>> The Xcode 2.3 "GCC 4.0" release notes discuss the flag -fuse-cxa-
>> atexit
>> which suggests that 2.3 definitely has changes in this area, but
>> what is
>> clearly a concern is why would 2.3 cause things to break -- and
>> only on
>> 10.3? I tried sticking in -fuse-cxa-atexit for both my app and bundle
>> projects but there was no change.
>
> I hadn't made the connection between this bug and that release note,
> so I was inspired to do some experimentation. I opened the test
> project that I built for my bug report, and in the bundle, added -fno-
> use-cxa-atexit in "other C flags". What do you know, now it does not
> crash on 10.3.9, and still is OK on 10.4.6!
>
> In my test project, I had constructor and destructor functions (i.e.,
> functions marked with __attribute__ ((constructor)) and __attribute__
> ((destructor))), and added a couple of static objects. When compiled
> with -fuse-cxa-atexit (the default), they execute in this order:
>
> static constructor 1
> static constructor 2
> constructor function
> destructor function
> static destructor 2
> static destructor 1
>
> When compiled with -fno-use-cxa-atexit, the order becomes:
>
> static constructor 1
> static constructor 2
> constructor function
> static destructor 2
> static destructor 1
> destructor function
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden