summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc/glibc_csl-2005q3-2.bb
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/glibc_csl-2005q3-2.bb
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/glibc_csl-2005q3-2.bb')
-rw-r--r--meta/packages/glibc/glibc_csl-2005q3-2.bb155
1 files changed, 155 insertions, 0 deletions
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