This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Find arm-linux-gnueabihf-gcc in compile
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 18 Jan 2018 18:32:05 +0000
- Subject: Re: [PATCH] Find arm-linux-gnueabihf-gcc in compile
- Authentication-results: sourceware.org; auth=none
- References: <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