TIP 538: Externalize libtommath

Login
Author:         Jan Nijtmans <[email protected]>
State:          Final
Type:           Project
Vote:           Done
Created:        9-April-2019
Post-History:
Keywords:       Tcl
Tcl-Version:    8.7
Tcl-Branch:     digit-bit-60
Vote-Results:   5/0/0 accepted
Votes-For:      JN, KBK, KW, MC, SL
Votes-Against:  none
Votes-Present:  none

Abstract

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

Rationale

Since version 8.5, 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, currently version 1.2.0.

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:

Implementation

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

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

Copyright

This document has been placed in the public domain.