]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Support single digit GCC version
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 11 Jul 2017 15:37:48 +0000 (08:37 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 17 Jul 2017 19:55:57 +0000 (12:55 -0700)
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)

ld/ChangeLog
ld/testsuite/ld-selective/selective.exp

index 2fb8c79de92dd6cd675192de7d01c20aa1ae54e5..861835c7a0206c2be3446993abeee15b61bfd3cc 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/ld-selective/selective.exp: Support single digit
+       GCC version.
+
 2017-07-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/21782
index 8d58c1612d9ac3fc776d1469178a37a383c73c62..11c8f3fe69501f502f94e4012ad03af6682382c0 100644 (file)
@@ -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 {