Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+qPFcKAn1DmV6S9GEFi0LpBxBXqLjAUevaXvhQ6ZC7mPmPb-Q@mail.gmail.com>
Date: Sat, 3 Jun 2017 18:50:59 -0400
From: mzpqnxow <musl@...qnxow.com>
To: musl@...ts.openwall.com
Cc: Rich Felker <dalias@...c.org>
Subject: Re: Issues building gdbserver with musl

FWIW, the following is the patch I came up with for PPC- it was very, very
short:

diff -Naur gdb-7.12/gdb/gdbserver/linux-ppc-low.c
gdb-7.12-ppc-patched/gdb/gdbserver/linux-ppc-low.c
--- gdb-7.12/gdb/gdbserver/linux-ppc-low.c 2016-08-01 11:50:20.000000000
-0400
+++ gdb-7.12-ppc-patched/gdb/gdbserver/linux-ppc-low.c 2017-05-15
13:40:22.073884258 -0400
@@ -21,7 +21,9 @@
 #include "linux-low.h"

 #include <elf.h>
+#define __ASSEMBLY__
 #include <asm/ptrace.h>
+#undef __ASSEMBLY__

 #include "nat/ppc-linux.h"
 #include "linux-ppc-tdesc.h"


On Sat, Jun 3, 2017 at 10:34 AM, Khem Raj <raj.khem@...il.com> wrote:

> Hi Thomas
>
>
>
> On Sat, Jun 3, 2017 at 7:14 AM, Thomas Petazzoni
> <thomas.petazzoni@...e-electrons.com> wrote:
> > Hello,
> >
> > We are building a number of toolchains, some of them using the musl C
> > library, and are seeing that gdbserver fails to build with musl on a
> > number of architectures. We have used musl 1.1.16, i.e the latest
> > version.
> >
> > Here are the failures that we see:
> >
> >  - On SuperH:
> >
> >    usr/sh4-buildroot-linux-musl/sysroot/usr/include/asm/ptrace_32.h:44:8:
> error: redefinition of 'struct pt_regs'
> >
> >  - On PowerPC64 and PowerPC64le:
> >
> >    usr/powerpc64-buildroot-linux-musl/sysroot/usr/include/asm/ptrace.h:31:8:
> error: redefinition of 'struct pt_regs'
> >    usr/powerpc64le-buildroot-linux-musl/sysroot/usr/include/asm/ptrace.h:31:8:
> error: redefinition of 'struct pt_regs'
> >
> >  - On PowerPC:
> >
> >    usr/powerpc-buildroot-linux-musl/sysroot/usr/include/asm/ptrace.h:31:8:
> error: redefinition of 'struct pt_regs'
>
>
> for ppe issues you can use something like
> http://git.yoctoproject.org/clean/cgit.cgi/poky/tree/meta/
> recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-
> uapi_pt_regs-on-GLIBC-syst.patch
>
> >
> >  - On Microblaze, little endian and big endian
> >
> >    usr/microblaze-buildroot-linux-musl/sysroot/usr/include/sys/procfs.h:30:2:
> error: unknown type name 'elf_gregset_t'
> >    error: 'Elf64_auxv_t' undeclared (first use in this function)
> >    error: 'Elf32_auxv_t' undeclared (first use in this function)
> >    ...
> >
> > On all those architectures, gdbserver builds fine with other C libraries.
> >
> > I had a brief look at the commits in musl since 1.1.16 and couldn't
> > spot anything that looked related.
> >
> > Are you interested in fixing those issues? If needed, I can provide an
> > easy way of reproducing those build failures.
> >
> > Thanks!
> >
> > Thomas
> > --
> > Thomas Petazzoni, CTO, Free Electrons
> > Embedded Linux and Kernel engineering
> > http://free-electrons.com
>

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.