public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0 of 1] patches/eglic/2_13: Make build of sunrpc/timezone portable
@ 2011-12-02 11:10 Titus von Boxberg
  2011-12-02 11:10 ` [PATCH 1 " Titus von Boxberg
  0 siblings, 1 reply; 4+ messages in thread
From: Titus von Boxberg @ 2011-12-02 11:10 UTC (permalink / raw)
  To: crossgcc

Yann, all,

here is the patch series of early 2011 for eglibc 2_9
now ported to eglibc 2_13.

See http://www.cygwin.com/ml/crossgcc/2011-02/msg00025.html

Regards

Titus

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1 of 1] patches/eglic/2_13: Make build of sunrpc/timezone portable
  2011-12-02 11:10 [PATCH 0 of 1] patches/eglic/2_13: Make build of sunrpc/timezone portable Titus von Boxberg
@ 2011-12-02 11:10 ` Titus von Boxberg
  2011-12-11 21:38   ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Titus von Boxberg @ 2011-12-02 11:10 UTC (permalink / raw)
  To: crossgcc

# 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1 of 1] patches/eglic/2_13: Make build of sunrpc/timezone portable
  2011-12-02 11:10 ` [PATCH 1 " Titus von Boxberg
@ 2011-12-11 21:38   ` Yann E. MORIN
  2011-12-11 21:46     ` Titus von Boxberg
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2011-12-11 21:38 UTC (permalink / raw)
  To: crossgcc; +Cc: Titus von Boxberg

Titus, All,

On Friday 02 December 2011 12:08:42 Titus von Boxberg wrote:
> # 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

Those patches are only for eglibc-2.13. Are the other versions immune
to this issue? What about glibc?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1 of 1] patches/eglic/2_13: Make build of sunrpc/timezone portable
  2011-12-11 21:38   ` Yann E. MORIN
@ 2011-12-11 21:46     ` Titus von Boxberg
  0 siblings, 0 replies; 4+ messages in thread
From: Titus von Boxberg @ 2011-12-11 21:46 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Am 11.12.2011 um 22:38 schrieb Yann E. MORIN:

> Titus, All,
> 
> On Friday 02 December 2011 12:08:42 Titus von Boxberg wrote:
>> # 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
> 
> Those patches are only for eglibc-2.13. Are the other versions immune
> to this issue? What about glibc?
Yann,
I have used eglibc 2_9 (in Feb 2011) and now 2_13.
All eglibc versions seem to require these patches.
glibc builds fine without.
I'm unsure if it makes sense to include them in ct-ng.
However, I think it's better to post than hide them.

Regards
Titus


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-11 21:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-02 11:10 [PATCH 0 of 1] patches/eglic/2_13: Make build of sunrpc/timezone portable Titus von Boxberg
2011-12-02 11:10 ` [PATCH 1 " Titus von Boxberg
2011-12-11 21:38   ` Yann E. MORIN
2011-12-11 21:46     ` Titus von Boxberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).