tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

building shlibs with -lc (was: Re: 64 bit time_t changes)



On Fri, Mar 28, 2008 at 10:19:23PM +0900, Joerg Sonnenberger wrote:
 > > First, currently, shared libs aren't linked with -lc when they're
 > > built, so no dependency is recorded; thus one can't readily tell which
 > > library images go with which libc versions. Worse, because of this,
 > > after a libc bump a newly compiled program linked against an old
 > > library and new libc will be silently invalid.
 > 
 > This is a bug in my opinion and I want to adress this.

In my opinion too... that's why I filed a pair of critical/high PRs on
it a while back.

I think the question is how, and specifically, how to do it so as to
break only library builds that are currently wrong.

Making the default gcc behavior be to use -lc with -shared, unless
-nostdlib, will take care of all the ordinary cases, but I'm worried
that it might break someone's plugin libs.

In base we'll have to add -lc explicitly in bsd.lib.mk, but I don't
see any reason that should be difficult or cause problems...

I suppose I should probably just try it and see what breaks, because
I don't think there's any better way.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index