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] PR gdb/21070: Build fix for MIPS with musl libc


On Mon, 23 Jan 2017, Simon Marchi wrote:

> > This issue has been reported in crosstool-ng; the patch is from
> > OpenEmbedded. Quoting the description from the patch:
> > 
> > [[[[
> > The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
> > but not by musl. Regardless of the libc, the kernel headers provide
> > <asm/sgidefs.h> which provides the same definitions, so use that
> > instead.
> > ]]]]

 It's a bug in musl then, the header is a part of the MIPS/Linux user API.  
OTOH <asm/sgidefs.h> is an internal kernel header and shouldn't really be 
used by user software.

> I wonder what is the history about why the glibc version undoes everything the
> kernel version defines.  Today they seem very similar.

 See: <https://www.sourceware.org/ml/libc-alpha/2004-11/msg00034.html> and
the thread that follows for a lengthy discussion.

>  However, tthere are
> some defines in the glibc on that are not in the kernel one.  In particular,
> _ABIO32 is not defined by the kernel but is used by GDB:
> 
> mips-linux-nat.c
> 456:  if (_MIPS_SIM == _ABIO32)
> 
> Does it cause a problem?

 Both _MIPS_SIM and _ABIO32 (if relevant) are defined by GCC, though the 
API is awkward.

  Maciej


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