Add native recipe for the elf patcher.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../elf-patcher/elf-patcher-1.5-native.bb | 4 +++ .../elf-patcher/elf-patcher-native.inc | 34 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 recipes-devtools/elf-patcher/elf-patcher-1.5-native.bb create mode 100644 recipes-devtools/elf-patcher/elf-patcher-native.inc
diff --git a/recipes-devtools/elf-patcher/elf-patcher-1.5-native.bb b/recipes-devtools/elf-patcher/elf-patcher-1.5-native.bb new file mode 100644 index 0000000..80a9a52 --- /dev/null +++ b/recipes-devtools/elf-patcher/elf-patcher-1.5-native.bb @@ -0,0 +1,4 @@ +require elf-patcher-native.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=30c1e44ff81caee33ce2f777440df394" +SRCBRANCH = "morello/release-1.5" diff --git a/recipes-devtools/elf-patcher/elf-patcher-native.inc b/recipes-devtools/elf-patcher/elf-patcher-native.inc new file mode 100644 index 0000000..871be9c --- /dev/null +++ b/recipes-devtools/elf-patcher/elf-patcher-native.inc @@ -0,0 +1,34 @@ +inherit llvm-morello-native native + +SUMMARY = "Elf-patcher" +DESCRIPTION = "Tool for paching up elf e_flag with EF_AARCH64_CHERI_PURECAP" +HOMEPAGE = "http://llvm.org" +LICENSE = "BSD-3-Clause" +OUTPUTS_NAME = "elf-patcher" + +PROVIDES = "virtual/${OUTPUTS_NAME}-native" + +SRC_URI = " \ + git://git.morello-project.org/morello/morello-aarch64;protocol=https;branch=${SRCBRANCH} \ + " +DEPENDS:remove = " virtual/elf-patcher-native virtual/musl-morello-libs-native" + +SRCREV = "${AUTOREV}" +PV = "${PN}+git${SRCPV}" + +S = "${WORKDIR}/git" +S-elf-patcher = "${WORKDIR}/git/morello/tools" + +FILES:${PN} = "${bindir}/${OUTPUTS_NAME}" + +do_configure[noexec] = "1" + +do_compile(){ + mkdir -p ${B}/${OUTPUTS_NAME} + ${CC} -o ${B}/${OUTPUTS_NAME}/${OUTPUTS_NAME} ${S-elf-patcher}/morello_elf.c +} + +do_install(){ + install -d ${D}${bindir} + install -m 0744 ${S}/${OUTPUTS_NAME}/${OUTPUTS_NAME} ${D}${bindir}/${OUTPUTS_NAME} +} \ No newline at end of file