summaryrefslogtreecommitdiff
path: root/meta/packages/glibc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/glibc')
-rw-r--r--meta/packages/glibc/files/nptl-crosscompile-2.3.6.patch175
-rw-r--r--meta/packages/glibc/glibc-initial_csl-2005q3-2.bb46
-rw-r--r--meta/packages/glibc/glibc-intermediate_csl-2005q3-2.bb16
-rw-r--r--meta/packages/glibc/glibc_csl-2005q3-2.bb155
4 files changed, 392 insertions, 0 deletions
diff --git a/meta/packages/glibc/files/nptl-crosscompile-2.3.6.patch b/meta/packages/glibc/files/nptl-crosscompile-2.3.6.patch
new file mode 100644
index 000000000..2df3cd998
--- /dev/null
+++ b/meta/packages/glibc/files/nptl-crosscompile-2.3.6.patch
@@ -0,0 +1,175 @@
+diff
+--- glibc-2.3.6/nptl/sysdeps/pthread/configure.in.orig 2006-09-14 11:12:16.000000000 +0100
++++ glibc-2.3.6/nptl/sysdeps/pthread/configure.in 2006-09-14 11:12:16.000000000 +0100
+@@ -21,29 +21,4 @@
+
+ dnl Iff <unwind.h> is available, make sure it is the right one and it
+ dnl contains struct _Unwind_Exception.
+-AC_CACHE_CHECK(dnl
+-for forced unwind support, libc_cv_forced_unwind, [dnl
+-AC_TRY_LINK([#include <unwind.h>], [
+-struct _Unwind_Exception exc;
+-struct _Unwind_Context *context;
+-_Unwind_GetCFA (context)],
+-libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)])
+-if test $libc_cv_forced_unwind = yes; then
+- AC_DEFINE(HAVE_FORCED_UNWIND)
+-dnl Check for C cleanup handling.
+- old_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -Werror -fexceptions"
+- AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl
+- AC_TRY_LINK([
+-#include <stdio.h>
+-void cl (void *a) { }], [
+- int a __attribute__ ((cleanup (cl)));
+- puts ("test")],
+-libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
+- CFLAGS="$old_CFLAGS"
+- if test $libc_cv_c_cleanup = no; then
+- AC_MSG_ERROR([the compiler must support C cleanup handling])
+- fi
+-else
+- AC_MSG_ERROR(forced unwind support is required)
+-fi
++AC_DEFINE(HAVE_FORCED_UNWIND)
+diff
+--- glibc-2.3.6/nptl/sysdeps/pthread/configure.orig 2006-09-14 11:11:12.000000000 +0100
++++ glibc-2.3.6/nptl/sysdeps/pthread/configure 2006-09-14 11:11:12.000000000 +0100
+@@ -24,136 +24,7 @@
+ fi
+
+
+-echo "$as_me:$LINENO: checking for forced unwind support" >&5
+-echo $ECHO_N "checking for forced unwind support... $ECHO_C" >&6
+-if test "${libc_cv_forced_unwind+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-#include <unwind.h>
+-int
+-main ()
+-{
+-
+-struct _Unwind_Exception exc;
+-struct _Unwind_Context *context;
+-_Unwind_GetCFA (context)
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- libc_cv_forced_unwind=yes
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-libc_cv_forced_unwind=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5
+-echo "${ECHO_T}$libc_cv_forced_unwind" >&6
+-if test $libc_cv_forced_unwind = yes; then
+- cat >>confdefs.h <<\_ACEOF
++cat >>confdefs.h <<\_ACEOF
+ #define HAVE_FORCED_UNWIND 1
+ _ACEOF
+
+- old_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -Werror -fexceptions"
+- echo "$as_me:$LINENO: checking for C cleanup handling" >&5
+-echo $ECHO_N "checking for C cleanup handling... $ECHO_C" >&6
+-if test "${libc_cv_c_cleanup+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+-#include <stdio.h>
+-void cl (void *a) { }
+-int
+-main ()
+-{
+-
+- int a __attribute__ ((cleanup (cl)));
+- puts ("test")
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- libc_cv_c_cleanup=yes
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-libc_cv_c_cleanup=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5
+-echo "${ECHO_T}$libc_cv_c_cleanup" >&6
+- CFLAGS="$old_CFLAGS"
+- if test $libc_cv_c_cleanup = no; then
+- { { echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5
+-echo "$as_me: error: the compiler must support C cleanup handling" >&2;}
+- { (exit 1); exit 1; }; }
+- fi
+-else
+- { { echo "$as_me:$LINENO: error: forced unwind support is required" >&5
+-echo "$as_me: error: forced unwind support is required" >&2;}
+- { (exit 1); exit 1; }; }
+-fi
diff --git a/meta/packages/glibc/glibc-initial_csl-2005q3-2.bb b/meta/packages/glibc/glibc-initial_csl-2005q3-2.bb
new file mode 100644
index 000000000..9ba2ac37c
--- /dev/null
+++ b/meta/packages/glibc/glibc-initial_csl-2005q3-2.bb
@@ -0,0 +1,46 @@
+SECTION = "libs"
+require glibc_${PV}.bb
+
+DEPENDS = "linux-libc-headers"
+PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
+FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+
+PACKAGES = ""
+
+do_configure () {
+ sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
+ chmod +x ${S}/configure
+ CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
+ --without-cvs --disable-sanity-checks \
+ --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --enable-hacker-mode
+ if grep -q GLIBC_2.3 ${S}/ChangeLog; then
+ # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
+ # Fortunately, we don't need errlist-compat.c, since we just need .h files,
+ # so work around this by creating a fake errlist-compat.c and satisfying its dependencies.
+ # Another workaround might be to tell configure to not use any cross options to $(CC).
+ # The real fix would be to get install-headers to not generate errlist-compat.c.
+ make sysdeps/gnu/errlist.c
+ mkdir -p stdio-common
+ touch stdio-common/errlist-compat.c
+ fi
+}
+
+do_compile () {
+ :
+}
+
+do_stage () {
+ oe_runmake cross-compiling=yes install_root=${CROSS_DIR}/${TARGET_SYS} prefix="" install-headers
+
+ # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
+ # so do them by hand. We can tolerate an empty stubs.h for the moment.
+ # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
+ mkdir -p ${CROSS_DIR}/${TARGET_SYS}/include/gnu
+ touch ${CROSS_DIR}/${TARGET_SYS}/include/gnu/stubs.h
+ cp ${S}/include/features.h ${CROSS_DIR}/${TARGET_SYS}/include/features.h
+}
+
+do_install () {
+ :
+}
diff --git a/meta/packages/glibc/glibc-intermediate_csl-2005q3-2.bb b/meta/packages/glibc/glibc-intermediate_csl-2005q3-2.bb
new file mode 100644
index 000000000..b6a0a552c
--- /dev/null
+++ b/meta/packages/glibc/glibc-intermediate_csl-2005q3-2.bb
@@ -0,0 +1,16 @@
+SECTION = "libs"
+
+require glibc_${PV}.bb
+
+DEFAULT_PREFERENCE = "-1"
+
+do_install () {
+ :
+}
+
+PACKAGES = ""
+PROVIDES = "virtual/${TARGET_PREFIX}libc-for-gcc"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
+GLIBC_ADDONS = "nptl,libidn"
+#GLIBC_ADDONS = "libidn"
+GLIBC_EXTRA_OECONF = ""
diff --git a/meta/packages/glibc/glibc_csl-2005q3-2.bb b/meta/packages/glibc/glibc_csl-2005q3-2.bb
new file mode 100644
index 000000000..754c01c48
--- /dev/null
+++ b/meta/packages/glibc/glibc_csl-2005q3-2.bb
@@ -0,0 +1,155 @@
+DESCRIPTION = "GNU C Library"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+LICENSE = "LGPL"
+SECTION = "libs"
+PRIORITY = "required"
+# DEFAULT_PREFERENCE = "-1"
+PV = "2.3.6+csl-arm-2005q3-2"
+PR = "r10"
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_DIR}/${BUILD_SYS}/include"
+TARGET_CPPFLAGS = "-I${STAGING_DIR}/${TARGET_SYS}/include"
+
+FILESDIR = "${FILE_DIRNAME}/files"
+
+GLIBC_ADDONS ?= "nptl,libidn"
+GLIBC_EXTRA_OECONF ?= ""
+
+GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN gez_ET bn_BD gez_ER 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))
+}
+
+# nptl needs unwind support in gcc, which can't be built without glibc.
+PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}"
+PROVIDES += "virtual/libintl virtual/libiconv"
+DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers"
+RDEPENDS_${PN}-dev = ""
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2005q3-2-arm-none-linux-gnueabi.src.tar.bz2 \
+ file://nptl-crosscompile-2.3.6.patch;patch=1 \
+ file://etc/ld.so.conf \
+ file://generate-supported.mk \
+ "
+
+do_unpack2() {
+ cd ${WORKDIR}
+ tar -xvjf ./arm-2005q3-2-arm-none-linux-gnueabi/glibc-2005q3-2.tar.bz2
+ rm -rf ./arm-2005q3-2-arm-none-linux-gnueabi
+}
+
+addtask unpack2 after do_unpack before do_patch
+
+S = "${WORKDIR}/glibc-2.3.5pre"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+inherit autotools
+
+EXTRA_OECONF = "--without-cvs --disable-profile --disable-debug --without-gd \
+ --enable-clocale=gnu \
+ --enable-add-ons \
+ --with-headers=${STAGING_INCDIR} \
+ --without-selinux \
+ ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
+
+def get_glibc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--without-fp"
+ return ""
+
+
+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
+ )
+}
+
+do_stage() {
+ rm -f ${STAGING_LIBDIR}/libc.so.6
+ oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \
+ 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
+ '${STAGING_LIBDIR}/libc.so.6' \
+ install-headers install-lib
+
+ install -d ${STAGING_INCDIR}/gnu \
+ ${STAGING_INCDIR}/bits \
+ ${STAGING_INCDIR}/rpcsvc
+ install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/
+ install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
+ install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
+ done
+ for i in libc.a libc_pic.a libc_nonshared.a; do
+ install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i"
+ done
+ echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so
+ echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so
+
+ rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6
+ oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \
+ 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
+ '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \
+ install-headers install-lib
+
+ install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \
+ ${CROSS_DIR}/${TARGET_SYS}/include/bits \
+ ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc
+ install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/
+ install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/
+ install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/
+ done
+
+ for i in libc.a libc_pic.a libc_nonshared.a; do
+ install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i"
+ done
+ echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so
+ echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so
+}
+
+require glibc-package.bbclass