From: H.J. Lu Date: Tue, 11 Jul 2017 15:37:48 +0000 (-0700) Subject: Support single digit GCC version X-Git-Tag: binutils-2_29~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2e7964c7e7a4148ed84e9ca2acbcba02a9d23fe;p=thirdparty%2Fbinutils-gdb.git Support single digit GCC version On Fedora 26, "g++ -dumpversion" displays "7", instead of "7.1.1". Update selective.exp to support single digit GCC version. Also remove duplicated [4-9] version check. * testsuite/ld-selective/selective.exp: Support single digit GCC version. (cherry picked from commit 61a0857c0fb512ce6a2ba4315a37fcce744f6045) --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 2fb8c79de92..861835c7a02 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2017-07-17 H.J. Lu + + * testsuite/ld-selective/selective.exp: Support single digit + GCC version. + 2017-07-17 H.J. Lu PR ld/21782 diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp index 8d58c1612d9..11c8f3fe695 100644 --- a/ld/testsuite/ld-selective/selective.exp +++ b/ld/testsuite/ld-selective/selective.exp @@ -102,7 +102,8 @@ foreach testitem $seltests { # the functionality we try to test for cannot be expected to work. set version [remote_exec host "$CXX -dumpversion"] set version [lindex $version 1] - if [regexp "^(\[1-9\]\[0-9\]+|\[4-9\]|3.(\[1-9\]\[0-9\]+|\[4-9\]))\\." $version] { + if { [regexp "^(\[1-9\]\[0-9\]+|\[4-9\]|3.(\[1-9\]\[0-9\]+))\\." $version] \ + || [regexp "^(\[1-9\]\[0-9\]+|\[4-9\])" $version] } { set testflags "$cflags $cxxflags" setup_xfail {*-*-*} } else {