Merge.
1.1 --- a/configure Sat Jan 16 17:52:44 2010 +0100
1.2 +++ b/configure Sun Jan 17 23:19:53 2010 +0100
1.3 @@ -257,6 +257,9 @@
1.4 --with-*) set_tool "$1" "$2" && shift || shift 2;;
1.5 --force) FORCE=1; shift;;
1.6 --help|-h) do_help; exit 0;;
1.7 + # Skip, auto-stuff compatibility
1.8 + --build=*|--host=*|--infodir=*|--datadir=*|--sysconfdir=*|--localstatedir=*) shift;;
1.9 + --build|--host|--infodir|--datadir|--sysconfdir|--localstatedir) shift 2;;
1.10 *) printf "Unrecognised option: '${1}'\n"; do_help; exit 1;;
1.11 esac
1.12 done
1.13 @@ -380,11 +383,10 @@
1.14
1.15 # If this version is n hg clone, try to get the revision number
1.16 # If we can't get the revision number, use date
1.17 +printf "Computing version string... "
1.18 case "${VERSION}" in
1.19 *+hg|hg)
1.20 - has_or_abort prog=hg
1.21 - printf "Computing version string... "
1.22 - REVISION="$( hg id -n 2>/dev/null )"
1.23 + REVISION="$( hg id -n 2>/dev/null || true )"
1.24 case "${REVISION}" in
1.25 "")
1.26 VERSION="${VERSION}_unknown@$( date +%Y%m%d.%H%M%S )";;
1.27 @@ -397,7 +399,7 @@
1.28 VERSION="$( printf "${VERSION}\n" |"${sed}" -r -e 's|/+|_|g;' )"
1.29 ;;
1.30 esac
1.31 -echo "${VERSION}"
1.32 +printf "${VERSION}\n"
1.33
1.34 #---------------------------------------------------------------------
1.35 # Compute and check install paths
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/uClibc/0.9.30.2/100-fix-gethostent_r-failure-retval.patch Sun Jan 17 23:19:53 2010 +0100
2.3 @@ -0,0 +1,17 @@
2.4 +Original patch from Gentoo.
2.5 +
2.6 +-= BEGIN original header =-
2.7 +-= END original header =-
2.8 +
2.9 +diff -durN uClibc-0.9.30.orig/libc/inet/resolv.c uClibc-0.9.30/libc/inet/resolv.c
2.10 +--- uClibc-0.9.30.orig/libc/inet/resolv.c 2008-11-02 01:25:33.000000000 +0100
2.11 ++++ uClibc-0.9.30/libc/inet/resolv.c 2009-02-07 09:57:59.000000000 +0100
2.12 +@@ -1788,7 +1788,7 @@
2.13 + int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen,
2.14 + struct hostent **result, int *h_errnop)
2.15 + {
2.16 +- int ret;
2.17 ++ int ret = HOST_NOT_FOUND;
2.18 +
2.19 + __UCLIBC_MUTEX_LOCK(mylock);
2.20 + if (__gethostent_fp == NULL) {
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/uClibc/0.9.30.2/110-arm_fix_alignment.patch Sun Jan 17 23:19:53 2010 +0100
3.3 @@ -0,0 +1,25 @@
3.4 +Original patch from Gentoo.
3.5 +
3.6 +-= BEGIN original header =-
3.7 +ARMV5 can use STRD and LDRD access instructions but these accesses need to be
3.8 +8 byte aligned. The dynamic linker's malloc needs to match this so structures
3.9 +become 8 byte aligned to void unaligned accesses.
3.10 +
3.11 +RP - 14/02/2008
3.12 +
3.13 +-= END original header =-
3.14 +
3.15 +Modified slightly for uClibc-0.9.30.2 by Joachim Nilsson <jocke@vmlinux.org>
3.16 +
3.17 +diff -durN uClibc-0.9.30.orig/ldso/ldso/arm/dl-sysdep.h uClibc-0.9.30/ldso/ldso/arm/dl-sysdep.h
3.18 +--- uClibc-0.9.30.orig/ldso/ldso/arm/dl-sysdep.h 2008-09-25 10:35:20.000000000 +0200
3.19 ++++ uClibc-0.9.30/ldso/ldso/arm/dl-sysdep.h 2009-02-07 09:57:59.000000000 +0100
3.20 +@@ -15,6 +15,8 @@
3.21 + GOT_BASE[1] = (unsigned long) MODULE; \
3.22 + }
3.23 +
3.24 ++#define DL_MALLOC_ALIGN 8 /* EABI needs 8 byte alignment for STRD LDRD*/
3.25 ++
3.26 + static __always_inline unsigned long arm_modulus(unsigned long m, unsigned long p)
3.27 + {
3.28 + unsigned long i,t,inc;
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/uClibc/0.9.30.2/120-rm-whitespace.patch Sun Jan 17 23:19:53 2010 +0100
4.3 @@ -0,0 +1,88 @@
4.4 +Original patch from Gentoo.
4.5 +
4.6 +-= BEGIN original header =-
4.7 +-= END original header =-
4.8 +
4.9 +diff -durN uClibc-0.9.30.orig/include/assert.h uClibc-0.9.30/include/assert.h
4.10 +--- uClibc-0.9.30.orig/include/assert.h 2008-07-23 13:23:36.000000000 +0200
4.11 ++++ uClibc-0.9.30/include/assert.h 2009-02-07 09:57:59.000000000 +0100
4.12 +@@ -31,7 +31,7 @@
4.13 + #define _ASSERT_H 1
4.14 + #include <features.h>
4.15 +
4.16 +-#if defined __cplusplus && __GNUC_PREREQ (2,95)
4.17 ++#if defined __cplusplus && __GNUC_PREREQ(2,95)
4.18 + # define __ASSERT_VOID_CAST static_cast<void>
4.19 + #else
4.20 + # define __ASSERT_VOID_CAST (void)
4.21 +@@ -60,12 +60,15 @@
4.22 + (__assert (__STRING(expr), __FILE__, __LINE__, \
4.23 + __ASSERT_FUNCTION), 0)))
4.24 +
4.25 ++/* Define some temporaries to workaround tinyx makedepend bug */
4.26 ++#define __GNUC_PREREQ_2_6 __GNUC_PREREQ(2, 6)
4.27 ++#define __GNUC_PREREQ_2_4 __GNUC_PREREQ(2, 4)
4.28 + /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
4.29 + which contains the name of the function currently being defined.
4.30 + This is broken in G++ before version 2.6.
4.31 + C9x has a similar variable called __func__, but prefer the GCC one since
4.32 + it demangles C++ function names. */
4.33 +-# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
4.34 ++# if defined __cplusplus ? __GNUC_PREREQ_2_6 : __GNUC_PREREQ_2_4
4.35 + # define __ASSERT_FUNCTION __PRETTY_FUNCTION__
4.36 + # else
4.37 + # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
4.38 +diff -durN uClibc-0.9.30.orig/include/complex.h uClibc-0.9.30/include/complex.h
4.39 +--- uClibc-0.9.30.orig/include/complex.h 2008-10-03 16:24:28.000000000 +0200
4.40 ++++ uClibc-0.9.30/include/complex.h 2009-02-07 09:57:59.000000000 +0100
4.41 +@@ -33,7 +33,7 @@
4.42 + /* We might need to add support for more compilers here. But since ISO
4.43 + C99 is out hopefully all maintained compilers will soon provide the data
4.44 + types `float complex' and `double complex'. */
4.45 +-#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
4.46 ++#if __GNUC_PREREQ(2, 7) && !__GNUC_PREREQ(2, 97)
4.47 + # define _Complex __complex__
4.48 + #endif
4.49 +
4.50 +diff -durN uClibc-0.9.30.orig/include/features.h uClibc-0.9.30/include/features.h
4.51 +--- uClibc-0.9.30.orig/include/features.h 2008-09-06 18:45:07.000000000 +0200
4.52 ++++ uClibc-0.9.30/include/features.h 2009-02-07 09:57:59.000000000 +0100
4.53 +@@ -143,7 +143,7 @@
4.54 +
4.55 + /* Convenience macros to test the versions of glibc and gcc.
4.56 + Use them like this:
4.57 +- #if __GNUC_PREREQ (2,8)
4.58 ++ #if __GNUC_PREREQ(2,8)
4.59 + ... code requiring gcc 2.8 or later ...
4.60 + #endif
4.61 + Note - they won't work for gcc1 or glibc1, since the _MINOR macros
4.62 +@@ -297,7 +297,7 @@
4.63 + /* uClibc does not support _FORTIFY_SOURCE */
4.64 + #undef _FORTIFY_SOURCE
4.65 + #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
4.66 +- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
4.67 ++ && __GNUC_PREREQ(4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
4.68 + # if _FORTIFY_SOURCE > 1
4.69 + # define __USE_FORTIFY_LEVEL 2
4.70 + # else
4.71 +@@ -366,7 +366,7 @@
4.72 + * uclibc itself is usually built without __USE_EXTERN_INLINES,
4.73 + * remove "&& !defined __OPTIMIZE_SIZE__" part to do otherwise.
4.74 + */
4.75 +-#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
4.76 ++#if __GNUC_PREREQ(2, 7) && defined __OPTIMIZE__ \
4.77 + && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
4.78 + && (defined __extern_inline || defined __GNUC_GNU_INLINE__)
4.79 + # define __USE_EXTERN_INLINES 1
4.80 +diff -durN uClibc-0.9.30.orig/include/tgmath.h uClibc-0.9.30/include/tgmath.h
4.81 +--- uClibc-0.9.30.orig/include/tgmath.h 2008-10-03 16:24:28.000000000 +0200
4.82 ++++ uClibc-0.9.30/include/tgmath.h 2009-02-07 09:57:59.000000000 +0100
4.83 +@@ -34,7 +34,7 @@
4.84 + do not try this for now and instead concentrate only on GNU CC. Once
4.85 + we have more information support for other compilers might follow. */
4.86 +
4.87 +-#if __GNUC_PREREQ (2, 7)
4.88 ++#if __GNUC_PREREQ(2, 7)
4.89 +
4.90 + # ifdef __NO_LONG_DOUBLE_MATH
4.91 + # define __tgml(fct) fct
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/uClibc/0.9.30.2/130-gnu89-inline.patch Sun Jan 17 23:19:53 2010 +0100
5.3 @@ -0,0 +1,16 @@
5.4 +Original patch from Gentoo.
5.5 +
5.6 +-= BEGIN original header =-
5.7 +-= END original header =-
5.8 +
5.9 +diff -durN uClibc-0.9.30.orig/Rules.mak uClibc-0.9.30/Rules.mak
5.10 +--- uClibc-0.9.30.orig/Rules.mak 2008-11-12 13:24:16.000000000 +0100
5.11 ++++ uClibc-0.9.30/Rules.mak 2009-02-07 09:57:59.000000000 +0100
5.12 +@@ -519,6 +519,7 @@
5.13 + endif
5.14 +
5.15 + CFLAGS += $(call check_gcc,-std=gnu99,)
5.16 ++CFLAGS += $(call check_gcc,-fgnu89-inline,)
5.17 +
5.18 + LDFLAGS_NOSTRIP:=$(CPU_LDFLAGS-y) -shared \
5.19 + -Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/patches/uClibc/0.9.30.2/140-pack-netinet-structs.patch Sun Jan 17 23:19:53 2010 +0100
6.3 @@ -0,0 +1,224 @@
6.4 +diff -urN uClibc-0.9.30.1.orig/include/netinet/igmp.h uClibc-0.9.30.1/include/netinet/igmp.h
6.5 +--- uClibc-0.9.30.1.orig/include/netinet/igmp.h 2009-04-08 09:00:10.926545132 +0200
6.6 ++++ uClibc-0.9.30.1/include/netinet/igmp.h 2009-04-08 09:00:26.242514273 +0200
6.7 +@@ -69,7 +69,7 @@
6.8 + u_int8_t igmp_code; /* routing code */
6.9 + u_int16_t igmp_cksum; /* checksum */
6.10 + struct in_addr igmp_group; /* group address */
6.11 +-};
6.12 ++} __attribute__ ((__packed__));
6.13 +
6.14 + #define IGMP_MINLEN 8
6.15 +
6.16 +diff -urN uClibc-0.9.30.1.orig/include/netinet/in.h uClibc-0.9.30.1/include/netinet/in.h
6.17 +--- uClibc-0.9.30.1.orig/include/netinet/in.h 2009-04-08 09:00:10.926545132 +0200
6.18 ++++ uClibc-0.9.30.1/include/netinet/in.h 2009-04-08 09:00:26.242514273 +0200
6.19 +@@ -202,7 +202,7 @@
6.20 + #define s6_addr in6_u.u6_addr8
6.21 + #define s6_addr16 in6_u.u6_addr16
6.22 + #define s6_addr32 in6_u.u6_addr32
6.23 +- };
6.24 ++ } __attribute__ ((__packed__));
6.25 +
6.26 + extern const struct in6_addr in6addr_any; /* :: */
6.27 + extern const struct in6_addr in6addr_loopback; /* ::1 */
6.28 +@@ -229,7 +229,7 @@
6.29 + __SOCKADDR_COMMON_SIZE -
6.30 + sizeof (in_port_t) -
6.31 + sizeof (struct in_addr)];
6.32 +- };
6.33 ++ } __attribute__ ((__packed__));
6.34 + #endif
6.35 +
6.36 + /* Ditto, for IPv6. */
6.37 +@@ -240,7 +240,7 @@
6.38 + uint32_t sin6_flowinfo; /* IPv6 flow information */
6.39 + struct in6_addr sin6_addr; /* IPv6 address */
6.40 + uint32_t sin6_scope_id; /* IPv6 scope-id */
6.41 +- };
6.42 ++ } __attribute__ ((__packed__));
6.43 +
6.44 +
6.45 + /* IPv4 multicast request. */
6.46 +@@ -251,7 +251,7 @@
6.47 +
6.48 + /* Local IP address of interface. */
6.49 + struct in_addr imr_interface;
6.50 +- };
6.51 ++ } __attribute__ ((__packed__));
6.52 +
6.53 + struct ip_mreq_source
6.54 + {
6.55 +@@ -263,7 +263,7 @@
6.56 +
6.57 + /* IP address of interface. */
6.58 + struct in_addr imr_sourceaddr;
6.59 +- };
6.60 ++ } __attribute__ ((__packed__));
6.61 +
6.62 + /* Likewise, for IPv6. */
6.63 + struct ipv6_mreq
6.64 +@@ -273,7 +273,7 @@
6.65 +
6.66 + /* local interface */
6.67 + unsigned int ipv6mr_interface;
6.68 +- };
6.69 ++ } __attribute__ ((__packed__));
6.70 +
6.71 +
6.72 + /* Multicast group request. */
6.73 +@@ -284,7 +284,7 @@
6.74 +
6.75 + /* Group address. */
6.76 + struct sockaddr_storage gr_group;
6.77 +- };
6.78 ++ } __attribute__ ((__packed__));
6.79 +
6.80 + struct group_source_req
6.81 + {
6.82 +@@ -296,7 +296,7 @@
6.83 +
6.84 + /* Source address. */
6.85 + struct sockaddr_storage gsr_source;
6.86 +- };
6.87 ++ } __attribute__ ((__packed__));
6.88 +
6.89 +
6.90 + /* Full-state filter operations. */
6.91 +@@ -315,7 +315,7 @@
6.92 + uint32_t imsf_numsrc;
6.93 + /* Source addresses. */
6.94 + struct in_addr imsf_slist[1];
6.95 +- };
6.96 ++ } __attribute__ ((__packed__));
6.97 +
6.98 + #define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
6.99 + - sizeof (struct in_addr) \
6.100 +@@ -336,7 +336,7 @@
6.101 + uint32_t gf_numsrc;
6.102 + /* Source addresses. */
6.103 + struct sockaddr_storage gf_slist[1];
6.104 +-};
6.105 ++} __attribute__ ((__packed__));
6.106 +
6.107 + #define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
6.108 + - sizeof (struct sockaddr_storage) \
6.109 +@@ -460,14 +460,14 @@
6.110 + {
6.111 + struct in6_addr ipi6_addr; /* src/dst IPv6 address */
6.112 + unsigned int ipi6_ifindex; /* send/recv interface index */
6.113 +- };
6.114 ++ } __attribute__ ((__packed__));
6.115 +
6.116 + /* IPv6 MTU information. */
6.117 + struct ip6_mtuinfo
6.118 + {
6.119 + struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
6.120 + uint32_t ip6m_mtu; /* path MTU in host byte order */
6.121 +- };
6.122 ++ } __attribute__ ((__packed__));
6.123 +
6.124 +
6.125 + #if 0 /*def __USE_GNU*/
6.126 +diff -urN uClibc-0.9.30.1.orig/include/netinet/ip.h uClibc-0.9.30.1/include/netinet/ip.h
6.127 +--- uClibc-0.9.30.1.orig/include/netinet/ip.h 2009-04-08 09:00:10.926545132 +0200
6.128 ++++ uClibc-0.9.30.1/include/netinet/ip.h 2009-04-08 09:00:26.242514273 +0200
6.129 +@@ -63,7 +63,7 @@
6.130 + u_int32_t saddr;
6.131 + u_int32_t daddr;
6.132 + /*The options start here. */
6.133 +- };
6.134 ++ } __attribute__ ((__packed__));
6.135 +
6.136 + #ifdef __USE_BSD
6.137 + /*
6.138 +@@ -127,7 +127,7 @@
6.139 + u_int8_t ip_p; /* protocol */
6.140 + u_short ip_sum; /* checksum */
6.141 + struct in_addr ip_src, ip_dst; /* source and dest address */
6.142 +- };
6.143 ++ } __attribute__ ((__packed__));
6.144 +
6.145 + /*
6.146 + * Time stamp option structure.
6.147 +diff -urN uClibc-0.9.30.1.orig/include/netinet/ip_icmp.h uClibc-0.9.30.1/include/netinet/ip_icmp.h
6.148 +--- uClibc-0.9.30.1.orig/include/netinet/ip_icmp.h 2009-04-08 09:00:10.926545132 +0200
6.149 ++++ uClibc-0.9.30.1/include/netinet/ip_icmp.h 2009-04-08 09:00:26.242514273 +0200
6.150 +@@ -43,7 +43,7 @@
6.151 + u_int16_t mtu;
6.152 + } frag; /* path mtu discovery */
6.153 + } un;
6.154 +-};
6.155 ++} __attribute__ ((__packed__));
6.156 +
6.157 + #define ICMP_ECHOREPLY 0 /* Echo Reply */
6.158 + #define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
6.159 +@@ -199,7 +199,7 @@
6.160 + #define icmp_radv icmp_dun.id_radv
6.161 + #define icmp_mask icmp_dun.id_mask
6.162 + #define icmp_data icmp_dun.id_data
6.163 +-};
6.164 ++} __attribute__ ((__packed__));
6.165 +
6.166 + /*
6.167 + * Lower bounds on packet lengths for various types.
6.168 +diff -urN uClibc-0.9.30.1.orig/include/netinet/tcp.h uClibc-0.9.30.1/include/netinet/tcp.h
6.169 +--- uClibc-0.9.30.1.orig/include/netinet/tcp.h 2009-04-08 09:00:10.926545132 +0200
6.170 ++++ uClibc-0.9.30.1/include/netinet/tcp.h 2009-04-08 09:00:26.242514273 +0200
6.171 +@@ -86,7 +86,7 @@
6.172 + u_int16_t th_win; /* window */
6.173 + u_int16_t th_sum; /* checksum */
6.174 + u_int16_t th_urp; /* urgent pointer */
6.175 +-};
6.176 ++} __attribute__ ((__packed__));
6.177 +
6.178 + # else /* !__FAVOR_BSD */
6.179 + struct tcphdr
6.180 +@@ -121,7 +121,7 @@
6.181 + u_int16_t window;
6.182 + u_int16_t check;
6.183 + u_int16_t urg_ptr;
6.184 +-};
6.185 ++} __attribute__ ((__packed__));
6.186 + # endif /* __FAVOR_BSD */
6.187 +
6.188 + enum
6.189 +@@ -226,7 +226,7 @@
6.190 + u_int32_t tcpi_rcv_space;
6.191 +
6.192 + u_int32_t tcpi_total_retrans;
6.193 +-};
6.194 ++} __attribute__ ((__packed__));
6.195 +
6.196 +
6.197 + /* For TCP_MD5SIG socket option. */
6.198 +@@ -239,7 +239,7 @@
6.199 + u_int16_t tcpm_keylen; /* Key length. */
6.200 + u_int32_t __tcpm_pad2; /* Zero. */
6.201 + u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */
6.202 +-};
6.203 ++} __attribute__ ((__packed__));
6.204 +
6.205 + #endif /* Misc. */
6.206 +
6.207 +diff -urN uClibc-0.9.30.1.orig/include/netinet/udp.h uClibc-0.9.30.1/include/netinet/udp.h
6.208 +--- uClibc-0.9.30.1.orig/include/netinet/udp.h 2009-04-08 09:00:10.926545132 +0200
6.209 ++++ uClibc-0.9.30.1/include/netinet/udp.h 2009-04-08 09:00:26.242514273 +0200
6.210 +@@ -61,7 +61,7 @@
6.211 + u_int16_t uh_dport; /* destination port */
6.212 + u_int16_t uh_ulen; /* udp length */
6.213 + u_int16_t uh_sum; /* udp checksum */
6.214 +-};
6.215 ++} __attribute__ ((__packed__));
6.216 +
6.217 + #else
6.218 +
6.219 +@@ -71,7 +71,7 @@
6.220 + u_int16_t dest;
6.221 + u_int16_t len;
6.222 + u_int16_t check;
6.223 +-};
6.224 ++} __attribute__ ((__packed__));
6.225 + #endif
6.226 +
6.227 + #define SOL_UDP 17 /* sockopt level for UDP */