public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Find arm-linux-gnueabihf-gcc in compile
Date: Thu, 18 Jan 2018 18:32:00 -0000	[thread overview]
Message-ID: <c42c3c67-4076-fe46-c739-1cd0d1c37246@redhat.com> (raw)
In-Reply-To: <1516265199-29059-1-git-send-email-yao.qi@linaro.org>

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

  parent reply	other threads:[~2018-01-18 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18  8:46 Yao Qi
2018-01-18 15:35 ` Simon Marchi
2018-01-18 18:32 ` Pedro Alves [this message]
2018-01-19  9:12   ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c42c3c67-4076-fe46-c739-1cd0d1c37246@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).