diff options
author | Joseph Myers <joseph@codesourcery.com> | 2018-08-09 15:34:12 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2018-08-09 15:34:12 +0000 |
commit | 2813e41e9049ccd0c75edc19c4fdefb21213b495 (patch) | |
tree | 1b60b7cd3434f9756b373963c5e249230bf3b7da /sysdeps | |
parent | 8ac0f9e6f742dba698dc2ae0461f76a4b46a7971 (diff) | |
download | glibc-2813e41e9049ccd0c75edc19c4fdefb21213b495.tar glibc-2813e41e9049ccd0c75edc19c4fdefb21213b495.tar.gz glibc-2813e41e9049ccd0c75edc19c4fdefb21213b495.tar.bz2 glibc-2813e41e9049ccd0c75edc19c4fdefb21213b495.zip |
Replace gen-libm-test.pl with gen-libm-test.py.
Following the recent discussion of using Python instead of Perl and
Awk for glibc build / test, this patch replaces gen-libm-test.pl with
a new gen-libm-test.py script. This script should work with all
Python versions supported by glibc (tested by hand with Python 2.7,
tested in the build system with Python 3.5; configure prefers Python 3
if available).
This script is designed to give identical output to gen-libm-test.pl
for ease of verification of the change, except for generated comments
referring to .py instead of .pl. (That is, identical for actual
inputs passed to the script, not necessarily for all possible input;
for example, this version more precisely follows the C standard syntax
for floating-point constants when deciding when to add LIT macro
calls.) In one place a comment notes that the generation of
NON_FINITE flags is replicating a bug in the Perl script to assist in
such comparisons (with the expectation that this bug can then be
separately fixed in the Python script later).
Tested for x86_64, including comparison of generated files (and hand
testing of the case of generating a sorted libm-test-ulps file, which
isn't covered by normal "make check").
I'd expect to follow this up by extending the new script to produce
the ulps tables for the manual as well (replacing
manual/libm-err-tab.pl, so that then we just have one ulps file
parser) - at which point the manual build would depend on both Perl
and Python (eliminating the Perl dependency would require someone to
rewrite summary.pl in Python, and that would only eliminate the
*direct* Perl dependency; current makeinfo is written in Perl so there
would still be an indirect dependency).
I think install.texi is more or less equally out-of-date regarding
Perl and Python uses before and after this patch, so I don't think
this patch depends on my patch
<https://sourceware.org/ml/libc-alpha/2018-08/msg00133.html> to update
install.texi regarding such uses (pending review).
* math/gen-libm-test.py: New file.
* math/gen-libm-test.pl: Remove.
* math/Makefile [$(PERL) != no]: Change condition to [PYTHON].
($(objpfx)libm-test-ulps.h): Use gen-libm-test.py instead of
gen-libm-test.pl.
($(libm-test-c-noauto-obj)): Likewise.
($(libm-test-c-auto-obj)): Likewise.
($(libm-test-c-narrow-obj)): Likewise.
(regen-ulps): Likewise.
* math/README.libm-test: Update references to gen-libm-test.pl.
* math/libm-test-driver.c (struct test_fj_f_data): Update comment
referencing gen-libm-test.pl.
* math/libm-test-nexttoward.inc (nexttoward_test_data): Likewise.
* math/libm-test-support.c: Likewise.
* math/libm-test-support.h: Likewise.
* sysdeps/generic/libm-test-ulps: Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/libm-test-ulps | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/generic/libm-test-ulps b/sysdeps/generic/libm-test-ulps index 7cfa1f8285..c96d364978 100644 --- a/sysdeps/generic/libm-test-ulps +++ b/sysdeps/generic/libm-test-ulps @@ -2,4 +2,4 @@ # This file is the fallback and contains # no data # You can create a new file with e.g. `test-double -u' -# followed by `gen-libm-test.pl -u ULPs -n'. +# followed by `gen-libm-test.py -u ULPs -n'. |