about summary refs log tree commit diff
path: root/conform/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-10-30 22:18:34 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-10-30 22:18:34 +0000
commit3ca235ed369872a6ec15cb15e826cd983d09f786 (patch)
treef7d04b9b79701915889452b0e3fd27646925d543 /conform/Makefile
parent60708030536df82616c16aa2f14f533c4362b969 (diff)
downloadglibc-3ca235ed369872a6ec15cb15e826cd983d09f786.tar.gz
glibc-3ca235ed369872a6ec15cb15e826cd983d09f786.tar.xz
glibc-3ca235ed369872a6ec15cb15e826cd983d09f786.zip
Convert linknamespace tests from Perl to Python.
This patch replaces conform/linknamespace.pl with a new
conform/linknamespace.py, so continuing the consolidation on Python
instead of Perl for miscellaneous scripts used in building and testing
glibc.  The new script follows the same logic as the old one; as a
recently-added script, there were no major cleanups to be made in the
course of the language conversion.

Tested for x86_64, and with build-many-glibcs.py.  For x86_64 I also
tested that if the Perl and Python scripts were made to print all the
symbols in seen_where and the paths of symbol references by which
those symbols were linked in, even when those symbols were OK,
identical symbol lists appeared in the output with both versions of
the script (the differences in linknamespace.out files were only in
paths to temporary files in diagnostics for e.g. deprecated functions,
and error output for the expected compilation failures when testing
ndbm.h and varargs.h).

	* conform/linknamespace.py: New file.
	* conform/linknamespace.pl: Remove file.
	* conform/Makefile ($(linknamespace-header-tests)): Use
	linknamespace.py instead of linknamespace.pl.  Do not use --tmpdir
	option.
Diffstat (limited to 'conform/Makefile')
-rw-r--r--conform/Makefile13
1 files changed, 6 insertions, 7 deletions
diff --git a/conform/Makefile b/conform/Makefile
index a2bbe0fb24..fbc4110688 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -218,17 +218,16 @@ $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \
 	$(evaluate-test)
 
 $(linknamespace-header-tests): $(objpfx)%/linknamespace.out: \
-			       linknamespace.pl \
+			       linknamespace.py \
 			       $(linknamespace-symlists-tests) \
 			       $(linknamespace-symlist-stdlibs-tests)
 	(set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \
 	 mkdir -p $(@D)/scratch; \
-	 $(PERL) -I. -w $< --tmpdir=$(@D)/scratch --cc='$(CC)' \
-		 --flags='$(conformtest-cc-flags)' --standard=$$std \
-		 --stdsyms=$(objpfx)symlist-$$std --header=$$hdr \
-		 --libsyms=$(objpfx)symlist-stdlibs-$$std \
-		 --readelf='$(READELF)' \
-		 > $@ 2>&1); \
+	 $(PYTHON) $< --cc='$(CC)' --flags='$(conformtest-cc-flags)' \
+		   --standard=$$std --stdsyms=$(objpfx)symlist-$$std \
+		   --header=$$hdr --libsyms=$(objpfx)symlist-stdlibs-$$std \
+		   --readelf='$(READELF)' \
+		   > $@ 2>&1); \
 	$(evaluate-test)
 
 # Pre-standard C feature no longer supported by GCC (obsoleted in