aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-07-11 08:37:48 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-07-11 08:41:22 -0700
commit61a0857c0fb512ce6a2ba4315a37fcce744f6045 (patch)
tree06ebdfc43ed01bdd4b8c10b4a4577c1f8a288b4e /ld
parent04ac15ab07e6360320a1c8fab82d25340c22a21f (diff)
downloadgdb-61a0857c0fb512ce6a2ba4315a37fcce744f6045.zip
gdb-61a0857c0fb512ce6a2ba4315a37fcce744f6045.tar.gz
gdb-61a0857c0fb512ce6a2ba4315a37fcce744f6045.tar.bz2
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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/testsuite/ld-selective/selective.exp3
2 files changed, 7 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 1f978bf..90bbed7a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/ld-selective/selective.exp: Support single digit
+ GCC version.
+
2017-07-11 Jiong Wang <jiong.wang@arm.com>
* testsuite/ld-aarch64/dt_textrel.d: Use "#pass" instead of ".*" to
diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp
index 8d58c16..11c8f3f 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 {