binutils-cross-testsuite_2.37.bb 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. require binutils.inc
  2. require binutils-${PV}.inc
  3. BPN = "binutils"
  4. DEPENDS += "dejagnu-native expect-native"
  5. DEPENDS += "binutils-native"
  6. deltask do_compile
  7. deltask do_install
  8. inherit nopackages
  9. do_configure[dirs] += "${B}/ld ${B}/bfd"
  10. do_configure() {
  11. # create config.h, oe enables initfini-array by default
  12. echo "#define HAVE_INITFINI_ARRAY" > ${B}/ld/config.h
  13. }
  14. # target depends
  15. DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils"
  16. DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}gcc"
  17. DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs"
  18. DEPENDS += "virtual/${MLPREFIX}libc"
  19. python check_prepare() {
  20. def suffix_sys(sys):
  21. if sys.endswith("-linux"):
  22. return sys + "-gnu"
  23. return sys
  24. def generate_site_exp(d, suite):
  25. content = []
  26. content.append('set srcdir "{0}/{1}"'.format(d.getVar("S"), suite))
  27. content.append('set objdir "{0}/{1}"'.format(d.getVar("B"), suite))
  28. content.append('set build_alias "{0}"'.format(d.getVar("BUILD_SYS")))
  29. content.append('set build_triplet {0}'.format(d.getVar("BUILD_SYS")))
  30. # use BUILD here since HOST=TARGET
  31. content.append('set host_alias "{0}"'.format(d.getVar("BUILD_SYS")))
  32. content.append('set host_triplet {0}'.format(d.getVar("BUILD_SYS")))
  33. content.append('set target_alias "{0}"'.format(d.getVar("TARGET_SYS")))
  34. content.append('set target_triplet {0}'.format(suffix_sys(d.getVar("TARGET_SYS"))))
  35. content.append("set development true")
  36. content.append("set experimental false")
  37. content.append(d.expand('set CXXFILT "${TARGET_PREFIX}c++filt"'))
  38. content.append(d.expand('set CC "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
  39. content.append(d.expand('set CXX "${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
  40. content.append(d.expand('set CFLAGS_FOR_TARGET "--sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
  41. if suite == "ld" and d.getVar("TUNE_ARCH") == "mips64":
  42. # oe patches binutils to have the default mips64 abi as 64bit, but
  43. # skips gas causing issues with the ld test suite (which uses gas)
  44. content.append('set ASFLAGS "-64"')
  45. return "\n".join(content)
  46. for i in ["binutils", "gas", "ld"]:
  47. builddir = os.path.join(d.getVar("B"), i)
  48. if not os.path.isdir(builddir):
  49. os.makedirs(builddir)
  50. with open(os.path.join(builddir, "site.exp"), "w") as f:
  51. f.write(generate_site_exp(d, i))
  52. }
  53. CHECK_TARGETS ??= "binutils gas ld"
  54. do_check[dirs] = "${B} ${B}/binutils ${B}/gas ${B}/ld"
  55. do_check[prefuncs] += "check_prepare"
  56. do_check[nostamp] = "1"
  57. do_check() {
  58. export LC_ALL=C
  59. for i in ${CHECK_TARGETS}; do
  60. (cd ${B}/$i; runtest \
  61. --tool $i \
  62. --srcdir ${S}/$i/testsuite \
  63. --ignore 'plugin.exp' \
  64. || true)
  65. done
  66. }
  67. addtask check after do_configure
  68. FILESEXTRAPATHS:prepend := "${THISDIR}/binutils:"
  69. SRCREV = "116a737f438d03a1bd6aa706b6ea0b4022f3b7e2"
  70. BINUTILS_GIT_URI = "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=git"
  71. SRC_URI += "\
  72. file://0001-merge-from-dubhe-pr-06-30-to-support-b0.94.patch \
  73. file://0002-merge-from-dubhe-pr-06-30-to-support-vector1.0.patch \
  74. file://0003-fix-unrecoginized-b-ext-issue.patch \
  75. file://0004-set-v-ext-version-to-1.0-draft.patch \
  76. file://0005-fix-incorrect-RCLASS_MAX.patch \
  77. file://0006-Merge-B-instruction-from-0p94-to-1.0.patch \
  78. file://0007-merge-Add-four-new-instruction-of-custom-CSRs.patch \
  79. file://0008-add-cache-prefetch-instruction.patch \
  80. file://0009-Delete-redundant-b0.94-instructions.patch \
  81. file://0010-change-vle1.v-vse1.v-to-vlm.v-vsm.v-according-rvv-1..patch \
  82. file://0011-enable-l2-cache-prefetch.patch \
  83. file://0012-RISC-V-Hypervisor-ext-drop-Privileged-Spec-1.9.1.patch \
  84. file://0013-RISC-V-Hypervisor-ext-support-Privileged-Spec-1.12.patch \
  85. file://0014-fixed-a-compiled-error-when-enable-gdb.patch \
  86. file://0015-fix-incorrect-pref-address-range.patch \
  87. "