surpport seeking the recorded video
[vuplus_openembedded] / recipes / glibc / glibc_2.2.5.bb
1 require glibc.inc
2
3 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs"
4 PR = "${INC_PR}.0"
5
6 DEFAULT_PREFERENCE_sh3 = "-99"
7
8 GLIBC_ADDONS ?= "linuxthreads"
9
10 #
11 # For now, we will skip building of a gcc package if it is a uclibc one
12 # and our build is not a uclibc one, and we skip a glibc one if our build
13 # is a uclibc build.
14 #
15 # See the note in gcc/gcc_3.4.0.oe
16 #
17
18 python __anonymous () {
19     import bb, re
20     uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
21     if uc_os:
22         raise bb.parse.SkipPackage("incompatible with target %s" %
23                                    bb.data.getVar('TARGET_OS', d, 1))
24 }
25
26 libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*"
27
28 FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir} ${datadir}/zoneinfo ${libdir}/locale"
29 FILES_ldd = "${bindir}/ldd"
30 FILES_libsegfault = "/lib/libSegFault*"
31 FILES_glibc-extra-nss = "/lib/libnss*"
32 FILES_sln = "/sbin/sln"
33 FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
34 FILES_nscd = "${sbindir}/nscd*"
35 FILES_glibc-utils = "${bindir} ${sbindir}"
36 FILES_glibc-gconv = "${libdir}/gconv"
37 FILES_catchsegv = "${bindir}/catchsegv"
38 DEPENDS_catchsegv = "libsegfault"
39 FILES_glibc-pcprofile = "/lib/libpcprofile.so"
40 FILES_glibc-thread-db = "/lib/libthread_db*"
41 FILES_localedef = "${bindir}/localedef"
42 RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
43 RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
44
45 #          file://noinfo.patch;patch=1 \
46 #          file://ldconfig.patch;patch=1;pnum=0 \
47
48 SRC_URI = "${GNU_MIRROR}/glibc/glibc-${PV}.tar.gz \
49            ${GNU_MIRROR}/glibc/glibc-linuxthreads-${PV}.tar.gz \
50            file://alpha-build-failure.patch;patch=1 \
51            file://arm-asm-clobber.patch;patch=1 \
52            file://arm-ctl_bus_isa.patch;patch=1 \
53            file://cris-libc-symbols.patch;patch=1 \
54            file://cris-stack-direction.patch;patch=1 \
55            file://dl-machine-alpha.patch;patch=1 \
56            file://dl-machine-arm.patch;patch=1 \
57            file://dl-machine-m68k.patch;patch=1 \
58            file://dl-machine-mips.patch;patch=1 \
59            file://dl-machine-sh.patch;patch=1 \
60            file://dl-machine-sparc.patch;patch=1 \
61            file://errlist-1.9.patch;patch=1 \
62            file://errlist-arm.patch;patch=1 \
63            file://glibc-2.2.5-allow-gcc-3.4-fixup.patch;patch=1 \
64            file://glibc-2.2.5-allow-gcc-3.4-grp.patch;patch=1 \
65            file://glibc-2.2.5-allow-gcc-4.x-configure.patch;patch=1 \
66            file://glibc-2.2.5-alpha-pwrite64.patch;patch=1 \
67            file://glibc-2.2.5-arm-pwrite64.patch;patch=1 \
68            file://glibc-2.2.5-crosstest.patch;patch=1 \
69            file://glibc-2.2.5-crossyes.patch;patch=1 \
70            file://glibc-2.2.5-cygwin.patch;patch=1 \
71            file://glibc-2.2.5-hhl-powerpc-fpu.patch;patch=1 \
72            file://glibc-2.2.5-mips-build-gmon.patch;patch=1 \
73            file://glibc-2.2.5-mips-clone-local-label.patch;patch=1 \
74            file://glibc-2.2.5-ppc405erratum77.patch;patch=1 \
75            file://glibc-drow-sh.patch;patch=1 \
76            file://glibc-test-lowram.patch;patch=1 \
77            file://initfini-alpha.patch;patch=1 \
78            file://initfini-sh.patch;patch=1 \
79            file://longjmp-sparc.patch;patch=1 \
80            file://sh-setjmp-fix.patch;patch=1 \
81            file://sprintf-prototype.patch;patch=1 \
82            file://sscanf.patch;patch=1 \
83            file://unwind-arm.patch;patch=1 \
84            file://ldd.patch;patch=1;pnum=0 \
85            file://fhs-linux-paths.patch;patch=1;pnum=1 \
86            file://arm-no-hwcap.patch;patch=1;pnum=0 \
87            file://arm-memcpy.patch;patch=1;pnum=0 \
88            file://arm-longlong.patch;patch=1;pnum=0 \
89            file://arm-machine-gmon.patch;patch=1;pnum=0 \
90            file://glibc-2.2.5-allow-gcc-3.4-td.patch;patch=1 \
91            file://glibc-2.2.5-alpha-self-clobber.patch;patch=1 \
92            file://pt-initfini-alpha.patch;patch=1 \
93            file://pt-initfini-sh.patch;patch=1 \
94            file://linuxthreads-2.2.5-ppc405erratum77.patch;patch=1 \
95            file://threadparam.patch;patch=1 \
96            file://initfini-flags.patch;patch=1 \
97            file://pt-initfini-flags.patch;patch=1 \
98            file://glibc-2.3.2-allow-solaris.patch;patch=1 \
99            \
100            file://etc/ld.so.conf \
101            file://generate-supported.mk"
102 #          file://makeconfig.patch;patch=1;pnum=0
103
104
105 # seems to break on TLS platforms
106 # SRC_URI_append_arm = " file://dyn-ldconfig.patch;patch=1;pnum=0"
107
108 S = "${WORKDIR}/glibc-${PV}"
109 B = "${WORKDIR}/build-${TARGET_SYS}"
110
111 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
112                 --without-cvs --disable-profile --disable-debug --without-gd \
113                 --enable-clocale=gnu \
114                 --enable-add-ons=${GLIBC_ADDONS} \
115                 --with-headers=${STAGING_INCDIR} \
116                 ${GLIBC_EXTRA_OECONF}"
117
118 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
119
120 glibc_do_unpack () {
121         mv ${WORKDIR}/linuxthreads ${WORKDIR}/linuxthreads_db ${S}/
122 }
123
124 python do_unpack () {
125         bb.build.exec_func('base_do_unpack', d)
126         bb.build.exec_func('glibc_do_unpack', d)
127 }
128
129 do_configure () {
130 # override this function to avoid the autoconf/automake/aclocal/autoheader
131 # calls for now
132 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
133 # version check and doesn't really help with anything
134         if [ -z "`which rpcgen`" ]; then
135                 echo "rpcgen not found.  Install glibc-devel."
136                 exit 1
137         fi
138         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
139         CPPFLAGS="" oe_runconf
140 }
141
142 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
143           yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
144           rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
145
146 do_compile () {
147         # this really is arm specific
148         touch ${S}/sysdeps/arm/framestate.c
149         # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
150         unset LDFLAGS
151         base_do_compile
152         (
153                 cd ${S}/sunrpc/rpcsvc
154                 for r in ${rpcsvc}; do
155                         h=`echo $r|sed -e's,\.x$,.h,'`
156                         rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
157                 done
158         )
159 }
160
161 do_stage() {
162         rm -f ${STAGING_DIR_HOST}${layout_base_libdir}/libc.so.6
163         oe_runmake 'install_root=${STAGING_DIR_HOST}' \
164                    'includedir=${layout_includedir}' 'libdir=${layout_libdir}' 'slibdir=${layout_base_libdir}' \
165                    '${STAGING_DIR_HOST}${layout_base_libdir}/libc.so.6' \
166                    '${STAGING_INCDIR}/bits/errno.h' \
167                    '${STAGING_INCDIR}/bits/libc-lock.h' \
168                    '${STAGING_INCDIR}/gnu/stubs.h' \
169                    install-headers install-lib
170
171         install -d ${STAGING_INCDIR}/gnu \
172                    ${STAGING_INCDIR}/bits \
173                    ${STAGING_INCDIR}/sys \
174                    ${STAGING_INCDIR}/rpcsvc
175         install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
176         install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
177         install -m 0644 ${S}/include/bits/xopen_lim.h ${STAGING_INCDIR}/bits/
178         install -m 0644 ${B}/gnu/lib-names.h ${STAGING_INCDIR}/gnu/
179         install -m 0644 ${S}/include/limits.h ${STAGING_INCDIR}/
180         install -m 0644 ${S}/include/gnu/libc-version.h ${STAGING_INCDIR}/gnu/
181         install -m 0644 ${S}/include/gnu-versions.h ${STAGING_INCDIR}/
182         install -m 0644 ${S}/include/values.h ${STAGING_INCDIR}/
183         install -m 0644 ${S}/include/errno.h ${STAGING_INCDIR}/
184         install -m 0644 ${S}/include/sys/errno.h ${STAGING_INCDIR}/sys/
185         install -m 0644 ${S}/include/features.h ${STAGING_INCDIR}/
186         for r in ${rpcsvc}; do
187                 h=`echo $r|sed -e's,\.x$,.h,'`
188                 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
189         done
190         for i in libc.a libc_pic.a libc_nonshared.a; do
191                 install -m 0644 ${B}/$i ${STAGING_DIR_HOST}/${layout_base_libdir}/ || die "failed to install $i"
192         done
193         echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_DIR_HOST}/${layout_base_libdir}/libc.so
194 }
195
196 require glibc-package.inc