merge of '178eac00dc5aa8338d42e8e203633bec7817bbf6'
[vuplus_openembedded] / packages / glibc / glibc_2.3.2.bb
1 require glibc.inc
2
3 PR = "r12"
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 RPROVIDES_glibc-dev += "libc-dev"
42
43 SRC_URI = "ftp://ftp.gnu.org/gnu/glibc/glibc-${PV}.tar.gz \
44            ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-2.3.2.tar.gz \
45            file://noinfo.patch;patch=1 \
46            file://10_cvs.patch;patch=1 \
47            file://arm-ioperm.patch;patch=1;pnum=0 \
48            file://glibc-i686-timing.patch;patch=1;pnum=1 \
49            file://makeconfig.patch;patch=1;pnum=0 \
50            file://locale-es_AR.patch;patch=1;pnum=0 \
51            file://ldconfig.patch;patch=1;pnum=0 \
52            file://ldd.patch;patch=1;pnum=0 \
53            file://fhs-linux-paths.patch;patch=1;pnum=1 \
54            file://glibc22-nss-upgrade.patch;patch=1;pnum=1 \
55            file://glibc22-eo_EO.patch;patch=1;pnum=1 \
56            file://glibc22-m68k-compat.patch;patch=1;pnum=1 \
57            file://glibc22-m68k-fpic.patch;patch=1;pnum=1 \
58            file://glibc22-locales.patch;patch=1;pnum=0 \
59            file://sparc64-fixups.patch;patch=1;pnum=1 \
60            file://glibc22-ttyname-devfs.patch;patch=1;pnum=0 \
61            file://powerpc-sysconf.patch;patch=1;pnum=1 \
62            file://arm-no-hwcap.patch;patch=1;pnum=0 \
63            file://locales-stuff.patch;patch=1;pnum=1 \
64            file://librt-mips.patch;patch=1;pnum=0 \
65            file://glibc23-ctype-compat.patch;patch=1;pnum=1 \
66            file://glibc23-hppa-Rminkernel.patch;patch=1;pnum=0 \
67            file://glibc23-function-compat.patch;patch=1;pnum=1 \
68            file://glibc23-errno.patch;patch=1;pnum=1 \
69            file://glibc23-asserth-decls.patch;patch=1;pnum=0 \
70            file://alpha-pic.patch;patch=1;pnum=0 \
71            file://glibc23-cmov.patch;patch=1;pnum=1 \
72            file://libgcc-compat-all.patch;patch=1;pnum=0 \
73            file://locales-supported.patch;patch=1;pnum=0 \
74            file://libgcc-compat-other.patch;patch=1;pnum=1 \
75            file://s390-tls.patch;patch=1;pnum=0 \
76            file://hurd-enable-ldconfig.patch;patch=1;pnum=1 \
77            file://30_glibc232-base.patch;patch=1;pnum=0 \
78            file://sparcv8-target.patch;patch=1;pnum=0 \
79            file://50_glibc232-arm-dwarf2-buildfix.patch;patch=1;pnum=0 \
80            file://50_glibc232-m68k-dwarf2-buildfix.patch;patch=1;pnum=1 \
81            file://arm-output-format.patch;patch=1;pnum=0 \
82            file://pthread-cleanup.patch;patch=1;pnum=0 \
83            file://glibc-${PV}-ldconfig-tls.patch;patch=1;pnum=1 \
84            file://glibc23-mips-msq.patch;patch=1;pnum=0 \
85            file://glibc23-libio-compat.patch;patch=1;pnum=1 \
86            file://80_glibc232-locales-nb_NO-fix.patch;patch=1;pnum=0 \
87            file://ldso-disable-hwcap.patch;patch=1;pnum=1 \
88            file://11_shlib-lds.patch;patch=1;pnum=1 \
89            file://glibc23-version-sanity.patch;patch=1;pnum=1 \
90            file://glibc23-sse-oldkernel.patch;patch=1;pnum=1 \
91            file://glibc23-sparc-pread64.patch;patch=1;pnum=1 \
92            file://glibc23-powerpc-sigcontext.patch;patch=1;pnum=1 \
93            file://hppa-syscall.patch;patch=1;pnum=0 \
94            file://glibc23-errno-hack.patch;patch=1;pnum=1 \
95            file://90_glibc232-statvfs.patch;patch=1;pnum=0 \
96            file://90_glibc232-timezones.patch;patch=1;pnum=0 \
97            file://arm-memcpy.patch;patch=1;pnum=0 \
98            file://arm-longlong.patch;patch=1;pnum=0 \
99            file://arm-machine-gmon.patch;patch=1;pnum=0 \
100            file://dyn-ldconfig.diff;patch=1;pnum=0 \
101            file://glibc232-gcc34-i386-fixup-attribute.patch;patch=1;pnum=1 \
102            file://glibc232-gcc34-no-unit-at-a-time.patch;patch=1;pnum=1 \
103            file://etc/ld.so.conf \
104            file://generate-supported.mk"
105
106 S = "${WORKDIR}/glibc-${PV}"
107 B = "${WORKDIR}/build-${TARGET_SYS}"
108
109 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
110                 --without-cvs --disable-profile --disable-debug --without-gd \
111                 --enable-clocale=gnu \
112                 --enable-add-ons=${GLIBC_ADDONS} \
113                 --with-headers=${STAGING_INCDIR} \
114                 ${GLIBC_EXTRA_OECONF}"
115
116 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
117
118 glibc_do_unpack () {
119         mv "${WORKDIR}/linuxthreads" "${WORKDIR}/linuxthreads_db" "${S}/"
120 }
121
122 python do_unpack () {
123         bb.build.exec_func('base_do_unpack', d)
124         bb.build.exec_func('glibc_do_unpack', d)
125 }
126
127 do_configure () {
128 # override this function to avoid the autoconf/automake/aclocal/autoheader
129 # calls for now
130 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
131 # version check and doesn't really help with anything
132         if [ -z "`which rpcgen`" ]; then
133                 echo "rpcgen not found.  Install glibc-devel."
134                 exit 1
135         fi
136         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
137         CPPFLAGS="" oe_runconf
138 }
139
140 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
141           yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
142           rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
143
144 do_compile () {
145         # this really is arm specific
146         touch ${S}/sysdeps/arm/framestate.c
147         # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
148         unset LDFLAGS
149         base_do_compile
150         (
151                 cd ${S}/sunrpc/rpcsvc
152                 for r in ${rpcsvc}; do
153                         h=`echo $r|sed -e's,\.x$,.h,'`
154                         rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
155                 done
156         )
157 }
158
159 require glibc-stage.inc
160
161 require glibc-package.bbclass