diff options
| author | Khem Raj <raj.khem@gmail.com> | 2022-02-10 10:37:19 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-16 09:46:28 +0000 |
| commit | 6957ff06a0ab978f73221766541c9541b9f7d1dd (patch) | |
| tree | 08194d403a20d2b0ae4d6a23f59e088b97eac65c /meta/recipes-devtools/binutils/binutils-cross-testsuite_2.38.bb | |
| parent | 1239b8e3e28516dd97df4f51d6c2f6d71eda1d46 (diff) | |
| download | poky-6957ff06a0ab978f73221766541c9541b9f7d1dd.tar.gz | |
binutils: Upgrade to 2.38 release
Release Notes are here [1]
[1] https://lists.gnu.org/archive/html/info-gnu/2022-02/msg00009.html
(From OE-Core rev: 77a1038828e638518dceda969da0817aa13eb5d3)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils-cross-testsuite_2.38.bb')
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-cross-testsuite_2.38.bb | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.38.bb b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.38.bb new file mode 100644 index 0000000000..ca99e91130 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.38.bb | |||
| @@ -0,0 +1,81 @@ | |||
| 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 | } | ||
| 19 | |||
| 20 | # target depends | ||
| 21 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils" | ||
| 22 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}gcc" | ||
| 23 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs" | ||
| 24 | DEPENDS += "virtual/${MLPREFIX}libc" | ||
| 25 | |||
| 26 | python check_prepare() { | ||
| 27 | def suffix_sys(sys): | ||
| 28 | if sys.endswith("-linux"): | ||
| 29 | return sys + "-gnu" | ||
| 30 | return sys | ||
| 31 | |||
| 32 | def generate_site_exp(d, suite): | ||
| 33 | content = [] | ||
| 34 | content.append('set srcdir "{0}/{1}"'.format(d.getVar("S"), suite)) | ||
| 35 | content.append('set objdir "{0}/{1}"'.format(d.getVar("B"), suite)) | ||
| 36 | content.append('set build_alias "{0}"'.format(d.getVar("BUILD_SYS"))) | ||
| 37 | content.append('set build_triplet {0}'.format(d.getVar("BUILD_SYS"))) | ||
| 38 | # use BUILD here since HOST=TARGET | ||
| 39 | content.append('set host_alias "{0}"'.format(d.getVar("BUILD_SYS"))) | ||
| 40 | content.append('set host_triplet {0}'.format(d.getVar("BUILD_SYS"))) | ||
| 41 | content.append('set target_alias "{0}"'.format(d.getVar("TARGET_SYS"))) | ||
| 42 | content.append('set target_triplet {0}'.format(suffix_sys(d.getVar("TARGET_SYS")))) | ||
| 43 | content.append("set development true") | ||
| 44 | content.append("set experimental false") | ||
| 45 | |||
| 46 | content.append(d.expand('set CXXFILT "${TARGET_PREFIX}c++filt"')) | ||
| 47 | content.append(d.expand('set CC "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
| 48 | content.append(d.expand('set CXX "${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
| 49 | content.append(d.expand('set CFLAGS_FOR_TARGET "--sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) | ||
| 50 | |||
| 51 | if suite == "ld" and d.getVar("TUNE_ARCH") == "mips64": | ||
| 52 | # oe patches binutils to have the default mips64 abi as 64bit, but | ||
| 53 | # skips gas causing issues with the ld test suite (which uses gas) | ||
| 54 | content.append('set ASFLAGS "-64"') | ||
| 55 | |||
| 56 | return "\n".join(content) | ||
| 57 | |||
| 58 | for i in ["binutils", "gas", "ld"]: | ||
| 59 | builddir = os.path.join(d.getVar("B"), i) | ||
| 60 | if not os.path.isdir(builddir): | ||
| 61 | os.makedirs(builddir) | ||
| 62 | with open(os.path.join(builddir, "site.exp"), "w") as f: | ||
| 63 | f.write(generate_site_exp(d, i)) | ||
| 64 | } | ||
| 65 | |||
| 66 | CHECK_TARGETS ??= "binutils gas ld" | ||
| 67 | |||
| 68 | do_check[dirs] = "${B} ${B}/binutils ${B}/gas ${B}/ld" | ||
| 69 | do_check[prefuncs] += "check_prepare" | ||
| 70 | do_check[nostamp] = "1" | ||
| 71 | do_check() { | ||
| 72 | export LC_ALL=C | ||
| 73 | for i in ${CHECK_TARGETS}; do | ||
| 74 | (cd ${B}/$i; runtest \ | ||
| 75 | --tool $i \ | ||
| 76 | --srcdir ${S}/$i/testsuite \ | ||
| 77 | --ignore 'plugin.exp' \ | ||
| 78 | || true) | ||
| 79 | done | ||
| 80 | } | ||
| 81 | addtask check after do_configure | ||
