Importing mksh in base

Gary Jennejohn gljennjohn at gmail.com
Sat Jan 26 09:22:46 UTC 2019


On Fri, 25 Jan 2019 22:08:33 +0100
Baptiste Daroussin <bapt at freebsd.org> wrote:

> On Fri, Jan 25, 2019 at 11:36:40AM -0800, Rodney W. Grimes wrote:
> > > Hi everyone,
> > > 
> > > I would like to import mksh in base, https://www.mirbsd.org/mksh.htm
> > > And make it the default root shell (not necessary in one step)
> > > 
> > > Why:
> > > 1/ it is tiny 400k (in the packaged version) all other shells fitting the
> > > expectation are bigger  
> > It is more than twice the size of our current /bin/sh, and giving up
> > 200k on the nano/tiny/wifi BSD is hard to justify.  400k is near the
> > size of tcsh.
> >   
> To be fair here:
> mksh is 331k on my amd64 machine
> /bin/sh is 165k
> 
> mksh only depends on libc
> /bin/sh depends on libc + libedit which adds an additional 231k to the battle.
> 
> If now we are comparing to the actual root shell:
> csh is 419k on the same machine and it depends on libncursesw and libcrypt
> 

How large is a statically linked mksh?  /rescue/sh is 8.5MB. 
Amazingly, that's four times larger than a statically linked
bash.

If mksh is supposed to be the default, then it might make sense
to have a statically linked binary under /rescue.

-- 
Gary Jennejohn


More information about the freebsd-arch mailing list