summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/maintainers.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-testsuite_2.32.bb83
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>"
66RECIPE_MAINTAINER_pn-binutils = "Khem Raj <raj.khem@gmail.com>" 66RECIPE_MAINTAINER_pn-binutils = "Khem Raj <raj.khem@gmail.com>"
67RECIPE_MAINTAINER_pn-binutils-cross-${TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>" 67RECIPE_MAINTAINER_pn-binutils-cross-${TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
68RECIPE_MAINTAINER_pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>" 68RECIPE_MAINTAINER_pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <raj.khem@gmail.com>"
69RECIPE_MAINTAINER_pn-binutils-cross-testsuite = "Khem Raj <raj.khem@gmail.com>"
69RECIPE_MAINTAINER_pn-binutils-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>" 70RECIPE_MAINTAINER_pn-binutils-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
70RECIPE_MAINTAINER_pn-bison = "Chen Qi <Qi.Chen@windriver.com>" 71RECIPE_MAINTAINER_pn-bison = "Chen Qi <Qi.Chen@windriver.com>"
71RECIPE_MAINTAINER_pn-bjam-native = "Alexander Kanavin <alex.kanavin@gmail.com>" 72RECIPE_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 @@
1require binutils.inc
2require binutils-${PV}.inc
3
4BPN = "binutils"
5
6DEPENDS += "dejagnu-native expect-native"
7DEPENDS += "binutils-native"
8
9deltask do_compile
10deltask do_install
11
12do_configure[dirs] += "${B}/ld ${B}/bfd"
13do_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
22DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils"
23DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}gcc"
24DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs"
25DEPENDS += "virtual/${MLPREFIX}libc"
26
27python 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
67CHECK_TARGETS ??= "binutils gas ld"
68
69do_check[dirs] = "${B} ${B}/binutils ${B}/gas ${B}/ld"
70do_check[prefuncs] += "check_prepare"
71do_check[nostamp] = "1"
72do_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}
82addtask check after do_configure
83