Re: [Fink-devel] lifetime of static variables
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Dave Vasilevsky wrote: | On Dec 22, 2004, at 2:24 AM, Martin Costabel wrote: | |> Is this different from using the "-single-module" linker flag? The |> latter is often recommended for problems with static initializers. | | | According to Apple, it's exactly the same thing: | http://developer.apple.com/releasenotes/DeveloperTools/ | CompilerTools.html . I guess when I looked into the issue for "arts" | way back during the KDE port it was before they added the | -single_module flag. | | For the benefit of anybody who needs to search for this later: To deal | with static initializers not running on OS X due to lazy linking, | | executables: link with -Wl,-bind_at_load | libraries: link with -single_module | This should bein the porting guide. Maybe even in the FAQ. Unfortunately I cannot write a blurb. I know too little. If you supply a blurb to fink-i18n@ I will take care that it gets added. - -d -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (Darwin) iD8DBQFBymtNPMoaMn4kKR4RA4LGAJ0ctgY51gzwBXy3828Ve8mEbIeMRQCgmnix XEdQSomVDhQS6JfcGF1LNaI= =oeA2 -END PGP SIGNATURE- --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] lifetime of static variables
On Dec 22, 2004, at 2:24 AM, Martin Costabel wrote: Is this different from using the "-single-module" linker flag? The latter is often recommended for problems with static initializers. According to Apple, it's exactly the same thing: http://developer.apple.com/releasenotes/DeveloperTools/ CompilerTools.html . I guess when I looked into the issue for "arts" way back during the KDE port it was before they added the -single_module flag. For the benefit of anybody who needs to search for this later: To deal with static initializers not running on OS X due to lazy linking, executables: link with -Wl,-bind_at_load libraries: link with -single_module Dave PGP.sig Description: This is a digitally signed message part
Re: [Fink-devel] lifetime of static variables
Mark Treiber wrote: Thanks everyone for the tips. I'm suprised this hasn't been brought up on this list yet (or at least I havn't been able to find it).. Well, it is brought up when it bites someone. There is a rather long thread on fink-devel from summer 2003 about how I hunted a bus error in scribus. It was finally found to be caused by a problem with QString::null from the qt3 library. This object is statically defined, end when it is used inside another static constructor, its behavior is undefined, legally speaking. In reality, it behaves "normal" on linux where static constructors are always called at the beginning, whereas on Darwin it leads to crashes. As a result you can, for example, use qt file operations inside static constructors on linux, but not on Darwin. The claim by the Darwin people that static objects are always initialized at latest before they are used is misleading in this situation. The word "used" can have different meanings, apparently. The message http://article.gmane.org/gmane.os.apple.fink.devel/5257 from 08/08/2003 contains some explanation and a small test file with a crash test. The situation has not changed since that time. -- Martin --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel