gcc: split up the build process into three distinct stages (minimal, initial, final...
[openwrt/.git] / toolchain / eglibc / patches / 2.8 / 100-darwin_cross.patch
1 --- a/libc/sunrpc/rpc/types.h
2 +++ b/libc/sunrpc/rpc/types.h
3 @@ -68,6 +68,7 @@ typedef unsigned long rpcport_t;
4  #include <sys/types.h>
5  #endif
6  
7 +#if !defined(_CROSS_RPCGEN_) || !defined(__APPLE__)
8  #ifndef __u_char_defined
9  typedef __u_char u_char;
10  typedef __u_short u_short;
11 @@ -83,6 +84,7 @@ typedef __daddr_t daddr_t;
12  typedef __caddr_t caddr_t;
13  # define __daddr_t_defined
14  #endif
15 +#endif
16  
17  #include <sys/time.h>
18  #include <sys/param.h>
19 --- a/libc/sunrpc/rpc_main.c
20 +++ b/libc/sunrpc/rpc_main.c
21 @@ -40,7 +40,11 @@
22  #include <stdio.h>
23  #include <string.h>
24  #include <unistd.h>
25 +#ifdef _CROSS_RPCGEN_
26 +#define gettext(X) (X)
27 +#else
28  #include <libintl.h>
29 +#endif
30  #include <ctype.h>
31  #include <sys/types.h>
32  #include <sys/param.h>
33 --- a/libc/sunrpc/rpc_scan.c
34 +++ b/libc/sunrpc/rpc_scan.c
35 @@ -39,7 +39,11 @@
36  #include <stdio.h>
37  #include <ctype.h>
38  #include <string.h>
39 +#ifdef _CROSS_RPCGEN_
40 +#define gettext(X) (X)
41 +#else
42  #include <libintl.h>
43 +#endif
44  #include "rpc_scan.h"
45  #include "rpc_parse.h"
46  #include "rpc_util.h"
47 --- a/libc/timezone/Makefile
48 +++ b/libc/timezone/Makefile
49 @@ -181,7 +181,7 @@ zic-objs = zic.o ialloc.o scheck.o
50  $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
51  
52  $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
53 -       gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
54 +       gcc $< -c $(OUTPUT_OPTION) $(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) $(CPPFLAGS-$*) \
55                 $(compile-mkdep-flags)
56  
57  $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))