From patchwork Thu Oct 20 19:31:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 16700 Received: (qmail 104693 invoked by alias); 20 Oct 2016 19:32:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 104683 invoked by uid 89); 20 Oct 2016 19:32:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1001, check-in X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Oct 2016 19:32:03 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 90C7AC073D48 for ; Thu, 20 Oct 2016 19:32:02 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9KJVx7L020749 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 20 Oct 2016 15:32:01 -0400 Date: Thu, 20 Oct 2016 21:31:58 +0200 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [testsuite patch] Fix gcc_compiled for gcc 6 & 7 Message-ID: <20161020193158.GA16273@host1.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.0 (2016-08-17) X-IsSubscribed: yes Hi, OK for check-in? Jan gdb/testsuite/ChangeLog 2016-10-20 Jan Kratochvil * lib/gdb.exp (get_compiler_info): Generalize gcc_compile regexp. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 378eea0..7d9b198 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3290,12 +3290,8 @@ proc get_compiler_info {{arg ""}} { } # Set the legacy symbols. - set gcc_compiled 0 - if { [regexp "^gcc-1-" "$compiler_info" ] } { set gcc_compiled 1 } - if { [regexp "^gcc-2-" "$compiler_info" ] } { set gcc_compiled 2 } - if { [regexp "^gcc-3-" "$compiler_info" ] } { set gcc_compiled 3 } - if { [regexp "^gcc-4-" "$compiler_info" ] } { set gcc_compiled 4 } - if { [regexp "^gcc-5-" "$compiler_info" ] } { set gcc_compiled 5 } + set gcc_compiled 0 + regexp "^gcc-(\[0-9\]+)-" "$compiler_info" matchall gcc_compiled # Log what happened. verbose -log "get_compiler_info: $compiler_info"