diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index 1c82fdb578cb90cba47be7e7dcbfcdf14a762463..1a8a349a5ff801b33729d74388654da5eb8d470d 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb @@ -95,6 +95,12 @@ GN_ARGS += 'node_path="${RECIPE_SYSROOT_NATIVE}/usr/bin"' GN_ARGS += 'host_toolchain="//oniro:host_toolchain"' GN_ARGS += 'install_oniro_third_party=false' +# OpenHarmony build system needs a bit of help to be able to find the right +# ld-musl-*.so path +inherit linuxloader +MUSL_LDSO_ARCH = "${@get_musl_loader_arch(d)}" +GN_ARGS += 'musl_arch="${MUSL_LDSO_ARCH}"' + # OpenHarmony unit tests are statically linked and therefore not stripped # binaries sum up to almost 80GB which makes it difficult to build OpenHarmony # with tests on a normal desktop, let alone the CI runner diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.1.bb b/recipes-openharmony/openharmony/openharmony-standard_3.1.bb index 60d06e91c943412053c1bae6fde6fccdaa52d205..eddcc674cd680a8a83b9d0b767f457db96d78e6c 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.1.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.1.bb @@ -117,6 +117,12 @@ GN_ARGS += 'flex_path="${RECIPE_SYSROOT_NATIVE}/usr/bin/flex"' GN_ARGS += 'bison_path="${RECIPE_SYSROOT_NATIVE}/usr/bin/bison"' GN_ARGS += 'flex_includedir="${RECIPE_SYSROOT_NATIVE}/usr/include"' +# OpenHarmony build system needs a bit of help to be able to find the right +# ld-musl-*.so path +inherit linuxloader +MUSL_LDSO_ARCH = "${@get_musl_loader_arch(d)}" +GN_ARGS += 'musl_arch="${MUSL_LDSO_ARCH}"' + # OpenHarmony unit tests are statically linked and therefore not stripped # binaries sum up to almost 80GB which makes it difficult to build OpenHarmony # with tests on a normal desktop, let alone the CI runner diff --git a/recipes-openharmony/prebuilts/files/build/common/musl/BUILD.gn b/recipes-openharmony/prebuilts/files/build/common/musl/BUILD.gn index 1393e369d5e863469e2d3926fb7961f6ec59706c..2099b7023016b2b6afa2266a0ceb4d829fbe3405 100644 --- a/recipes-openharmony/prebuilts/files/build/common/musl/BUILD.gn +++ b/recipes-openharmony/prebuilts/files/build/common/musl/BUILD.gn @@ -4,7 +4,7 @@ group("musl_install") { deps = [ - "//third_party/musl:ld-musl-arm.so", + "//third_party/musl:ld-musl.so", "//third_party/musl:libc.so", ] } diff --git a/recipes-openharmony/prebuilts/files/third_party/musl/BUILD.gn b/recipes-openharmony/prebuilts/files/third_party/musl/BUILD.gn index 266afcde886bb06187a06aeaca1b0119129c3b53..7b2ea067eb850a091268202c7f8f3ba430a3e6ae 100644 --- a/recipes-openharmony/prebuilts/files/third_party/musl/BUILD.gn +++ b/recipes-openharmony/prebuilts/files/third_party/musl/BUILD.gn @@ -4,9 +4,10 @@ import("//build/ohos.gni") import("//oniro/third_party.gni") +import("musl_config.gni") -ohos_prebuilt_executable("ld-musl-arm.so") { - source = "//oniro/sysroots/target/lib/ld-musl-arm.so.1" +ohos_prebuilt_executable("ld-musl.so") { + source = "//oniro/sysroots/target/lib/ld-musl-${musl_arch}.so.1" subsystem_name = "common" part_name = "common" install_enable = install_oniro_third_party