From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96072 invoked by alias); 18 Jan 2018 18:32:10 -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 95270 invoked by uid 89); 18 Jan 2018 18:32:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=entirely 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, 18 Jan 2018 18:32:08 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 47CDC4AEBE; Thu, 18 Jan 2018 18:32:07 +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 AA431600CA; Thu, 18 Jan 2018 18:32:06 +0000 (UTC) Subject: Re: [PATCH] Find arm-linux-gnueabihf-gcc in compile To: Yao Qi , gdb-patches@sourceware.org References: <1516265199-29059-1-git-send-email-yao.qi@linaro.org> From: Pedro Alves Message-ID: Date: Thu, 18 Jan 2018 18:32: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: <1516265199-29059-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/msg00379.txt.bz2 On 01/18/2018 08:46 AM, Yao Qi wrote: > GCC for arm-linux has different names on different distros. It is > arm-linux-gnu-gcc on fedora. Debian/Ubuntu has arm-linux-gnueabihf-gcc. > So when I run gdb.compile/ tests on arm-linux, I get, > > (gdb) compile code -- ; > Could not find a compiler matching "^arm(-[^-]*)?-linux(-gnu)?-gcc$" > > This patch extend the regexp to match both arm-linux-gnu-gcc and > arm-linux-gnueabihf-gcc. Debian seems to have a "arm-linux-gnueabi-gcc" as well, , which I assume is a version that defaults to soft-float. (Or is that softfp?) So it's not entirely accurate to say that it's arm-linux-gnueabihf-gcc on Debian. It has both (and maybe more). The "hf" in the name is encoding the default float ABI the compiler outputs (hf is for hard float), which may not be the right one if you have multiple versions of the compiler around in the PATH. (more likely in a cross setup than on native, I guess.) I think either gnueabihf/gnueabi compiler would be able to emit code for either ABI, it's just a matter of what is the default, so which ABI to pick can be left to making gdb pass the right -mfloat-abi=soft/softfp/hard (and likewise other "-m" options). Thus, seems OK. Thanks, Pedro Alves