diff options
author | Wang Mingyu <wangmy@cn.fujitsu.com> | 2021-01-12 12:01:57 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-18 23:51:07 +0000 |
commit | 0f87a1f6bbb10248037cf5ee86fee494f39361b3 (patch) | |
tree | 66254c465461031b2f380d9cc4d49f162918de6a /meta/recipes-devtools/binutils/binutils-cross-testsuite_2.35.1.bb | |
parent | 2632e00c4d5f90bb51a9a676fa429903576e8395 (diff) | |
download | poky-0f87a1f6bbb10248037cf5ee86fee494f39361b3.tar.gz |
binutils: upgrade 2.35 -> 2.35.1
(From OE-Core rev: fbb752ea3b815d9a9475d4cbf7070a12ebea48e8)
Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cff69ee95a6ab49e6c6c1b1b2435e479e526c2c9)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils-cross-testsuite_2.35.1.bb')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils-cross-testsuite_2.35.1.bb | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.35.1.bb b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.35.1.bb new file mode 100644 index 0000000000..07a8e7c417 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.35.1.bb | |||
@@ -0,0 +1,85 @@ | |||
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 | inherit nopackages | ||
13 | |||
14 | do_configure[dirs] += "${B}/ld ${B}/bfd" | ||
15 | do_configure() { | ||
16 | # create config.h, oe enables initfini-array by default | ||
17 | echo "#define HAVE_INITFINI_ARRAY" > ${B}/ld/config.h | ||
18 | # use the bfd_stdint.h from binutils-native, this is the same of the one | ||
19 | # generated by binutils-cross | ||
20 | cp ${RECIPE_SYSROOT_NATIVE}/usr/include/bfd_stdint.h ${B}/bfd/ | ||
21 | } | ||
22 | |||
23 | # target depends | ||
24 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils" | ||
25 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}gcc" | ||
26 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs" | ||
27 | DEPENDS += "virtual/${MLPREFIX}libc" | ||
28 | |||
29 | python check_prepare() { | ||
30 | def suffix_sys(sys): | ||
31 | if sys.endswith("-linux"): | ||
32 | return sys + "-gnu" | ||
33 | return sys | ||
34 | |||
35 | def generate_site_exp(d, suite): | ||
36 | content = [] | ||
37 | content.append('set srcdir "{0}/{1}"'.format(d.getVar("S"), suite)) | ||
38 | content.append('set objdir "{0}/{1}"'.format(d.getVar("B"), suite)) | ||
39 | content.append('set build_alias "{0}"'.format(d.getVar("BUILD_SYS"))) | ||
40 | content.append('set build_triplet {0}'.format(d.getVar("BUILD_SYS"))) | ||
41 | # use BUILD here since HOST=TARGET | ||
42 | content.append('set host_alias "{0}"'.format(d.getVar("BUILD_SYS"))) | ||
43 | content.append('set host_triplet {0}'.format(d.getVar("BUILD_SYS"))) | ||
44 | content.append('set target_alias "{0}"'.format(d.getVar("TARGET_SYS"))) | ||
45 | content.append('set target_triplet {0}'.format(suffix_sys(d.getVar("TARGET_SYS")))) | ||
46 | content.append("set development true") | ||
47 | content.append("set experimental false") | ||
48 | |||
49 | content.append(d.expand('set CXXFILT "${TARGET_PREFIX}c++filt"')) | ||
50 | content.append(d.expand('set CC "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
51 | content.append(d.expand('set CXX "${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
52 | content.append(d.expand('set CFLAGS_FOR_TARGET "--sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
53 | |||
54 | if suite == "ld" and d.getVar("TUNE_ARCH") == "mips64": | ||
55 | # oe patches binutils to have the default mips64 abi as 64bit, but | ||
56 | # skips gas causing issues with the ld test suite (which uses gas) | ||
57 | content.append('set ASFLAGS "-64"') | ||
58 | |||
59 | return "\n".join(content) | ||
60 | |||
61 | for i in ["binutils", "gas", "ld"]: | ||
62 | builddir = os.path.join(d.getVar("B"), i) | ||
63 | if not os.path.isdir(builddir): | ||
64 | os.makedirs(builddir) | ||
65 | with open(os.path.join(builddir, "site.exp"), "w") as f: | ||
66 | f.write(generate_site_exp(d, i)) | ||
67 | } | ||
68 | |||
69 | CHECK_TARGETS ??= "binutils gas ld" | ||
70 | |||
71 | do_check[dirs] = "${B} ${B}/binutils ${B}/gas ${B}/ld" | ||
72 | do_check[prefuncs] += "check_prepare" | ||
73 | do_check[nostamp] = "1" | ||
74 | do_check() { | ||
75 | export LC_ALL=C | ||
76 | for i in ${CHECK_TARGETS}; do | ||
77 | (cd ${B}/$i; runtest \ | ||
78 | --tool $i \ | ||
79 | --srcdir ${S}/$i/testsuite \ | ||
80 | --ignore 'plugin.exp' \ | ||
81 | || true) | ||
82 | done | ||
83 | } | ||
84 | addtask check after do_configure | ||
85 | |||