aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils.inc
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-05-21 13:17:41 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 10:45:32 +0100
commitf0ad3c8ce298ca492938e4ded2263c54213786f6 (patch)
tree2829a4afa33912c828c601bef50aabfe4f4e8b1c /meta/recipes-devtools/binutils/binutils.inc
parent55c01de28a28a4cfe16d36663c190a874ef2e85d (diff)
downloadopenembedded-core-contrib-f0ad3c8ce298ca492938e4ded2263c54213786f6.tar.gz
openembedded-core-contrib-f0ad3c8ce298ca492938e4ded2263c54213786f6.tar.bz2
openembedded-core-contrib-f0ad3c8ce298ca492938e4ded2263c54213786f6.zip
binutils: use new update-alternatives
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils.inc')
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc18
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 552b80871b..2440509207 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -146,12 +146,14 @@ do_install_virtclass-native () {
rmdir ${D}/${libdir}64 || :
}
-pkg_postinst_${PN}-symlinks () {
- update-alternatives --install ${bindir}/ar ar ${TARGET_PREFIX}ar 100
- update-alternatives --install ${bindir}/strings strings ${TARGET_PREFIX}strings 100
-}
+inherit update-alternatives
-pkg_prerm_${PN}-symlinks () {
- update-alternatives --remove ar ${TARGET_PREFIX}ar
- update-alternatives --remove strings ${TARGET_PREFIX}strings
-}
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-symlinks = "ar strings"
+
+ALTERNATIVE_LINK_NAME[ar] = "${bindir}/ar"
+ALTERNATIVE_TARGET[ar] = "${bindir}/${TARGET_PREFIX}ar"
+
+ALTERNATIVE_LINK_NAME[strings] = "${bindir}/strings"
+ALTERNATIVE_TARGET[strings] = "${bindir}/${TARGET_PREFIX}strings"