aboutsummaryrefslogtreecommitdiff
path: root/meta-aarch64
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2013-05-08 08:51:19 +0200
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2013-05-08 08:51:19 +0200
commit6e1c45452226527c78d13d1fb339aa5c276f1570 (patch)
tree4bfa9c1db0b1b27de1ef5c494c5f8612466fcf53 /meta-aarch64
parentc2c06024b42ee9c426ac68a5384d26d7cecc13c1 (diff)
downloadmeta-linaro-6e1c45452226527c78d13d1fb339aa5c276f1570.tar.gz
binutils: reuse OE-Core
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Diffstat (limited to 'meta-aarch64')
-rw-r--r--meta-aarch64/recipes-devtools/binutils/binutils-cross-canadian.inc23
-rw-r--r--meta-aarch64/recipes-devtools/binutils/binutils-cross.inc28
-rw-r--r--meta-aarch64/recipes-devtools/binutils/binutils.inc137
3 files changed, 3 insertions, 185 deletions
diff --git a/meta-aarch64/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta-aarch64/recipes-devtools/binutils/binutils-cross-canadian.inc
index 4658badf..7cb7177d 100644
--- a/meta-aarch64/recipes-devtools/binutils/binutils-cross-canadian.inc
+++ b/meta-aarch64/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -1,22 +1 @@
-inherit cross-canadian
-
-DESCRIPTION = "A GNU collection of cross-canadian binary utilities for ${TARGET_ARCH} target"
-PN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-BPN = "binutils"
-
-DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext"
-EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
- "
-do_install () {
- autotools_do_install
-
- # We're not interested in the libs or headers, these would come from the
- # nativesdk or target version of the binutils recipe
- rm -rf ${D}${prefix}/${TARGET_SYS}
- rm -f ${D}${libdir}/libbfd*
- rm -f ${D}${libdir}/libiberty*
- rm -f ${D}${libdir}/libopcodes*
- rm -f ${D}${includedir}/*.h
-}
-
-BBCLASSEXTEND = ""
+require recipes-devtools/binutils/binutils-cross-canadian.inc
diff --git a/meta-aarch64/recipes-devtools/binutils/binutils-cross.inc b/meta-aarch64/recipes-devtools/binutils/binutils-cross.inc
index 300a1d39..97a4bc78 100644
--- a/meta-aarch64/recipes-devtools/binutils/binutils-cross.inc
+++ b/meta-aarch64/recipes-devtools/binutils/binutils-cross.inc
@@ -1,27 +1 @@
-inherit cross
-PROVIDES = "virtual/${TARGET_PREFIX}binutils"
-
-INHIBIT_DEFAULT_DEPS = "1"
-INHIBIT_AUTOTOOLS_DEPS = "1"
-
-EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \
- --disable-install-libbfd \
- --enable-poison-system-directories \
- "
-do_install () {
- oe_runmake 'DESTDIR=${D}' install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${D}${STAGING_DIR_NATIVE}${libdir_native}/libiberty.a
- rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}
- rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts
- rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info
- rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale
- rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man
- rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || :
- rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || :
- rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || :
- rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || :
- rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || :
- rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || :
-}
+require recipes-devtools/binutils/binutils-cross.inc
diff --git a/meta-aarch64/recipes-devtools/binutils/binutils.inc b/meta-aarch64/recipes-devtools/binutils/binutils.inc
index ee748a40..38b3947a 100644
--- a/meta-aarch64/recipes-devtools/binutils/binutils.inc
+++ b/meta-aarch64/recipes-devtools/binutils/binutils.inc
@@ -1,136 +1 @@
-SUMMARY = "A GNU collection of binary utilities"
-DESCRIPTION = "The GNU Binutils are a collection of binary tools. \
-The main ones are ld (GNU Linker), and as (GNU Assembler). This \
-package also includes addition tools such as addr2line (Converts \
-addresses into filenames and line numbers), ar (utility for creating, \
-modifying and extracting archives), nm (list symbols in object \
-files), objcopy (copy and translate object files), objdump (Display \
-object information), and other tools and related libraries."
-HOMEPAGE = "http://www.gnu.org/software/binutils/"
-BUGTRACKER = "http://sourceware.org/bugzilla/"
-SECTION = "devel"
-LICENSE = "GPLv3"
-
-DEPENDS = "flex-native bison-native zlib-native"
-
-inherit autotools gettext multilib_header
-
-PACKAGES += "${PN}-symlinks"
-
-FILES_${PN} = " \
- ${bindir}/${TARGET_PREFIX}* \
- ${libdir}/lib*-*.so \
- ${prefix}/${TARGET_SYS}/bin/*"
-
-FILES_${PN}-dev = " \
- ${includedir} \
- ${libdir}/*.la \
- ${libdir}/libbfd.so \
- ${libdir}/libopcodes.so"
-
-FILES_${PN}-symlinks = " \
- ${bindir}/addr2line \
- ${bindir}/as \
- ${bindir}/c++filt \
- ${bindir}/embedspu \
- ${bindir}/gprof \
- ${bindir}/ld \
- ${bindir}/ld.bfd \
- ${bindir}/ld.gold \
- ${bindir}/nm \
- ${bindir}/objcopy \
- ${bindir}/objdump \
- ${bindir}/ranlib \
- ${bindir}/readelf \
- ${bindir}/elfedit \
- ${bindir}/size \
- ${bindir}/strip"
-
-FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug"
-
-B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
-
-EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
- --disable-werror \
- --enable-plugins \
- ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '', d)} \
- ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
-
-# This is necessary due to a bug in the binutils Makefiles
-# EXTRA_OEMAKE = "configure-build-libiberty all"
-
-export AR = "${HOST_PREFIX}ar"
-export AS = "${HOST_PREFIX}as"
-export LD = "${HOST_PREFIX}ld"
-export NM = "${HOST_PREFIX}nm"
-export RANLIB = "${HOST_PREFIX}ranlib"
-export OBJCOPY = "${HOST_PREFIX}objcopy"
-export OBJDUMP = "${HOST_PREFIX}objdump"
-
-export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
-export AS_FOR_TARGET = "${TARGET_PREFIX}as"
-export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
-export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
-export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
-
-export CC_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
-export CXX_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
-
-export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}"
-export CPP_FOR_BUILD = "${BUILD_CPP}"
-export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
-
-do_configure () {
- (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
- oe_runconf
-#
-# must prime config.cache to ensure the build of libiberty
-#
- mkdir -p ${B}/build-${BUILD_SYS}
- for i in ${CONFIG_SITE}; do
- cat $i >> ${B}/build-${BUILD_SYS}/config.cache
- done
-}
-
-do_install () {
- autotools_do_install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${D}${libdir}/ldscripts
-
- # Fix the /usr/${TARGET_SYS}/bin/* links
- for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
- rm -f $l
- ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
- | tr -s / \
- | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
- done
-
- # Install the libiberty header
- install -d ${D}${includedir}
- install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
- install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-
- cd ${D}${bindir}
-
- # Symlinks for ease of running these on the native target
- for p in ${TARGET_PREFIX}* ; do
- ln -sf $p `echo $p | sed -e s,${TARGET_PREFIX},,`
- done
-
- rm -f ${D}${bindir}/ar ${D}${bindir}/strings
-
- oe_multilib_header bfd.h
-}
-
-inherit update-alternatives
-
-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"
+require recipes-devtools/binutils/binutils.inc