From 0c843f9ff4f4112c10f34931dbf0ff3895e3b765 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@huawei.com>
Date: Mon, 28 Feb 2022 18:27:55 +0100
Subject: [PATCH] oniro-linux.conf: Force musl as TCLIBC

Upstream moved the default definition of TCLIBC as part of:

commit 57aa60ef6422568b425b6ccc4451567efc578469
Author: Martin Jansa <Martin.Jansa@gmail.com>
Date:   Wed Sep 16 15:28:52 2020 +0200
    bitbake.conf: use ${TCMODE}-${TCLIBC} directory for CACHE

This moved TCLIBC from defaultsetup.conf to bitbake.conf but the problem
is that it did it before the place were bitbake.conf includes the distro
configuration changing its behaviour. With this change, a ?= in the
distro configuration will be ignored as the first one is already
defined in bitbake.conf.

Because of the above, we ended up with defaulting to glibc. We revert
this by forcing the value of TCLIBC accordingly. This will have a side
effect that shell environment variable will be ignored. So doing that
through BB_ENV_EXTRAWHITE will be broken from now on. If we want that
ability in the future, we can try to address.

Fixes: https://booting.oniroproject.org/distro/oniro/-/issues/252

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
 meta-oniro-core/conf/distro/oniro-linux.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oniro-core/conf/distro/oniro-linux.conf b/meta-oniro-core/conf/distro/oniro-linux.conf
index f91977a9..328ea45a 100644
--- a/meta-oniro-core/conf/distro/oniro-linux.conf
+++ b/meta-oniro-core/conf/distro/oniro-linux.conf
@@ -60,7 +60,7 @@ require conf/distro/include/oniro.inc
 require conf/distro/include/oniro-wic.inc
 require conf/distro/include/oniro-packageconfig.inc
 
-TCLIBC ?= "musl"
+TCLIBC = "musl"
 
 INIT_MANAGER = "systemd"
 
-- 
GitLab