Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | require gem5-source_20.inc |
| 2 | inherit scons package |
| 3 | |
| 4 | HOMEPAGE = "https://www.gem5.org/documentation/general_docs/m5ops" |
| 5 | SUMMARY = "m5ops provide pseudo-instructions to trigger gem5 functionality" |
| 6 | LICENSE = "BSD-3-Clause" |
| 7 | |
| 8 | M5OPS_DIR = "util/m5" |
| 9 | |
| 10 | SRC_URI += "file://0001-util-m5ops-optional-extra-build-flags.patch" |
| 11 | |
| 12 | OUT_DIR = "build/${TARGET_ARCH}/out" |
| 13 | |
| 14 | EXTRA_OESCONS += "${TARGET_ARCH}.CROSS_COMPILE=${TARGET_PREFIX} \ |
| 15 | ${TARGET_ARCH}.CCFLAGS=--sysroot=${STAGING_DIR_TARGET} \ |
| 16 | ${TARGET_ARCH}.LINKFLAGS=--sysroot=${STAGING_DIR_TARGET} \ |
| 17 | -C ${S}/${M5OPS_DIR} ${OUT_DIR}/m5" |
| 18 | |
| 19 | # The SConstruct file for m5ops does not provide a "install" target |
| 20 | # We do the install process within the recipe |
| 21 | do_install() { |
| 22 | install -d ${D}${bindir} ${D}${libdir} ${D}${includedir} |
| 23 | install -m 755 ${B}/${M5OPS_DIR}/${OUT_DIR}/m5 ${D}${bindir} |
| 24 | install -m 644 ${B}/${M5OPS_DIR}/${OUT_DIR}/libm5.a ${D}${libdir} |
| 25 | install -m 644 ${B}/include/gem5/m5ops.h ${D}${includedir} |
| 26 | } |