From: Martin Liska Date: Tue, 18 Jan 2022 08:16:26 +0000 (+0100) Subject: Update check_effective_target_recent_python3 X-Git-Tag: basepoints/gcc-13~1657 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50c3975129c5d97387bbe4976bea1931d3fad0b2;p=thirdparty%2Fgcc.git Update check_effective_target_recent_python3 Require at least Python 3.6. gcc/testsuite/ChangeLog: * gcc.src/maintainers.exp: Use the new check_effective_target_recent_python3. * lib/target-supports.exp: Check for Python3 version >= 3.6. --- diff --git a/gcc/testsuite/gcc.src/maintainers.exp b/gcc/testsuite/gcc.src/maintainers.exp index 63361dd5e4b3..a4b3986be777 100644 --- a/gcc/testsuite/gcc.src/maintainers.exp +++ b/gcc/testsuite/gcc.src/maintainers.exp @@ -24,8 +24,8 @@ proc gcc_src_run_maintainers_verify_sh {} { set contrib $rootdir/contrib set maintainers $rootdir/MAINTAINERS - if { ![check_effective_target_python3] } { - unsupported "$script python3 is missing" + if { ![check_effective_target_recent_python3] } { + unsupported "$script recent python3 is missing" return } diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index fd48475a57c9..fbb6c7352237 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -11723,10 +11723,10 @@ proc check_effective_target___OPTIMIZE__ {} { } [current_compiler_flags]] } -# Return 1 if python3 is available. +# Return 1 if python3 (>= 3.6) is available. -proc check_effective_target_python3 { } { - set result [remote_exec host "python3 --version"] +proc check_effective_target_recent_python3 { } { + set result [remote_exec host "python3 -c \"import sys; assert sys.version_info >= (3, 6)\""] set status [lindex $result 0] if { $status == 0 } then { return 1;