From 9221133a3fb36e326ee20275051a1b5e9f3997ae Mon Sep 17 00:00:00 2001
From: Esben Haabendal <esben.haabendal@huawei.com>
Date: Wed, 6 Jul 2022 11:28:22 +0200
Subject: [PATCH] Simplify adding OpenHarmony support to other distros

By moving more of the configuration into openharmony.inc, it becomes
easier to add OpenHarmony support to other distros.

Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
---
 conf/distro/include/openharmony.inc      | 7 +++++++
 conf/distro/oniro-openharmony-linux.conf | 6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/conf/distro/include/openharmony.inc b/conf/distro/include/openharmony.inc
index 0bf6204d..8965c424 100644
--- a/conf/distro/include/openharmony.inc
+++ b/conf/distro/include/openharmony.inc
@@ -21,3 +21,10 @@ OPENHARMONY_OVERRIDES:df-openharmony = ":openharmony-${OPENHARMONY_VERSION}"
 DISTROOVERRIDES:append = "${OPENHARMONY_OVERRIDES}"
 
 PREFERRED_VERSION_openharmony-standard = "${OPENHARMONY_VERSION}"
+
+# clang_rt.profile library is used in openharmony-standard build
+PACKAGECONFIG:pn-compiler-rt = "profile"
+
+require openssl.inc
+require java.inc
+require musl-ldso-paths.inc
diff --git a/conf/distro/oniro-openharmony-linux.conf b/conf/distro/oniro-openharmony-linux.conf
index 69042a16..85cbcf13 100644
--- a/conf/distro/oniro-openharmony-linux.conf
+++ b/conf/distro/oniro-openharmony-linux.conf
@@ -14,8 +14,6 @@ DISTRO_FEATURES:append = " openharmony"
 TOOLCHAIN = "clang"
 RUNTIME = "llvm"
 
-PACKAGECONFIG:pn-compiler-rt = "profile"
-
 # musl libc
 TCLIBC = "musl"
 
@@ -36,10 +34,6 @@ PREFERRED_VERSION_linux-yocto = "5.10.%"
 require conf/distro/include/yocto-uninative.inc
 INHERIT += "uninative"
 
-require include/openssl.inc
-require include/java.inc
-require include/musl-ldso-paths.inc
-
 # Workaround for missing host tools in do_testimage when not adding testimage to
 # IMAGE_CLASSES, but doing a direct `inherit testimage` in image recipes
 # instead.
-- 
GitLab