summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/glibc/glibc_2.3.5+cvs20050627.bb')
-rw-r--r--meta/packages/glibc/glibc_2.3.5+cvs20050627.bb175
1 files changed, 175 insertions, 0 deletions
diff --git a/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
new file mode 100644
index 0000000000..c8f1d56841
--- /dev/null
+++ b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
@@ -0,0 +1,175 @@
1DESCRIPTION = "GNU C Library"
2HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
3LICENSE = "LGPL"
4SECTION = "libs"
5PRIORITY = "required"
6MAINTAINER = "Phil Blundell <pb@handhelds.org>"
7
8FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs-2.3.5"
9SRCDATE = "20050627"
10PR = "r3"
11
12GLIBC_ADDONS ?= "ports,linuxthreads"
13GLIBC_EXTRA_OECONF ?= ""
14
15GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN"
16
17#
18# For now, we will skip building of a gcc package if it is a uclibc one
19# and our build is not a uclibc one, and we skip a glibc one if our build
20# is a uclibc build.
21#
22# See the note in gcc/gcc_3.4.0.oe
23#
24
25python __anonymous () {
26 import bb, re
27 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
28 if uc_os:
29 raise bb.parse.SkipPackage("incompatible with target %s" %
30 bb.data.getVar('TARGET_OS', d, 1))
31}
32
33# nptl needs unwind support in gcc, which can't be built without glibc.
34PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}"
35PROVIDES += "virtual/libintl virtual/libiconv"
36DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers"
37RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
38INHIBIT_DEFAULT_DEPS = "1"
39
40# file://noinfo.patch;patch=1
41# file://ldconfig.patch;patch=1;pnum=0
42# file://arm-machine-gmon.patch;patch=1;pnum=0 \
43# \
44# file://arm-ioperm.patch;patch=1;pnum=0 \
45# file://ldd.patch;patch=1;pnum=0 \
46SRC_URI = "http://familiar.handhelds.org/source/v0.8.3/stash_libc_sources.redhat.com__20050627.tar.gz \
47 http://familiar.handhelds.org/source/v0.8.3/stash_ports_sources.redhat.com__20050627.tar.gz \
48 file://arm-audit.patch;patch=1 \
49 file://arm-audit2.patch;patch=1 \
50 file://arm-no-hwcap.patch;patch=1 \
51 file://arm-memcpy.patch;patch=1 \
52 file://arm-longlong.patch;patch=1;pnum=0 \
53 file://fhs-linux-paths.patch;patch=1 \
54 file://dl-cache-libcmp.patch;patch=1 \
55 file://ldsocache-varrun.patch;patch=1 \
56 file://5090_all_stubs-rule-fix.patch;patch=1 \
57 file://etc/ld.so.conf \
58 file://generate-supported.mk"
59
60# seems to fail on tls platforms
61SRC_URI_append_arm = " file://dyn-ldconfig-20041128.patch;patch=1"
62
63S = "${WORKDIR}/libc"
64B = "${WORKDIR}/build-${TARGET_SYS}"
65
66inherit autotools
67
68EXTRA_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=${CROSS_DIR}/${TARGET_SYS}/include \
73 --without-selinux \
74 ${GLIBC_EXTRA_OECONF}"
75
76EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
77
78def get_glibc_fpu_setting(bb, d):
79 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
80 return "--without-fp"
81 return ""
82
83do_munge() {
84 # Integrate ports into tree
85 mv ${WORKDIR}/ports ${S}
86
87 # http://www.handhelds.org/hypermail/oe/51/5135.html
88 # Some files were moved around between directories on
89 # 2005-12-21, which means that any attempt to check out
90 # from CVS using a datestamp older than that will be doomed.
91 #
92 # This is a workaround for that problem.
93 rm -rf ${S}/bits
94}
95
96addtask munge before do_patch after do_unpack
97
98do_configure () {
99# override this function to avoid the autoconf/automake/aclocal/autoheader
100# calls for now
101# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
102# version check and doesn't really help with anything
103 if [ -z "`which rpcgen`" ]; then
104 echo "rpcgen not found. Install glibc-devel."
105 exit 1
106 fi
107 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
108 CPPFLAGS="" oe_runconf
109}
110
111rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
112 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
113 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
114
115do_compile () {
116 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
117 unset LDFLAGS
118 base_do_compile
119 (
120 cd ${S}/sunrpc/rpcsvc
121 for r in ${rpcsvc}; do
122 h=`echo $r|sed -e's,\.x$,.h,'`
123 rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
124 done
125 )
126}
127
128do_stage() {
129 rm -f ${STAGING_LIBDIR}/libc.so.6
130 oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \
131 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
132 '${STAGING_LIBDIR}/libc.so.6' \
133 install-headers install-lib
134
135 install -d ${STAGING_INCDIR}/gnu \
136 ${STAGING_INCDIR}/bits \
137 ${STAGING_INCDIR}/rpcsvc
138 install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/
139 install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
140 install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
141 for r in ${rpcsvc}; do
142 h=`echo $r|sed -e's,\.x$,.h,'`
143 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
144 done
145 for i in libc.a libc_pic.a libc_nonshared.a; do
146 install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i"
147 done
148 echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so
149 echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so
150
151 rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6
152 oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \
153 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
154 '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \
155 install-headers install-lib
156
157 install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \
158 ${CROSS_DIR}/${TARGET_SYS}/include/bits \
159 ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc
160 install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/
161 install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/
162 install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h
163 for r in ${rpcsvc}; do
164 h=`echo $r|sed -e's,\.x$,.h,'`
165 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/
166 done
167
168 for i in libc.a libc_pic.a libc_nonshared.a; do
169 install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i"
170 done
171 echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so
172 echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so
173}
174
175include glibc-package.bbclass