simon-git: spigot (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Feb 11 16:10:51 GMT 2017


TL;DR:
  2c623dc expint.c: add a few more move().
  259c502 expr.cpp: rewrite list macro to fix clang warnings.
  684fe90 Factor out source files list from Makefile.am.
  d3b9328 Makefile for cross-building Windows spigot with Linux clang-cl.
  50413ae test.sh: strip \r from the output of spigot.
  34afe73 test.sh: stop using <(...) in baseNfile / cfracfile tests.

Repository:     https://git.tartarus.org/simon/spigot.git
On the web:     https://git.tartarus.org/?p=simon/spigot.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2017-02-11 16:10:51

commit 2c623dc2f5b5253014f5bcec693c02ec2675e32c
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=2c623dc2f5b5253014f5bcec693c02ec2675e32c;hp=1d65ce37254543148c913374ba4ecf9ae13451c0
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Feb 11 15:26:08 2017 +0000

    expint.c: add a few more move().
    
    Apparently compilers disagree on whether these ones are actually
    necessary - Debian jessie wouldn't build the new spigot without them
    but does build it with them, and clang's warning about redundant
    move() doesn't trigger if I add them, but on the other hand Ubuntu
    16.04's g++ was quite happy without them.
    
    Still, everyone seems to be happy _with_ them, so they can stay.

 expint.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit 259c50295ea30e5ce9e29aa479bb5bed5b6f27bf
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=259c50295ea30e5ce9e29aa479bb5bed5b6f27bf;hp=2c623dc2f5b5253014f5bcec693c02ec2675e32c
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Feb 11 15:49:23 2017 +0000

    expr.cpp: rewrite list macro to fix clang warnings.
    
    The problem with the previous version was that every op_foo()
    implementing one of the operators or functions in the expression
    language had a parameter called 'args' and two aliases to its vector
    elements called 'a' and 'b', leading to a lot of annoying warnings
    from clang when they weren't used (e.g. because some given function
    was unary, or a constant).
    
    I've reworked the list macro so that it takes six different sub-macro
    parameters for declaring each of the basic kinds of function (unary or
    binary operators, functions with 1 or 2 arguments, variadic functions,
    and constants), and now each of those macros can expand to a slightly
    different implementing function.
    
    The warnings that this fixes are annoying and unnecessary - they're in
    the class of compiler warnings that you'd really like to be able to
    suppress if they occur in a macro expansion, on the grounds that macro
    expansion generates a lot of things that a thinking human wouldn't and
    that doesn't mean they're erroneous in the same way. Even so, I think
    on balance this is a positive change; there's more macro machinery
    involved in expanding out the various products of the list macro, but
    the list itself is now simpler (no boilerplate macro arguments in
    entries they're irrelevant to) and that's the part I anticipate
    editing most often in the future.

 expr.cpp | 234 ++++++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 128 insertions(+), 106 deletions(-)

commit 684fe90ecbe3bbb3b22a03f5eb9a1f0caf45bb04
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=684fe90ecbe3bbb3b22a03f5eb9a1f0caf45bb04;hp=259c50295ea30e5ce9e29aa479bb5bed5b6f27bf
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Feb 11 15:53:20 2017 +0000

    Factor out source files list from Makefile.am.
    
    This removes duplication between Makefile.am and the Python module's
    setup.py, and also means I have a handy Makefile fragment that I can
    include in any further Makefile types that I might be about to invent.

 Makefile.am     |  9 +++------
 python/setup.py | 49 +++++++++++++++++++++++++++----------------------
 sources.mk      |  9 +++++++++
 3 files changed, 39 insertions(+), 28 deletions(-)

commit d3b932895dfc120ed5d9fcc419194bb112cb45ec
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=d3b932895dfc120ed5d9fcc419194bb112cb45ec;hp=684fe90ecbe3bbb3b22a03f5eb9a1f0caf45bb04
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Feb 11 15:56:14 2017 +0000

    Makefile for cross-building Windows spigot with Linux clang-cl.
    
    This uses the same setup of clang-cl that I've recently been trying
    out with PuTTY (notably, you have to use the real Visual Studio
    headers and library files, and make symlink farms of them that often
    include links to the same file by names differing only in case).
    
    I've also managed to persuade it to compile GMP and link that to
    spigot, so now I can build a Windows spigot.exe that goes at the same
    speed as the default Linux configuration. (The link is static, so the
    resulting spigot.exe is still self-contained.) To enable this, you can
    define GMP_SOURCE_TARBALL on the make command line to point at a GMP
    distribution archive (I've been testing with gmp-6.1.2.tar.lz) and the
    makefile will take care of the whole unpack/configure/make/make
    install cycle and link the resulting libgmp.lib into spigot. (And
    there are some other make variables you could define instead to point
    at an existing header and library file, or an already-unpacked source
    dir.) If you don't define any of those, you'll still get a version of
    spigot with the internal bigint implementation.
    
    Even without GMP, the clang-cl output binary goes at more than twice
    the speed of the version from real Visual Studio. With GMP, of course,
    it's faster still.
    
    (This is still in enough of an experimental state that I'm not yet
    actually modifying Buildscr to build spigot like this in my nightly
    snapshots, but I may do that at some point.)

 .gitignore       |  1 +
 Makefile.clangcl | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

commit 50413ae1e77de4995ed3ee58a3076f8eade48d50
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=50413ae1e77de4995ed3ee58a3076f8eade48d50;hp=d3b932895dfc120ed5d9fcc419194bb112cb45ec
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Feb 11 15:57:06 2017 +0000

    test.sh: strip \r from the output of spigot.
    
    This makes it possible to run test.sh on Windows spigot.exe without
    spurious test failures because of the latter's CRLF-formatted text
    output.

 test.sh | 1 +
 1 file changed, 1 insertion(+)

commit 34afe7316dd15ef80ff633860504d097d0a2dbfb
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=34afe7316dd15ef80ff633860504d097d0a2dbfb;hp=50413ae1e77de4995ed3ee58a3076f8eade48d50
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Feb 11 16:01:48 2017 +0000

    test.sh: stop using <(...) in baseNfile / cfracfile tests.
    
    This is another fix that's useful when running test.sh against a
    Windows spigot.exe on Linux: the filename format that bash generates
    in response to the <(...) syntax is not one that Wine will recognise
    as describing an actual file. So now I run all spigot's tests with a
    temporary directory as their cwd, and in that directory, I write out
    each piece of test file data into a file whose name has no difficult
    characters in it.
    
    With this change and the previous one, I can run test.sh on a Windows
    spigot.exe (via binfmt_misc configuration to implicitly invoke Wine)
    and get it through the entire test suite with 100% pass rate. (Of
    course that doesn't include the fd tests, but test.sh already knows
    how to automatically skip those when spigot --version reports that
    they aren't supported by a given binary.)

 test.sh | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)



More information about the tartarus-commits mailing list