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

next in thread | previous in thread | raw e-mail | index | archive | help
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'm really talking radically larger now.  Experiment on a simple hello
world C program ... link it -Bstatic, you'll see what I mean.

There are parts of the tree that are built this way on purpose, stuff in
/sbin, say.  This is for emergencies, so stuff in that directory will work
even if your /usr partition fails to mount (so your runtime linker can't
get at the shared libraries).  One popular mistake to make is to give root
a shell such as tcsh (usually in /usr/local/bin, and usually linked
dynamically).  First time you lose /usr, you find you can no longer do
stuff manually, because root's shell can't execute.  No running fsck
manually, and saving yourself.

Some people build tcsh statically for that reason.  That kinda mistake you
only have to make once (no I haven't done that, I do dumber ones).

> 
> thanks,
> Jim Durham
> 

----------------------------+-----------------------------------------------
Chuck Robey                 | Interests include any kind of voice or data 
chuckr@eng.umd.edu          | communications topic, C programming, and Unix.
9120 Edmonston Ct #302      |
Greenbelt, MD 20770         | I run Journey2 and n3lxx, both FreeBSD
(301) 220-2114              | version 2.2 current -- and great FUN!
----------------------------+-----------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.95.960909003458.7311A-100000>