summaryrefslogtreecommitdiff
path: root/recipes/dietlibc/dietlibc-0.32
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2009-10-03 00:57:03 +0200
committerHenning Heinold <heinold@inf.fu-berlin.de>2009-10-04 22:12:52 +0200
commit3a663867510f00548cb1d4db5d44d7df3aafb62c (patch)
tree918c1541bf0340d79d6128b71a2a0505e8097b10 /recipes/dietlibc/dietlibc-0.32
parent0e95309087dfb9fcd2aaf1a713d856398eb45a91 (diff)
dietlibc: update to version 0.32
* switch to .inc and PR_INC
Diffstat (limited to 'recipes/dietlibc/dietlibc-0.32')
-rw-r--r--recipes/dietlibc/dietlibc-0.32/ccache.patch74
-rw-r--r--recipes/dietlibc/dietlibc-0.32/diethome.patch24
2 files changed, 98 insertions, 0 deletions
diff --git a/recipes/dietlibc/dietlibc-0.32/ccache.patch b/recipes/dietlibc/dietlibc-0.32/ccache.patch
new file mode 100644
index 0000000000..fb067f038f
--- /dev/null
+++ b/recipes/dietlibc/dietlibc-0.32/ccache.patch
@@ -0,0 +1,74 @@
+Index: dietlibc-0.32/diet.c
+===================================================================
+--- dietlibc-0.32.orig/diet.c 2009-03-17 00:17:58.000000000 +0100
++++ dietlibc-0.32/diet.c 2009-10-02 14:12:14.306929201 +0200
+@@ -132,7 +132,12 @@
+ }
+ }
+ {
+- char *cc=argv[1];
++ char *cc;
++ if (!strcmp(argv[1],"ccache")) {
++ cc=argv[2];
++ } else {
++ cc=argv[1];
++ }
+ char *tmp=strchr(cc,0)-2;
+ char *tmp2,*tmp3;
+ if (tmp<cc) goto donttouch;
+@@ -144,7 +149,7 @@
+ if (tmp3<tmp2) tmp2=tmp3;
+ if (tmp2-cc>90) error("platform name too long!\n");
+ shortplatform=platform+len;
+- memmove(shortplatform,argv[1],(size_t)(tmp2-cc));
++ memmove(shortplatform,cc,(size_t)(tmp2-cc));
+ platform[tmp2-cc+len]=0;
+ if (shortplatform[0]=='i' && shortplatform[2]=='8' && shortplatform[3]=='6') shortplatform[1]='3';
+ } else {
+@@ -291,6 +296,9 @@
+
+ dest=newargv;
+ *dest++=argv[1];
++ if (strcmp(argv[1],"ccache") == 0) {
++ *dest++=argv[2];
++ }
+ if (argv[2]) {
+ if (!strcmp(argv[2],"-V")) {
+ *dest++=argv[2];
+@@ -300,9 +308,9 @@
+ } else if (!memcmp(argv[2],"-V",2)) {
+ *dest++=argv[2];
+ ++argv;
+- --argc;
+ }
+ }
++
+ #ifndef __DYN_LIB
+ if (_link) { *dest++=(char*)nostdlib; *dest++=dashstatic; *dest++=dashL; }
+ #else
+@@ -320,7 +328,15 @@
+ #ifdef WANT_DYNAMIC
+ if (_link) { *dest++=d; }
+ #endif
+- for (i=2; i<argc; ++i) {
++ if (strcmp(argv[1],"ccache") == 0) {
++ i=3;
++ } else {
++ i=2;
++ }
++ for (i; i<argc; ++i) {
++ if (strstr(argv[i],"isystem") != NULL)
++ continue;
++
+ if (!strcmp(argv[i],"-pthread")) {
+ *dest++="-D_REENTRANT";
+ if (_link) *dest++="-lpthread";
+@@ -333,6 +349,8 @@
+ continue;
+ }
+ *dest++=argv[i];
++ *dest--;
++ *dest++;
+ }
+ #ifndef __DYN_LIB
+ if (compile || _link) {
diff --git a/recipes/dietlibc/dietlibc-0.32/diethome.patch b/recipes/dietlibc/dietlibc-0.32/diethome.patch
new file mode 100644
index 0000000000..ee05b2308d
--- /dev/null
+++ b/recipes/dietlibc/dietlibc-0.32/diethome.patch
@@ -0,0 +1,24 @@
+Index: dietlibc-0.32/Makefile
+===================================================================
+--- dietlibc-0.32.orig/Makefile 2008-05-09 06:36:56.000000000 +0200
++++ dietlibc-0.32/Makefile 2009-10-02 14:39:58.059248076 +0200
+@@ -295,16 +295,16 @@
+ $(SYSCALLOBJ): syscalls.h
+
+ $(OBJDIR)/elftrunc: $(OBJDIR)/diet contrib/elftrunc.c
+- bin-$(MYARCH)/diet $(CROSS)$(CC) $(CFLAGS) -o $@ contrib/elftrunc.c
++ DIETHOME=$(PWD) bin-$(MYARCH)/diet $(CROSS)$(CC) $(CFLAGS) -o $@ contrib/elftrunc.c
+
+ $(OBJDIR)/dnsd: $(OBJDIR)/diet contrib/dnsd.c
+- bin-$(MYARCH)/diet $(CROSS)$(CC) $(CFLAGS) -o $@ contrib/dnsd.c
++ DIETHOME=$(PWD) bin-$(MYARCH)/diet $(CROSS)$(CC) $(CFLAGS) -o $@ contrib/dnsd.c
+
+ VERSION=dietlibc-$(shell head -n 1 CHANGES|sed 's/://')
+ CURNAME=$(notdir $(shell pwd))
+
+ $(OBJDIR)/diet: $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o diet.c $(OBJDIR)/dietlibc.a $(OBJDIR)/dyn_stop.o
+- $(CROSS)$(CC) -isystem include $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -DVERSION=\"$(VERSION)\" -lgcc
++ $(CROSS)$(CC) -isystem include $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -DVERSION=\"$(VERSION)\" -lgcc
+ $(CROSS)strip -R .comment -R .note $@
+
+ $(OBJDIR)/diet-i: $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o diet.c $(OBJDIR)/dietlibc.a $(OBJDIR)/dyn_stop.o