diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-06-20 08:18:38 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-21 12:50:07 +0100 |
commit | f4ed063e32f064e996a4c29760fa4ac49f1ed73c (patch) | |
tree | 822f7ed5785aaee318ccd35344f9918f02e13923 /meta/recipes-devtools/binutils | |
parent | 3c516e1032c86156dc09ffa509977fe197470090 (diff) | |
download | openembedded-core-f4ed063e32f064e996a4c29760fa4ac49f1ed73c.tar.gz openembedded-core-f4ed063e32f064e996a4c29760fa4ac49f1ed73c.tar.bz2 openembedded-core-f4ed063e32f064e996a4c29760fa4ac49f1ed73c.zip |
binutils: Add with-sysroot to target binutils
Also rearrange the recipes to have common bits
in inc files and not include the target bb file
everywhere. This lets us add specific options
to specific recipes particularly target recipe in
this case
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils')
8 files changed, 71 insertions, 78 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.22.inc b/meta/recipes-devtools/binutils/binutils-2.22.inc new file mode 100644 index 0000000000..6f1e0dc4ed --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils-2.22.inc @@ -0,0 +1,37 @@ +PR = "r10" + +LIC_FILES_CHKSUM="\ + file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ + file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ + file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ + file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ + file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ + file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ + " + +SRC_URI = "\ + ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \ + file://binutils-uclibc-100-uclibc-conf.patch \ + file://binutils-uclibc-300-001_ld_makefile_patch.patch \ + file://binutils-uclibc-300-006_better_file_error.patch \ + file://binutils-uclibc-300-012_check_ldrunpath_length.patch \ + file://binutils-uclibc-gas-needs-libm.patch \ + file://binutils-x86_64_i386_biarch.patch \ + file://libtool-2.4-update.patch \ + file://binutils-2.19.1-ld-sysroot.patch \ + file://libiberty_path_fix.patch \ + file://binutils-poison.patch \ + file://libtool-rpath-fix.patch \ + file://clone-shadow.patch \ + file://binutils-powerpc-e5500.patch \ + file://binutils-armv5e.patch \ + file://mips64-default-ld-emulation.patch \ + file://0001-PR-ld-13470.patch \ + " + +SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5" +SRC_URI[sha256sum] = "6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9" diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc index 15b9abb2b0..a23531ca23 100644 --- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc +++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc @@ -5,11 +5,8 @@ PN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}" BPN = "binutils" DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk" -EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \ - --program-prefix=${TARGET_PREFIX} \ - --disable-werror \ - ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)}" - +EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \ + " do_install () { autotools_do_install diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.22.bb b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.22.bb index a49adedad6..5dbaa03017 100644 --- a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.22.bb +++ b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.22.bb @@ -1,3 +1,3 @@ -require binutils_${PV}.bb +require binutils.inc +require binutils-${PV}.inc require binutils-cross-canadian.inc -PR = "r2" diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc index 80152a9b4c..300a1d39ec 100644 --- a/meta/recipes-devtools/binutils/binutils-cross.inc +++ b/meta/recipes-devtools/binutils/binutils-cross.inc @@ -4,14 +4,10 @@ PROVIDES = "virtual/${TARGET_PREFIX}binutils" INHIBIT_DEFAULT_DEPS = "1" INHIBIT_AUTOTOOLS_DEPS = "1" -EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \ - --program-prefix=${TARGET_PREFIX} \ +EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \ --disable-install-libbfd \ - --disable-werror \ --enable-poison-system-directories \ - ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)} \ - ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" - + " do_install () { oe_runmake 'DESTDIR=${D}' install diff --git a/meta/recipes-devtools/binutils/binutils-cross_2.22.bb b/meta/recipes-devtools/binutils/binutils-cross_2.22.bb index 01d99db419..fbd1f7d25a 100644 --- a/meta/recipes-devtools/binutils/binutils-cross_2.22.bb +++ b/meta/recipes-devtools/binutils/binutils-cross_2.22.bb @@ -1,2 +1,3 @@ -require binutils_${PV}.bb +require binutils.inc +require binutils-${PV}.inc require binutils-cross.inc diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.22.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.22.bb index 0e8b6e486f..0eb5684e81 100644 --- a/meta/recipes-devtools/binutils/binutils-crosssdk_2.22.bb +++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.22.bb @@ -4,9 +4,6 @@ inherit crosssdk PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk" -PR = "r2" - do_configure_prepend () { sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt } - diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 2440509207..19cb06a7f5 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc @@ -50,13 +50,10 @@ FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug" B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ - --enable-install-libbfd \ - --enable-shared \ --disable-werror \ + ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)} \ ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" -EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd" - # This is necessary due to a bug in the binutils Makefiles # EXTRA_OEMAKE = "configure-build-libiberty all" @@ -124,28 +121,6 @@ do_install () { oe_multilib_header bfd.h } -do_install_virtclass-native () { - autotools_do_install - - # 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} - - # We only want libiberty, libbfd and libopcodes - rm -rf ${D}${bindir} - rm -rf ${D}${prefix}/${TARGET_SYS} - rm -rf ${D}${prefix}/lib/ldscripts - rm -rf ${D}${prefix}/share/info - rm -rf ${D}${prefix}/share/locale - rm -rf ${D}${prefix}/share/man - rmdir ${D}${prefix}/share || : - rmdir ${D}/${libdir}/gcc-lib || : - rmdir ${D}/${libdir}64/gcc-lib || : - rmdir ${D}/${libdir} || : - rmdir ${D}/${libdir}64 || : -} - inherit update-alternatives ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-devtools/binutils/binutils_2.22.bb b/meta/recipes-devtools/binutils/binutils_2.22.bb index 7b6adef122..b8e1112fa5 100644 --- a/meta/recipes-devtools/binutils/binutils_2.22.bb +++ b/meta/recipes-devtools/binutils/binutils_2.22.bb @@ -1,42 +1,32 @@ require binutils.inc +require binutils-${PV}.inc +EXTRA_OECONF += "--with-sysroot=/ \ + --enable-install-libbfd \ + --enable-shared \ + " -PR = "r9" +EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd" -LIC_FILES_CHKSUM="\ - file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\ - file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ - file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ - file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ - file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ - file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ - file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ - file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ - file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ - file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ - " +do_install_virtclass-native () { + autotools_do_install -SRC_URI = "\ - ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \ - file://binutils-uclibc-100-uclibc-conf.patch \ - file://binutils-uclibc-300-001_ld_makefile_patch.patch \ - file://binutils-uclibc-300-006_better_file_error.patch \ - file://binutils-uclibc-300-012_check_ldrunpath_length.patch \ - file://binutils-uclibc-gas-needs-libm.patch \ - file://binutils-x86_64_i386_biarch.patch \ - file://libtool-2.4-update.patch \ - file://binutils-2.19.1-ld-sysroot.patch \ - file://libiberty_path_fix.patch \ - file://binutils-poison.patch \ - file://libtool-rpath-fix.patch \ - file://clone-shadow.patch \ - file://binutils-powerpc-e5500.patch \ - file://binutils-armv5e.patch \ - file://mips64-default-ld-emulation.patch \ - file://0001-PR-ld-13470.patch \ - " - -SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5" -SRC_URI[sha256sum] = "6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9" + # 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} + # We only want libiberty, libbfd and libopcodes + rm -rf ${D}${bindir} + rm -rf ${D}${prefix}/${TARGET_SYS} + rm -rf ${D}${prefix}/lib/ldscripts + rm -rf ${D}${prefix}/share/info + rm -rf ${D}${prefix}/share/locale + rm -rf ${D}${prefix}/share/man + rmdir ${D}${prefix}/share || : + rmdir ${D}/${libdir}/gcc-lib || : + rmdir ${D}/${libdir}64/gcc-lib || : + rmdir ${D}/${libdir} || : + rmdir ${D}/${libdir}64 || : +} BBCLASSEXTEND = "native" |