summaryrefslogtreecommitdiff
path: root/uclibc/uclibc_0.9.26.oe
diff options
context:
space:
mode:
authorGerald Britton <gbritton@doomcom.org>2004-04-27 02:53:54 +0000
committerGerald Britton <gbritton@doomcom.org>2004-04-27 02:53:54 +0000
commit5c76c320af6f82794823215c081469d3de8e64e4 (patch)
tree324384db2b3a349459fb4fa28fc910448ec52ae7 /uclibc/uclibc_0.9.26.oe
parentf63c99c34855fff1cbb932457b08bdd29b3777ff (diff)
- binutils 2.15.90.0.3 / gcc 3.4.0 toolchain
- support in glibc and uclibc for gcc 3.4.0 - new target setup for uclibc, TARGET_OS=linux-uclibc to match the uclibc project's setup and modern config.sub already has support for it. BKrev: 408dcb42JOaGKxGg3PSn6IwU4Kimfw
Diffstat (limited to 'uclibc/uclibc_0.9.26.oe')
-rw-r--r--uclibc/uclibc_0.9.26.oe73
1 files changed, 42 insertions, 31 deletions
diff --git a/uclibc/uclibc_0.9.26.oe b/uclibc/uclibc_0.9.26.oe
index d7232174e8..8008b5c0e7 100644
--- a/uclibc/uclibc_0.9.26.oe
+++ b/uclibc/uclibc_0.9.26.oe
@@ -4,41 +4,49 @@ SECTION = "libs"
PRIORITY = "required"
MAINTAINER = "Gerald Britton <gbritton@doomcom.org>"
-# We want to select whether we're building a uclibc or glibc system and
-# perform provides accordingly. We want to trigger on the original
-# TARGET_VENDOR setting, so we must do this before changing it.
-def target_is_uclibc(d):
- import oe
- if (oe.data.getVar('TARGET_VENDOR', d, 1) == '-uclibc'):
- return 1
- return 0
-def cond_provides(d):
- import oe
- if target_is_uclibc(d):
- return 'virtual/libc'
- return ''
-def cond_packages(d):
- import oe
- if target_is_uclibc(d):
- return '${PN} ${PN}-doc ${PN}-dev ${PN}-locale'
- return '${PN}-compat'
-PROVIDES := "${@cond_provides(d)}"
-PACKAGES := "${@cond_packages(d)}"
-
-# When target is not a uclibc system, do a compat-only package
-FILES_${PN}-compat = "${libdir}/lib*.so.* /lib/*.so*"
-
-# This will ONLY build to this target (we override it incase we're buliding
-# the world for a glibc system)
-TARGET_VENDOR = "-uclibc"
-TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
-TARGET_PREFIX = "${TARGET_SYS}-"
+#
+# 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))
+}
-FILESDIR = "${@os.path.dirname(oe.data.getVar('FILE',d,1))}/uclibc-${PV}"
+#
+# 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))
+}
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc-initial"
+PROVIDES = "virtual/libc"
+DEPENDS = "virtual/${TARGET_PREFIX}binutils \
+ virtual/${TARGET_PREFIX}gcc-initial"
+#
+# 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"
+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"
S = "${WORKDIR}/uClibc-${PV}"
@@ -63,6 +71,7 @@ uclibcbuild_do_patch() {
cp ${FILESDIR}/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
@@ -72,6 +81,8 @@ uclibcbuild_do_patch() {
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
+
make oldconfig
}