diff options
author | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2008-02-06 01:28:36 +0000 |
---|---|---|
committer | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2008-02-06 01:28:36 +0000 |
commit | 58946634dcccaee49525b9bdaf9b9585c0b31a08 (patch) | |
tree | ada61ac6f0ffcf16831b0719dc5b651b8389d86c /packages/klibc | |
parent | 5fcb08b919068b402022c7601ae05cee58b50c09 (diff) |
klibc: move do_stage to separate inc file. Fixes do_stage failure for klibc-utils-static.
Diffstat (limited to 'packages/klibc')
-rw-r--r-- | packages/klibc/klibc-common.inc | 62 | ||||
-rw-r--r-- | packages/klibc/klibc-utils-static_1.5.bb | 2 | ||||
-rw-r--r-- | packages/klibc/klibc.inc | 83 |
3 files changed, 74 insertions, 73 deletions
diff --git a/packages/klibc/klibc-common.inc b/packages/klibc/klibc-common.inc new file mode 100644 index 0000000000..146968eaf0 --- /dev/null +++ b/packages/klibc/klibc-common.inc @@ -0,0 +1,62 @@ +DEPENDS = "virtual/kernel perl-native" +SECTION = "libs" +DESCRIPTION = "klibc is intended to be a minimalistic libc subset for \ +use with initramfs. It is deliberately written for small size, \ +minimal entaglement, and portability, not speed." +LICENSE = "BSD-ADV" +SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/Stable/klibc-${PV}.tar.bz2" +SRC_URI += "file://install.patch;patch=1" +S = "${WORKDIR}/klibc-${PV}" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# for the correct kernel staging path +# inherit module-base + +EXTRA_OEMAKE = "'ARCH=${KLIBC_ARCH}' \ + 'CROSS=${TARGET_PREFIX}' \ + 'CC=${HOST_PREFIX}gcc' \ + 'LD=${HOST_PREFIX}ld' \ + 'AR=${AR}' \ + 'RANLIB=${RANLIB}' \ + 'NM=${TARGET_PREFIX}nm' \ + 'STRIP=echo' \ + 'SHLIBDIR=/lib' \ + 'HOST_CC=${BUILD_CC}' \ + 'HOST_CFLAGS=${BUILD_CFLAGS}' \ + 'HOST_LDFLAGS=${BUILD_LDFLAGS}' \ + 'HOST_LIBS=' \ + 'LDFLAGS=' \ + 'ARCHREQFLAGS=${HOST_CC_ARCH}' \ + 'OPTFLAGS=${TARGET_CFLAGS}' \ + 'mandir=${mandir}'" + +KLIBC_ARCH = '${TARGET_ARCH}' +KLIBC_ARCH_armeb = 'arm' +KLIBC_ARCH_mipsel = 'mips' + +# the klibc code contains ARM instructions (for ARM), this +# could be fixed, but for the moment: +ARM_INSTRUCTION_SET = "arm" + +TARGET_CFLAGS := "${@oe_filter_out('-I\S+', '${TARGET_CFLAGS}', d)} -I${STAGING_KERNEL_DIR}/include" + +INSTALLDIR = "/usr/lib/klibc" +INSTALLPREFIX = "${INSTALLDIR}/${TARGET_PREFIX}" +INSTALLBINDIR = "${INSTALLPREFIX}bin" +INSTALLLIBDIR = "${INSTALLPREFIX}lib" +INSTALLINCDIR = "${INSTALLPREFIX}include" + +PACKAGES = "${PN}-dbg ${PN} ${PN}-dev ${PN}-doc" + +FILES_${PN} = "/lib/*.so* ${INSTALLBINDIR}" +FILES_${PN}-dev = "/usr/bin ${INSTALLINCDIR} ${INSTALLLIBDIR}" + +do_configure () { + ln -sf ${STAGING_KERNEL_DIR} linux +} + +do_install() { + # The installed -dev won't work because it has the cross compiler + # path compiled in. + oe_runmake 'INSTALLROOT=${D}' install +} diff --git a/packages/klibc/klibc-utils-static_1.5.bb b/packages/klibc/klibc-utils-static_1.5.bb index 4349b8d4f0..17db23305d 100644 --- a/packages/klibc/klibc-utils-static_1.5.bb +++ b/packages/klibc/klibc-utils-static_1.5.bb @@ -1,4 +1,4 @@ -require klibc.inc +require klibc-common.inc PR = "r3" diff --git a/packages/klibc/klibc.inc b/packages/klibc/klibc.inc index 539e2fbf84..efaf298e36 100644 --- a/packages/klibc/klibc.inc +++ b/packages/klibc/klibc.inc @@ -1,78 +1,17 @@ -DEPENDS = "virtual/kernel perl-native" -SECTION = "libs" -DESCRIPTION = "klibc is intended to be a minimalistic libc subset for \ -use with initramfs. It is deliberately written for small size, \ -minimal entaglement, and portability, not speed." -LICENSE = "BSD-ADV" -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/Stable/klibc-${PV}.tar.bz2" -SRC_URI += "file://install.patch;patch=1" -S = "${WORKDIR}/klibc-${PV}" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -# for the correct kernel staging path -# inherit module-base - -EXTRA_OEMAKE = "'ARCH=${KLIBC_ARCH}' \ - 'CROSS=${TARGET_PREFIX}' \ - 'CC=${HOST_PREFIX}gcc' \ - 'LD=${HOST_PREFIX}ld' \ - 'AR=${AR}' \ - 'RANLIB=${RANLIB}' \ - 'NM=${TARGET_PREFIX}nm' \ - 'STRIP=echo' \ - 'SHLIBDIR=/lib' \ - 'HOST_CC=${BUILD_CC}' \ - 'HOST_CFLAGS=${BUILD_CFLAGS}' \ - 'HOST_LDFLAGS=${BUILD_LDFLAGS}' \ - 'HOST_LIBS=' \ - 'LDFLAGS=' \ - 'ARCHREQFLAGS=${HOST_CC_ARCH}' \ - 'OPTFLAGS=${TARGET_CFLAGS}' \ - 'mandir=${mandir}'" - -KLIBC_ARCH = '${TARGET_ARCH}' -KLIBC_ARCH_armeb = 'arm' -KLIBC_ARCH_mipsel = 'mips' - -# the klibc code contains ARM instructions (for ARM), this -# could be fixed, but for the moment: -ARM_INSTRUCTION_SET = "arm" - -TARGET_CFLAGS := "${@oe_filter_out('-I\S+', '${TARGET_CFLAGS}', d)} -I${STAGING_KERNEL_DIR}/include" - -INSTALLDIR = "/usr/lib/klibc" -INSTALLPREFIX = "${INSTALLDIR}/${TARGET_PREFIX}" -INSTALLBINDIR = "${INSTALLPREFIX}bin" -INSTALLLIBDIR = "${INSTALLPREFIX}lib" -INSTALLINCDIR = "${INSTALLPREFIX}include" - -PACKAGES = "${PN}-dbg ${PN} ${PN}-dev ${PN}-doc" - -FILES_${PN} = "/lib/*.so* ${INSTALLBINDIR}" -FILES_${PN}-dev = "/usr/bin ${INSTALLINCDIR} ${INSTALLLIBDIR}" - -do_configure () { - ln -sf ${STAGING_KERNEL_DIR} linux -} +require klibc-common.inc STAGING_KLIBC_DIR = "${STAGING_DIR_HOST}/klibc" do_stage() { - rm -rf "${STAGING_KLIBC_DIR}" - oe_runmake 'prefix=${STAGING_KLIBC_DIR}' \ - 'bindir=${STAGING_BINDIR}' \ - 'mandir=${STAGING_DIR_HOST}${layout_mandir}' \ - install - # The following is sufficient, at least in klibc 1.1.1 to make klcc - # use the staged libraries and include files. - sed -i -e 's@^\$prefix = .*$@\$prefix = "${STAGING_KLIBC_DIR}/lib/klibc";@' \ - '${STAGING_BINDIR}/${TARGET_PREFIX}klcc' + rm -rf "${STAGING_KLIBC_DIR}" + oe_runmake 'prefix=${STAGING_KLIBC_DIR}' \ + 'bindir=${STAGING_BINDIR}' \ + 'mandir=${STAGING_DIR_HOST}${layout_mandir}' \ + install + # The following is sufficient, at least in klibc 1.1.1 to make klcc + # use the staged libraries and include files. + sed -i -e 's@^\$prefix = .*$@\$prefix = "${STAGING_KLIBC_DIR}/lib/klibc";@' \ + '${STAGING_BINDIR}/${TARGET_PREFIX}klcc' # Perhaps other binaries need to be moved to cross? - mv '${STAGING_BINDIR}/${TARGET_PREFIX}klcc' '${STAGING_BINDIR_CROSS}' -} - -do_install() { - # The installed -dev won't work because it has the cross compiler - # path compiled in. - oe_runmake 'INSTALLROOT=${D}' install + mv '${STAGING_BINDIR}/${TARGET_PREFIX}klcc' '${STAGING_BINDIR_CROSS}' } |