summaryrefslogtreecommitdiff
path: root/meta/packages/glibc
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2008-03-04 16:34:07 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2008-03-04 16:34:07 +0000
commit68e4dbb0ebd1a6ca420cb98ff25db7c01030624c (patch)
tree17f63f3cc76e7226c7cbe98363d7fe14f8da5864 /meta/packages/glibc
parent4c117c12857ff176faee157b49250e0a12895de7 (diff)
downloadopenembedded-core-68e4dbb0ebd1a6ca420cb98ff25db7c01030624c.tar.gz
openembedded-core-68e4dbb0ebd1a6ca420cb98ff25db7c01030624c.tar.bz2
openembedded-core-68e4dbb0ebd1a6ca420cb98ff25db7c01030624c.zip
glibc: added 2.6.1 from OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3903 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/glibc')
-rw-r--r--meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch41
-rw-r--r--meta/packages/glibc/files/glibc-2.6.1-RTLD_SINGLE_THREAD_P-1.patch20
-rw-r--r--meta/packages/glibc/glibc-2.4/ldd-unbash.patch11
-rw-r--r--meta/packages/glibc/glibc-2.4/local-stdio-lock.diff34
-rw-r--r--meta/packages/glibc/glibc-initial_2.6.1.bb6
-rw-r--r--meta/packages/glibc/glibc-intermediate_2.6.1.bb8
-rw-r--r--meta/packages/glibc/glibc_2.6.1.bb150
7 files changed, 270 insertions, 0 deletions
diff --git a/meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch b/meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch
new file mode 100644
index 0000000000..e137287dd1
--- /dev/null
+++ b/meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch
@@ -0,0 +1,41 @@
+# All lines beginning with `# DP:' are a description of the patch.
+# DP: Description: allow dynamic long-running processes to
+# DP: re-read a dynamically updated resolv.conf on the fly
+# DP: Dpatch author: Adam Conrad <adconrad@ubuntu.com>
+# DP: Patch author: Thorsten Kukuk <kukuk@suse.de>
+# DP: Upstream status: Ubuntu-Specific
+# DP: Date: 2006-01-13 08:14:21 UTC
+
+Index: resolv/res_libc.c
+===================================================================
+--- resolv/res_libc.c.orig
++++ resolv/res_libc.c
+@@ -22,7 +22,7 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <bits/libc-lock.h>
+-
++#include <sys/stat.h>
+
+ /* The following bit is copied from res_data.c (where it is #ifdef'ed
+ out) since res_init() should go into libc.so but the rest of that
+@@ -94,8 +94,17 @@
+ int
+ __res_maybe_init (res_state resp, int preinit)
+ {
+- if (resp->options & RES_INIT) {
+- if (__res_initstamp != resp->_u._ext.initstamp) {
++ static time_t last_mtime;
++ struct stat statbuf;
++ int ret;
++
++
++ if (resp->options & RES_INIT) {
++ ret = stat (_PATH_RESCONF, &statbuf);
++ if (__res_initstamp != resp->_u._ext.initstamp
++ || (ret == 0) && (last_mtime != statbuf.st_mtime))
++ {
++ last_mtime = statbuf.st_mtime;
+ if (resp->nscount > 0) {
+ __res_iclose (resp, true);
+ return __res_vinit (resp, 1);
diff --git a/meta/packages/glibc/files/glibc-2.6.1-RTLD_SINGLE_THREAD_P-1.patch b/meta/packages/glibc/files/glibc-2.6.1-RTLD_SINGLE_THREAD_P-1.patch
new file mode 100644
index 0000000000..33d5282b90
--- /dev/null
+++ b/meta/packages/glibc/files/glibc-2.6.1-RTLD_SINGLE_THREAD_P-1.patch
@@ -0,0 +1,20 @@
+Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
+Date: 07-02-2007
+Initial Package Version: 2.6
+Origin: http://sourceware.org/ml/libc-ports/2007-05/msg00051.html
+Upstream Status: Unknown
+Description: Defines RTLD_SINGLE_THREAD_P for arm.
+
+diff -Naur glibc-2.6.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h glibc-2.6/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
+--- glibc-2.6.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h 2007-07-02 17:39:22.000000000 -0400
++++ glibc-2.6/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h 2007-07-02 17:39:36.000000000 -0400
+@@ -126,3 +126,9 @@
+ # define NO_CANCELLATION 1
+
+ #endif
++
++#ifndef __ASSEMBLER__
++# define RTLD_SINGLE_THREAD_P \
++ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
++ header.multiple_threads) == 0, 1)
++#endif
diff --git a/meta/packages/glibc/glibc-2.4/ldd-unbash.patch b/meta/packages/glibc/glibc-2.4/ldd-unbash.patch
new file mode 100644
index 0000000000..2fb8854b49
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/ldd-unbash.patch
@@ -0,0 +1,11 @@
+--- glibc-2.5/elf/ldd.bash.in.org 2006-04-30 16:06:20.000000000 +0000
++++ glibc-2.5/elf/ldd.bash.in 2007-03-30 19:18:57.000000000 +0000
+@@ -110,7 +110,7 @@
+ # environments where the executed program might not have permissions
+ # to write to the console/tty. But only bash 3.x supports the pipefail
+ # option, and we don't bother to handle the case for older bash versions.
+-if set -o pipefail 2> /dev/null; then
++if false; then
+ try_trace() {
+ eval $add_env '"$@"' | cat
+ }
diff --git a/meta/packages/glibc/glibc-2.4/local-stdio-lock.diff b/meta/packages/glibc/glibc-2.4/local-stdio-lock.diff
new file mode 100644
index 0000000000..65cd2fd6b4
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/local-stdio-lock.diff
@@ -0,0 +1,34 @@
+---
+ bits/stdio-lock.h | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+--- glibc-2.7.orig/bits/stdio-lock.h
++++ glibc-2.7/bits/stdio-lock.h
+@@ -45,14 +45,23 @@ __libc_lock_define_recursive (typedef, _
+ #define _IO_cleanup_region_end(_doit) \
+ __libc_cleanup_region_end (_doit)
+
+ #if defined _LIBC && !defined NOT_IN_libc
+ # define _IO_acquire_lock(_fp) \
+- _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
+- _IO_flockfile (_fp)
++ { \
++ _IO_FILE *_IO_acquire_lock_file = _fp; \
++ __libc_cleanup_region_start (1, (void (*) (void *)) _IO_acquire_lock_fct, &_IO_acquire_lock_file); \
++ _IO_flockfile (_IO_acquire_lock_file)
++
++# define _IO_acquire_lock_clear_flags2(_fp) \
++ { \
++ _IO_FILE *_IO_acquire_lock_file = _fp; \
++ __libc_cleanup_region_start (1, (void (*) (void *)) _IO_acquire_lock_clear_flags2_fct, &_IO_acquire_lock_file); \
++ _IO_flockfile (_IO_acquire_lock_file)
+
+ # define _IO_release_lock(_fp) \
+- _IO_funlockfile (_fp); \
+- _IO_cleanup_region_end (0)
++ __libc_cleanup_region_end (1); \
++ }
++
+ #endif
+
+ #endif /* bits/stdio-lock.h */
diff --git a/meta/packages/glibc/glibc-initial_2.6.1.bb b/meta/packages/glibc/glibc-initial_2.6.1.bb
new file mode 100644
index 0000000000..3ad96569f5
--- /dev/null
+++ b/meta/packages/glibc/glibc-initial_2.6.1.bb
@@ -0,0 +1,6 @@
+require glibc_${PV}.bb
+require glibc-initial.inc
+
+do_configure_prepend () {
+ unset CFLAGS
+} \ No newline at end of file
diff --git a/meta/packages/glibc/glibc-intermediate_2.6.1.bb b/meta/packages/glibc/glibc-intermediate_2.6.1.bb
new file mode 100644
index 0000000000..05d6250783
--- /dev/null
+++ b/meta/packages/glibc/glibc-intermediate_2.6.1.bb
@@ -0,0 +1,8 @@
+require glibc_${PV}.bb
+require glibc-intermediate.inc
+
+# gcc uses -Werror which break on a "you have no thumb interwork" _warning_
+do_configure_prepend() {
+ sed -i s:-Werror:: ${S}/configure
+}
+
diff --git a/meta/packages/glibc/glibc_2.6.1.bb b/meta/packages/glibc/glibc_2.6.1.bb
new file mode 100644
index 0000000000..4c59bbdc13
--- /dev/null
+++ b/meta/packages/glibc/glibc_2.6.1.bb
@@ -0,0 +1,150 @@
+require glibc.inc
+PR = "r3"
+
+ARM_INSTRUCTION_SET = "arm"
+
+PACKAGES_DYNAMIC = "libc6*"
+RPROVIDES_${PN}-dev = "libc6-dev"
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
+
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4"
+
+GLIBC_ADDONS ?= "ports,nptl,libidn"
+
+GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
+
+#
+# For now, we will skip building of a gcc package if it is a uclibc one
+# and our build is not a uclibc one, and we skip a glibc one if our build
+# is a uclibc build.
+#
+# See the note in gcc/gcc_3.4.0.oe
+#
+
+python __anonymous () {
+ import bb, re
+ uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
+ if uc_os:
+ raise bb.parse.SkipPackage("incompatible with target %s" %
+ bb.data.getVar('TARGET_OS', d, 1))
+}
+
+RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
+
+SRC_URI = "\
+ ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
+ ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-${PV}.tar.bz2 \
+ ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2 \
+ file://arm-memcpy.patch;patch=1 \
+ file://arm-longlong.patch;patch=1 \
+ file://fhs-linux-paths.patch;patch=1 \
+ file://dl-cache-libcmp.patch;patch=1 \
+ file://ldsocache-varrun.patch;patch=1 \
+ file://nptl-crosscompile.patch;patch=1 \
+ file://glibc-2.5-local-dynamic-resolvconf.patch;patch=1;pnum=0 \
+ file://glibc-check_pf.patch;patch=1;pnum=0 \
+ file://zecke-sane-readelf.patch;patch=1 \
+ file://ldd-unbash.patch;patch=1 \
+ file://generic-bits_select.h \
+ file://generic-bits_types.h \
+ file://generic-bits_typesizes.h \
+ file://generic-bits_time.h \
+ file://etc/ld.so.conf \
+ file://generate-supported.mk \
+ file://glibc-2.6.1-RTLD_SINGLE_THREAD_P-1.patch;patch=1 \
+"
+
+# Build fails on sh3 and sh4 without additional patches
+SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
+SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1"
+
+# PowerPC Patches to add support for soft-float
+SRC_URI_append_powerpc = "file://powerpc-sqrt-hack.diff;patch=1"
+
+S = "${WORKDIR}/glibc-${PV}"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+EXTRA_OECONF = "\
+ --enable-kernel=${OLDEST_KERNEL} \
+ --without-cvs --disable-profile --disable-debug --without-gd \
+ --enable-clocale=gnu \
+ --enable-add-ons=${GLIBC_ADDONS} \
+ --with-headers=${STAGING_INCDIR} \
+ --without-selinux \
+ ${GLIBC_EXTRA_OECONF} \
+"
+
+EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
+
+do_munge() {
+ # Integrate ports and libidn into tree
+ mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports
+ mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn
+
+ # Ports isn't really working... Fix it
+ # Some of this is rather dirty, but it seems to be the only
+ # quick way to get this cruft to compile
+ rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
+ ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
+ cp ${S}/nptl/sysdeps/pthread/bits/sigthread.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+ cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+ cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+ cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h
+ cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h
+ cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h
+ cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h
+ # Copy in generic stuff for not yet implemented headers
+ for i in ${S}/bits/*.h; do
+ F=`basename $i`
+ [ "$F" = "local_lim.h" ] && continue
+ [ "$F" = "errno.h" ] && continue
+ test -e ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/$F || test -e ${S}/ports/sysdeps/arm/bits/$F || test -e ${S}/sysdeps/unix/sysv/linux/bits/$F || test -e ${S}/sysdeps/ieee754/bits/$F || cp $i ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+ done
+ # This is harmful; we need to get the one from nptl/sysdeps/pthreads
+ rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h
+ # Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h
+ rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h
+ # Obsoleted by sysdeps/gnu/bits/utmp.h
+ rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h
+}
+
+addtask munge before do_patch after do_unpack
+
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+ if [ -z "`which rpcgen`" ]; then
+ echo "rpcgen not found. Install glibc-devel."
+ exit 1
+ fi
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+ rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+ # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+ unset LDFLAGS
+ base_do_compile
+ (
+ cd ${S}/sunrpc/rpcsvc
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
+ done
+ )
+}
+
+require glibc-stage.inc
+
+require glibc-package.bbclass