patches/gcc/4.3.6/130-cross-compile.patch
author Jang, Bongseo <graycells@gmail.com>
Sun Sep 23 11:53:02 2012 +0900 (2012-09-23)
changeset 3059 1e5fe55974bc
parent 2124 5dd0b83ae528
permissions -rw-r--r--
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
thomas@1461
     1
Original patch from: ../4.3.2/130-cross-compile.patch
thomas@1461
     2
thomas@1461
     3
-= BEGIN original header =-
thomas@1461
     4
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/08_all_gcc-4.1-cross-compile.patch
thomas@1461
     5
Some notes on the 'bootstrap with or without libc headers' debate:
thomas@1461
     6
http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html
thomas@1461
     7
http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html
thomas@1461
     8
thomas@1461
     9
-= END original header =-
thomas@1461
    10
thomas@1461
    11
diff -durN gcc-4.3.3.orig/gcc/configure gcc-4.3.3/gcc/configure
thomas@1461
    12
--- gcc-4.3.3.orig/gcc/configure	2008-08-01 11:51:03.000000000 +0200
thomas@1461
    13
+++ gcc-4.3.3/gcc/configure	2009-01-27 22:19:16.000000000 +0100
thomas@1461
    14
@@ -13442,7 +13442,7 @@
thomas@1461
    15
 	    | powerpc*-*-*,powerpc64*-*-*)
thomas@1461
    16
 		CROSS="$CROSS -DNATIVE_CROSS" ;;
thomas@1461
    17
 	esac
thomas@1461
    18
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
thomas@1461
    19
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
thomas@1461
    20
         SYSTEM_HEADER_DIR=$build_system_header_dir
thomas@1461
    21
 fi
thomas@1461
    22
 
thomas@1461
    23
diff -durN gcc-4.3.3.orig/gcc/configure.ac gcc-4.3.3/gcc/configure.ac
thomas@1461
    24
--- gcc-4.3.3.orig/gcc/configure.ac	2008-08-01 11:51:03.000000000 +0200
thomas@1461
    25
+++ gcc-4.3.3/gcc/configure.ac	2009-01-27 22:19:16.000000000 +0100
thomas@1461
    26
@@ -1749,7 +1749,7 @@
thomas@1461
    27
 	    | powerpc*-*-*,powerpc64*-*-*)
thomas@1461
    28
 		CROSS="$CROSS -DNATIVE_CROSS" ;;
thomas@1461
    29
 	esac
thomas@1461
    30
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
thomas@1461
    31
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
thomas@1461
    32
         SYSTEM_HEADER_DIR=$build_system_header_dir 
thomas@1461
    33
 fi
thomas@1461
    34
 
thomas@1461
    35
diff -durN gcc-4.3.3.orig/gcc/unwind-dw2.c gcc-4.3.3/gcc/unwind-dw2.c
thomas@1461
    36
--- gcc-4.3.3.orig/gcc/unwind-dw2.c	2008-09-25 00:44:28.000000000 +0200
thomas@1461
    37
+++ gcc-4.3.3/gcc/unwind-dw2.c	2009-01-27 22:19:16.000000000 +0100
thomas@1461
    38
@@ -334,9 +334,11 @@
thomas@1461
    39
 }
thomas@1461
    40
 #endif
thomas@1461
    41
 
thomas@1461
    42
+#ifndef inhibit_libc
thomas@1461
    43
 #ifdef MD_UNWIND_SUPPORT
thomas@1461
    44
 #include MD_UNWIND_SUPPORT
thomas@1461
    45
 #endif
thomas@1461
    46
+#endif
thomas@1461
    47
 
thomas@1461
    48
 /* Extract any interesting information from the CIE for the translation
thomas@1461
    49
    unit F belongs to.  Return a pointer to the byte after the augmentation,