aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2012-09-25 13:56:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-22 14:57:26 +0100
commit74b5f8943b2b29c7b3b62be7d81fb2b3a86b9584 (patch)
tree03cd109a102b3a6ffe13a079b585f8049b105c12
parent61131828c59178c923b3d5b5fcacf0dbcba275a5 (diff)
downloadopenembedded-core-contrib-74b5f8943b2b29c7b3b62be7d81fb2b3a86b9584.tar.gz
eglibc: Move perl- and bash-using scripts to separate recipes
This removes the dependency of eglibc.bb itself on perl and bash which, in turn, eliminates the need to build those two recipes if the scripts which need them are not going to be installed. Also provide dummy do_evacuate_scripts() for all variants of eglibc-initial otherwise the nativesdk and multilib variants might crash trying to copy a non-existent mtrace script. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/eglibc/eglibc-collateral.inc11
-rw-r--r--meta/recipes-core/eglibc/eglibc-initial.inc5
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale.inc11
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace.inc14
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace_2.16.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc24
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts.inc17
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts_2.16.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.16.bb2
9 files changed, 69 insertions, 17 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-collateral.inc b/meta/recipes-core/eglibc/eglibc-collateral.inc
new file mode 100644
index 0000000000..b770bb0a28
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-collateral.inc
@@ -0,0 +1,11 @@
+INHIBIT_DEFAULT_DEPS = "1"
+LICENSE = "GPLv2 & LGPLv2.1"
+
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install[depends] += "virtual/${MLPREFIX}libc:do_populate_sysroot"
+
diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
index f44db0c00e..1520efd718 100644
--- a/meta/recipes-core/eglibc/eglibc-initial.inc
+++ b/meta/recipes-core/eglibc/eglibc-initial.inc
@@ -73,3 +73,8 @@ eglibcinitial_sstate_postinst() {
}
do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}"
+
+# We don't install any scripts so there is nothing to evacuate
+do_evacuate_scripts () {
+ :
+}
diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc
index 16ace66502..0381e2630a 100644
--- a/meta/recipes-core/eglibc/eglibc-locale.inc
+++ b/meta/recipes-core/eglibc/eglibc-locale.inc
@@ -1,15 +1,8 @@
-INHIBIT_DEFAULT_DEPS = "1"
-LICENSE = "GPLv2 & LGPLv2.1"
+include eglibc-collateral.inc
BPN = "eglibc"
LOCALEBASEPN = "eglibc"
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
# is set. The idea is to avoid running localedef on the target (at first boot)
# to decrease initial boot time and avoid localedef being killed by the OOM
@@ -90,6 +83,4 @@ do_install () {
inherit libc-package
-do_install[depends] += "virtual/${MLPREFIX}libc:do_populate_sysroot"
-
BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace.inc b/meta/recipes-core/eglibc/eglibc-mtrace.inc
new file mode 100644
index 0000000000..1ec93ac19b
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-mtrace.inc
@@ -0,0 +1,14 @@
+include eglibc-collateral.inc
+
+PR = "r1"
+SUMMARY = "mtrace utility provided by eglibc"
+DESCRIPTION = "mtrace utility provided by eglibc"
+RDEPENDS_${PN} = "perl"
+RPROVIDES_${PN} = "libc-mtrace"
+
+SRC = "${STAGING_INCDIR}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
+
+do_install() {
+ install -d -m 0755 ${D}${bindir}
+ install -m 0755 ${SRC}/mtrace ${D}${bindir}/
+}
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace_2.16.bb b/meta/recipes-core/eglibc/eglibc-mtrace_2.16.bb
new file mode 100644
index 0000000000..6fa2be9cc9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-mtrace_2.16.bb
@@ -0,0 +1 @@
+require eglibc-mtrace.inc
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index 0059bcfc1c..79c43f15be 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -17,7 +17,7 @@ python __anonymous () {
# Set this to zero if you don't want ldconfig in the output package
USE_LDCONFIG ?= "1"
-PACKAGES = "${PN}-dbg catchsegv sln nscd ldd ${PN}-mtrace ${PN}-utils eglibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} eglibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
+PACKAGES = "${PN}-dbg catchsegv sln nscd ldd ${PN}-utils eglibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} eglibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
# The ld.so in this eglibc supports the GNU_HASH
RPROVIDES_${PN} = "glibc rtld(GNU_HASH)"
@@ -51,8 +51,6 @@ FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug"
FILES_catchsegv = "${bindir}/catchsegv"
RDEPENDS_catchsegv = "libsegfault"
-RDEPENDS_${PN}-utils += "bash"
-RDEPENDS_${PN}-mtrace += "perl"
FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so"
FILES_eglibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
RPROVIDES_${PN}-dev += "libc-dev"
@@ -65,11 +63,9 @@ DESCRIPTION_nscd = "nscd, name service cache daemon, caches name service lookups
SUMMARY_eglibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services."
SUMMARY_ldd = "print shared library dependencies"
-DESCRIPTION_ldd = "/usr/bin/ldd prints shared library dependencies for each program or shared library specified on the command line."
+DESCRIPTION_ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line."
SUMMARY_${PN}-utils = "Miscellaneous utilities provided by eglibc"
DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
-SUMMARY_${PN}-mtrace = "mtrace utility provided by eglibc"
-DESCRIPTION_${PN}-mtrace = "mtrace utility provided by eglibc"
DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
inherit libc-common multilib_header
@@ -111,10 +107,26 @@ do_install_locale () {
addtask do_install_locale after do_install before do_populate_sysroot do_package
+bashscripts = "mtrace sotruss xtrace"
+
+do_evacuate_scripts () {
+ target=${D}${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+ mkdir -p $target
+ for i in ${bashscripts}; do
+ cp ${D}${bindir}/$i $target/
+ done
+}
+
+addtask evacuate_scripts after do_install before do_populate_sysroot do_package
+
PACKAGE_PREPROCESS_FUNCS += "eglibc_package_preprocess"
eglibc_package_preprocess () {
rm -rf ${PKGD}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
+ rm -rf ${PKGD}/${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+ for i in ${bashscripts}; do
+ rm -f ${PKGD}${bindir}/$i
+ done
rm -rf ${PKGD}/${localedir}
if [ "${libdir}" != "${exec_prefix}/lib" ]; then
# This dir only exists to hold locales
diff --git a/meta/recipes-core/eglibc/eglibc-scripts.inc b/meta/recipes-core/eglibc/eglibc-scripts.inc
new file mode 100644
index 0000000000..a020961f7f
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-scripts.inc
@@ -0,0 +1,17 @@
+include eglibc-collateral.inc
+
+SUMMARY = "utility scripts provided by eglibc"
+DESCRIPTION = "utility scripts provided by eglibc"
+RDEPENDS_${PN} = "bash"
+RDEPENDS_ldd = "bash"
+
+SRC = "${STAGING_INCDIR}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
+
+bashscripts = "mtrace sotruss xtrace"
+
+do_install() {
+ install -d -m 0755 ${D}${bindir}
+ for i in ${bashscripts}; do
+ install -m 0755 ${SRC}/$i ${D}${bindir}/
+ done
+}
diff --git a/meta/recipes-core/eglibc/eglibc-scripts_2.16.bb b/meta/recipes-core/eglibc/eglibc-scripts_2.16.bb
new file mode 100644
index 0000000000..31133621d1
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-scripts_2.16.bb
@@ -0,0 +1 @@
+require eglibc-scripts.inc
diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
index 78bf9bedaf..2c1018f21c 100644
--- a/meta/recipes-core/eglibc/eglibc_2.16.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
@@ -3,7 +3,7 @@ require eglibc.inc
SRCREV = "20393"
DEPENDS += "gperf-native kconfig-frontends-native"
-PR = "r15"
+PR = "r16"
PR_append = "+svnr${SRCPV}"
EGLIBC_BRANCH="eglibc-2_16"