This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Find arm-linux-gnueabihf-gcc in compile


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]