Replace with

System Internals / glibc - Joseph Myers [] - 9 August 2018 15:34 EDT

Following the recent discussion of using Python instead of Perl and Awk for glibc build / test, this patch replaces with a new 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 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/, 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 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 to update install.texi regarding such uses (pending review).

- math/ New file.
- math/ Remove.
- math/Makefile [$(PERL) != no]: Change condition to [PYTHON]. ($(objpfx)libm-test-ulps.h): Use instead of ($(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
- math/libm-test-driver.c (struct test_fj_f_data): Update comment referencing
- math/ (nexttoward_test_data): Likewise.
- math/libm-test-support.c: Likewise.
- math/libm-test-support.h: Likewise.
- sysdeps/generic/libm-test-ulps: Likewise.

2813e41e90 Replace with
ChangeLog | 19 +
math/Makefile | 26 +-
math/README.libm-test | 20 +-
math/ | 846 -----------------------------------------
math/ | 603 +++++++++++++++++++++++++++++
math/libm-test-driver.c | 2 +-
math/ | 2 +-
math/libm-test-support.c | 2 +-
math/libm-test-support.h | 4 +-
sysdeps/generic/libm-test-ulps | 2 +-
10 files changed, 651 insertions(+), 875 deletions(-)


  • Share