TIP 538: Externalize libtommath

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.
Author:         Jan Nijtmans <[email protected]>
State:          Draft
Type:           Project
Vote:           Pending
Created:        9-April-2019
Post-History:
Keywords:       Tcl
Tcl-Version:    8.7
Tcl-Branch:     digit-bit-60

Abstract

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

Rationale

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:

Implementation

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.

Copyright

This document has been placed in the public domain.