[lfs-dev] bc ready

Gavin Howard gavin.d.howard at gmail.com
Mon Jul 15 06:23:55 PDT 2019

> I will be continuing to run the GNU version of bc.  While the version you now have in the book may be a totally impressive piece of work, until it is picked up by one or more major distros, it is not suitable for my system.
> Compare to the situation with libjpeg-turbo, which completely overtook libjpeg.  Why you would make choices that make your build less mainstream is not clear.  There's been no discussion of this that I am aware of.

There was not much discussion; I presented it, and Bruce seemed to
like it. I don't know all of the reasons for that, but I can say one
thing: this bc is more mainstream than you think.

It may not be in any "major distro," but there are efforts underway to
get it into Arch and Gentoo (for example, see
https://github.com/gentoo/gentoo/pull/11716), though I don't know if
you would consider those mainstream. It is also available as an option
in at least two other distros: Alpine Linux and Void Linux. In
addition to those two, there are at least 3 distros that have made
this bc the only option: Adelie Linux, Ataraxia Linux, and Sabotage

But that is not all. This bc is the bc on which the bc's in toybox
(https://github.com/landley/toybox) and busybox (https://busybox.net/)
are based. So, for Android, which uses toybox as its base and is a
major distro in some senses of the word, uses this bc to bootstrap the
kernel. And because this bc is available, in an older and more poorly
maintained form, in busybox, which is used in a lot of distros, this
bc is more widely available than you think.

And that is *still* not all. This bc is now available as an option for
NetBSD, OpenBSD, and FreeBSD. In the latter, particularly, there is an
effort underway to make this bc the default over the BSD bc (see

So how mainstream this bc is depends on your definition of mainstream.
If you only mean Linux, it's still more mainstream than you give it
credit for. If you mean Linux and the BSD's, this bc is just as
mainstream as GNU bc, and will be even more mainstream if FreeBSD
adopts it as the default. And if it does, it will probably be adopted
by the others as the default, making it even more mainstream.

And just so you know: besides fixing some incompatibilities with POSIX
in GNU bc, my bc is a drop-in replacement for it; it has all of the
GNU extensions, including undocumented ones. This means you could
switch to my bc and you would not notice any difference other than
better speed (see
People have done this, including Android, as mentioned above, and they
have had no issues.

Gavin Howard

More information about the lfs-dev mailing list