Gentoo Archives: gentoo-dev

From: (Diego 'Flameeyes' =?utf-8?Q?Petten=C3=B2?=)
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: RFC: Should preserve-libs be enabled by default?
Date: Fri, 30 May 2008 12:40:17
In Reply to: Re: [gentoo-dev] Re: RFC: Should preserve-libs be enabled by default? by "Rémi Cardona"
1 Rémi Cardona <remi@g.o> writes:
3 > --as-needed breaks legitimate C++ code, I have yet to see it break
4 > plain C code (but I could be wrong).
6 This because C does not have constructors or static objects. I suppose I
7 can write a couple of C files that can present the problem, but really,
8 they would break as soon as I change the loading rules by moving to a
9 non-ELF system or a different dynamic loader.
11 It's interesting to note that Microsoft _did_ think of this problem when
12 designing the .NET framework, and they answer is ensuring just that the
13 static constructor will be called (right) before any static method or
14 attribute is referenced and (right) before any object of the given class
15 is istantiated. They don't get otherwise an absolute order in which
16 static constructors are called.
18 --
19 Diego "Flameeyes" Pettenò