mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Patch to require Python 3.4 or later to build glibc.
This patch makes Python 3.4 or later a required tool for building glibc, so allowing changes of awk, perl etc. code used in the build and test to Python code without any such changes needing makefile conditionals or to handle older Python versions. This patch makes the configure test for Python check the version and give an error if Python is missing or too old, and removes makefile conditionals that are no longer needed. It does not itself convert any code from another language to Python, and does not remove any compatibility with older Python versions from existing scripts. Tested for x86_64. * configure.ac (PYTHON_PROG): Use AC_CHECK_PROG_VER. Set critic_missing for versions before 3.4. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Document requirement for Python to build glibc. * INSTALL: Regenerated. * Rules [PYTHON]: Make code unconditional. * benchtests/Makefile [PYTHON]: Likewise. * conform/Makefile [PYTHON]: Likewise. * manual/Makefile [PYTHON]: Likewise. * math/Makefile [PYTHON]: Likewise.
This commit is contained in:
29
configure
vendored
29
configure
vendored
@ -5344,19 +5344,30 @@ fi
|
||||
|
||||
test -n "$PYTHON_PROG" && break
|
||||
done
|
||||
test -n "$PYTHON_PROG" || PYTHON_PROG="no"
|
||||
|
||||
case "x$PYTHON_PROG" in
|
||||
xno|x|x:) PYTHON_PROG=no ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
if test "x$PYTHON_PROG" = xno; then
|
||||
aux_missing="$aux_missing python"
|
||||
if test -z "$PYTHON_PROG"; then
|
||||
ac_verc_fail=yes
|
||||
else
|
||||
PYTHON="$PYTHON_PROG -B"
|
||||
# Found it, now check the version.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $PYTHON_PROG" >&5
|
||||
$as_echo_n "checking version of $PYTHON_PROG... " >&6; }
|
||||
ac_prog_version=`$PYTHON_PROG --version 2>&1 | sed -n 's/^.*Python \([0-9][0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*)
|
||||
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
|
||||
$as_echo "$ac_prog_version" >&6; }
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
critic_missing="$critic_missing python"
|
||||
fi
|
||||
|
||||
PYTHON="$PYTHON_PROG -B"
|
||||
|
||||
|
||||
test -n "$critic_missing" && as_fn_error $? "
|
||||
*** These critical programs are missing or too old:$critic_missing
|
||||
|
Reference in New Issue
Block a user