diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/conf/distro/include/maintainers.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/binutils/binutils-cross-testsuite_2.32.bb | 83 |
2 files changed, 84 insertions, 0 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 34153f9d02..e0a0f7a654 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc | |||
@@ -66,6 +66,7 @@ RECIPE_MAINTAINER_pn-bind = "Armin Kuster <akuster808@gmail.com>" | |||
66 | RECIPE_MAINTAINER_pn-binutils = "Khem Raj <raj.khem@gmail.com>" | 66 | RECIPE_MAINTAINER_pn-binutils = "Khem Raj <raj.khem@gmail.com>" |
67 | RECIPE_MAINTAINER_pn-binutils-cross-${TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>" | 67 | RECIPE_MAINTAINER_pn-binutils-cross-${TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>" |
68 | RECIPE_MAINTAINER_pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>" | 68 | RECIPE_MAINTAINER_pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>" |
69 | RECIPE_MAINTAINER_pn-binutils-cross-testsuite = "Khem Raj <raj.khem@gmail.com>" | ||
69 | RECIPE_MAINTAINER_pn-binutils-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>" | 70 | RECIPE_MAINTAINER_pn-binutils-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>" |
70 | RECIPE_MAINTAINER_pn-bison = "Chen Qi <Qi.Chen@windriver.com>" | 71 | RECIPE_MAINTAINER_pn-bison = "Chen Qi <Qi.Chen@windriver.com>" |
71 | RECIPE_MAINTAINER_pn-bjam-native = "Alexander Kanavin <alex.kanavin@gmail.com>" | 72 | RECIPE_MAINTAINER_pn-bjam-native = "Alexander Kanavin <alex.kanavin@gmail.com>" |
diff --git a/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.32.bb b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.32.bb new file mode 100644 index 0000000000..e62e64e8ae --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.32.bb | |||
@@ -0,0 +1,83 @@ | |||
1 | require binutils.inc | ||
2 | require binutils-${PV}.inc | ||
3 | |||
4 | BPN = "binutils" | ||
5 | |||
6 | DEPENDS += "dejagnu-native expect-native" | ||
7 | DEPENDS += "binutils-native" | ||
8 | |||
9 | deltask do_compile | ||
10 | deltask do_install | ||
11 | |||
12 | do_configure[dirs] += "${B}/ld ${B}/bfd" | ||
13 | do_configure() { | ||
14 | # create config.h, oe enables initfini-array by default | ||
15 | echo "#define HAVE_INITFINI_ARRAY" > ${B}/ld/config.h | ||
16 | # use the bfd_stdint.h from binutils-native, this is the same of the one | ||
17 | # generated by binutils-cross | ||
18 | cp ${RECIPE_SYSROOT_NATIVE}/usr/include/bfd_stdint.h ${B}/bfd/ | ||
19 | } | ||
20 | |||
21 | # target depends | ||
22 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils" | ||
23 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}gcc" | ||
24 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs" | ||
25 | DEPENDS += "virtual/${MLPREFIX}libc" | ||
26 | |||
27 | python check_prepare() { | ||
28 | def suffix_sys(sys): | ||
29 | if sys.endswith("-linux"): | ||
30 | return sys + "-gnu" | ||
31 | return sys | ||
32 | |||
33 | def generate_site_exp(d, suite): | ||
34 | content = [] | ||
35 | content.append('set srcdir "{0}/{1}"'.format(d.getVar("S"), suite)) | ||
36 | content.append('set objdir "{0}/{1}"'.format(d.getVar("B"), suite)) | ||
37 | content.append('set build_alias "{0}"'.format(d.getVar("BUILD_SYS"))) | ||
38 | content.append('set build_triplet {0}'.format(d.getVar("BUILD_SYS"))) | ||
39 | # use BUILD here since HOST=TARGET | ||
40 | content.append('set host_alias "{0}"'.format(d.getVar("BUILD_SYS"))) | ||
41 | content.append('set host_triplet {0}'.format(d.getVar("BUILD_SYS"))) | ||
42 | content.append('set target_alias "{0}"'.format(d.getVar("TARGET_SYS"))) | ||
43 | content.append('set target_triplet {0}'.format(suffix_sys(d.getVar("TARGET_SYS")))) | ||
44 | content.append("set development true") | ||
45 | content.append("set experimental false") | ||
46 | |||
47 | content.append(d.expand('set CXXFILT "${TARGET_PREFIX}c++filt"')) | ||
48 | content.append(d.expand('set CC "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
49 | content.append(d.expand('set CXX "${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
50 | content.append(d.expand('set CFLAGS_FOR_TARGET "--sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
51 | |||
52 | if suite == "ld" and d.getVar("TUNE_ARCH") == "mips64": | ||
53 | # oe patches binutils to have the default mips64 abi as 64bit, but | ||
54 | # skips gas causing issues with the ld test suite (which uses gas) | ||
55 | content.append('set ASFLAGS "-64"') | ||
56 | |||
57 | return "\n".join(content) | ||
58 | |||
59 | for i in ["binutils", "gas", "ld"]: | ||
60 | builddir = os.path.join(d.getVar("B"), i) | ||
61 | if not os.path.isdir(builddir): | ||
62 | os.makedirs(builddir) | ||
63 | with open(os.path.join(builddir, "site.exp"), "w") as f: | ||
64 | f.write(generate_site_exp(d, i)) | ||
65 | } | ||
66 | |||
67 | CHECK_TARGETS ??= "binutils gas ld" | ||
68 | |||
69 | do_check[dirs] = "${B} ${B}/binutils ${B}/gas ${B}/ld" | ||
70 | do_check[prefuncs] += "check_prepare" | ||
71 | do_check[nostamp] = "1" | ||
72 | do_check() { | ||
73 | export LC_ALL=C | ||
74 | for i in ${CHECK_TARGETS}; do | ||
75 | (cd ${B}/$i; runtest \ | ||
76 | --tool $i \ | ||
77 | --srcdir ${S}/$i/testsuite \ | ||
78 | --ignore 'plugin.exp' \ | ||
79 | || true) | ||
80 | done | ||
81 | } | ||
82 | addtask check after do_configure | ||
83 | |||