Re: Possible problems with the current CVS version

Thorsten Glaser <[email protected]> Wed, 20 Aug 2014 15:48:00 +0200 (CEST)
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
On Tue, 19 Aug 2014, Steven Honeyman wrote:

> Do you know if this is still considered an "active" project? Most of

I think it's at least somewhat active, but Felix is on holidays
right now. He has not merged back the patches we have in the
Debian packaging of dietlibc, despite repeat prodding, though.

> the links on the dietlibc webpage are outdated or broken so
> unfortunately I'm expecting it is not.

Oh.

> Hmm a matter of opinion - but I do agree with you, mksh is
> excellent... but compiles to twice the size

Sure, but…

> I get 173kb with dietlibc and 184kb with musl. Dash is 81kb and 98kb
> respectively (and 70kb with klibc)

I get 131 KiB with klibc static, 121 KiB with klibc dynamic.

Ensure CC='diet -Os gcc', of course.

You can disable, for example, the Vi command line editing mode
(-DMKSH_S_NOVI in CPPFLAGS) and hardcode UTF-8 (-DMKSH_ASSUME_UTF8
or, to hardcode disabled UTF-8 unless "set -U" is used,
-DMKSH_ASSUME_UTF8=0). With those, I save 16K.

There is also -DMKSH_SMALL (disables Vi mode by default) or, to be not
as hardline, -DMKSH_SMALL -DMKSH_SMALL_BUT_FAST. (another 14K or 8K)

I think the benefits (better, less buggy code; the ability to
use constructs like arrays and [[ … ]]) are well worth it. And
a more active development and wider deploy (every Android device
carries mksh as /system/bin/sh) and review.

Do note that you can link or symlink mksh to things like [,
test, echo, kill, cat in a busybox-like manner (although the
cat built into mksh has only -u as option, so no cat -v).
This should save you another few KiB.

bye,
//mirabilos
-- 
«MyISAM tables -will- get corrupted eventually. This is a fact of life. »
“mysql is about as much database as ms access” – “MSSQL at least descends
from a database” “it's a rebranded SyBase” “MySQL however was born from a
flatfile and went downhill from there” – “at least jetDB doesn’t claim to
be a database”	‣‣‣ Please, http://deb.li/mysql and MariaDB, finally die!