summaryrefslogtreecommitdiff
path: root/toolchain/eglibc/patches
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-03-23 07:41:39 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-03-23 07:41:39 +0100
commit5266f7d3302b67b349213c8870f8872e2fd1951c (patch)
treec98769e7c0f4aff01be84dbc22db128f269f9635 /toolchain/eglibc/patches
parent5dd0d19f14b28b17f377f84dffd4bc3c10db90c5 (diff)
fix cross-compile on Cygwin hosts.
bug reported by M. Hofmann.
Diffstat (limited to 'toolchain/eglibc/patches')
-rw-r--r--toolchain/eglibc/patches/eglibc-cross.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/toolchain/eglibc/patches/eglibc-cross.patch b/toolchain/eglibc/patches/eglibc-cross.patch
new file mode 100644
index 000000000..e2cc86c2e
--- /dev/null
+++ b/toolchain/eglibc/patches/eglibc-cross.patch
@@ -0,0 +1,92 @@
+diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h eglibc-2.11.1/libc/sunrpc/rpc/types.h
+--- eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h 2010-02-24 08:09:59.000000000 +0100
++++ eglibc-2.11.1/libc/sunrpc/rpc/types.h 2010-03-22 18:30:14.944408497 +0100
+@@ -68,6 +68,7 @@
+ #include <sys/types.h>
+ #endif
+
++#if !defined(_CROSS_RPCGEN_)
+ #ifndef __u_char_defined
+ typedef __u_char u_char;
+ typedef __u_short u_short;
+@@ -83,6 +84,7 @@
+ typedef __caddr_t caddr_t;
+ # define __daddr_t_defined
+ #endif
++#endif
+
+ #include <sys/time.h>
+ #include <sys/param.h>
+diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c eglibc-2.11.1/libc/sunrpc/rpc_clntout.c
+--- eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c 2010-02-24 08:10:01.000000000 +0100
++++ eglibc-2.11.1/libc/sunrpc/rpc_clntout.c 2010-03-22 18:30:38.973160151 +0100
+@@ -31,7 +31,7 @@
+ */
+ #include <stdio.h>
+ #include <string.h>
+-#include <rpc/types.h>
++#include "rpc/types.h"
+ #include "rpc_parse.h"
+ #include "rpc_util.h"
+ #include "proto.h"
+diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c eglibc-2.11.1/libc/sunrpc/rpc_main.c
+--- eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c 2010-02-24 08:10:00.000000000 +0100
++++ eglibc-2.11.1/libc/sunrpc/rpc_main.c 2010-03-22 18:31:31.245661003 +0100
+@@ -37,7 +37,11 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
++#ifdef _CROSS_RPCGEN_
++#define gettext(X) (X)
++#else
+ #include <libintl.h>
++#endif
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c eglibc-2.11.1/libc/sunrpc/rpc_scan.c
+--- eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c 2010-02-24 08:10:00.000000000 +0100
++++ eglibc-2.11.1/libc/sunrpc/rpc_scan.c 2010-03-22 18:31:16.146907097 +0100
+@@ -36,7 +36,11 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
++#ifdef _CROSS_RPCGEN_
++#define gettext(X) (X)
++#else
+ #include <libintl.h>
++#endif
+ #include "rpc_scan.h"
+ #include "rpc_parse.h"
+ #include "rpc_util.h"
+diff -Nur eglibc-2.11.1.orig/libc/timezone/Makefile eglibc-2.11.1/libc/timezone/Makefile
+--- eglibc-2.11.1.orig/libc/timezone/Makefile 2010-02-24 08:09:02.000000000 +0100
++++ eglibc-2.11.1/libc/timezone/Makefile 2010-03-22 18:50:04.134408513 +0100
+@@ -69,10 +69,11 @@
+ $(addprefix $(inst_zonedir)/, \
+ $(posixrules-file)))
+
+-install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
+- $(zonenames:%=posix/%) \
+- $(zonenames:%=right/%)) \
+- $(installed-localtime-file) $(installed-posixrules-file)
++install-others =
++#install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
++# $(zonenames:%=posix/%) \
++# $(zonenames:%=right/%)) \
++# $(installed-localtime-file) $(installed-posixrules-file)
+
+ ifeq ($(have-ksh),yes)
+ install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
+@@ -181,8 +182,9 @@
+ $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
+
+ $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
+- gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
+- -DCROSS_ZIC $(compile-mkdep-flags)
++ gcc $< -c $(OUTPUT_OPTION) \
++ $(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) \
++ $(CPPFLAGS-$*) -DCROSS_ZIC $(compile-mkdep-flags)
+
+ $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
+ gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@