From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14028 invoked by alias); 2 Dec 2011 11:10:27 -0000 Received: (qmail 14017 invoked by uid 22791); 2 Dec 2011 11:10:25 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TW_CP,TW_PC X-Spam-Check-By: sourceware.org Received: from mail.terralink.de (HELO mail.terralink.de) (217.9.16.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Dec 2011 11:10:11 +0000 Received: from suchoi.alsteraero.com (pd95ba963.dip0.t-ipconnect.de [217.91.169.99]) by mail.terralink.de (Postfix) with ESMTPA id 155F93A434 for ; Fri, 2 Dec 2011 12:10:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by suchoi.alsteraero.com (Postfix) with ESMTP id 4AC133C9E668 for ; Fri, 2 Dec 2011 12:10:08 +0100 (CET) Received: from suchoi.alsteraero.com ([127.0.0.1]) by localhost (suchoi.alsteraero.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Z9mqNy5V4bC for ; Fri, 2 Dec 2011 12:10:08 +0100 (CET) Received: from suchoi.alsteraero.lan (suchoi.alsteraero.lan [172.23.1.28]) by suchoi.alsteraero.com (Postfix) with ESMTPS id 3054A3C9E663 for ; Fri, 2 Dec 2011 12:10:08 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 1 of 1] patches/eglic/2_13: Make build of sunrpc/timezone portable X-Mercurial-Node: 5590d3c19c2f9c8a037a7b34bdb7f95070dc1bc1 Message-Id: <5590d3c19c2f9c8a037a.1322824122@suchoi.alsteraero.lan> In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.0 Date: Fri, 02 Dec 2011 11:10:00 -0000 From: Titus von Boxberg To: crossgcc@sourceware.org X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00001.txt.bz2 # HG changeset patch # User Titus von Boxberg # 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" 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 + 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