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

Yao Qi qiyaoltc@gmail.com
Thu Jan 18 08:46:00 GMT 2018


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 },
-- 
1.9.1



More information about the Gdb-patches mailing list