all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: rms@gnu.org
Cc: eliz@gnu.org, ulm@gentoo.org, emacs-devel@gnu.org
Subject: Re: Merging bignum to master
Date: Thu, 16 Aug 2018 12:31:52 -0700	[thread overview]
Message-ID: <ec17dd2b-1cdf-b0e3-4735-da7eea6c7318@cs.ucla.edu> (raw)
In-Reply-To: <E1fq8E4-0006kc-UA@fencepost.gnu.org>

Richard Stallman wrote:

> Why would we need both?  Given --enable-bignums, which seems
> fundametally to fit the purpose, is there really a reason for
> --with-gmp?  Do we support bignums other than using gmp?

Yes and no. If by "using gmp" you mean linking to libgmp, some GNU packages do 
support bignums other than by linking to libgmp. However, every GNU package that 
I know of supports bignums either by linking to libgmp or by compiling code 
copied from some subset of the GMP sources.

Here are some 'configure' options that GNU packages use to control this. As far 
as I can see, only Emacs master 'configure' follows the GNU coding standards. 
This suggests that in this area the standards are either too ambitious or are 
not clear enough; in either case they could use examples to cover some of the 
issues mentioned below.

* Emacs (master branch) always supports bignums, and by default it uses libgmp 
if available and otherwise substitutes its own portable and slower 
implementation copied from the GMP source code. The default can be overridden 
with --with-libgmp / --without-libgmp. This follows the GNU coding standards, 
and it wouldn't make sense to for Emacs 'configure' to have an --enable-bignum 
option since bignums are always supported.

* MPFR and Nettle always use bignums and by default always uses libgmp. Their 
'configure' scripts have an --enable-mini-gmp option to cause their builds to 
use the portable and slower substitute. This doesn't follow the GNU coding 
standards, since --enable-mini-gmp doesn't affect user-visible features.

* Coreutils supports bignums only as a build-time option that affects 
user-visible behavior. The Coreutils implementation always uses libgmp to 
support bignums if bignums are requested. Its 'configure' has a --with-gmp / 
--without-gmp option that works much like Emacs's --with-libgmp / 
--without-libgmp option, and that enables the bignum feature. It sounds like 
you're saying that Coreutils should rename its --with-gmp / --without-gmp option 
to --enable-bignums / --disable-bignums or something like that, since the option 
enables user-visible behavior. (Better yet, I suppose Coreutils should do what 
Emacs does and substitute its own portable implementation and use a 
--with-libgmp / --without-libgmp 'configure' option, though that'd be more work.)

* GNU Common Lisp always supports bignums and requires libgmp, and has an 
--enable-oldgmp option that links to an older version of libgmp rather than a 
newer one. This usage doesn't follow the GNU coding standards, which say this 
should be a --with option.

* GCC always uses bignums and requires libgmp, and if the platform lacks libgmp 
the GCC build process documents a procedure for you to download the GMP sources, 
build a libgmp of your own, and link to that. GCC's 'configure' program has a 
--with-gmp=DIR option that lets you tell the build procedure where libgmp is 
installed if it is neither supplied by your system nor built from sources in the 
way that GCC recommends. This --with-gmp=DIR option doesn't follow the GNU 
coding standards, which say "Do not use a @samp{--with} option to specify the 
file name to use to find certain files."

I doubt whether this is an exhaustive survey, but it should give you a feel for 
some of the confusion in this area.



  reply	other threads:[~2018-08-16 19:31 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-11 19:47 Merging bignum to master Tom Tromey
2018-08-11 21:28 ` Basil L. Contovounesios
2018-08-12 16:34   ` Tom Tromey
2018-08-13 12:21     ` Basil L. Contovounesios
2018-08-14  0:21     ` Andy Moreton
2018-08-15 23:41       ` Andy Moreton
2018-08-16 15:38         ` Basil L. Contovounesios
2018-08-19  8:26         ` Paul Eggert
2018-08-17 14:58   ` Eli Zaretskii
2018-08-12  6:29 ` Ulrich Mueller
2018-08-12  8:09   ` Paul Eggert
2018-08-12 17:21     ` Ulrich Mueller
2018-08-12 18:20       ` Eli Zaretskii
2018-08-12 19:30         ` Ulrich Mueller
2018-08-13  0:15           ` Paul Eggert
2018-08-12 18:05     ` Eli Zaretskii
2018-08-12 23:53       ` Paul Eggert
2018-08-13  0:20         ` Tom Tromey
2018-08-13  7:51         ` Andreas Schwab
2018-08-13  8:06           ` Ulrich Mueller
2018-08-13  9:14             ` Paul Eggert
2018-08-14 23:09               ` Paul Eggert
2018-08-16  2:46                 ` Richard Stallman
2018-08-13 23:31         ` Richard Stallman
2018-08-14  1:41           ` Paul Eggert
2018-08-16  2:41             ` Richard Stallman
2018-08-16 19:31               ` Paul Eggert [this message]
2018-08-16 22:02               ` Stefan Monnier
2018-08-12  7:37 ` John Wiegley
2018-08-12 18:21   ` Eli Zaretskii
2018-08-12 11:48 ` Pip Cet
2018-08-12 16:02   ` Tom Tromey
2018-08-13 22:58   ` Paul Eggert
2018-08-14  1:12     ` Noam Postavsky
2018-08-14 13:04     ` Pip Cet
2018-08-14 18:01       ` Paul Eggert
2018-08-15 15:20         ` Pip Cet
2018-08-15 16:17           ` Paul Eggert
2018-08-15 23:57           ` Andy Moreton
2018-08-16 22:00             ` Stefan Monnier
2018-08-20 16:28         ` Some vars now limited to fixnum size. (Was: Merging bignum to master) Karl Fogel
2018-08-20 16:54           ` Paul Eggert
2018-08-20 17:27             ` Eli Zaretskii
2018-08-20 17:27             ` Paul Eggert
2018-08-20 18:00               ` Eli Zaretskii
2018-08-20 19:55                 ` Pip Cet
2018-08-20 23:15                   ` Paul Eggert
2018-08-21 15:01               ` Some vars now limited to fixnum size Tom Tromey
2018-08-21 16:36                 ` Andy Moreton
2018-08-21 18:46                 ` Paul Eggert
2018-08-22 15:39                   ` Tom Tromey
2018-08-21  3:38             ` Some vars now limited to fixnum size. (Was: Merging bignum to master) Richard Stallman
2018-08-21  4:09               ` Paul Eggert
2018-08-22  4:03                 ` Richard Stallman
2018-08-22  4:53                   ` Paul Eggert
2018-08-20 17:25           ` Eli Zaretskii
2018-08-14  0:51 ` Merging bignum to master Andy Moreton
2018-08-15 15:46 ` Andy Moreton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec17dd2b-1cdf-b0e3-4735-da7eea6c7318@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=ulm@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.