From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 56F7939730E1; Tue, 17 Aug 2021 19:14:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 56F7939730E1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: vAfCXmzw8J7gZx0CL6vhz7z09oAbCpT8/0lpJ5ClEotvAcvxrVJ2Rdjm8GSBJyFb7wfpQ5M4Rj umaXmeIF4hecVQtGwPVudnAf8wTnW+9UWaaSuqyk/bcXmfMv7YzsyN1sdgvNkxLHqU1L54ls70 0nYu3ywCsdp9+PrDr08eJQkPbQzF0YQgvBKtLa7brcFM3+0Wxm8EuP22iuR1mz8mAeXI5Z8RSy PfxaST/+a+RzGlqxqJtUp3+IXfj6kdvcFqUqsXPvNi6vXogeRZInzV1phEiS3bDFIF4ev44UU4 PvCCwWorrBkq+PTiOJQpctCW X-IronPort-AV: E=Sophos;i="5.84,329,1620720000"; d="scan'208,223";a="65007246" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 17 Aug 2021 11:14:42 -0800 IronPort-SDR: NpnCj1o0WwGDvjOPhLeMcOLXDVJlEhGQifuxazX2BvbDReknHDg7GVpprvDoiHfmmIS/ic6vp1 w9kM7+HVwYMpiFE9ltPFhMlTuTIILc88N9xRZvmJyhUwnPkn4PTGbmhrSKKkXtf1EDaA7wiX0u a+UTO9XTN3FPU/Pm8IUNuhwPK70IsdKpKOwmpBvW1hm4LGKLzPXx+bjevG6uTOSyBDtRpzDnJn jJCPALk1Rt5GaBSk+w4gkpez93Pe1EE4aI1Wlfw22MKUq4qHqA73lwazc+4+dmTeEGlbqKUaom pWQ= From: Thomas Schwinge To: Matthias Kretz , , CC: Jonathan Wakely Subject: Re: [PATCH] Avoid illegal argument to verbose in dg-test callback In-Reply-To: <2031740.irdbgypaU6@minbar> References: <2031740.irdbgypaU6@minbar> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Tue, 17 Aug 2021 21:14:32 +0200 Message-ID: <87wnoj289z.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LOTSOFHASH, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 19:14:46 -0000 --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2020-04-16T15:21:44+0200, Matthias Kretz wrote: > If extra_tool_flags starts with a dash, an error like 'ERROR: verbose: > illegal argument: -march=3Dnative -O2 -std=3Dc++17' is printed. This is > easily fixed by inserting a double dash before the variable. > --- a/libstdc++-v3/testsuite/lib/libstdc++.exp > +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp > @@ -408,7 +408,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flag= s } { > set options "" > if { $extra_tool_flags !=3D "" } { > verbose -log "extra_tool_flags are:" > - verbose -log $extra_tool_flags > + verbose -log -- $extra_tool_flags I'm confirming the original problem, but on one system, it's not resolved by this change, because instead we get: extra_tool_flags are: ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/con= formance.exp. ERROR: usage: send [args] string while executing "send_log "$message\n"" (procedure "verbose" line 48) invoked from within "verbose -log -- $extra_tool_flags" (procedure "libstdc++-dg-test" line 45) invoked from within "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra= -tool-flags}"" (procedure "saved-dg-test" line 115) invoked from within [...] That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leadi= ng dash in message". (I suppose that's what'd make this work, but have not verified.) Thus, as obvious, pushed "libstdc++: Avoid illegal argument to verbose in dg-test callback, continued" to master branch in commit 60b94d8bd2280837e980a53cf81bdf902d726e61, and cherry-picked into releases/gcc-11 branch in commit 112bbc8d1d81c1b6375ea3cfb083cdeb0a06ea3a, and into releases/gcc-10 branch in commit 6e64bbec7dead374628abe525b6f56e20f9507c3, see attached. Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-test.patch" >From 60b94d8bd2280837e980a53cf81bdf902d726e61 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 17 Aug 2021 17:58:30 +0200 Subject: [PATCH] libstdc++: Avoid illegal argument to verbose in dg-test callback, continued This is a follow-up to commit 697b94cfaef4a958132faf0cf4b35b15dfb29acc "libstdc++: Avoid illegal argument to verbose in dg-test callback". I'm confirming the original problem, but on one system, it's not resolved by this change, because instead we get: extra_tool_flags are: ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp. ERROR: usage: send [args] string while executing "send_log "$message\n"" (procedure "verbose" line 48) invoked from within "verbose -log -- $extra_tool_flags" (procedure "libstdc++-dg-test" line 45) invoked from within "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}"" (procedure "saved-dg-test" line 115) invoked from within [...] That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leading dash in message". (I suppose that's what'd make this work, but have not verified.) libstdc++-v3/ * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose, continued. --- libstdc++-v3/testsuite/lib/libstdc++.exp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 73b202ce212..35ccbe47c39 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -410,8 +410,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } { set select_compile "v3_target_compile" set options "" if { $extra_tool_flags != "" } { - verbose -log "extra_tool_flags are:" - verbose -log -- $extra_tool_flags + verbose -log "extra_tool_flags are: $extra_tool_flags" if { [string first "-x c" $extra_tool_flags ] != -1 } { verbose -log "compiling and executing as C, not C++" set edit_tool_flags $extra_tool_flags -- 2.30.2 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-.g11.patch" >From 112bbc8d1d81c1b6375ea3cfb083cdeb0a06ea3a Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 17 Aug 2021 17:58:30 +0200 Subject: [PATCH] libstdc++: Avoid illegal argument to verbose in dg-test callback, continued This is a follow-up to commit 697b94cfaef4a958132faf0cf4b35b15dfb29acc "libstdc++: Avoid illegal argument to verbose in dg-test callback". I'm confirming the original problem, but on one system, it's not resolved by this change, because instead we get: extra_tool_flags are: ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp. ERROR: usage: send [args] string while executing "send_log "$message\n"" (procedure "verbose" line 48) invoked from within "verbose -log -- $extra_tool_flags" (procedure "libstdc++-dg-test" line 45) invoked from within "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}"" (procedure "saved-dg-test" line 115) invoked from within [...] That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leading dash in message". (I suppose that's what'd make this work, but have not verified.) libstdc++-v3/ * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose, continued. (cherry picked from commit 60b94d8bd2280837e980a53cf81bdf902d726e61) --- libstdc++-v3/testsuite/lib/libstdc++.exp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 7f9580db8ed..27fac23500c 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -410,8 +410,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } { set select_compile "v3_target_compile" set options "" if { $extra_tool_flags != "" } { - verbose -log "extra_tool_flags are:" - verbose -log -- $extra_tool_flags + verbose -log "extra_tool_flags are: $extra_tool_flags" if { [string first "-x c" $extra_tool_flags ] != -1 } { verbose -log "compiling and executing as C, not C++" set edit_tool_flags $extra_tool_flags -- 2.30.2 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-libstdc-Avoid-illegal-argument-to-verbose-in-dg-.g10.patch" >From 6e64bbec7dead374628abe525b6f56e20f9507c3 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 17 Aug 2021 17:58:30 +0200 Subject: [PATCH] libstdc++: Avoid illegal argument to verbose in dg-test callback, continued This is a follow-up to commit 697b94cfaef4a958132faf0cf4b35b15dfb29acc "libstdc++: Avoid illegal argument to verbose in dg-test callback". I'm confirming the original problem, but on one system, it's not resolved by this change, because instead we get: extra_tool_flags are: ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp. ERROR: usage: send [args] string while executing "send_log "$message\n"" (procedure "verbose" line 48) invoked from within "verbose -log -- $extra_tool_flags" (procedure "libstdc++-dg-test" line 45) invoked from within "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}"" (procedure "saved-dg-test" line 115) invoked from within [...] That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leading dash in message". (I suppose that's what'd make this work, but have not verified.) libstdc++-v3/ * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose, continued. (cherry picked from commit 60b94d8bd2280837e980a53cf81bdf902d726e61) --- libstdc++-v3/testsuite/lib/libstdc++.exp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 3b8587cd01d..45dd2c8c02e 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -410,8 +410,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } { set select_compile "v3_target_compile" set options "" if { $extra_tool_flags != "" } { - verbose -log "extra_tool_flags are:" - verbose -log -- $extra_tool_flags + verbose -log "extra_tool_flags are: $extra_tool_flags" if { [string first "-x c" $extra_tool_flags ] != -1 } { verbose -log "compiling and executing as C, not C++" set edit_tool_flags $extra_tool_flags -- 2.30.2 --=-=-=--