summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-02-20 09:13:40 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-22 23:57:27 +0000
commitfd0e3e1708393cf4b59802843c2c6c917798145c (patch)
tree6cdcbf2d50b78b0e1cc24571bc4eea4a5735e833 /meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb
parent746f277acc908c75a1578c018b5dd03fb88bcb1a (diff)
downloadpoky-fd0e3e1708393cf4b59802843c2c6c917798145c.tar.gz
binutils: Upgrade to 2.34 release
Details of changelog [1] Removing bfd/ld patch to enable PE targets, instead use specific emulations via --enable-targets for x86_64 Re-arrange/forward-port patches and upgrade libctf configure to libtool 2.4 patch rpaths are no longer emitted into elfedit/readelf therefore no need of chrpath anymore Instead of pre-generating configure scripts and house them in libtool patch, generate them during configure. This also ensures that we do not patch configure directly but rather the sources which generate it Package newly added libctf library [1] https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00000.html (From OE-Core rev: 82f7d5cfc2ab02f39b69c0f8697d660936422d4a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Christopher Clark <christopher.clark6@baesystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb')
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb85
1 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb
new file mode 100644
index 0000000000..07a8e7c417
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb
@@ -0,0 +1,85 @@
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
12inherit nopackages
13
14do_configure[dirs] += "${B}/ld ${B}/bfd"
15do_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
24DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils"
25DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}gcc"
26DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs"
27DEPENDS += "virtual/${MLPREFIX}libc"
28
29python 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
69CHECK_TARGETS ??= "binutils gas ld"
70
71do_check[dirs] = "${B} ${B}/binutils ${B}/gas ${B}/ld"
72do_check[prefuncs] += "check_prepare"
73do_check[nostamp] = "1"
74do_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}
84addtask check after do_configure
85