summaryrefslogtreecommitdiff
path: root/uclibc-snapshot
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-08-03 22:57:08 +0000
committerChris Larson <clarson@kergoth.com>2004-08-03 22:57:08 +0000
commita90dae26321f16fe5600e796c211a6f920063dcd (patch)
treed487ae884f5fd9a8252ff72477b547df58f7a067 /uclibc-snapshot
parentc20cb42ec8d6bc8919308e039b45b12136685452 (diff)
Merge openembedded@openembedded.bkbits.net:packages
into handhelds.org:/home/kergoth/code/projects/packages 2004/08/03 12:40:42-05:00 handhelds.org!kergoth uclibc builds: move make oldconfig into do_configure, and mangle uclibc's awareness of the target FPU based on the TARGET_FPU variable. 2004/08/03 11:46:57-05:00 handhelds.org!kergoth Merge openembedded@openembedded.bkbits.net:packages into handhelds.org:/home/kergoth/code/packages 2004/08/03 11:45:01-05:00 handhelds.org!kergoth Merge openembedded@openembedded.bkbits.net:packages into handhelds.org:/home/kergoth/code/packages 2004/08/03 10:59:37-05:00 handhelds.org!kergoth kill off a few unncessary test results. BKrev: 411018441HwpjOID_6gDO1gm35XWGA
Diffstat (limited to 'uclibc-snapshot')
-rw-r--r--uclibc-snapshot/uclibc-snapshot_cvs.oe152
1 files changed, 152 insertions, 0 deletions
diff --git a/uclibc-snapshot/uclibc-snapshot_cvs.oe b/uclibc-snapshot/uclibc-snapshot_cvs.oe
index e69de29bb2..bdcafb35df 100644
--- a/uclibc-snapshot/uclibc-snapshot_cvs.oe
+++ b/uclibc-snapshot/uclibc-snapshot_cvs.oe
@@ -0,0 +1,152 @@
+DESCRIPTION = "C library for embedded systems"
+LICENSE = "LGPL"
+SECTION = "libs"
+PRIORITY = "required"
+MAINTAINER = "Gerald Britton <gbritton@doomcom.org>"
+PV = "${CVSDATE}"
+
+#
+# For now, we will skip building of a gcc package if it is a uclibc one
+# and our build is not a uclibc one, and we skip a glibc one if our build
+# is a uclibc build.
+#
+# See the note in gcc/gcc_3.4.0.oe
+#
+
+python __anonymous () {
+ import oe, re
+ uc_os = (re.match('.*uclibc$', oe.data.getVar('TARGET_OS', d, 1)) != None)
+ if not uc_os:
+ raise oe.parse.SkipPackage("incompatible with target %s" %
+ oe.data.getVar('TARGET_OS', d, 1))
+}
+
+#
+# We can only work currently with a predefined .config, this ensures we have
+# one. In the future, this may want to respect ${MACHINE} as well.
+#
+
+python __anonymous () {
+ import oe, os;
+ conf = (oe.data.getVar('FILESDIR', d, 1) + "/uClibc.config." +
+ oe.data.getVar('TARGET_ARCH', d, 1))
+ if not os.access(conf, os.R_OK):
+ raise oe.parse.SkipPackage("no available .config for target %s" %
+ oe.data.getVar('TARGET_OS', d, 1))
+}
+
+PROVIDES += " virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
+DEPENDS = "patcher-native virtual/${TARGET_PREFIX}binutils \
+ virtual/${TARGET_PREFIX}gcc-initial"
+INHIBIT_DEFAULT_DEPS = "1"
+
+#
+# This locale file gets copied into uClibc-${PV}/extra/locale/ prior to
+# build, it does not need to be unpacked, but we can't inhibit the unpacking
+# in the current build system.
+#
+UCLIBC_LOCALE_FILE = "uClibc-locale-030818.tgz"
+SRC_URI = "cvs://anonymous:@166.70.99.138/var/cvs;module=uClibc \
+ http://www.uclibc.org/downloads/${UCLIBC_LOCALE_FILE} \
+ http://www.uclibc.org/downloads/toolchain/kernel-headers-2.4.21.tar.bz2 \
+ file://uClibc.config.${TARGET_ARCH}"
+
+S = "${WORKDIR}/uClibc"
+
+UCLIBC_PREFIX = "${CROSS_DIR}/${TARGET_SYS}"
+UCLIBC_STAGE_PREFIX = "${STAGING_DIR}/${HOST_SYS}"
+
+EXTRA_OEMAKE = ""
+
+uclibcbuild_do_patch() {
+ rm -f ${WORKDIR}/linux/include/asm
+ ln -sf asm-${TARGET_ARCH} ${WORKDIR}/linux/include/asm
+
+ touch ${WORKDIR}/linux/include/linux/autoconf.h
+
+ echo "#define UTS_RELEASE \"2.4.21\"" > ${WORKDIR}/linux/include/linux/version.h
+ echo "#define LINUX_VERSION_CODE 132117" >> ${WORKDIR}/linux/include/linux/version.h
+ echo "#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))" \
+ >> ${WORKDIR}/linux/include/linux/version.h
+
+ if [ -f ${WORKDIR}/uClibc.config.${TARGET_ARCH} ]; then
+ cp ${WORKDIR}/uClibc.config.${TARGET_ARCH} ${S}/.config
+ else
+ echo ERROR: No target specific config for ${TARGET_ARCH}
+ return 1
+ fi
+
+ perl -i -p -e 's,^CROSS=.*,TARGET_ARCH=${TARGET_ARCH}\nCROSS=${TARGET_PREFIX},g' ${S}/Rules.mak
+ perl -i -p -e 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"${WORKDIR}/linux\",g' ${S}/.config
+ perl -i -p -e 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' ${S}/.config
+ perl -i -p -e 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/${prefix}\",g' ${S}/.config
+ perl -i -p -e 's,^SHARED_LIB_LOADER_PATH=.*,SHARED_LIB_LOADER_PATH=\"/lib\",g' ${S}/.config
+ perl -i -p -e 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y\nUCLIBC_HAS_LOCALE=n,g' ${S}/.config
+
+ cp ${DL_DIR}/${UCLIBC_LOCALE_FILE} extra/locale
+}
+
+uclibcbuild_do_fpumangle() {
+ perl -i -p -e 's,^HAS_FPU=y,# HAS_FPU is not set,' ${S}/.config
+}
+
+python do_patch () {
+ oe.build.exec_func('base_do_patch', d)
+ oe.build.exec_func('uclibcbuild_do_patch', d)
+ if oe.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ oe.build.exec_func('uclibcbuild_do_fpumangle', d)
+}
+
+do_configure() {
+ oe_runmake oldconfig
+}
+
+do_stage() {
+ # Install into the cross dir (this MUST be done first because we
+ # will install crt1.o in the install_dev stage and gcc needs it)
+ oe_runmake PREFIX= DEVEL_PREFIX=${UCLIBC_PREFIX}/ \
+ RUNTIME_PREFIX=${UCLIBC_PREFIX}/ \
+ install_dev install_runtime install_utils
+
+ # We don't really need this
+ rm -f ${UCLIBC_PREFIX}/include/.cvsignore
+
+ # Fixup shared lib symlinks
+ ( cd ${UCLIBC_PREFIX}/lib
+ for f in c crypt dl m nsl pthread resolv thread_db util; do
+ ln -sf lib${f}.so.? lib${f}.so
+ done
+ )
+
+ # This conflicts with the c++ version of this header
+ rm -f ${UCLIBC_PREFIX}/include/bits/atomicity.h
+
+ # Install into the staging dir
+ oe_runmake PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
+ RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
+ install_dev install_runtime install_utils
+
+ # We don't really need this
+ rm -f ${UCLIBC_STAGE_PREFIX}/include/.cvsignore
+
+ # Fixup shared lib symlinks
+ ( cd ${UCLIBC_STAGE_PREFIX}/lib
+ for f in c crypt dl m nsl pthread resolv thread_db util; do
+ ln -sf lib${f}.so.? lib${f}.so
+ done
+ )
+
+ # This conflicts with the c++ version of this header
+ rm -f ${UCLIBC_STAGE_PREFIX}/include/bits/atomicity.h
+}
+
+do_install() {
+ oe_runmake PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
+ install_dev install_runtime install_utils
+
+ # We don't really need this in /usr/include
+ rm -f ${D}/${prefix}/include/.cvsignore
+
+ # This conflicts with the c++ version of this header
+ rm -f ${D}/${prefix}/include/bits/atomicity.h
+}