This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
# HG changeset patch # User Titus von Boxberg <titus@v9g.de> # Date 1322823220 -3600 # Node ID 5590d3c19c2f9c8a037a7b34bdb7f95070dc1bc1 # Parent f9230a1e50666c105a631247b4383c25111cf783 patches/eglic/2_13: Make build of sunrpc/timezone portable These patches make the build of the build system tools for sunrpc and timezone portable to BSD/OSX systems. Signed-off-by: "Titus von Boxberg" <titus@v9g.de> diff -r f9230a1e5066 -r 5590d3c19c2f patches/eglibc/2_13/120-cross-rpcgen-portable.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/eglibc/2_13/120-cross-rpcgen-portable.patch Fri Dec 02 11:53:40 2011 +0100 @@ -0,0 +1,32 @@ +--- eglibc-2_13.org/sunrpc/Makefile 2008-04-25 13:12:05.000000000 +0200 ++++ eglibc-2_13/sunrpc/Makefile 2011-11-30 14:26:45.000000000 +0100 +@@ -138,17 +138,27 @@ + + include ../Rules + ++OS?= $(shell uname) ++ifeq ($(OS),Darwin) ++CROSSRPCCFLAGS=-I/opt/local/include ++CROSSRPCLDFLAGS=-L/opt/local/lib -lintl ++endif ++ifeq ($(OS),FreeBSD) ++CROSSRPCCFLAGS=-I/usr/local/include ++CROSSRPCLDFLAGS=-L/usr/local/lib -lintl ++endif ++ + $(objpfx)rpcgen: $(addprefix $(objpfx),$(rpcgen-objs)) \ + $(sort $(filter $(common-objpfx)libc%,$(link-libc))) \ + $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) + $(+link) + + $(addprefix $(objpfx)cross-,$(rpcgen-objs)): $(objpfx)cross-%.o: %.c +- gcc $< -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ \ ++ gcc $< -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ $(CROSSRPCCFLAGS) \ + $(OUTPUT_OPTION) $(compile-mkdep-flags) + + $(objpfx)cross-rpcgen: $(addprefix $(objpfx)cross-,$(rpcgen-objs)) +- gcc $^ -o $@ ++ gcc $^ $(CROSSRPCLDFLAGS) -o $@ + + # This makes sure -DNOT_IN_libc is passed for all these modules. + cpp-srcs-left := $(rpcgen-objs:.o=.c) diff -r f9230a1e5066 -r 5590d3c19c2f patches/eglibc/2_13/121-cross-rpcgen-portable.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/eglibc/2_13/121-cross-rpcgen-portable.patch Fri Dec 02 11:53:40 2011 +0100 @@ -0,0 +1,25 @@ +--- eglibc-2_13.org/sunrpc/rpc/types.h 2010-08-19 22:32:31.000000000 +0200 ++++ eglibc-2_13/sunrpc/rpc/types.h 2011-11-29 22:41:21.616484816 +0100 +@@ -70,6 +70,7 @@ + #endif + + #ifndef __u_char_defined ++#if !defined(__APPLE__) && !defined(__BSD__) + typedef __u_char u_char; + typedef __u_short u_short; + typedef __u_int u_int; +@@ -77,11 +78,14 @@ + typedef __quad_t quad_t; + typedef __u_quad_t u_quad_t; + typedef __fsid_t fsid_t; ++#endif + # define __u_char_defined + #endif + #ifndef __daddr_t_defined ++#if !defined(__APPLE__) && !defined(__BSD__) + typedef __daddr_t daddr_t; + typedef __caddr_t caddr_t; ++#endif + # define __daddr_t_defined + #endif + diff -r f9230a1e5066 -r 5590d3c19c2f patches/eglibc/2_13/122-cross-rpcgen-portable.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/eglibc/2_13/122-cross-rpcgen-portable.patch Fri Dec 02 11:53:40 2011 +0100 @@ -0,0 +1,16 @@ +--- eglibc-2_13.org/sunrpc/rpc_main.c 2010-08-19 22:32:31.000000000 +0200 ++++ eglibc-2_13/sunrpc/rpc_main.c 2011-11-29 22:41:30.922373803 +0100 +@@ -997,8 +997,11 @@ + abort (); + temp = rindex (cmd->infile, '.'); + cp = stpcpy (mkfilename, "Makefile."); +- if (temp != NULL) +- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0'; ++ if (temp != NULL) { ++ size_t l = strlen(cmd->infile); ++ if (l > temp - cmd->infile) l = temp - cmd->infile; ++ *((char *) strncpy (cp, cmd->infile, temp - cmd->infile) + l) = '\0'; ++ } + else + stpcpy (cp, cmd->infile); + diff -r f9230a1e5066 -r 5590d3c19c2f patches/eglibc/2_13/123-cross-rpcgen-portable.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/eglibc/2_13/123-cross-rpcgen-portable.patch Fri Dec 02 11:53:40 2011 +0100 @@ -0,0 +1,12 @@ +--- eglibc-2_13.org/sunrpc/proto.h 2008-09-26 18:27:00.000000000 +0200 ++++ eglibc-2_13/sunrpc/proto.h 2011-11-29 22:41:41.370024010 +0100 +@@ -58,7 +58,9 @@ + + /* Rather then defining _GNU_SOURCE before including $build's <string.h> + we just declare stpcpy here. */ ++#ifndef stpcpy + extern char *stpcpy (char *, const char *); ++#endif + + /* Use $build's i18n support as we can't use $host's. */ + #define _(X) (gettext (X)) diff -r f9230a1e5066 -r 5590d3c19c2f patches/eglibc/2_13/124-cross-zic-portable.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/eglibc/2_13/124-cross-zic-portable.patch Fri Dec 02 11:53:40 2011 +0100 @@ -0,0 +1,31 @@ +--- eglibc-2_13.org/timezone/Makefile 2009-03-03 14:14:09.000000000 +0100 ++++ eglibc-2_13/timezone/Makefile 2011-11-30 14:32:32.000000000 +0100 +@@ -176,16 +176,26 @@ + $(zic-cmd) -p $(posixrules) + endif + ++OS?= $(shell uname) ++ifeq ($(OS),Darwin) ++CROSSZICCFLAGS=-I/opt/local/include ++CROSSZICLDFLAGS=-L/opt/local/lib -lintl ++endif ++ifeq ($(OS),FreeBSD) ++CROSSZICCFLAGS=-I/usr/local/include ++CROSSZICLDFLAGS=-L/usr/local/lib -lintl ++endif ++ + zic-objs = zic.o ialloc.o scheck.o + + $(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) ++ -DCROSS_ZIC $(CROSSZICCFLAGS) $(compile-mkdep-flags) + + $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs)) +- gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@ ++ gcc $(CROSSZICLDFLAGS) $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@ + + tz-cflags = -DTZDIR='"$(zonedir)"' \ + -DTZDEFAULT='"$(localtime-file)"' \ -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |