diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/glibc/glibc_2.4.bb | |
parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
download | poky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/glibc/glibc_2.4.bb')
-rw-r--r-- | meta/packages/glibc/glibc_2.4.bb | 201 |
1 files changed, 201 insertions, 0 deletions
diff --git a/meta/packages/glibc/glibc_2.4.bb b/meta/packages/glibc/glibc_2.4.bb new file mode 100644 index 0000000000..faaf27ced3 --- /dev/null +++ b/meta/packages/glibc/glibc_2.4.bb | |||
@@ -0,0 +1,201 @@ | |||
1 | DESCRIPTION = "GNU C Library" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" | ||
3 | LICENSE = "LGPL" | ||
4 | SECTION = "libs" | ||
5 | PRIORITY = "required" | ||
6 | DEFAULT_PREFERENCE = "-1" | ||
7 | PR = "r4" | ||
8 | |||
9 | FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4" | ||
10 | |||
11 | GLIBC_ADDONS ?= "ports,nptl,libidn" | ||
12 | GLIBC_EXTRA_OECONF ?= "" | ||
13 | |||
14 | GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN" | ||
15 | |||
16 | # | ||
17 | # For now, we will skip building of a gcc package if it is a uclibc one | ||
18 | # and our build is not a uclibc one, and we skip a glibc one if our build | ||
19 | # is a uclibc build. | ||
20 | # | ||
21 | # See the note in gcc/gcc_3.4.0.oe | ||
22 | # | ||
23 | |||
24 | python __anonymous () { | ||
25 | import bb, re | ||
26 | uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) | ||
27 | if uc_os: | ||
28 | raise bb.parse.SkipPackage("incompatible with target %s" % | ||
29 | bb.data.getVar('TARGET_OS', d, 1)) | ||
30 | } | ||
31 | |||
32 | # nptl needs unwind support in gcc, which can't be built without glibc. | ||
33 | PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}" | ||
34 | PROVIDES += "virtual/libintl virtual/libiconv" | ||
35 | DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers" | ||
36 | RDEPENDS_${PN}-dev = "linux-libc-headers-dev" | ||
37 | INHIBIT_DEFAULT_DEPS = "1" | ||
38 | |||
39 | # file://noinfo.patch;patch=1 | ||
40 | # file://ldconfig.patch;patch=1;pnum=0 | ||
41 | # file://arm-machine-gmon.patch;patch=1;pnum=0 \ | ||
42 | # \ | ||
43 | # file://arm-ioperm.patch;patch=1;pnum=0 \ | ||
44 | # file://ldd.patch;patch=1;pnum=0 \ | ||
45 | SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.4.tar.bz2 \ | ||
46 | ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-2.4.tar.bz2 \ | ||
47 | ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-2.4.tar.bz2 \ | ||
48 | file://arm-memcpy.patch;patch=1 \ | ||
49 | file://arm-longlong.patch;patch=1 \ | ||
50 | file://fhs-linux-paths.patch;patch=1 \ | ||
51 | file://dl-cache-libcmp.patch;patch=1 \ | ||
52 | file://ldsocache-varrun.patch;patch=1 \ | ||
53 | file://nptl-crosscompile.patch;patch=1 \ | ||
54 | file://glibc-2.4-compile.patch;patch=1 \ | ||
55 | file://fixup-aeabi-syscalls.patch;patch=1 \ | ||
56 | file://generic-bits_select.h \ | ||
57 | file://generic-bits_types.h \ | ||
58 | file://generic-bits_typesizes.h \ | ||
59 | file://generic-bits_time.h \ | ||
60 | file://etc/ld.so.conf \ | ||
61 | file://generate-supported.mk" | ||
62 | |||
63 | S = "${WORKDIR}/glibc-2.4" | ||
64 | B = "${WORKDIR}/build-${TARGET_SYS}" | ||
65 | |||
66 | inherit autotools | ||
67 | |||
68 | EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | ||
69 | --without-cvs --disable-profile --disable-debug --without-gd \ | ||
70 | --enable-clocale=gnu \ | ||
71 | --enable-add-ons=${GLIBC_ADDONS} \ | ||
72 | --with-headers=${STAGING_INCDIR} \ | ||
73 | --without-selinux \ | ||
74 | ${GLIBC_EXTRA_OECONF}" | ||
75 | |||
76 | EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}" | ||
77 | |||
78 | def get_glibc_fpu_setting(bb, d): | ||
79 | if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: | ||
80 | return "--without-fp" | ||
81 | return "" | ||
82 | |||
83 | do_munge() { | ||
84 | # Integrate ports and libidn into tree | ||
85 | mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports | ||
86 | mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn | ||
87 | |||
88 | # Ports isn't really working... Fix it | ||
89 | # Some of this is rather dirty, but it seems to be the only | ||
90 | # quick way to get this cruft to compile | ||
91 | rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads | ||
92 | ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads | ||
93 | cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/ | ||
94 | cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/ | ||
95 | cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h | ||
96 | cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h | ||
97 | cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h | ||
98 | cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h | ||
99 | # Copy in generic stuff for not yet implemented headers | ||
100 | for i in ${S}/bits/*.h; do | ||
101 | F=`basename $i` | ||
102 | [ "$F" = "local_lim.h" ] && continue | ||
103 | [ "$F" = "errno.h" ] && continue | ||
104 | 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/ | ||
105 | done | ||
106 | # This is harmful; we need to get the one from nptl/sysdeps/pthreads | ||
107 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h | ||
108 | # Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h | ||
109 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h | ||
110 | # Obsoleted by sysdeps/gnu/bits/utmp.h | ||
111 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h | ||
112 | |||
113 | # http://www.handhelds.org/hypermail/oe/51/5135.html | ||
114 | # Some files were moved around between directories on | ||
115 | # 2005-12-21, which means that any attempt to check out | ||
116 | # from CVS using a datestamp older than that will be doomed. | ||
117 | # | ||
118 | # This is a workaround for that problem. | ||
119 | rm -rf ${S}/bits | ||
120 | } | ||
121 | |||
122 | addtask munge before do_patch after do_unpack | ||
123 | |||
124 | do_configure () { | ||
125 | # override this function to avoid the autoconf/automake/aclocal/autoheader | ||
126 | # calls for now | ||
127 | # don't pass CPPFLAGS into configure, since it upsets the kernel-headers | ||
128 | # version check and doesn't really help with anything | ||
129 | if [ -z "`which rpcgen`" ]; then | ||
130 | echo "rpcgen not found. Install glibc-devel." | ||
131 | exit 1 | ||
132 | fi | ||
133 | (cd ${S} && gnu-configize) || die "failure in running gnu-configize" | ||
134 | CPPFLAGS="" oe_runconf | ||
135 | } | ||
136 | |||
137 | rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ | ||
138 | yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ | ||
139 | rusers.x spray.x nfs_prot.x rquota.x key_prot.x" | ||
140 | |||
141 | do_compile () { | ||
142 | # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging | ||
143 | unset LDFLAGS | ||
144 | base_do_compile | ||
145 | ( | ||
146 | cd ${S}/sunrpc/rpcsvc | ||
147 | for r in ${rpcsvc}; do | ||
148 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
149 | rpcgen -h $r -o $h || oewarn "unable to generate header for $r" | ||
150 | done | ||
151 | ) | ||
152 | } | ||
153 | |||
154 | do_stage() { | ||
155 | rm -f ${STAGING_LIBDIR}/libc.so.6 | ||
156 | oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \ | ||
157 | 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ | ||
158 | '${STAGING_LIBDIR}/libc.so.6' \ | ||
159 | install-headers install-lib | ||
160 | |||
161 | install -d ${STAGING_INCDIR}/gnu \ | ||
162 | ${STAGING_INCDIR}/bits \ | ||
163 | ${STAGING_INCDIR}/rpcsvc | ||
164 | install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/ | ||
165 | install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/ | ||
166 | install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h | ||
167 | for r in ${rpcsvc}; do | ||
168 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
169 | install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/ | ||
170 | done | ||
171 | for i in libc.a libc_pic.a libc_nonshared.a; do | ||
172 | install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i" | ||
173 | done | ||
174 | echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so | ||
175 | echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so | ||
176 | |||
177 | rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6 | ||
178 | oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \ | ||
179 | 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ | ||
180 | '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \ | ||
181 | install-headers install-lib | ||
182 | |||
183 | install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \ | ||
184 | ${CROSS_DIR}/${TARGET_SYS}/include/bits \ | ||
185 | ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc | ||
186 | install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/ | ||
187 | install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/ | ||
188 | install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h | ||
189 | for r in ${rpcsvc}; do | ||
190 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
191 | install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/ | ||
192 | done | ||
193 | |||
194 | for i in libc.a libc_pic.a libc_nonshared.a; do | ||
195 | install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i" | ||
196 | done | ||
197 | echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so | ||
198 | echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so | ||
199 | } | ||
200 | |||
201 | include glibc-package.bbclass | ||