TIP 538: Externalize libtommath

Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.
Author:         Jan Nijtmans <jan.nijtmans@gmail.com>
State:          Draft
Type:           Project
Vote:           Pending
Created:        9-April-2019
Keywords:       Tcl
Tcl-Version:    8.7
Tcl-Branch:     digit-bit-60


This TIP proposes to add the possibility to link Tcl with an external libtommath library, if available, for shared builds.


Since 8.6, Tcl has had a built-in libtommath library with modifications. By now, many of those modifications were adopted upstream. This makes it possible to change the built Tcl library, using the external libtommath library as-is, instead of using it's own fork. libtommath will continue to be delivered together with the Tcl source code.

Specification and Documentation

Starting with libtommath 1.1.0, it is possible to build Tcl without the internal libtommath, instead linking with the unmodified, externally built, libtommath. This has the following consequences:


All makefiles are adapted to detect external presence of libtommath 1.1.0 or later. If so, this library will be used for shared builds, otherwise the built-in libtommath will continue to be used as before.

An implementation of this TIP is present in the digit-bit-60 branch.


This document has been placed in the public domain.