Message ID | 1516265199-29059-1-git-send-email-yao.qi@linaro.org |
---|---|
State | New, archived |
Headers |
Received: (qmail 117212 invoked by alias); 18 Jan 2018 08:46:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 116617 invoked by uid 89); 18 Jan 2018 08:46:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:static. X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Jan 2018 08:46:45 +0000 Received: by mail-wm0-f68.google.com with SMTP id 141so20952615wme.3 for <gdb-patches@sourceware.org>; Thu, 18 Jan 2018 00:46:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Zz0NcxPWQzKr9HjiCULBX5Ycq9G//0oXWVijlKBKMck=; b=hBPZuxj4a1cud67BCveqZ+R98UHagizUrvQfbye1Z6pwe3Jd8p8654TM9rvQbuSLTe wHvZ5lV5rODm4J+KGcWYQpQ7NUIr5jH1FwIFFoKC0rgnkHgWfLpLnH5sf5lrBxXZ8i8h 3MYACPGPPAUxn3m/huPy1CWkBtq1SmqsIzennM4aBhUpFQIYwToyQKjZTcipYJ0vMzLF xsQEgyXgLJ0eo7lcwyyk8ClMk5vCKFPyE+ffkrZC41ZNfdmZ2E1wDoAYlX7CRVccj3Sn 5AfoLPuGPRukvRVxN/SylEVW06MQibp0lzrmFvQHXQTHvyOM2lQCAYtCx2SKqwBwCN2l YCuw== X-Gm-Message-State: AKwxytfekLsRrx5Q8HQEGv7lJ7mbsw+GI74uewARTBvrq0/VJFbDSkCx AsaM4AitxAlp3j6M858XE+P6mQ== X-Google-Smtp-Source: ACJfBovX0Z9n2GzKSHk9sYpy4e27wektBcTPe/Rr0LHp/xKKugDMJeg29zR1PtoejZTEFukbXT5wSg== X-Received: by 10.28.67.194 with SMTP id q185mr4172921wma.76.1516265203364; Thu, 18 Jan 2018 00:46:43 -0800 (PST) Received: from E107787-LIN.cambridge.arm.com (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id s44sm1443899wrc.64.2018.01.18.00.46.42 for <gdb-patches@sourceware.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Jan 2018 00:46:42 -0800 (PST) From: Yao Qi <qiyaoltc@gmail.com> X-Google-Original-From: Yao Qi <yao.qi@linaro.org> To: gdb-patches@sourceware.org Subject: [PATCH] Find arm-linux-gnueabihf-gcc in compile Date: Thu, 18 Jan 2018 08:46:39 +0000 Message-Id: <1516265199-29059-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes |
Commit Message
Yao Qi
Jan. 18, 2018, 8:46 a.m. UTC
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. gdb: 2018-01-17 Yao Qi <yao.qi@linaro.org> * osabi.c (gdb_osabi_names): Extend the regexp for arm-linux-gnueabihf. --- gdb/osabi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 2018-01-18 03:46, 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. > > gdb: > > 2018-01-17 Yao Qi <yao.qi@linaro.org> > > * osabi.c (gdb_osabi_names): Extend the regexp for > arm-linux-gnueabihf. > --- > gdb/osabi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/osabi.c b/gdb/osabi.c > index 129164f..fd44deb 100644 > --- a/gdb/osabi.c > +++ b/gdb/osabi.c > @@ -63,7 +63,7 @@ static const struct osabi_names gdb_osabi_names[] = > { "SVR4", NULL }, > { "GNU/Hurd", NULL }, > { "Solaris", NULL }, > - { "GNU/Linux", "linux(-gnu)?" }, > + { "GNU/Linux", "linux(-gnu[^-]*)?" }, > { "FreeBSD", NULL }, > { "NetBSD", NULL }, > { "OpenBSD", NULL }, That seem reasonable to me. Simon
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, <https://packages.debian.org/sid/gcc-7-arm-linux-gnueabi>, 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
diff --git a/gdb/osabi.c b/gdb/osabi.c index 129164f..fd44deb 100644 --- a/gdb/osabi.c +++ b/gdb/osabi.c @@ -63,7 +63,7 @@ static const struct osabi_names gdb_osabi_names[] = { "SVR4", NULL }, { "GNU/Hurd", NULL }, { "Solaris", NULL }, - { "GNU/Linux", "linux(-gnu)?" }, + { "GNU/Linux", "linux(-gnu[^-]*)?" }, { "FreeBSD", NULL }, { "NetBSD", NULL }, { "OpenBSD", NULL },