This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed, PATCH] Support single digit GCC version


On Tue, Jul 11, 2017 at 8:42 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> 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.
> ---
>  ld/ChangeLog                            | 5 +++++
>  ld/testsuite/ld-selective/selective.exp | 3 ++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
>
> 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 {
> --
> 2.9.4
>

I backported it to 2.29 branch.


-- 
H.J.
From f2e7964c7e7a4148ed84e9ca2acbcba02a9d23fe Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 11 Jul 2017 08:37:48 -0700
Subject: [PATCH] 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)
---
 ld/ChangeLog                            | 5 +++++
 ld/testsuite/ld-selective/selective.exp | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 2fb8c79de9..861835c7a0 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,10 @@
 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
 	* testsuite/ld-x86-64/pie3-nacl.d: New file.
 	* testsuite/ld-x86-64/pie3.d: Likewise.
diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp
index 8d58c1612d..11c8f3fe69 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 {
-- 
2.13.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]