Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[vuplus_openembedded] / recipes / glibc / glibc_2.3.2.bb
1 require glibc.inc
2
3 PR = "r20"
4
5 DEFAULT_PREFERENCE_sh3 = "-99"
6
7 GLIBC_ADDONS ?= "linuxthreads"
8
9 #
10 # For now, we will skip building of a gcc package if it is a uclibc one
11 # and our build is not a uclibc one, and we skip a glibc one if our build
12 # is a uclibc build.
13 #
14 # See the note in gcc/gcc_3.4.0.oe
15 #
16
17 python __anonymous () {
18     import bb, re
19     uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
20     if uc_os:
21         raise bb.parse.SkipPackage("incompatible with target %s" %
22                                    bb.data.getVar('TARGET_OS', d, 1))
23 }
24
25 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*"
26
27 FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir} ${datadir}/zoneinfo"
28 FILES_ldd = "${bindir}/ldd"
29 FILES_libsegfault = "/lib/libSegFault*"
30 FILES_glibc-extra-nss = "/lib/libnss*"
31 FILES_sln = "/sbin/sln"
32 FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
33 FILES_nscd = "${sbindir}/nscd*"
34 FILES_glibc-utils = "${bindir} ${sbindir}"
35 FILES_glibc-gconv = "${libdir}/gconv"
36 FILES_catchsegv = "${bindir}/catchsegv"
37 DEPENDS_catchsegv = "libsegfault"
38 FILES_glibc-pcprofile = "/lib/libpcprofile.so"
39 FILES_glibc-thread-db = "/lib/libthread_db*"
40 FILES_localedef = "${bindir}/localedef"
41 RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
42 RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
43
44 SRC_URI = "ftp://ftp.gnu.org/gnu/glibc/glibc-${PV}.tar.gz \
45            ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-2.3.2.tar.gz \
46            file://noinfo.patch;patch=1 \
47            file://10_cvs.patch;patch=1 \
48            file://arm-ioperm.patch;patch=1;pnum=0 \
49            file://glibc-i686-timing.patch;patch=1;pnum=1 \
50            file://makeconfig.patch;patch=1;pnum=0 \
51            file://locale-es_AR.patch;patch=1;pnum=0 \
52            file://ldconfig.patch;patch=1;pnum=0 \
53            file://ldd.patch;patch=1;pnum=0 \
54            file://fhs-linux-paths.patch;patch=1;pnum=1 \
55            file://glibc22-nss-upgrade.patch;patch=1;pnum=1 \
56            file://glibc22-eo_EO.patch;patch=1;pnum=1 \
57            file://glibc22-m68k-compat.patch;patch=1;pnum=1 \
58            file://glibc22-m68k-fpic.patch;patch=1;pnum=1 \
59            file://glibc22-locales.patch;patch=1;pnum=0 \
60            file://sparc64-fixups.patch;patch=1;pnum=1 \
61            file://glibc22-ttyname-devfs.patch;patch=1;pnum=0 \
62            file://powerpc-sysconf.patch;patch=1;pnum=1 \
63            file://arm-no-hwcap.patch;patch=1;pnum=0 \
64            file://locales-stuff.patch;patch=1;pnum=1 \
65            file://librt-mips.patch;patch=1;pnum=0 \
66            file://glibc23-ctype-compat.patch;patch=1;pnum=1 \
67            file://glibc23-hppa-Rminkernel.patch;patch=1;pnum=0 \
68            file://glibc23-function-compat.patch;patch=1;pnum=1 \
69            file://glibc23-errno.patch;patch=1;pnum=1 \
70            file://glibc23-asserth-decls.patch;patch=1;pnum=0 \
71            file://alpha-pic.patch;patch=1;pnum=0 \
72            file://glibc23-cmov.patch;patch=1;pnum=1 \
73            file://libgcc-compat-all.patch;patch=1;pnum=0 \
74            file://locales-supported.patch;patch=1;pnum=0 \
75            file://libgcc-compat-other.patch;patch=1;pnum=1 \
76            file://s390-tls.patch;patch=1;pnum=0 \
77            file://hurd-enable-ldconfig.patch;patch=1;pnum=1 \
78            file://30_glibc232-base.patch;patch=1;pnum=0 \
79            file://sparcv8-target.patch;patch=1;pnum=0 \
80            file://50_glibc232-arm-dwarf2-buildfix.patch;patch=1;pnum=0 \
81            file://50_glibc232-m68k-dwarf2-buildfix.patch;patch=1;pnum=1 \
82            file://arm-output-format.patch;patch=1;pnum=0 \
83            file://pthread-cleanup.patch;patch=1;pnum=0 \
84            file://glibc-${PV}-ldconfig-tls.patch;patch=1;pnum=1 \
85            file://glibc23-mips-msq.patch;patch=1;pnum=0 \
86            file://glibc23-libio-compat.patch;patch=1;pnum=1 \
87            file://80_glibc232-locales-nb_NO-fix.patch;patch=1;pnum=0 \
88            file://ldso-disable-hwcap.patch;patch=1;pnum=1 \
89            file://11_shlib-lds.patch;patch=1;pnum=1 \
90            file://glibc23-version-sanity.patch;patch=1;pnum=1 \
91            file://glibc23-sse-oldkernel.patch;patch=1;pnum=1 \
92            file://glibc23-sparc-pread64.patch;patch=1;pnum=1 \
93            file://glibc23-powerpc-sigcontext.patch;patch=1;pnum=1 \
94            file://hppa-syscall.patch;patch=1;pnum=0 \
95            file://glibc23-errno-hack.patch;patch=1;pnum=1 \
96            file://90_glibc232-statvfs.patch;patch=1;pnum=0 \
97            file://90_glibc232-timezones.patch;patch=1;pnum=0 \
98            file://arm-memcpy.patch;patch=1;pnum=0 \
99            file://arm-longlong.patch;patch=1;pnum=0 \
100            file://arm-machine-gmon.patch;patch=1;pnum=0 \
101            file://dyn-ldconfig.diff;patch=1;pnum=0 \
102            file://glibc232-gcc34-i386-fixup-attribute.patch;patch=1;pnum=1 \
103            file://glibc232-gcc34-no-unit-at-a-time.patch;patch=1;pnum=1 \
104            file://etc/ld.so.conf \
105            file://generate-supported.mk"
106
107 S = "${WORKDIR}/glibc-${PV}"
108 B = "${WORKDIR}/build-${TARGET_SYS}"
109
110 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
111                 --without-cvs --disable-profile --disable-debug --without-gd \
112                 --enable-clocale=gnu \
113                 --enable-add-ons=${GLIBC_ADDONS} \
114                 --with-headers=${STAGING_INCDIR} \
115                 ${GLIBC_EXTRA_OECONF}"
116
117 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
118
119 glibc_do_unpack () {
120         mv "${WORKDIR}/linuxthreads" "${WORKDIR}/linuxthreads_db" "${S}/"
121 }
122
123 python do_unpack () {
124         bb.build.exec_func('base_do_unpack', d)
125         bb.build.exec_func('glibc_do_unpack', d)
126 }
127
128 do_configure () {
129 # override this function to avoid the autoconf/automake/aclocal/autoheader
130 # calls for now
131 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
132 # version check and doesn't really help with anything
133         if [ -z "`which rpcgen`" ]; then
134                 echo "rpcgen not found.  Install glibc-devel."
135                 exit 1
136         fi
137         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
138         CPPFLAGS="" oe_runconf
139 }
140
141 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
142           yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
143           rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
144
145 do_compile () {
146         # this really is arm specific
147         touch ${S}/sysdeps/arm/framestate.c
148         # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
149         unset LDFLAGS
150         base_do_compile
151         (
152                 cd ${S}/sunrpc/rpcsvc
153                 for r in ${rpcsvc}; do
154                         h=`echo $r|sed -e's,\.x$,.h,'`
155                         rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
156                 done
157         )
158 }
159
160 require glibc-stage.inc
161
162 require glibc-package.bbclass