summaryrefslogtreecommitdiff
path: root/uclibc/uclibc_0.9.26.oe
diff options
context:
space:
mode:
Diffstat (limited to 'uclibc/uclibc_0.9.26.oe')
-rw-r--r--uclibc/uclibc_0.9.26.oe75
1 files changed, 25 insertions, 50 deletions
diff --git a/uclibc/uclibc_0.9.26.oe b/uclibc/uclibc_0.9.26.oe
index 5338191501..bef042ccb5 100644
--- a/uclibc/uclibc_0.9.26.oe
+++ b/uclibc/uclibc_0.9.26.oe
@@ -3,6 +3,7 @@ LICENSE = "LGPL"
SECTION = "libs"
PRIORITY = "required"
MAINTAINER = "Gerald Britton <gbritton@doomcom.org>"
+PR = "r1"
#
# For now, we will skip building of a gcc package if it is a uclibc one
@@ -20,23 +21,9 @@ python __anonymous () {
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"
+PROVIDES += " virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
DEPENDS = "patcher-native virtual/${TARGET_PREFIX}binutils \
- virtual/${TARGET_PREFIX}gcc-initial"
+ virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
INHIBIT_DEFAULT_DEPS = "1"
#
@@ -45,59 +32,47 @@ INHIBIT_DEFAULT_DEPS = "1"
# in the current build system.
#
UCLIBC_LOCALE_FILE = "uClibc-locale-030818.tgz"
-FILESDIR = "${@os.path.dirname(oe.data.getVar('FILE',d,1))}/uclibc-${PV}"
SRC_URI = "http://www.uclibc.org/downloads/uClibc-${PV}.tar.bz2 \
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}"
+ file://nokernelheadercheck.patch;patch=1 \
+ file://26headers.patch;patch=1 \
+ file://uClibc.config"
S = "${WORKDIR}/uClibc-${PV}"
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
+EXTRA_OEMAKE = "'OPTIMIZATION=' 'CPU_CFLAGS=${CFLAGS}' 'STRIPTOOL=true'"
+configmangle = 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE="${CROSS_DIR}/${TARGET_SYS}/include",g; \
+ s,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX="/",g; \
+ s,^DEVEL_PREFIX=.*,DEVEL_PREFIX="/${prefix}",g; \
+ s,^SHARED_LIB_LOADER_PATH=.*,SHARED_LIB_LOADER_PATH="/lib",; \
+ s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y\nUCLIBC_HAS_LOCALE=n,g;'
- 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
+python () {
+ if oe.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ oe.data.setVar('configmangle_append', ' s,^HAS_FPU=y,# HAS_FPU is not set,;', d)
}
-uclibcbuild_do_fpumangle() {
- perl -i -p -e 's,^HAS_FPU=y,# HAS_FPU is not set,' ${S}/.config
+uclibcbuild_do_patch() {
+ ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux
+ ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm
+
+ cp ${DL_DIR}/${UCLIBC_LOCALE_FILE} extra/locale
}
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() {
+ cp ${WORKDIR}/uClibc.config ${S}/.config
+
+ perl -i -p -e 's,^CROSS=.*,TARGET_ARCH=${TARGET_ARCH}\nCROSS=${TARGET_PREFIX},g' ${S}/Rules.mak
+ perl -i -p -e '${configmangle}' ${S}/.config
+
oe_runmake oldconfig
}