diff options
author | Henning Heinold <heinold@inf.fu-berlin.de> | 2009-10-03 00:57:03 +0200 |
---|---|---|
committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2009-10-04 22:12:52 +0200 |
commit | 3a663867510f00548cb1d4db5d44d7df3aafb62c (patch) | |
tree | 918c1541bf0340d79d6128b71a2a0505e8097b10 | |
parent | 0e95309087dfb9fcd2aaf1a713d856398eb45a91 (diff) |
dietlibc: update to version 0.32
* switch to .inc and PR_INC
-rw-r--r-- | classes/dietlibc.bbclass | 4 | ||||
-rw-r--r-- | conf/checksums.ini | 4 | ||||
-rw-r--r-- | recipes/dietlibc/dietlibc-0.32/ccache.patch | 74 | ||||
-rw-r--r-- | recipes/dietlibc/dietlibc-0.32/diethome.patch | 24 | ||||
-rw-r--r-- | recipes/dietlibc/dietlibc.inc | 45 | ||||
-rw-r--r-- | recipes/dietlibc/dietlibc_0.31.bb | 51 | ||||
-rw-r--r-- | recipes/dietlibc/dietlibc_0.32.bb | 9 |
7 files changed, 164 insertions, 47 deletions
diff --git a/classes/dietlibc.bbclass b/classes/dietlibc.bbclass index 7c7b5fec81..e0a657806a 100644 --- a/classes/dietlibc.bbclass +++ b/classes/dietlibc.bbclass @@ -4,8 +4,8 @@ def dietlibc_after_parse(d): import bb # Remove the NLS cfg = oe_filter_out('--(dis|en)able-nls', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d) - # Remove shared and static and set it right - cfg += " --disable-nls --disbale-shared --enable-static" + # Remove shared enable static only + cfg += " --disable-nls --disable-shared --enable-static" bb.data.setVar('EXTRA_OECONF', cfg, d) cfg = bb.data.getVar('EXTRA_OEMAKE', d, 1) or "" cfg = oe_filter_out("\'CC=", bb.data.getVar('EXTRA_OEMAKE', d, 1) or "", d) diff --git a/conf/checksums.ini b/conf/checksums.ini index bb61d09889..67d3ea2790 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -5050,6 +5050,10 @@ sha256=dcc1809e8477b95317a7ff503cdd8b6d3f85b8d83a3245252ff47cf631523620 md5=acb98d469ee932d902fdf6de07802b7c sha256=99613d6a67f747f52e4184c613f7cba5cbb76af237c9acd04742e3ca24cf56cd +[http://kernel.org/pub/linux/libs/dietlibc/dietlibc-0.32.tar.bz2] +md5=0098761c17924c15e21d25acdda4a8b5 +sha256=6613a2cae3b39e340779735d7500d284f5a691c5ed67e59a6057e0888726e458 + [ftp://source.mvista.com/pub/xscale/pxa/diff-2.4.18-rmk7-pxa3.gz] md5=249c7a63a506d302c96be26517a70298 sha256=ca569dfa1e5cfd2f4134f3f61f667bcfab5e15c7d43c8a6e835d384ac5b31a07 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 diff --git a/recipes/dietlibc/dietlibc.inc b/recipes/dietlibc/dietlibc.inc new file mode 100644 index 0000000000..7884188486 --- /dev/null +++ b/recipes/dietlibc/dietlibc.inc @@ -0,0 +1,45 @@ +SECTION = "libs" +DESCRIPTION = "The diet libc is a libc that is optimized for small size. \ +It can be used to create small statically linked binaries" +LICENSE = "GPLv2" + +INC_PR = "r1" + +SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/dietlibc/dietlibc-${PV}.tar.bz2" + +#otherwise the whole run scripts got broken +do_configure () { +: +} + +do_compile () { + oe_runmake all CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" prefix=${STAGING_DIR_TARGET}/lib/dietlibc + oe_runmake all ARCH="${TARGET_ARCH}" CROSS=" " prefix=${STAGING_DIR_TARGET}/lib/dietlibc +} + +#no packages needed, all binaries will be compiled with -static +PACKAGES = " " + +#otherwise the whole run scripts got broken +do_install () { +: +} + +do_stage () { + DIETLIBC_BUILD_ARCH=`echo ${BUILD_ARCH} | sed -e s'/.86/386/'` + DIETLIBC_TARGET_ARCH=`echo ${TARGET_ARCH} | sed -e s'/.86/386/'` + rm -rf ${STAGING_DIR_TARGET}/lib/dietlibc || true + rm ${CROSS_DIR}/bin/diet || true + install -d ${STAGING_DIR_TARGET}/lib/dietlibc/lib-${DIETLIBC_TARGET_ARCH} + install -d ${STAGING_DIR_TARGET}/lib/dietlibc/include + for i in `find include -name \*.h`; do install -m 644 -D $i ${STAGING_DIR_TARGET}/lib/dietlibc/$i; done + + install -m755 bin-${DIETLIBC_BUILD_ARCH}/diet-i ${CROSS_DIR}/bin/diet + + cd bin-${DIETLIBC_TARGET_ARCH} + install -m 644 start.o libm.a libpthread.a librpc.a \ + liblatin1.a libcompat.a libcrypt.a \ + ${STAGING_DIR_TARGET}/lib/dietlibc/lib-${DIETLIBC_TARGET_ARCH} + install -m 644 dietlibc.a ${STAGING_DIR_TARGET}/lib/dietlibc/lib-${DIETLIBC_TARGET_ARCH}/libc.a +} + diff --git a/recipes/dietlibc/dietlibc_0.31.bb b/recipes/dietlibc/dietlibc_0.31.bb index 7720588b60..70b813bb07 100644 --- a/recipes/dietlibc/dietlibc_0.31.bb +++ b/recipes/dietlibc/dietlibc_0.31.bb @@ -1,47 +1,8 @@ -SECTION = "libs" -DESCRIPTION = "The diet libc is a libc that is optimized for small size. \ -It can be used to create small statically linked binaries" -LICENSE = "GPLv2" +require dietlibc.inc -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/dietlibc/dietlibc-${PV}.tar.bz2 \ - file://ccache.patch;patch=1 \ - file://ceil.patch;patch=1 \ - file://ai_addrconfig.patch;patch=1 \ - " - -#otherwise the whole run scripts got broken -do_configure () { - echo "moo" > /dev/null 2>&1 -} - -do_compile () { - oe_runmake all CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" prefix=${STAGING_DIR_TARGET}/lib/dietlibc - oe_runmake all ARCH="${TARGET_ARCH}" CROSS=" " prefix=${STAGING_DIR_TARGET}/lib/dietlibc -} - -#no packages needed, all binaries will be compiled with -static -PACKAGES = " " - -#otherwise the whole run scripts got broken -do_install () { - echo "moo" > /dev/null 2>&1 -} - -do_stage () { - DIETLIBC_BUILD_ARCH=`echo ${BUILD_ARCH} | sed -e s'/.86/386/'` - DIETLIBC_TARGET_ARCH=`echo ${TARGET_ARCH} | sed -e s'/.86/386/'` - rm -rf ${STAGING_DIR_TARGET}/lib/dietlibc || true - rm ${CROSS_DIR}/bin/diet || true - install -d ${STAGING_DIR_TARGET}/lib/dietlibc/lib-${DIETLIBC_TARGET_ARCH} - install -d ${STAGING_DIR_TARGET}/lib/dietlibc/include - for i in `find include -name \*.h`; do install -m 644 -D $i ${STAGING_DIR_TARGET}/lib/dietlibc/$i; done - - install -m755 bin-${DIETLIBC_BUILD_ARCH}/diet-i ${CROSS_DIR}/bin/diet - - cd bin-${DIETLIBC_TARGET_ARCH} - install -m 644 start.o libm.a libpthread.a librpc.a \ - liblatin1.a libcompat.a libcrypt.a \ - ${STAGING_DIR_TARGET}/lib/dietlibc/lib-${DIETLIBC_TARGET_ARCH} - install -m 644 dietlibc.a ${STAGING_DIR_TARGET}/lib/dietlibc/lib-${DIETLIBC_TARGET_ARCH}/libc.a -} +PR = "${INC_PR}.1" +SRC_URI += "file://ccache.patch;patch=1 \ + file://ceil.patch;patch=1 \ + file://ai_addrconfig.patch;patch=1 \ + " diff --git a/recipes/dietlibc/dietlibc_0.32.bb b/recipes/dietlibc/dietlibc_0.32.bb new file mode 100644 index 0000000000..5e644fa750 --- /dev/null +++ b/recipes/dietlibc/dietlibc_0.32.bb @@ -0,0 +1,9 @@ +require dietlibc.inc + +PR = "${INC_PR}.1" + +SRC_URI += "file://ccache.patch;patch=1 \ + file://ceil.patch;patch=1 \ + file://diethome.patch;patch=1 \ + " + |