usefulness of UCLIBC_CTOR_DTOR ?
Lennart Sorensen
lsorense at csclub.uwaterloo.ca
Fri Aug 12 17:53:23 UTC 2011
On Fri, Aug 12, 2011 at 05:34:49PM +0200, John Spencer wrote:
> when compiling without this option, the crucial files ctri.o and
> crtn.o don't get built.
> the option in menuconfig is called "Support global constructors and
> destructors", at the top of "General Library Settings".
>
> when reading, i always had the fealing it is regarding C++
> ctors/dtors, so i disabled it, and wondered why the build failed (in
> that i couldn't produce a working binary later on)
>
> also, the help text of that option doesn't quite make it clear that
> it will have that effect.
>
> overall this looks like a pretty useless and confusing option, which
> imho should get removed.
> even if there's a way to build a binary without those 2 object
> files, which i'm not aware of (please point it out if you know how),
> it doesn't cost nothing except of 1200 bytes harddisk storage to
> still build them.
C libraries can have constructors and destructors too.
But if you don't need them (and a lot of code doesn't) then you probably
get a smaller uclibc by turning them off.
Just because more people have heard of C++ constructors and destructors,
doesn't mean that's the only use for them.
--
Len Sorensen
More information about the uClibc
mailing list