Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Sep 1996 20:11:31 -0400 (EDT)
From:      Jim Durham <durham@durham>
To:        Chuck Robey <chuckr@glue.umd.edu>
Cc:        hackers@freebsd.org
Subject:   Re: NOSHARED
Message-ID:  <Pine.BSF.3.91.960909200201.4503C-100000@w2xo.pgh.pa.us>
In-Reply-To: <Pine.OSF.3.95.960909003458.7311A-100000@ginger.eng.umd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 9 Sep 1996, Chuck Robey wrote:

> On Sun, 8 Sep 1996, Jim Durham wrote:
> 
> > Could someone point out to me where the variable NOSHARED is being
> > set in the 2.1 source tree?
> 
> It's in share/mk/bsd.prog.mk.  Well, I mean to say, it's used there, and
> if you want, you could define it in your etc/make.conf, or on the command
> line when you make world.  I sure wouldn't advise you to do that.  I
> forces things to be built nonshared (no dynamic linking), so all the
> binaries get extremely bloated in size, and take a much longer time to
> startup.  

I replied to this to another person and neglected to cc: hackers.
So, let me explain.

I was compiling a hacked copy of slattach.c. I noticed the binary
was huge and figured out that it was being linked statically.

Being of a curious mind, I decided to investigate and found the
place in bsd.prog.mk where it was tested to control whether or not
shared libs are used.

What bothered me at that point was why the original binary was linked
to use shared libs and the /usr/src/sbin/slattach directory's Makefile
caused slattach to be statically linked when I made it? If the binary that 
came with the dist was dynamically linked, why was my new compile static?

I then went looking for where NOSHARED was set. I figured it had
to be in /usr/src/sbin/slattach's Makefile. No dice. I even looked at
/usr/src and usr/src/sbin Makefiles. No dice.

That is what prompted the question. Maybe it's because the distribution
was trimmed by picking and choosing what binaries to make dynamic to save
space in the distribution and the source tree just makes them all static 
to simplify things?

If so, my question remains.. where the heck is it set to YES or TRUE?
Just curious..

regards,
-Jim Durham
           






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960909200201.4503C-100000>