The LLVM compiler-rt recipe lived with the musl library, which does not make sense, place them where they belong: in devtools. Move musl to meta-morello-toolchain as it is required to build compiler-rt. Enable musl to use the new toolchain.
Linux image and therefore fvp configs are also affected as MORELLO_ARCH variable now belongs to morello-toolchain layer.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-core/musl/files/compiler_rt.cmake | 0 .../recipes-core/musl/musl-morello-a64-so.inc | 0 .../recipes-core/musl/musl-morello-a64.inc | 0 .../recipes-core/musl/musl-morello-c64-so.inc | 0 .../recipes-core/musl/musl-morello-c64.inc | 0 .../recipes-core/musl/musl-morello-common.inc | 4 +++- .../recipes-core/musl/musl-morello-native.bb | 6 ++++-- .../recipes-core/musl/musl-morello-target.inc | 3 +-- .../recipes-core/musl/musl_%.bbappend | 0 .../recipes-core/musl/override-glibc.inc | 0 .../recipes-core/musl/override-musl.inc | 0 .../llvm/llvm-morello-runtime-native.bb | 11 ++++++----- meta-morello/conf/machine/include/morello-common.inc | 1 - meta-morello/conf/machine/morello-fvp.conf | 2 +- .../recipes-morello/images/morello-linux-image.bb | 4 ++-- 15 files changed, 17 insertions(+), 14 deletions(-) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/files/compiler_rt.cmake (100%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/musl-morello-a64-so.inc (100%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/musl-morello-a64.inc (100%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/musl-morello-c64-so.inc (100%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/musl-morello-c64.inc (100%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/musl-morello-common.inc (93%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/musl-morello-native.bb (92%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/musl-morello-target.inc (96%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/musl_%.bbappend (100%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/override-glibc.inc (100%) rename {meta-morello => meta-morello-toolchain}/recipes-core/musl/override-musl.inc (100%) rename meta-morello/recipes-core/musl/musl-morello-libs-native.bb => meta-morello-toolchain/recipes-devtools/llvm/llvm-morello-runtime-native.bb (93%)
diff --git a/meta-morello/recipes-core/musl/files/compiler_rt.cmake b/meta-morello-toolchain/recipes-core/musl/files/compiler_rt.cmake similarity index 100% rename from meta-morello/recipes-core/musl/files/compiler_rt.cmake rename to meta-morello-toolchain/recipes-core/musl/files/compiler_rt.cmake diff --git a/meta-morello/recipes-core/musl/musl-morello-a64-so.inc b/meta-morello-toolchain/recipes-core/musl/musl-morello-a64-so.inc similarity index 100% rename from meta-morello/recipes-core/musl/musl-morello-a64-so.inc rename to meta-morello-toolchain/recipes-core/musl/musl-morello-a64-so.inc diff --git a/meta-morello/recipes-core/musl/musl-morello-a64.inc b/meta-morello-toolchain/recipes-core/musl/musl-morello-a64.inc similarity index 100% rename from meta-morello/recipes-core/musl/musl-morello-a64.inc rename to meta-morello-toolchain/recipes-core/musl/musl-morello-a64.inc diff --git a/meta-morello/recipes-core/musl/musl-morello-c64-so.inc b/meta-morello-toolchain/recipes-core/musl/musl-morello-c64-so.inc similarity index 100% rename from meta-morello/recipes-core/musl/musl-morello-c64-so.inc rename to meta-morello-toolchain/recipes-core/musl/musl-morello-c64-so.inc diff --git a/meta-morello/recipes-core/musl/musl-morello-c64.inc b/meta-morello-toolchain/recipes-core/musl/musl-morello-c64.inc similarity index 100% rename from meta-morello/recipes-core/musl/musl-morello-c64.inc rename to meta-morello-toolchain/recipes-core/musl/musl-morello-c64.inc diff --git a/meta-morello/recipes-core/musl/musl-morello-common.inc b/meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc similarity index 93% rename from meta-morello/recipes-core/musl/musl-morello-common.inc rename to meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc index c0ada53..78ebd91 100644 --- a/meta-morello/recipes-core/musl/musl-morello-common.inc +++ b/meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc @@ -4,6 +4,8 @@ LICENSE = "MIT"
FILESEXTRAPATHS:prepend := "${THISDIR}:"
+DEPENDS:remove:toolchain-llvm-morello = "virtual/musl-morello" + SUMMARY = "CHERI enabled musl libc" SRC_URI = " \ git://git.morello-project.org/morello/musl-libc;protocol=https;branch=${SRCBRANCH} \ @@ -11,7 +13,7 @@ SRC_URI = " \ "
# morello-release-1.5.0 -SRCREV = "df8f6409fb58efe35a3300b91a1f1941e2f89022" +SRCREV = "df8f6409fb58efe35a3300b91a1f1941e2f89022" SRCBRANCH = "morello/master"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=b03f1cc25363d094011f8f4fd8bcfb68" diff --git a/meta-morello/recipes-core/musl/musl-morello-native.bb b/meta-morello-toolchain/recipes-core/musl/musl-morello-native.bb similarity index 92% rename from meta-morello/recipes-core/musl/musl-morello-native.bb rename to meta-morello-toolchain/recipes-core/musl/musl-morello-native.bb index e7e6792..e1f1479 100644 --- a/meta-morello/recipes-core/musl/musl-morello-native.bb +++ b/meta-morello-toolchain/recipes-core/musl/musl-morello-native.bb @@ -1,5 +1,7 @@ -inherit llvm-morello-native native -require musl-morello-${MORELLO_ARCH}.inc +inherit native +require recipes-core/musl/musl-morello-${MORELLO_ARCH}.inc + +TOOLCHAIN = "${MORELLO_TOOLCHAIN}"
DESCRIPTION = " That is right, we have a native libc sysroot that is needed as an intermediate step \ to provide crt and compiler-rt that will be used by the cross compiler, this recipe exist to avoid having \ diff --git a/meta-morello/recipes-core/musl/musl-morello-target.inc b/meta-morello-toolchain/recipes-core/musl/musl-morello-target.inc similarity index 96% rename from meta-morello/recipes-core/musl/musl-morello-target.inc rename to meta-morello-toolchain/recipes-core/musl/musl-morello-target.inc index 0b804fc..9f34ee9 100644 --- a/meta-morello/recipes-core/musl/musl-morello-target.inc +++ b/meta-morello-toolchain/recipes-core/musl/musl-morello-target.inc @@ -1,9 +1,8 @@ -inherit llvm-morello-native
COMPATIBLE_MACHINE = "morello" SECTION = "libs"
-DEPENDS:append = " virtual/musl-morello-libs-native" +TOOLCHAIN = "${MORELLO_TOOLCHAIN}"
MUSL_LDSO_ARCH = "aarch64_purecap"
diff --git a/meta-morello/recipes-core/musl/musl_%.bbappend b/meta-morello-toolchain/recipes-core/musl/musl_%.bbappend similarity index 100% rename from meta-morello/recipes-core/musl/musl_%.bbappend rename to meta-morello-toolchain/recipes-core/musl/musl_%.bbappend diff --git a/meta-morello/recipes-core/musl/override-glibc.inc b/meta-morello-toolchain/recipes-core/musl/override-glibc.inc similarity index 100% rename from meta-morello/recipes-core/musl/override-glibc.inc rename to meta-morello-toolchain/recipes-core/musl/override-glibc.inc diff --git a/meta-morello/recipes-core/musl/override-musl.inc b/meta-morello-toolchain/recipes-core/musl/override-musl.inc similarity index 100% rename from meta-morello/recipes-core/musl/override-musl.inc rename to meta-morello-toolchain/recipes-core/musl/override-musl.inc diff --git a/meta-morello/recipes-core/musl/musl-morello-libs-native.bb b/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello-runtime-native.bb similarity index 93% rename from meta-morello/recipes-core/musl/musl-morello-libs-native.bb rename to meta-morello-toolchain/recipes-devtools/llvm/llvm-morello-runtime-native.bb index 6318aa9..a1c27e3 100644 --- a/meta-morello/recipes-core/musl/musl-morello-libs-native.bb +++ b/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello-runtime-native.bb @@ -1,11 +1,13 @@ -inherit cmake llvm-morello-native native -require musl-morello-${MORELLO_ARCH}.inc +inherit cmake native +require recipes-core/musl/musl-morello-${MORELLO_ARCH}.inc + +TOOLCHAIN = "${MORELLO_TOOLCHAIN}"
DESCRIPTION = "Libraries that go into the clang resource folder, \ search path for that folder is relative to clang directory itself."
-DEPENDS += "musl-morello-native" -PROVIDES = "virtual/musl-morello-libs-native" +DEPENDS += "musl-morello-native" +PROVIDES = "virtual/llvm-morello-runtime-native"
B_COMPILERRT = "${WORKDIR}/build_compiler_rt" S_CRT = "${LLVM_SHARED_SOURCE}/compiler-rt/lib/crt" @@ -33,7 +35,6 @@ BUILD_LD = "${LLVM_PATH}/ld.lld" BUILD_LTO = "-fuse-ld=lld" BUILD_HOSTCC = "${LLVM_PATH}/clang"
- do_install() {
export CFLAGS="" diff --git a/meta-morello/conf/machine/include/morello-common.inc b/meta-morello/conf/machine/include/morello-common.inc index 2279c71..77a7bdf 100644 --- a/meta-morello/conf/machine/include/morello-common.inc +++ b/meta-morello/conf/machine/include/morello-common.inc @@ -18,7 +18,6 @@ C64_LIB_TRIPLE = "aarch64-unknown-linux-musl_purecap" A64_ARCH_FLAGS = "-march=armv8" C64_ARCH_FLAGS = "-march=morello+c64 -mabi=purecap"
-MORELLO_ARCH ?= "c64" GLOBAL_ARCH_TRIPLE ?= "${C64_ARCH_TRIPLE}" GLOBAL_LIB_TRIPLE ?= "${C64_LIB_TRIPLE}" GLOBAL_ARCH_FLAGS ?= "${C64_ARCH_FLAGS}" diff --git a/meta-morello/conf/machine/morello-fvp.conf b/meta-morello/conf/machine/morello-fvp.conf index f9ead8d..0aa78f6 100644 --- a/meta-morello/conf/machine/morello-fvp.conf +++ b/meta-morello/conf/machine/morello-fvp.conf @@ -44,7 +44,7 @@ FVP_CONFIG[Morello_Top.soc.mcp_qspi_loader.fname] ?= "${DEPLOY_DIR_IMAGE}/mcp_
FVP_CONFIG[board.ap_qspi_loader.fname] ?= "${DEPLOY_DIR_IMAGE}/fip.bin"
-FVP_CONFIG[board.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/morello-linux-image-c64-glibc.img" +FVP_CONFIG[board.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/morello-linux-image-glibc.img"
FVP_CONFIG[board.virtio_net.hostbridge.userNetworking] ?= "1" FVP_CONFIG[board.virtio_net.enabled] ?= "1" diff --git a/meta-morello/recipes-morello/images/morello-linux-image.bb b/meta-morello/recipes-morello/images/morello-linux-image.bb index 4c0f2bd..6a2b677 100644 --- a/meta-morello/recipes-morello/images/morello-linux-image.bb +++ b/meta-morello/recipes-morello/images/morello-linux-image.bb @@ -17,7 +17,7 @@ require ${MACHINE_LINUX_REQUIRE}
PACKAGE_ARCH = "${MACHINE_ARCH}"
-DEPENDS += "virtual/kernel virtual/grub-efi morello-initramfs mtools-native e2fsprogs-native coreutils-native bc-native util-linux-native" +DEPENDS += "virtual/kernel grub-efi morello-initramfs mtools-native e2fsprogs-native coreutils-native bc-native util-linux-native" PROVIDES = "${OUTPUTS_NAME}"
ESP_SIZE = "100" @@ -146,7 +146,7 @@ do_install() {
do_deploy() { install -d ${DEPLOYDIR}/ESP - install ${D}/${OUTPUTS_NAME}.img ${DEPLOYDIR}/${OUTPUTS_NAME}-${MORELLO_ARCH}-${TCLIBC}.img + install ${D}/${OUTPUTS_NAME}.img ${DEPLOYDIR}/${OUTPUTS_NAME}-${TCLIBC}.img install ${D}/${ESP_IMAGE}.img ${DEPLOYDIR}/ESP/${ESP_IMAGE}.img
}