diff options
Diffstat (limited to 'meta/packages/glibc/glibc_2.5.bb')
| -rw-r--r-- | meta/packages/glibc/glibc_2.5.bb | 206 |
1 files changed, 206 insertions, 0 deletions
diff --git a/meta/packages/glibc/glibc_2.5.bb b/meta/packages/glibc/glibc_2.5.bb new file mode 100644 index 0000000000..0afadadb60 --- /dev/null +++ b/meta/packages/glibc/glibc_2.5.bb | |||
| @@ -0,0 +1,206 @@ | |||
| 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 | PR = "r2" | ||
| 7 | |||
| 8 | # the -isystem in bitbake.conf screws up glibc do_stage | ||
| 9 | BUILD_CPPFLAGS = "-I${STAGING_DIR}/${BUILD_SYS}/include" | ||
| 10 | TARGET_CPPFLAGS = "-I${STAGING_DIR}/${TARGET_SYS}/include" | ||
| 11 | |||
| 12 | |||
| 13 | FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4" | ||
| 14 | |||
| 15 | GLIBC_ADDONS ?= "ports,nptl,libidn" | ||
| 16 | GLIBC_EXTRA_OECONF ?= "" | ||
| 17 | |||
| 18 | GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN" | ||
| 19 | |||
| 20 | # | ||
| 21 | # For now, we will skip building of a gcc package if it is a uclibc one | ||
| 22 | # and our build is not a uclibc one, and we skip a glibc one if our build | ||
| 23 | # is a uclibc build. | ||
| 24 | # | ||
| 25 | # See the note in gcc/gcc_3.4.0.oe | ||
| 26 | # | ||
| 27 | |||
| 28 | python __anonymous () { | ||
| 29 | import bb, re | ||
| 30 | uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) | ||
| 31 | if uc_os: | ||
| 32 | raise bb.parse.SkipPackage("incompatible with target %s" % | ||
| 33 | bb.data.getVar('TARGET_OS', d, 1)) | ||
| 34 | } | ||
| 35 | |||
| 36 | # nptl needs unwind support in gcc, which can't be built without glibc. | ||
| 37 | PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}" | ||
| 38 | PROVIDES += "virtual/libintl virtual/libiconv" | ||
| 39 | DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers" | ||
| 40 | RDEPENDS_${PN}-dev = "linux-libc-headers-dev" | ||
| 41 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 42 | |||
| 43 | # file://noinfo.patch;patch=1 | ||
| 44 | # file://ldconfig.patch;patch=1;pnum=0 | ||
| 45 | # file://arm-machine-gmon.patch;patch=1;pnum=0 \ | ||
| 46 | # \ | ||
| 47 | # file://arm-ioperm.patch;patch=1;pnum=0 \ | ||
| 48 | # file://ldd.patch;patch=1;pnum=0 \ | ||
| 49 | SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \ | ||
| 50 | ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-${PV}.tar.bz2 \ | ||
| 51 | ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2 \ | ||
| 52 | file://arm-memcpy.patch;patch=1 \ | ||
| 53 | file://arm-longlong.patch;patch=1 \ | ||
| 54 | file://fhs-linux-paths.patch;patch=1 \ | ||
| 55 | file://dl-cache-libcmp.patch;patch=1 \ | ||
| 56 | file://ldsocache-varrun.patch;patch=1 \ | ||
| 57 | file://nptl-crosscompile.patch;patch=1 \ | ||
| 58 | # file://glibc-2.4-compile.patch;patch=1 \ | ||
| 59 | # file://glibc-2.4-openat-3.patch;patch=1 \ | ||
| 60 | # file://fixup-aeabi-syscalls.patch;patch=1 \ | ||
| 61 | file://zecke-sane-readelf.patch;patch=1 \ | ||
| 62 | file://generic-bits_select.h \ | ||
| 63 | file://generic-bits_types.h \ | ||
| 64 | file://generic-bits_typesizes.h \ | ||
| 65 | file://generic-bits_time.h \ | ||
| 66 | file://etc/ld.so.conf \ | ||
| 67 | file://generate-supported.mk" | ||
| 68 | |||
| 69 | |||
| 70 | # Build fails on sh3 and sh4 without additional patches | ||
| 71 | SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1" | ||
| 72 | SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1" | ||
| 73 | |||
| 74 | S = "${WORKDIR}/glibc-${PV}" | ||
| 75 | B = "${WORKDIR}/build-${TARGET_SYS}" | ||
| 76 | |||
| 77 | inherit autotools | ||
| 78 | |||
| 79 | EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | ||
| 80 | --without-cvs --disable-profile --disable-debug --without-gd \ | ||
| 81 | --enable-clocale=gnu \ | ||
| 82 | --enable-add-ons=${GLIBC_ADDONS} \ | ||
| 83 | --with-headers=${STAGING_INCDIR} \ | ||
| 84 | --without-selinux \ | ||
| 85 | ${GLIBC_EXTRA_OECONF}" | ||
| 86 | |||
| 87 | EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}" | ||
| 88 | |||
| 89 | def get_glibc_fpu_setting(bb, d): | ||
| 90 | if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: | ||
| 91 | return "--without-fp" | ||
| 92 | return "" | ||
| 93 | |||
| 94 | do_munge() { | ||
| 95 | # Integrate ports and libidn into tree | ||
| 96 | mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports | ||
| 97 | mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn | ||
| 98 | |||
| 99 | # Ports isn't really working... Fix it | ||
| 100 | # Some of this is rather dirty, but it seems to be the only | ||
| 101 | # quick way to get this cruft to compile | ||
| 102 | rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads | ||
| 103 | ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads | ||
| 104 | cp ${S}/nptl/sysdeps/pthread/bits/sigthread.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/ | ||
| 105 | cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/ | ||
| 106 | cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/ | ||
| 107 | cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h | ||
| 108 | cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h | ||
| 109 | cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h | ||
| 110 | cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h | ||
| 111 | # Copy in generic stuff for not yet implemented headers | ||
| 112 | for i in ${S}/bits/*.h; do | ||
| 113 | F=`basename $i` | ||
| 114 | [ "$F" = "local_lim.h" ] && continue | ||
| 115 | [ "$F" = "errno.h" ] && continue | ||
| 116 | 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/ | ||
| 117 | done | ||
| 118 | # This is harmful; we need to get the one from nptl/sysdeps/pthreads | ||
| 119 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h | ||
| 120 | # Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h | ||
| 121 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h | ||
| 122 | # Obsoleted by sysdeps/gnu/bits/utmp.h | ||
| 123 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h | ||
| 124 | } | ||
| 125 | |||
| 126 | addtask munge before do_patch after do_unpack | ||
| 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 | # -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 | do_stage() { | ||
| 160 | rm -f ${STAGING_LIBDIR}/libc.so.6 | ||
| 161 | oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \ | ||
| 162 | 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ | ||
| 163 | '${STAGING_LIBDIR}/libc.so.6' \ | ||
| 164 | install-headers install-lib | ||
| 165 | |||
| 166 | install -d ${STAGING_INCDIR}/gnu \ | ||
| 167 | ${STAGING_INCDIR}/bits \ | ||
| 168 | ${STAGING_INCDIR}/rpcsvc | ||
| 169 | install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/ | ||
| 170 | install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/ | ||
| 171 | install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h | ||
| 172 | for r in ${rpcsvc}; do | ||
| 173 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
| 174 | install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/ | ||
| 175 | done | ||
| 176 | for i in libc.a libc_pic.a libc_nonshared.a; do | ||
| 177 | install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i" | ||
| 178 | done | ||
| 179 | echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so | ||
| 180 | echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so | ||
| 181 | |||
| 182 | rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6 | ||
| 183 | oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \ | ||
| 184 | 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ | ||
| 185 | '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \ | ||
| 186 | install-headers install-lib | ||
| 187 | |||
| 188 | install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \ | ||
| 189 | ${CROSS_DIR}/${TARGET_SYS}/include/bits \ | ||
| 190 | ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc | ||
| 191 | install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/ | ||
| 192 | install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/ | ||
| 193 | install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h | ||
| 194 | for r in ${rpcsvc}; do | ||
| 195 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
| 196 | install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/ | ||
| 197 | done | ||
| 198 | |||
| 199 | for i in libc.a libc_pic.a libc_nonshared.a; do | ||
| 200 | install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i" | ||
| 201 | done | ||
| 202 | echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so | ||
| 203 | echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so | ||
| 204 | } | ||
| 205 | |||
| 206 | require glibc-package.bbclass | ||
