debug/gdb: fix from upstream with newer glibc(siginfo vs siginfo_t, Gentoo gdb-7.4.1 patch)
This is for when you failed to build gdb-native with the error:
gdb-7.4.1/gdb/linux-nat.h:79:18: error: field 'siginfo' has incomplete type"
This is from mirror://gentoo/distfiles/gdb-7.4.1-patches-2.tar.xz
Signed-off-by: "Jang, Bongseo" <graycells@gmail.com>
[yann.morin.1998@free.fr: refresh ptrace_setsiginfo patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-ID: <4eef2edec3201c50b420.1348370891@localhost.localdomain>
PatchWork-ID: 186179
1 diff -durN gcc-4.4.5.orig/gcc/config/freebsd-spec.h gcc-4.4.5/gcc/config/freebsd-spec.h
2 --- gcc-4.4.5.orig/gcc/config/freebsd-spec.h 2010-10-09 23:09:53.000000000 +0200
3 +++ gcc-4.4.5/gcc/config/freebsd-spec.h 2010-10-09 23:10:02.000000000 +0200
5 #define FBSD_STARTFILE_SPEC \
7 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
8 - %{!p:%{profile:gcrt1.o%s} \
9 - %{!profile:crt1.o%s}}}} \
10 - crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
11 + %{!p:%{profile:gcrt1.o%s} \
12 + %{!profile:crt1.o%s}}}} \
14 + %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
16 /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
17 the magical crtend.o file (see crtstuff.c) which provides part of
23 +#include <sys/param.h>
24 +#if __FreeBSD_version < 500016
25 #define FBSD_LIB_SPEC " \
33 +#elif __FreeBSD_version < 700022
34 #define FBSD_LIB_SPEC " \
36 %{!pg: %{pthread:-lpthread} -lc} \
37 %{pg: %{pthread:-lpthread_p} -lc_p} \
40 +#define FBSD_LIB_SPEC " \
42 + %{!pg: %{pthread:-lpthread} -lc} \
43 + %{pg: %{pthread:-lpthread_p} -lc_p}} \
45 + %{pthread:-lpthread} -lc} \
52 #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
54 #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
57 +#if defined(HAVE_LD_EH_FRAME_HDR)
58 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
61 +/* Use --as-needed -lgcc_s for eh support. */
62 +#ifdef HAVE_LD_AS_NEEDED
63 +#define USE_LD_AS_NEEDED 1