patches/uClibc/20080801/100-ifaddrs.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Aug 07 14:05:47 2008 +0000 (2008-08-07)
changeset 766 717efd8b78b4
permissions -rw-r--r--
Update all samples to the latest set of options.
Update some samples to use newer features.
Add patches for the uClibc-20080801 snapshot to be able to build with gcc-4.3.
Add a patch against glibc-2.7 to allow building PPC with latest kernel headers.
Add a patch to gcc to use an alternate unwinding when built against uClibc (after a private explanation/request by Daniel Egger <daniel@eggers-club.de>)

/trunk/patches/glibc/2.7/230-powerpc-private_futex.patch | 15 15 0 0 +
/trunk/patches/uClibc/20080801/300-fix-asm.patch | 175 175 0 0 +++++++++
/trunk/patches/uClibc/20080801/100-ifaddrs.patch | 190 190 0 0 +++++++++
/trunk/patches/uClibc/20080801/200-mips-typeof.patch | 112 112 0 0 ++++++
/trunk/patches/gcc/4.3.1/330-unwind-for-uClibc.patch | 25 25 0 0 +
/trunk/samples/x86_64-unknown-linux-gnu/crosstool.config | 17 10 7 0 +
/trunk/samples/armeb-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/arm-unknown-linux-gnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/ia64-unknown-linux-gnu/crosstool.config | 14 11 3 0 +
/trunk/samples/x86_64-unknown-linux-uclibc/uClibc-20080801.config | 232 232 0 0 ++++++++++++
/trunk/samples/x86_64-unknown-linux-uclibc/crosstool.config | 34 21 13 0 +-
/trunk/samples/i686-nptl-linux-gnu/crosstool.config | 10 7 3 0 +
/trunk/samples/powerpc-unknown-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/mips-unknown-linux-uclibc/uClibc-20080801.config | 249 249 0 0 ++++++++++++
/trunk/samples/mips-unknown-linux-uclibc/crosstool.config | 38 23 15 0 +-
/trunk/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 10 4 0 +
/trunk/samples/armeb-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/arm-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/i586-geode-linux-uclibc/uClibc-20080801.config | 261 261 0 0 +++++++++++++
/trunk/samples/i586-geode-linux-uclibc/crosstool.config | 32 20 12 0 ++
/trunk/samples/powerpc-unknown-linux-uclibc/crosstool.config | 12 9 3 0 +
/trunk/samples/mipsel-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/alphaev56-unknown-linux-gnu/crosstool.config | 16 10 6 0 +
25 files changed, 1428 insertions(+), 84 deletions(-)
     1 Copyright 2008 Yann E. MORIN.
     2 
     3 This patch is needed to make gcc-4.3.1 able to build the Java frontend.
     4 
     5 Index: uClibc/libc/inet/ifaddrs.c
     6 ===================================================================
     7 --- uClibc/libc/inet/ifaddrs.c	(revision 23002)
     8 +++ uClibc/libc/inet/ifaddrs.c	(working copy)
     9 @@ -22,7 +22,7 @@
    10  #include <alloca.h>
    11  #include <assert.h>
    12  #include <errno.h>
    13 -#include "ifaddrs.h"
    14 +#include <ifaddrs.h>
    15  #include <net/if.h>
    16  #include <netinet/in.h>
    17  #include <netpacket/packet.h>
    18 Index: uClibc/libc/inet/ifaddrs.h
    19 ===================================================================
    20 --- uClibc/libc/inet/ifaddrs.h	(revision 23002)
    21 +++ uClibc/libc/inet/ifaddrs.h	(working copy)
    22 @@ -1,76 +0,0 @@
    23 -/* ifaddrs.h -- declarations for getting network interface addresses
    24 -   Copyright (C) 2002 Free Software Foundation, Inc.
    25 -   This file is part of the GNU C Library.
    26 -
    27 -   The GNU C Library is free software; you can redistribute it and/or
    28 -   modify it under the terms of the GNU Lesser General Public
    29 -   License as published by the Free Software Foundation; either
    30 -   version 2.1 of the License, or (at your option) any later version.
    31 -
    32 -   The GNU C Library is distributed in the hope that it will be useful,
    33 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
    34 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    35 -   Lesser General Public License for more details.
    36 -
    37 -   You should have received a copy of the GNU Lesser General Public
    38 -   License along with the GNU C Library; if not, write to the Free
    39 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    40 -   02111-1307 USA.  */
    41 -
    42 -#ifndef _IFADDRS_H
    43 -#define _IFADDRS_H	1
    44 -
    45 -#include <features.h>
    46 -#include <sys/socket.h>
    47 -#include <stdbool.h>
    48 -#include <stdint.h>
    49 -
    50 -__BEGIN_DECLS
    51 -
    52 -/* The `getifaddrs' function generates a linked list of these structures.
    53 -   Each element of the list describes one network interface.  */
    54 -struct ifaddrs
    55 -{
    56 -  struct ifaddrs *ifa_next;	/* Pointer to the next structure.  */
    57 -
    58 -  char *ifa_name;		/* Name of this network interface.  */
    59 -  unsigned int ifa_flags;	/* Flags as from SIOCGIFFLAGS ioctl.  */
    60 -
    61 -  struct sockaddr *ifa_addr;	/* Network address of this interface.  */
    62 -  struct sockaddr *ifa_netmask; /* Netmask of this interface.  */
    63 -  union
    64 -  {
    65 -    /* At most one of the following two is valid.  If the IFF_BROADCAST
    66 -       bit is set in `ifa_flags', then `ifa_broadaddr' is valid.  If the
    67 -       IFF_POINTOPOINT bit is set, then `ifa_dstaddr' is valid.
    68 -       It is never the case that both these bits are set at once.  */
    69 -    struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */
    70 -    struct sockaddr *ifu_dstaddr; /* Point-to-point destination address.  */
    71 -  } ifa_ifu;
    72 -  /* These very same macros are defined by <net/if.h> for `struct ifaddr'.
    73 -     So if they are defined already, the existing definitions will be fine.  */
    74 -# ifndef ifa_broadaddr
    75 -#  define ifa_broadaddr	ifa_ifu.ifu_broadaddr
    76 -# endif
    77 -# ifndef ifa_dstaddr
    78 -#  define ifa_dstaddr	ifa_ifu.ifu_dstaddr
    79 -# endif
    80 -
    81 -  void *ifa_data;		/* Address-specific data (may be unused).  */
    82 -};
    83 -
    84 -
    85 -/* Create a linked list of `struct ifaddrs' structures, one for each
    86 -   network interface on the host machine.  If successful, store the
    87 -   list in *IFAP and return 0.  On errors, return -1 and set `errno'.
    88 -
    89 -   The storage returned in *IFAP is allocated dynamically and can
    90 -   only be properly freed by passing it to `freeifaddrs'.  */
    91 -extern int getifaddrs (struct ifaddrs **__ifap) __THROW;
    92 -
    93 -/* Reclaim the storage allocated by a previous `getifaddrs' call.  */
    94 -extern void freeifaddrs (struct ifaddrs *__ifa)  __THROW;
    95 -
    96 -__END_DECLS
    97 -
    98 -#endif /* ifaddrs.h */
    99 Index: uClibc/libc/inet/getaddrinfo.c
   100 ===================================================================
   101 --- uClibc/libc/inet/getaddrinfo.c	(revision 23002)
   102 +++ uClibc/libc/inet/getaddrinfo.c	(working copy)
   103 @@ -68,7 +68,7 @@
   104  #include <sys/un.h>
   105  #include <sys/utsname.h>
   106  #include <net/if.h>
   107 -#include "ifaddrs.h"
   108 +#include <ifaddrs.h>
   109  
   110  /* Experimentally off - libc_hidden_proto(memcpy) */
   111  /* Experimentally off - libc_hidden_proto(memset) */
   112 --- /dev/null	2008-08-04 09:44:45.624322752 +0200
   113 +++ uClibc/include/ifaddrs.h	2008-08-05 09:31:20.000000000 +0200
   114 @@ -0,0 +1,76 @@
   115 +/* ifaddrs.h -- declarations for getting network interface addresses
   116 +   Copyright (C) 2002 Free Software Foundation, Inc.
   117 +   This file is part of the GNU C Library.
   118 +
   119 +   The GNU C Library is free software; you can redistribute it and/or
   120 +   modify it under the terms of the GNU Lesser General Public
   121 +   License as published by the Free Software Foundation; either
   122 +   version 2.1 of the License, or (at your option) any later version.
   123 +
   124 +   The GNU C Library is distributed in the hope that it will be useful,
   125 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
   126 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   127 +   Lesser General Public License for more details.
   128 +
   129 +   You should have received a copy of the GNU Lesser General Public
   130 +   License along with the GNU C Library; if not, write to the Free
   131 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   132 +   02111-1307 USA.  */
   133 +
   134 +#ifndef _IFADDRS_H
   135 +#define _IFADDRS_H	1
   136 +
   137 +#include <features.h>
   138 +#include <sys/socket.h>
   139 +#include <stdbool.h>
   140 +#include <stdint.h>
   141 +
   142 +__BEGIN_DECLS
   143 +
   144 +/* The `getifaddrs' function generates a linked list of these structures.
   145 +   Each element of the list describes one network interface.  */
   146 +struct ifaddrs
   147 +{
   148 +  struct ifaddrs *ifa_next;	/* Pointer to the next structure.  */
   149 +
   150 +  char *ifa_name;		/* Name of this network interface.  */
   151 +  unsigned int ifa_flags;	/* Flags as from SIOCGIFFLAGS ioctl.  */
   152 +
   153 +  struct sockaddr *ifa_addr;	/* Network address of this interface.  */
   154 +  struct sockaddr *ifa_netmask; /* Netmask of this interface.  */
   155 +  union
   156 +  {
   157 +    /* At most one of the following two is valid.  If the IFF_BROADCAST
   158 +       bit is set in `ifa_flags', then `ifa_broadaddr' is valid.  If the
   159 +       IFF_POINTOPOINT bit is set, then `ifa_dstaddr' is valid.
   160 +       It is never the case that both these bits are set at once.  */
   161 +    struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */
   162 +    struct sockaddr *ifu_dstaddr; /* Point-to-point destination address.  */
   163 +  } ifa_ifu;
   164 +  /* These very same macros are defined by <net/if.h> for `struct ifaddr'.
   165 +     So if they are defined already, the existing definitions will be fine.  */
   166 +# ifndef ifa_broadaddr
   167 +#  define ifa_broadaddr	ifa_ifu.ifu_broadaddr
   168 +# endif
   169 +# ifndef ifa_dstaddr
   170 +#  define ifa_dstaddr	ifa_ifu.ifu_dstaddr
   171 +# endif
   172 +
   173 +  void *ifa_data;		/* Address-specific data (may be unused).  */
   174 +};
   175 +
   176 +
   177 +/* Create a linked list of `struct ifaddrs' structures, one for each
   178 +   network interface on the host machine.  If successful, store the
   179 +   list in *IFAP and return 0.  On errors, return -1 and set `errno'.
   180 +
   181 +   The storage returned in *IFAP is allocated dynamically and can
   182 +   only be properly freed by passing it to `freeifaddrs'.  */
   183 +extern int getifaddrs (struct ifaddrs **__ifap) __THROW;
   184 +
   185 +/* Reclaim the storage allocated by a previous `getifaddrs' call.  */
   186 +extern void freeifaddrs (struct ifaddrs *__ifa)  __THROW;
   187 +
   188 +__END_DECLS
   189 +
   190 +#endif /* ifaddrs.h */