From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88741 invoked by alias); 16 Jan 2018 12:18:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 88722 invoked by uid 89); 16 Jan 2018 12:18:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=grown, listing, nobody 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; Tue, 16 Jan 2018 12:18:51 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10FBA85540; Tue, 16 Jan 2018 12:18:50 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2103460851; Tue, 16 Jan 2018 12:18:43 +0000 (UTC) Subject: Re: [PATCH] Run gdb.compile/*.exp on {x86,x86_64,s390}-linux only To: Yao Qi , gdb-patches@sourceware.org References: <1516103412-25086-1-git-send-email-yao.qi@linaro.org> Cc: jan.kratochvil@redhat.com, pmuldoon@redhat.com From: Pedro Alves Message-ID: <088c44b5-5454-e187-3984-956a30904ffc@redhat.com> Date: Tue, 16 Jan 2018 12:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1516103412-25086-1-git-send-email-yao.qi@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-01/txt/msg00295.txt.bz2 On 01/16/2018 11:50 AM, Yao Qi wrote: > I see many gdb.compile/*.exp fails on aarch64-linux and arm-linux, > > (gdb) compile code -- ; > Could not find a compiler matching "^arm(-[^-]*)?-linux(-gnu)?-gcc$" > (gdb) compile code -- ; > aarch64-none-linux-gnu-gcc: error: unrecognized command line option '-m64' > > I think we need to properly skip tests on targets which don't support > compile. As far as I know, gdb compile is supported on x86, x86_64, > and s390. OOC, how did you determine which archs support it? What is needed to support compile on other Linux archs? Isn't the aarch64 issue simply that it's missing a gdbarch_gcc_target_options implementation to override the default of "-m64"? > I think we need to properly skip tests on targets which don't support > compile. As far as I know, gdb compile is supported on x86, x86_64, > and s390. > > This patch matches the target triplet in > lib/gdb.exp:skip_compile_feature_tests. If the target triplet is > *not* x86,x86_64, and s390 linux, return 1; otherwise, do the > "compile code -- ;" test. > > An alternative approach is to modify lib/gdb.exp:skip_compile_feature_tests > to match these error messages above. However, these error message is > from libcc1, subject to change, and other targets may have different > error messages from libcc1. A problem with white listing is the list tends to stay with the few initial entries. Forks working on other ports tend to not notice the feature gated by the check exists and needs work, because they never had to actively look at the failures and decide to blacklist their port, or actually fix the underlying gdb issue. Witness the multiple cases of things like: # Until "catch fork" is implemented on other targets... # if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then { ... which is stale in the sense that other ports have grown fork support over time, but nobody updated the tests... So while whitelisting is the practical thing to do in many cases, I think it doesn't hurt to raise the bar a little higher in this case. So "goto again;": Isn't the aarch64 issue simply that it's missing a gdbarch_gcc_target_options implementation to override the default of "-m64"? What else is missing? Thanks, Pedro Alves