blob: 8ff4826ef45d9730c586c7862b6fde5842af740e [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001require gem5-source_20.inc
2inherit scons package
3
4HOMEPAGE = "https://www.gem5.org/documentation/general_docs/m5ops"
5SUMMARY = "m5ops provide pseudo-instructions to trigger gem5 functionality"
6LICENSE = "BSD-3-Clause"
7
8M5OPS_DIR = "util/m5"
9
10SRC_URI += "file://0001-util-m5ops-optional-extra-build-flags.patch"
11
12OUT_DIR = "build/${TARGET_ARCH}/out"
13
14EXTRA_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
21do_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}