Bug 21070 - GDB fails to build for mips-*-linux-musl
Summary: GDB fails to build for mips-*-linux-musl
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-20 04:55 UTC by Alexey Neyman
Modified: 2018-04-19 15:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
PATCH (551 bytes, patch)
2017-01-20 04:55 UTC, Alexey Neyman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Neyman 2017-01-20 04:55:22 UTC
Created attachment 9766 [details]
PATCH

Quote from the original patch description:

[[[[
Build fix for MIPS with musl libc

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.

Upstream-Status: Pending

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
]]]]

Despite the "Upstream-Status" line, I wasn't able to find this issue in the GDB's bugzilla - so submitting it.

This has been reported as an issue in crosstool-ng:
https://github.com/crosstool-ng/crosstool-ng/pull/517

The patch was originally provided for OpenEmbedded:
http://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
Comment 1 Tom Tromey 2018-04-19 15:21:34 UTC
Hi.  Thanks for the patch.

The gdb project doesn't generally review patches in bugzilla.
Instead please follow the contribution guidelines:

https://sourceware.org/gdb/wiki/ContributionChecklist
Comment 2 Alexey Neyman 2018-04-19 15:46:29 UTC
I did awhile ago, the patch was discussed and rejected: GDB developers point a finger at musl, and musl blames gdb:

GDB developer's response:
https://sourceware.org/ml/gdb-patches/2017-01/msg00668.html

MUSL developer's response:
http://www.openwall.com/lists/musl/2017/01/26/2

Would be nice if GDB and MUSL guys could talk directly without me serving as a middle man.