summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc
diff options
context:
space:
mode:
authorTomas Frydrych <tf@openedhand.com>2006-09-18 15:23:13 +0000
committerTomas Frydrych <tf@openedhand.com>2006-09-18 15:23:13 +0000
commit02059b7a72b03de846f78ab9a2c24d660b29d59e (patch)
tree5b059c6d2a705c596e72604c572d866aa4afee2b /meta/packages/glibc
parentde35d836b450951eddb505acb4b60de18d368df1 (diff)
downloadpoky-02059b7a72b03de846f78ab9a2c24d660b29d59e.tar.gz
files for using csl2005q3-2 toolchain
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@723 311d38ba-8fff-0310-9ca6-ca027cbcb966
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 0000000000..2df3cd998b
--- /dev/null
+++ b/meta/packages/glibc/files/nptl-crosscompile-2.3.6.patch
@@ -0,0 +1,175 @@
1diff
2--- glibc-2.3.6/nptl/sysdeps/pthread/configure.in.orig 2006-09-14 11:12:16.000000000 +0100
3+++ glibc-2.3.6/nptl/sysdeps/pthread/configure.in 2006-09-14 11:12:16.000000000 +0100
4@@ -21,29 +21,4 @@
5
6 dnl Iff <unwind.h> is available, make sure it is the right one and it
7 dnl contains struct _Unwind_Exception.
8-AC_CACHE_CHECK(dnl
9-for forced unwind support, libc_cv_forced_unwind, [dnl
10-AC_TRY_LINK([#include <unwind.h>], [
11-struct _Unwind_Exception exc;
12-struct _Unwind_Context *context;
13-_Unwind_GetCFA (context)],
14-libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)])
15-if test $libc_cv_forced_unwind = yes; then
16- AC_DEFINE(HAVE_FORCED_UNWIND)
17-dnl Check for C cleanup handling.
18- old_CFLAGS="$CFLAGS"
19- CFLAGS="$CFLAGS -Werror -fexceptions"
20- AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl
21- AC_TRY_LINK([
22-#include <stdio.h>
23-void cl (void *a) { }], [
24- int a __attribute__ ((cleanup (cl)));
25- puts ("test")],
26-libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
27- CFLAGS="$old_CFLAGS"
28- if test $libc_cv_c_cleanup = no; then
29- AC_MSG_ERROR([the compiler must support C cleanup handling])
30- fi
31-else
32- AC_MSG_ERROR(forced unwind support is required)
33-fi
34+AC_DEFINE(HAVE_FORCED_UNWIND)
35diff
36--- glibc-2.3.6/nptl/sysdeps/pthread/configure.orig 2006-09-14 11:11:12.000000000 +0100
37+++ glibc-2.3.6/nptl/sysdeps/pthread/configure 2006-09-14 11:11:12.000000000 +0100
38@@ -24,136 +24,7 @@
39 fi
40
41
42-echo "$as_me:$LINENO: checking for forced unwind support" >&5
43-echo $ECHO_N "checking for forced unwind support... $ECHO_C" >&6
44-if test "${libc_cv_forced_unwind+set}" = set; then
45- echo $ECHO_N "(cached) $ECHO_C" >&6
46-else
47- cat >conftest.$ac_ext <<_ACEOF
48-/* confdefs.h. */
49-_ACEOF
50-cat confdefs.h >>conftest.$ac_ext
51-cat >>conftest.$ac_ext <<_ACEOF
52-/* end confdefs.h. */
53-#include <unwind.h>
54-int
55-main ()
56-{
57-
58-struct _Unwind_Exception exc;
59-struct _Unwind_Context *context;
60-_Unwind_GetCFA (context)
61- ;
62- return 0;
63-}
64-_ACEOF
65-rm -f conftest.$ac_objext conftest$ac_exeext
66-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
67- (eval $ac_link) 2>conftest.er1
68- ac_status=$?
69- grep -v '^ *+' conftest.er1 >conftest.err
70- rm -f conftest.er1
71- cat conftest.err >&5
72- echo "$as_me:$LINENO: \$? = $ac_status" >&5
73- (exit $ac_status); } &&
74- { ac_try='test -z "$ac_c_werror_flag"
75- || test ! -s conftest.err'
76- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
77- (eval $ac_try) 2>&5
78- ac_status=$?
79- echo "$as_me:$LINENO: \$? = $ac_status" >&5
80- (exit $ac_status); }; } &&
81- { ac_try='test -s conftest$ac_exeext'
82- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
83- (eval $ac_try) 2>&5
84- ac_status=$?
85- echo "$as_me:$LINENO: \$? = $ac_status" >&5
86- (exit $ac_status); }; }; then
87- libc_cv_forced_unwind=yes
88-else
89- echo "$as_me: failed program was:" >&5
90-sed 's/^/| /' conftest.$ac_ext >&5
91-
92-libc_cv_forced_unwind=no
93-fi
94-rm -f conftest.err conftest.$ac_objext \
95- conftest$ac_exeext conftest.$ac_ext
96-fi
97-echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5
98-echo "${ECHO_T}$libc_cv_forced_unwind" >&6
99-if test $libc_cv_forced_unwind = yes; then
100- cat >>confdefs.h <<\_ACEOF
101+cat >>confdefs.h <<\_ACEOF
102 #define HAVE_FORCED_UNWIND 1
103 _ACEOF
104
105- old_CFLAGS="$CFLAGS"
106- CFLAGS="$CFLAGS -Werror -fexceptions"
107- echo "$as_me:$LINENO: checking for C cleanup handling" >&5
108-echo $ECHO_N "checking for C cleanup handling... $ECHO_C" >&6
109-if test "${libc_cv_c_cleanup+set}" = set; then
110- echo $ECHO_N "(cached) $ECHO_C" >&6
111-else
112- cat >conftest.$ac_ext <<_ACEOF
113-/* confdefs.h. */
114-_ACEOF
115-cat confdefs.h >>conftest.$ac_ext
116-cat >>conftest.$ac_ext <<_ACEOF
117-/* end confdefs.h. */
118-
119-#include <stdio.h>
120-void cl (void *a) { }
121-int
122-main ()
123-{
124-
125- int a __attribute__ ((cleanup (cl)));
126- puts ("test")
127- ;
128- return 0;
129-}
130-_ACEOF
131-rm -f conftest.$ac_objext conftest$ac_exeext
132-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
133- (eval $ac_link) 2>conftest.er1
134- ac_status=$?
135- grep -v '^ *+' conftest.er1 >conftest.err
136- rm -f conftest.er1
137- cat conftest.err >&5
138- echo "$as_me:$LINENO: \$? = $ac_status" >&5
139- (exit $ac_status); } &&
140- { ac_try='test -z "$ac_c_werror_flag"
141- || test ! -s conftest.err'
142- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
143- (eval $ac_try) 2>&5
144- ac_status=$?
145- echo "$as_me:$LINENO: \$? = $ac_status" >&5
146- (exit $ac_status); }; } &&
147- { ac_try='test -s conftest$ac_exeext'
148- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
149- (eval $ac_try) 2>&5
150- ac_status=$?
151- echo "$as_me:$LINENO: \$? = $ac_status" >&5
152- (exit $ac_status); }; }; then
153- libc_cv_c_cleanup=yes
154-else
155- echo "$as_me: failed program was:" >&5
156-sed 's/^/| /' conftest.$ac_ext >&5
157-
158-libc_cv_c_cleanup=no
159-fi
160-rm -f conftest.err conftest.$ac_objext \
161- conftest$ac_exeext conftest.$ac_ext
162-fi
163-echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5
164-echo "${ECHO_T}$libc_cv_c_cleanup" >&6
165- CFLAGS="$old_CFLAGS"
166- if test $libc_cv_c_cleanup = no; then
167- { { echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5
168-echo "$as_me: error: the compiler must support C cleanup handling" >&2;}
169- { (exit 1); exit 1; }; }
170- fi
171-else
172- { { echo "$as_me:$LINENO: error: forced unwind support is required" >&5
173-echo "$as_me: error: forced unwind support is required" >&2;}
174- { (exit 1); exit 1; }; }
175-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 0000000000..9ba2ac37cc
--- /dev/null
+++ b/meta/packages/glibc/glibc-initial_csl-2005q3-2.bb
@@ -0,0 +1,46 @@
1SECTION = "libs"
2require glibc_${PV}.bb
3
4DEPENDS = "linux-libc-headers"
5PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
6FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
7
8PACKAGES = ""
9
10do_configure () {
11 sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
12 chmod +x ${S}/configure
13 CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
14 --without-cvs --disable-sanity-checks \
15 --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
16 --enable-hacker-mode
17 if grep -q GLIBC_2.3 ${S}/ChangeLog; then
18 # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
19 # Fortunately, we don't need errlist-compat.c, since we just need .h files,
20 # so work around this by creating a fake errlist-compat.c and satisfying its dependencies.
21 # Another workaround might be to tell configure to not use any cross options to $(CC).
22 # The real fix would be to get install-headers to not generate errlist-compat.c.
23 make sysdeps/gnu/errlist.c
24 mkdir -p stdio-common
25 touch stdio-common/errlist-compat.c
26 fi
27}
28
29do_compile () {
30 :
31}
32
33do_stage () {
34 oe_runmake cross-compiling=yes install_root=${CROSS_DIR}/${TARGET_SYS} prefix="" install-headers
35
36 # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
37 # so do them by hand. We can tolerate an empty stubs.h for the moment.
38 # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
39 mkdir -p ${CROSS_DIR}/${TARGET_SYS}/include/gnu
40 touch ${CROSS_DIR}/${TARGET_SYS}/include/gnu/stubs.h
41 cp ${S}/include/features.h ${CROSS_DIR}/${TARGET_SYS}/include/features.h
42}
43
44do_install () {
45 :
46}
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 0000000000..b6a0a552cb
--- /dev/null
+++ b/meta/packages/glibc/glibc-intermediate_csl-2005q3-2.bb
@@ -0,0 +1,16 @@
1SECTION = "libs"
2
3require glibc_${PV}.bb
4
5DEFAULT_PREFERENCE = "-1"
6
7do_install () {
8 :
9}
10
11PACKAGES = ""
12PROVIDES = "virtual/${TARGET_PREFIX}libc-for-gcc"
13DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
14GLIBC_ADDONS = "nptl,libidn"
15#GLIBC_ADDONS = "libidn"
16GLIBC_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 0000000000..754c01c488
--- /dev/null
+++ b/meta/packages/glibc/glibc_csl-2005q3-2.bb
@@ -0,0 +1,155 @@
1DESCRIPTION = "GNU C Library"
2HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
3LICENSE = "LGPL"
4SECTION = "libs"
5PRIORITY = "required"
6# DEFAULT_PREFERENCE = "-1"
7PV = "2.3.6+csl-arm-2005q3-2"
8PR = "r10"
9
10# the -isystem in bitbake.conf screws up glibc do_stage
11BUILD_CPPFLAGS = "-I${STAGING_DIR}/${BUILD_SYS}/include"
12TARGET_CPPFLAGS = "-I${STAGING_DIR}/${TARGET_SYS}/include"
13
14FILESDIR = "${FILE_DIRNAME}/files"
15
16GLIBC_ADDONS ?= "nptl,libidn"
17GLIBC_EXTRA_OECONF ?= ""
18
19GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN gez_ET bn_BD gez_ER te_IN"
20
21#
22# For now, we will skip building of a gcc package if it is a uclibc one
23# and our build is not a uclibc one, and we skip a glibc one if our build
24# is a uclibc build.
25#
26# See the note in gcc/gcc_3.4.0.oe
27#
28
29python __anonymous () {
30 import bb, re
31 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
32 if uc_os:
33 raise bb.parse.SkipPackage("incompatible with target %s" %
34 bb.data.getVar('TARGET_OS', d, 1))
35}
36
37# nptl needs unwind support in gcc, which can't be built without glibc.
38PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}"
39PROVIDES += "virtual/libintl virtual/libiconv"
40DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers"
41RDEPENDS_${PN}-dev = ""
42INHIBIT_DEFAULT_DEPS = "1"
43
44SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2005q3-2-arm-none-linux-gnueabi.src.tar.bz2 \
45 file://nptl-crosscompile-2.3.6.patch;patch=1 \
46 file://etc/ld.so.conf \
47 file://generate-supported.mk \
48 "
49
50do_unpack2() {
51 cd ${WORKDIR}
52 tar -xvjf ./arm-2005q3-2-arm-none-linux-gnueabi/glibc-2005q3-2.tar.bz2
53 rm -rf ./arm-2005q3-2-arm-none-linux-gnueabi
54}
55
56addtask unpack2 after do_unpack before do_patch
57
58S = "${WORKDIR}/glibc-2.3.5pre"
59B = "${WORKDIR}/build-${TARGET_SYS}"
60
61inherit autotools
62
63EXTRA_OECONF = "--without-cvs --disable-profile --disable-debug --without-gd \
64 --enable-clocale=gnu \
65 --enable-add-ons \
66 --with-headers=${STAGING_INCDIR} \
67 --without-selinux \
68 ${GLIBC_EXTRA_OECONF}"
69
70EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
71
72def get_glibc_fpu_setting(bb, d):
73 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
74 return "--without-fp"
75 return ""
76
77
78do_configure () {
79# override this function to avoid the autoconf/automake/aclocal/autoheader
80# calls for now
81# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
82# version check and doesn't really help with anything
83 if [ -z "`which rpcgen`" ]; then
84 echo "rpcgen not found. Install glibc-devel."
85 exit 1
86 fi
87 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
88 CPPFLAGS="" oe_runconf
89}
90
91rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
92 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
93 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
94
95do_compile () {
96 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
97 unset LDFLAGS
98 base_do_compile
99 (
100 cd ${S}/sunrpc/rpcsvc
101 for r in ${rpcsvc}; do
102 h=`echo $r|sed -e's,\.x$,.h,'`
103 rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
104 done
105 )
106}
107
108do_stage() {
109 rm -f ${STAGING_LIBDIR}/libc.so.6
110 oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \
111 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
112 '${STAGING_LIBDIR}/libc.so.6' \
113 install-headers install-lib
114
115 install -d ${STAGING_INCDIR}/gnu \
116 ${STAGING_INCDIR}/bits \
117 ${STAGING_INCDIR}/rpcsvc
118 install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/
119 install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
120 install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
121 for r in ${rpcsvc}; do
122 h=`echo $r|sed -e's,\.x$,.h,'`
123 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
124 done
125 for i in libc.a libc_pic.a libc_nonshared.a; do
126 install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i"
127 done
128 echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so
129 echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so
130
131 rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6
132 oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \
133 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
134 '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \
135 install-headers install-lib
136
137 install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \
138 ${CROSS_DIR}/${TARGET_SYS}/include/bits \
139 ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc
140 install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/
141 install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/
142 install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h
143 for r in ${rpcsvc}; do
144 h=`echo $r|sed -e's,\.x$,.h,'`
145 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/
146 done
147
148 for i in libc.a libc_pic.a libc_nonshared.a; do
149 install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i"
150 done
151 echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so
152 echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so
153}
154
155require glibc-package.bbclass