[omniORB] Static build with GCC 3.4

Vladimir Panov gbr at voidland.org
Thu Mar 3 14:37:55 GMT 2005


Duncan Grisby wrote:

>On Thursday 10 February, Vladimir Panov wrote:
>
>  
>
>>When omniORB 4.0.5 (or any 4.0 version, actually) is built with GCC
>>3.4, then a statically linked program against it segfaults on
>>startup. The reason is that the static initializers of the code sets
>>are not executed (even the ones from libomniORB4.a, not only the ones
>>from libomniCodeSets4.a). The reason seems to be a new optimization in
>>GCC 3.4 called "unit-at-a-time" which is on by default when using -O2.
>>    
>>
>
>Thanks for your patch. I've checked it in. Have you reported the problem
>to the GCC developers?
>
>Cheers,
>
>Duncan.
>
>  
>
Hi, Duncan.

Actually, it is not a bug. They are fully aware of the problems this 
optimization might introduce.
omniORB's problem is that -fno-unit-at-a-time might be dropped in the 
future (as stated in the realease notes of GCC 3.4). I tried to fix the 
source so that -fno-unit-at-a-time is not needed, but failed. If I try 
again and succeed, I will send a patch.

Vlado




More information about the omniORB-list mailing list