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 13:03:04 +0100 |
commit | e146139b42460e20db9749e8fdebd14db8513034 (patch) | |
tree | 7ce6194fc2ecbae8502c1abb35725c6731f0d173 /meta | |
parent | be9756ae12c7ea4629943bf59f30f0c8330a2056 (diff) | |
download | poky-e146139b42460e20db9749e8fdebd14db8513034.tar.gz |
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
(From OE-Core rev: f4ed063e32f064e996a4c29760fa4ac49f1ed73c)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
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 @@ | |||
1 | PR = "r10" | ||
2 | |||
3 | LIC_FILES_CHKSUM="\ | ||
4 | file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\ | ||
5 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ | ||
6 | file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ | ||
7 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ | ||
8 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ | ||
9 | file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ | ||
10 | file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ | ||
11 | file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ | ||
12 | file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ | ||
13 | file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ | ||
14 | " | ||
15 | |||
16 | SRC_URI = "\ | ||
17 | ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \ | ||
18 | file://binutils-uclibc-100-uclibc-conf.patch \ | ||
19 | file://binutils-uclibc-300-001_ld_makefile_patch.patch \ | ||
20 | file://binutils-uclibc-300-006_better_file_error.patch \ | ||
21 | file://binutils-uclibc-300-012_check_ldrunpath_length.patch \ | ||
22 | file://binutils-uclibc-gas-needs-libm.patch \ | ||
23 | file://binutils-x86_64_i386_biarch.patch \ | ||
24 | file://libtool-2.4-update.patch \ | ||
25 | file://binutils-2.19.1-ld-sysroot.patch \ | ||
26 | file://libiberty_path_fix.patch \ | ||
27 | file://binutils-poison.patch \ | ||
28 | file://libtool-rpath-fix.patch \ | ||
29 | file://clone-shadow.patch \ | ||
30 | file://binutils-powerpc-e5500.patch \ | ||
31 | file://binutils-armv5e.patch \ | ||
32 | file://mips64-default-ld-emulation.patch \ | ||
33 | file://0001-PR-ld-13470.patch \ | ||
34 | " | ||
35 | |||
36 | SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5" | ||
37 | 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}" | |||
5 | BPN = "binutils" | 5 | BPN = "binutils" |
6 | 6 | ||
7 | DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk" | 7 | DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk" |
8 | EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \ | 8 | EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \ |
9 | --program-prefix=${TARGET_PREFIX} \ | 9 | " |
10 | --disable-werror \ | ||
11 | ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)}" | ||
12 | |||
13 | do_install () { | 10 | do_install () { |
14 | autotools_do_install | 11 | autotools_do_install |
15 | 12 | ||
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 @@ | |||
1 | require binutils_${PV}.bb | 1 | require binutils.inc |
2 | require binutils-${PV}.inc | ||
2 | require binutils-cross-canadian.inc | 3 | require binutils-cross-canadian.inc |
3 | 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" | |||
4 | INHIBIT_DEFAULT_DEPS = "1" | 4 | INHIBIT_DEFAULT_DEPS = "1" |
5 | INHIBIT_AUTOTOOLS_DEPS = "1" | 5 | INHIBIT_AUTOTOOLS_DEPS = "1" |
6 | 6 | ||
7 | EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \ | 7 | EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \ |
8 | --program-prefix=${TARGET_PREFIX} \ | ||
9 | --disable-install-libbfd \ | 8 | --disable-install-libbfd \ |
10 | --disable-werror \ | ||
11 | --enable-poison-system-directories \ | 9 | --enable-poison-system-directories \ |
12 | ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)} \ | 10 | " |
13 | ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" | ||
14 | |||
15 | do_install () { | 11 | do_install () { |
16 | oe_runmake 'DESTDIR=${D}' install | 12 | oe_runmake 'DESTDIR=${D}' install |
17 | 13 | ||
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 @@ | |||
1 | require binutils_${PV}.bb | 1 | require binutils.inc |
2 | require binutils-${PV}.inc | ||
2 | require binutils-cross.inc | 3 | 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 | |||
4 | 4 | ||
5 | PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk" | 5 | PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk" |
6 | 6 | ||
7 | PR = "r2" | ||
8 | |||
9 | do_configure_prepend () { | 7 | do_configure_prepend () { |
10 | sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt | 8 | sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt |
11 | } | 9 | } |
12 | |||
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" | |||
50 | B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" | 50 | B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" |
51 | 51 | ||
52 | EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ | 52 | EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ |
53 | --enable-install-libbfd \ | ||
54 | --enable-shared \ | ||
55 | --disable-werror \ | 53 | --disable-werror \ |
54 | ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)} \ | ||
56 | ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" | 55 | ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" |
57 | 56 | ||
58 | EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd" | ||
59 | |||
60 | # This is necessary due to a bug in the binutils Makefiles | 57 | # This is necessary due to a bug in the binutils Makefiles |
61 | # EXTRA_OEMAKE = "configure-build-libiberty all" | 58 | # EXTRA_OEMAKE = "configure-build-libiberty all" |
62 | 59 | ||
@@ -124,28 +121,6 @@ do_install () { | |||
124 | oe_multilib_header bfd.h | 121 | oe_multilib_header bfd.h |
125 | } | 122 | } |
126 | 123 | ||
127 | do_install_virtclass-native () { | ||
128 | autotools_do_install | ||
129 | |||
130 | # Install the libiberty header | ||
131 | install -d ${D}${includedir} | ||
132 | install -m 644 ${S}/include/ansidecl.h ${D}${includedir} | ||
133 | install -m 644 ${S}/include/libiberty.h ${D}${includedir} | ||
134 | |||
135 | # We only want libiberty, libbfd and libopcodes | ||
136 | rm -rf ${D}${bindir} | ||
137 | rm -rf ${D}${prefix}/${TARGET_SYS} | ||
138 | rm -rf ${D}${prefix}/lib/ldscripts | ||
139 | rm -rf ${D}${prefix}/share/info | ||
140 | rm -rf ${D}${prefix}/share/locale | ||
141 | rm -rf ${D}${prefix}/share/man | ||
142 | rmdir ${D}${prefix}/share || : | ||
143 | rmdir ${D}/${libdir}/gcc-lib || : | ||
144 | rmdir ${D}/${libdir}64/gcc-lib || : | ||
145 | rmdir ${D}/${libdir} || : | ||
146 | rmdir ${D}/${libdir}64 || : | ||
147 | } | ||
148 | |||
149 | inherit update-alternatives | 124 | inherit update-alternatives |
150 | 125 | ||
151 | ALTERNATIVE_PRIORITY = "100" | 126 | 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 @@ | |||
1 | require binutils.inc | 1 | require binutils.inc |
2 | require binutils-${PV}.inc | ||
3 | EXTRA_OECONF += "--with-sysroot=/ \ | ||
4 | --enable-install-libbfd \ | ||
5 | --enable-shared \ | ||
6 | " | ||
2 | 7 | ||
3 | PR = "r9" | 8 | EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd" |
4 | 9 | ||
5 | LIC_FILES_CHKSUM="\ | 10 | do_install_virtclass-native () { |
6 | file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\ | 11 | autotools_do_install |
7 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ | ||
8 | file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ | ||
9 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ | ||
10 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ | ||
11 | file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ | ||
12 | file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ | ||
13 | file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ | ||
14 | file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ | ||
15 | file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ | ||
16 | " | ||
17 | 12 | ||
18 | SRC_URI = "\ | 13 | # Install the libiberty header |
19 | ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \ | 14 | install -d ${D}${includedir} |
20 | file://binutils-uclibc-100-uclibc-conf.patch \ | 15 | install -m 644 ${S}/include/ansidecl.h ${D}${includedir} |
21 | file://binutils-uclibc-300-001_ld_makefile_patch.patch \ | 16 | install -m 644 ${S}/include/libiberty.h ${D}${includedir} |
22 | file://binutils-uclibc-300-006_better_file_error.patch \ | ||
23 | file://binutils-uclibc-300-012_check_ldrunpath_length.patch \ | ||
24 | file://binutils-uclibc-gas-needs-libm.patch \ | ||
25 | file://binutils-x86_64_i386_biarch.patch \ | ||
26 | file://libtool-2.4-update.patch \ | ||
27 | file://binutils-2.19.1-ld-sysroot.patch \ | ||
28 | file://libiberty_path_fix.patch \ | ||
29 | file://binutils-poison.patch \ | ||
30 | file://libtool-rpath-fix.patch \ | ||
31 | file://clone-shadow.patch \ | ||
32 | file://binutils-powerpc-e5500.patch \ | ||
33 | file://binutils-armv5e.patch \ | ||
34 | file://mips64-default-ld-emulation.patch \ | ||
35 | file://0001-PR-ld-13470.patch \ | ||
36 | " | ||
37 | |||
38 | SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5" | ||
39 | SRC_URI[sha256sum] = "6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9" | ||
40 | 17 | ||
18 | # We only want libiberty, libbfd and libopcodes | ||
19 | rm -rf ${D}${bindir} | ||
20 | rm -rf ${D}${prefix}/${TARGET_SYS} | ||
21 | rm -rf ${D}${prefix}/lib/ldscripts | ||
22 | rm -rf ${D}${prefix}/share/info | ||
23 | rm -rf ${D}${prefix}/share/locale | ||
24 | rm -rf ${D}${prefix}/share/man | ||
25 | rmdir ${D}${prefix}/share || : | ||
26 | rmdir ${D}/${libdir}/gcc-lib || : | ||
27 | rmdir ${D}/${libdir}64/gcc-lib || : | ||
28 | rmdir ${D}/${libdir} || : | ||
29 | rmdir ${D}/${libdir}64 || : | ||
30 | } | ||
41 | 31 | ||
42 | BBCLASSEXTEND = "native" | 32 | BBCLASSEXTEND = "native" |