From patchwork Wed Dec 17 15:24:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 76838 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B372CD65C65 for ; Wed, 17 Dec 2025 15:24:27 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.17075.1765985065601276861 for ; Wed, 17 Dec 2025 07:24:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=GVKlGh4A; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=4446d33a3f=hongxu.jia@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BH535oG1076109; Wed, 17 Dec 2025 07:24:23 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=PPS06212021; bh=JqDoCc4YetLa5kLioPoN xz0vS+GKvG+XkU0sY6SjaZ0=; b=GVKlGh4AdRAhtW80udAZwfuPBD8uJ9K5vL26 /FY4Ab0lSYOZA/36TjLUTiFYxKhI8cGbjCUWbKALmw9iy835ZhDYMGs97X31yKzh uKV2RxE6Q+bGfC6dSXweqQQGsMpR9BZfv8rgxmAGRNRpEAV1df+EBJptzmj2ghOf DU7dLLIGyKWoRRCMnNwGpwSBvBR7tqJ1I7XTXaT5PV5HMRVFb5ATQHjxd3WlEOv0 McW9FWtb5b6hycEbxw/fW5ffuLLnxG4w244I/XEmE8ZGg4ZpWjWKD6CYvIVbYjJ5 1QUuk5Z3KCYFd0UnuSC5C0tb6OPrXZ3ZtP3BbVJ3BKqhBhu9mQ== Received: from ala-exchng01.corp.ad.wrs.com ([128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4b3k6j0qyx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 17 Dec 2025 07:24:23 -0800 (PST) Received: from ala-exchng01.corp.ad.wrs.com (10.11.224.121) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Wed, 17 Dec 2025 07:24:22 -0800 Received: from pek-lpg-core5.wrs.com (10.11.232.110) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Wed, 17 Dec 2025 07:24:21 -0800 From: Hongxu Jia To: , Subject: [PATCH v6 1/8] distro/include: rework debug build Date: Wed, 17 Dec 2025 23:24:14 +0800 Message-ID: <20251217152421.1181080-1-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=ErvfbCcA c=1 sm=1 tr=0 ts=6942cb27 cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=3-RhneuVAAAA:8 a=ag1SF4gXAAAA:8 a=t7CeM3EgAAAA:8 a=AT7qKQP2qk2aVwQu-SAA:9 a=MBHTkq5ozfd5zzl9:21 a=VLVLkjT_5ZicWzSuYqSo:22 a=Yupwre4RP9_Eg_Bd0iYG:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: YHfJHIp0eXu2Zom2WlKgD2ZH3_VKLM-Y X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE3MDEyMCBTYWx0ZWRfXzzc88kA6GKeG WT+5kUDgcjYSEnxmtDgbyHvv5Ylovdy2sObf8pvoVsBT5eQe8zkG0yhEsfVNZp5tVYWwU572gTW k+bMW0uxDgMzR177XvPtt4uzOi9J/rFOJrr5TZ5YOrbZ3R2vOQtEx5wNU3bZ70Ik+Gk6AUH3OtQ prQMpYqu3smCgMxdEAg3NDdqzGWBGTSdgeoDKvMZKLOETtL71C57MOrws0EYYldrdxsqH7V/tPb oQE1JSyoq753RdqKIs240hvO6y3J2fviJXgoHJDjDwbZx3ILyDibAs9+2LoBszuxH7YLMVzrJxW tkT+0NsCTjUpCBTscdQQoHBTceSGjVifTyx1dyyxHQSTxh9bFCgSV4BMYl2u20g2f34y7dPuvmh CavqhKuJz3DElF3sEyEfIXx5FXyBwA== X-Proofpoint-ORIG-GUID: YHfJHIp0eXu2Zom2WlKgD2ZH3_VKLM-Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-17_02,2025-12-16_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 malwarescore=0 adultscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512170120 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Dec 2025 15:24:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228055 The problem with DEBUG_BUILD is that we have a lot of debug information in builds anyway and this is now unclear what it means. The documentation.conf entry mentions packages which is now incorrect too. The variable is a very old one and the interface is poorly designed compared to other areas now. This commit drop DEBUG_BUILD, and add debug_build.inc to instead. In bitbake.conf, use ??= to set *_OPTIMIZATION, in debug_build.inc to use ?= to override *_OPTIMIZATION Make a config fragment to use include_all debug_build.inc to allow other layers to add their own debug build configurations, user should use the following ways to enable debug build $ bitbake-config-build enable-fragment core/yocto/debug-build Or $ echo 'OE_FRAGMENTS += "core/yocto/debug-build"' >> conf/local.conf Suggested-by: Peter Kjellerstedt Suggested-by: Richard Purdie Signed-off-by: Hongxu Jia --- meta/conf/bitbake.conf | 9 +++------ meta/conf/distro/include/debug_build.inc | 5 +++++ meta/conf/documentation.conf | 3 +-- meta/conf/fragments/yocto/debug-build.conf | 8 ++++++++ meta/conf/templates/default/local.conf.sample.extended | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 meta/conf/distro/include/debug_build.inc create mode 100644 meta/conf/fragments/yocto/debug-build.conf diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 88f4d0df69..653d396c79 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -659,13 +659,10 @@ DEBUG_PREFIX_MAP ?= "${DEBUG_PREFIX_MAP_EXTRA} \ " DEBUG_LEVELFLAG ?= "-g" -FULL_OPTIMIZATION = "-O2 ${DEBUG_LEVELFLAG}" -DEBUG_OPTIMIZATION = "-Og ${DEBUG_LEVELFLAG}" -SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}" -SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD" +FULL_OPTIMIZATION ??= "-O2 ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION ??= "${FULL_OPTIMIZATION}" # compiler flags for native/nativesdk -BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g', '-O2', d)}" -BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD" +BUILD_OPTIMIZATION ??= "-O2" ################################################################## # Reproducibility diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc new file mode 100644 index 0000000000..9ae6be10c9 --- /dev/null +++ b/meta/conf/distro/include/debug_build.inc @@ -0,0 +1,5 @@ +# Override SELECTED_OPTIMIZATION and BUILD_OPTIMIZATION when fragment 'core/yocto/debug-build' is enabled. +DEBUG_OPTIMIZATION ?= "-Og ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION ?= "${DEBUG_OPTIMIZATION}" +# compiler flags for native/nativesdk +BUILD_OPTIMIZATION ?= "-Og -g" diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf index 741130a392..cdd6566f3c 100644 --- a/meta/conf/documentation.conf +++ b/meta/conf/documentation.conf @@ -129,7 +129,6 @@ CVE_CHECK_LAYER_INCLUDELIST[doc] = "Defines which layers to include during cve-c D[doc] = "The destination directory." DATE[doc] = "The date the build was started using YMD format." DATETIME[doc] = "The date and time the build was started." -DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable." DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-Og ${DEBUG_LEVELFLAG}'." DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority." DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)." @@ -370,7 +369,7 @@ SDK_OUTPUT[doc] = "The location used by the OpenEmbedded build system when creat SDKIMAGE_FEATURES[doc] = "Equivalent to IMAGE_FEATURES. However, this variable applies to the SDK generated from an image using the command 'bitbake -c populate_sdk imagename'." SDKMACHINE[doc] = "Specifies the architecture (i.e. i686 or x86_64) for which to build SDK and ADT items." SECTION[doc] = "The section in which packages should be categorized. Package management utilities can make use of this variable." -SELECTED_OPTIMIZATION[doc] = "The variable takes the value of FULL_OPTIMIZATION unless DEBUG_BUILD = '1'. In this case, the value of DEBUG_OPTIMIZATION is used." +SELECTED_OPTIMIZATION[doc] = "The variable takes the value of FULL_OPTIMIZATION unless fragment 'core/yocto/debug-build' is enabled. In this case, the value of DEBUG_OPTIMIZATION is used." SERIAL_CONSOLES[doc] = "Defines the serial consoles (TTYs) to enable using getty." SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS[doc] = "A list of recipe dependencies that should not be used to determine signatures of tasks from one recipe when they depend on tasks from another recipe." SIGGEN_EXCLUDERECIPES_ABISAFE[doc] = "A list of recipes that are completely stable and will never change." diff --git a/meta/conf/fragments/yocto/debug-build.conf b/meta/conf/fragments/yocto/debug-build.conf new file mode 100644 index 0000000000..5bdc1366b4 --- /dev/null +++ b/meta/conf/fragments/yocto/debug-build.conf @@ -0,0 +1,8 @@ +BB_CONF_FRAGMENT_SUMMARY = "Specifies to build recipes with debugging information. \ +This influences the value of the SELECTED_OPTIMIZATION variable." +BB_CONF_FRAGMENT_DESCRIPTION = "Enables full debug and backtrace capabilities for all programs \ +and libraries in the image, by modifying the SELECTED_OPTIMIZATION variable, \ +setting it to "DEBUG_OPTIMIZATION"." + +# Allow other layers to add their own debug build configurations +include_all conf/distro/include/debug_build.inc diff --git a/meta/conf/templates/default/local.conf.sample.extended b/meta/conf/templates/default/local.conf.sample.extended index a898b18d59..0e96d40daa 100644 --- a/meta/conf/templates/default/local.conf.sample.extended +++ b/meta/conf/templates/default/local.conf.sample.extended @@ -67,7 +67,7 @@ # # Uncomment this to change the optimization to make debugging easer, at the # possible cost of performance. -# DEBUG_BUILD = "1" +# OE_FRAGMENTS += "core/yocto/debug-build" # # Uncomment this to disable the stripping of the installed binaries # INHIBIT_PACKAGE_STRIP = "1" From patchwork Wed Dec 17 15:24:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 76844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CEDDD65C69 for ; Wed, 17 Dec 2025 15:24:37 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.17077.1765985067520457706 for ; Wed, 17 Dec 2025 07:24:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=TelZmmJV; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=4446d33a3f=hongxu.jia@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BH4KiQW3917019; Wed, 17 Dec 2025 15:24:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=EEpHpPNnh61nq9z6/H6P90mk2QqJGENbKfGGEUWDBzU=; b=TelZmmJVO+EY CmnGJsz7giMFDyjkRKFd4E35Aogm5P5qoWx8IwODDA0yILb4iqtSxWA6+BgsKXw8 heDIqZT2fztx3HxN4Rv9P/UAUy/5HkGBWTuRjGrNA9dqE+v8ZtV4BD5VPIz3nCcG mmNWqWSS8oIMdkcY0PaX0p6ubylbFqiqXCSW19H5CatDjkXbsR24yOQDaS5Jab8R apysYeJOq9XdF+bvGw+Q6lfo6kgMJDzMXgKaEcGrGftn/hbvb58BNrIMzYbaALHu 8rzfTRURn9B0vNCP6Oi1o9HIeVVBMy4qqbjI7C7+oW0kHer46hk0Yv6vCK3ab9WR 96Qp9tKq0g== Received: from ala-exchng01.corp.ad.wrs.com ([128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4b3k68rr20-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 17 Dec 2025 15:24:25 +0000 (GMT) Received: from ala-exchng01.corp.ad.wrs.com (10.11.224.121) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Wed, 17 Dec 2025 07:24:24 -0800 Received: from pek-lpg-core5.wrs.com (10.11.232.110) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Wed, 17 Dec 2025 07:24:23 -0800 From: Hongxu Jia To: , Subject: [PATCH v6 2/8] debug_build.inc: collect debug build tuning configuration Date: Wed, 17 Dec 2025 23:24:15 +0800 Message-ID: <20251217152421.1181080-2-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251217152421.1181080-1-hongxu.jia@windriver.com> References: <20251217152421.1181080-1-hongxu.jia@windriver.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE3MDEyMCBTYWx0ZWRfXx+osgbR14BPs 7DDgvAJKHZuCewU4DzbRW7wW4xVumPLH/ZbXAlGGYegTi1HZ5bJM4aL01DHNdTD2/CDp4IqQTZ8 kW2doAFEvmY2VXYrgFOBcJdXOYSayWPR7xi8suHlr9WrIwBT1MorB/GWUok7AT9RKuiddikyDR0 5Cz357Rrd5hrMYCHmHwbWWCTVtScTuX+Nz9ASw5Y1x7sHeGOXszJl+d7i+E61ApO34UGEWrmqqm 0d7nRcFSfPijsxGU1nBay9bBoVH5sm6kAOmrAu44V8QaBUYJDeId8RP7DrxnSRcKozOdY+hRz0R yC7xqp32G1ac/NhgJn/RMfyaCGbzDp2tDtJYzbqQfyQ08V+WQ5+SwX/ocC2vnNZWUMdHMdfUBAD oBb/AO/1Mb7aaGyG5Ajj2ePCEMWGGg== X-Proofpoint-ORIG-GUID: 9n0x7NttGVPzhA2qVSRCnJmNMqaw0VMi X-Proofpoint-GUID: 9n0x7NttGVPzhA2qVSRCnJmNMqaw0VMi X-Authority-Analysis: v=2.4 cv=EpLfbCcA c=1 sm=1 tr=0 ts=6942cb29 cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=iGHA9ds3AAAA:8 a=3-RhneuVAAAA:8 a=t7CeM3EgAAAA:8 a=p_J065krOJSGb3ilSzMA:9 a=IDjme54_S0fX3SJZ:21 a=nM-MV4yxpKKO9kiQg6Ot:22 a=VLVLkjT_5ZicWzSuYqSo:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-17_02,2025-12-16_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 spamscore=0 phishscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512170120 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Dec 2025 15:24:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228056 The modern compilers and code seem to require extra steps to avoid DEBUG errors, Move debug tuning configuration from recipes to an include file to address these errors. Drop `:remove' operation on variable, override variables directly Suggested-by: Peter Kjellerstedt Signed-off-by: Hongxu Jia --- meta/conf/distro/include/debug_build.inc | 37 +++++++++++++++++++ meta/recipes-connectivity/kea/kea_3.0.1.bb | 10 ----- .../debugedit/debugedit_5.2.bb | 2 - meta/recipes-devtools/gcc/gcc-sanitizers.inc | 3 -- .../python/python3-lxml_6.0.2.bb | 12 ------ meta/recipes-extended/bash/bash_5.3.bb | 3 -- meta/recipes-extended/mdadm/mdadm_4.4.bb | 2 - .../jpeg/libjpeg-turbo_3.1.2.bb | 3 -- .../vulkan-validation-layers_1.4.328.1.bb | 2 - meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb | 1 - meta/recipes-kernel/perf/perf.bb | 2 - meta/recipes-sato/webkit/webkitgtk_2.50.0.bb | 3 +- meta/recipes-support/vim/vim_9.1.bb | 2 +- 13 files changed, 40 insertions(+), 42 deletions(-) diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc index 9ae6be10c9..5562cdee89 100644 --- a/meta/conf/distro/include/debug_build.inc +++ b/meta/conf/distro/include/debug_build.inc @@ -3,3 +3,40 @@ DEBUG_OPTIMIZATION ?= "-Og ${DEBUG_LEVELFLAG}" SELECTED_OPTIMIZATION ?= "${DEBUG_OPTIMIZATION}" # compiler flags for native/nativesdk BUILD_OPTIMIZATION ?= "-Og -g" + +# The modern compilers and code seem to require extra steps to avoid DEBUG errors, +# this file collects debug tuning configuration to address DEBUG errors. + +DEBUG_OPTIMIZATION:append:pn-perf = " -Wno-error=maybe-uninitialized" +DEBUG_OPTIMIZATION:append:armv4:pn-libjpeg-turbo = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +DEBUG_OPTIMIZATION:append:armv5:pn-libjpeg-turbo = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +DEBUG_OPTIMIZATION:append:armv4:pn-bash = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +DEBUG_OPTIMIZATION:append:armv5:pn-bash = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +DEBUG_OPTIMIZATION:append:pn-mdadm = " -Wno-error" +DEBUG_OPTIMIZATION:mips:pn-kea = "-O ${DEBUG_LEVELFLAG}" +DEBUG_OPTIMIZATION:mipsel:pn-kea = "-O ${DEBUG_LEVELFLAG}" +# {standard input}: Assembler messages: +# {standard input}:1488805: Error: branch out of range +DEBUG_OPTIMIZATION:mips:pn-python3-lxml = "-O ${DEBUG_LEVELFLAG}" +DEBUG_OPTIMIZATION:mipsel:pn-python3-lxml = "-O ${DEBUG_LEVELFLAG}" +# used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] +DEBUG_OPTIMIZATION:append:pn-gcc-sanitizers = " -Wno-error" + +BUILD_OPTIMIZATION:mips:pn-kea = "-O -g" +BUILD_OPTIMIZATION:mipsel:pn-kea = "-O -g" +# {standard input}: Assembler messages: +# {standard input}:1488805: Error: branch out of range +BUILD_OPTIMIZATION:mips:pn-python3-lxml = "-O -g" +BUILD_OPTIMIZATION:mipsel:pn-python3-lxml = "-O -g" + +CPPFLAGS:append:arm:pn-lttng-ust = " -DUATOMIC_NO_LINK_ERROR" + +OECMAKE_WEBKIT_NO_INLINE_HINTS:pn-webkitgtk = "-DWEBKIT_NO_INLINE_HINTS=ON" + +EXTRA_OECONF:append:pn-debugedit = " --disable-inlined-xxhash" +EXTRA_OECONF:append:pn-debugedit-native = " --disable-inlined-xxhash" +EXTRA_OECONF:append:pn-nativesdk-debugedit = " --disable-inlined-xxhash" + +lcl_maybe_fortify:pn-vim = "" + +CXXFLAGS:append:pn-vulkan-validation-layers = " -DXXH_NO_INLINE_HINTS=1" diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb index 70738783b2..9584d1dde9 100644 --- a/meta/recipes-connectivity/kea/kea_3.0.1.bb +++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb @@ -36,16 +36,6 @@ INITSCRIPT_PARAMS = "defaults 30" SYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service" SYSTEMD_AUTO_ENABLE = "disable" -DEBUG_OPTIMIZATION:remove:mips = " -Og" -DEBUG_OPTIMIZATION:append:mips = " -O" -BUILD_OPTIMIZATION:remove:mips = " -Og" -BUILD_OPTIMIZATION:append:mips = " -O" - -DEBUG_OPTIMIZATION:remove:mipsel = " -Og" -DEBUG_OPTIMIZATION:append:mipsel = " -O" -BUILD_OPTIMIZATION:remove:mipsel = " -Og" -BUILD_OPTIMIZATION:append:mipsel = " -O" - CXXFLAGS:remove = "-fvisibility-inlines-hidden" do_configure:prepend() { diff --git a/meta/recipes-devtools/debugedit/debugedit_5.2.bb b/meta/recipes-devtools/debugedit/debugedit_5.2.bb index 76c54ba63d..4ac6cab559 100644 --- a/meta/recipes-devtools/debugedit/debugedit_5.2.bb +++ b/meta/recipes-devtools/debugedit/debugedit_5.2.bb @@ -22,8 +22,6 @@ inherit pkgconfig autotools multilib_script RDEPENDS:${PN} += "bash elfutils-binutils" -EXTRA_OECONF = "${@oe.utils.vartrue('DEBUG_BUILD', '--disable-inlined-xxhash', '', d)}" - BBCLASSEXTEND = "native nativesdk" MULTILIB_SCRIPTS = "${PN}:${bindir}/find-debuginfo" diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc index 6c81d30243..f4727ee6db 100644 --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc @@ -54,9 +54,6 @@ INHIBIT_DEFAULT_DEPS = "1" ALLOW_EMPTY:${PN} = "1" DEPENDS = "virtual/crypt gcc-runtime virtual/cross-cc" -# used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] -DEBUG_OPTIMIZATION:append = " -Wno-error" - BBCLASSEXTEND = "nativesdk" PACKAGES = "${PN} ${PN}-dbg" diff --git a/meta/recipes-devtools/python/python3-lxml_6.0.2.bb b/meta/recipes-devtools/python/python3-lxml_6.0.2.bb index 876fda93b6..178908e3b2 100644 --- a/meta/recipes-devtools/python/python3-lxml_6.0.2.bb +++ b/meta/recipes-devtools/python/python3-lxml_6.0.2.bb @@ -23,18 +23,6 @@ SRC_URI[sha256sum] = "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96 SRC_URI += "${PYPI_SRC_URI}" inherit pkgconfig pypi setuptools3 -# {standard input}: Assembler messages: -# {standard input}:1488805: Error: branch out of range -DEBUG_OPTIMIZATION:remove:mips = " -Og" -DEBUG_OPTIMIZATION:append:mips = " -O" -BUILD_OPTIMIZATION:remove:mips = " -Og" -BUILD_OPTIMIZATION:append:mips = " -O" - -DEBUG_OPTIMIZATION:remove:mipsel = " -Og" -DEBUG_OPTIMIZATION:append:mipsel = " -O" -BUILD_OPTIMIZATION:remove:mipsel = " -Og" -BUILD_OPTIMIZATION:append:mipsel = " -O" - BBCLASSEXTEND = "native nativesdk" RDEPENDS:${PN} += "libxml2 libxslt python3-compression" diff --git a/meta/recipes-extended/bash/bash_5.3.bb b/meta/recipes-extended/bash/bash_5.3.bb index b50a48d28c..74671f5a56 100644 --- a/meta/recipes-extended/bash/bash_5.3.bb +++ b/meta/recipes-extended/bash/bash_5.3.bb @@ -15,9 +15,6 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ SRC_URI[tarball.sha256sum] = "0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba" -DEBUG_OPTIMIZATION:append:armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" -DEBUG_OPTIMIZATION:append:armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" - CFLAGS += "-std=gnu17" # mkbuiltins.c is built with native toolchain and needs gnu17 as well: # http://errors.yoctoproject.org/Errors/Details/853016/ diff --git a/meta/recipes-extended/mdadm/mdadm_4.4.bb b/meta/recipes-extended/mdadm/mdadm_4.4.bb index 26a60e4c1a..e81b8fdf3c 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.4.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.4.bb @@ -39,8 +39,6 @@ EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CWFLAGS="" CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${sys BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}" \ SYSROOT="${STAGING_DIR_TARGET}" STRIP=' -DEBUG_OPTIMIZATION:append = " -Wno-error" - do_install() { oe_runmake 'DESTDIR=${D}' install install-systemd install -d ${D}/${sysconfdir}/ diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_3.1.2.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_3.1.2.bb index d4877bb92b..bc9d803f6b 100644 --- a/meta/recipes-graphics/jpeg/libjpeg-turbo_3.1.2.bb +++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_3.1.2.bb @@ -44,9 +44,6 @@ EXTRA_OECMAKE:append:class-target:powerpc = " ${@bb.utils.contains("TUNE_FEATURE EXTRA_OECMAKE:append:class-target:powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}" EXTRA_OECMAKE:append:class-target:powerpc64le = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}" -DEBUG_OPTIMIZATION:append:armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" -DEBUG_OPTIMIZATION:append:armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" - # libjpeg-turbo-2.0.2/simd/mips/jsimd_dspr2.S # :13:5: error: invalid token in expression # .if $17 != 0 diff --git a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.328.1.bb b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.328.1.bb index 76a87398c4..84d75b8f7f 100644 --- a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.328.1.bb +++ b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.328.1.bb @@ -26,8 +26,6 @@ EXTRA_OECMAKE = "\ -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ " -CXXFLAGS:append = " ${@oe.utils.vartrue('DEBUG_BUILD', '-DXXH_NO_INLINE_HINTS=1', '', d)}" - PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr" PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb index 1a15c5b420..0d4c67f0fa 100644 --- a/meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb +++ b/meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb @@ -16,7 +16,6 @@ inherit autotools lib_package manpages python3native pkgconfig include lttng-platforms.inc EXTRA_OECONF = "--disable-numa" -CPPFLAGS:append:arm = "${@oe.utils.vartrue('DEBUG_BUILD', '-DUATOMIC_NO_LINK_ERROR', '', d)}" DEPENDS = "liburcu util-linux" RDEPENDS:${PN}-bin = "python3-core" diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index b69ba2ac12..3319ed5c78 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -422,8 +422,6 @@ FILES:${PN}-python = " \ " FILES:${PN}-perl = "${libexecdir}/perf-core/scripts/perl" -DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized" - PACKAGESPLITFUNCS =+ "perf_fix_sources" perf_fix_sources () { diff --git a/meta/recipes-sato/webkit/webkitgtk_2.50.0.bb b/meta/recipes-sato/webkit/webkitgtk_2.50.0.bb index a8d0a094b3..b4173c08dd 100644 --- a/meta/recipes-sato/webkit/webkitgtk_2.50.0.bb +++ b/meta/recipes-sato/webkit/webkitgtk_2.50.0.bb @@ -86,11 +86,12 @@ PACKAGECONFIG[gamepad] = "-DENABLE_GAMEPAD=ON,-DENABLE_GAMEPAD=OFF,libmanette" PACKAGECONFIG[sysprof-capture] = "-DUSE_SYSTEM_SYSPROF_CAPTURE=YES,-DUSE_SYSTEM_SYSPROF_CAPTURE=NO,sysprof" PACKAGECONFIG[speech] = "-DENABLE_SPEECH_SYNTHESIS=ON,-DENABLE_SPEECH_SYNTHESIS=OFF,flite" +OECMAKE_WEBKIT_NO_INLINE_HINTS ??= "-DWEBKIT_NO_INLINE_HINTS=OFF" EXTRA_OECMAKE = " \ -DPORT=GTK \ ${@oe.utils.vartrue('GI_DATA_ENABLED', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ ${@oe.utils.vartrue('GIDOCGEN_ENABLED', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \ - ${@oe.utils.vartrue('DEBUG_BUILD', '-DWEBKIT_NO_INLINE_HINTS=ON', '-DWEBKIT_NO_INLINE_HINTS=OFF', d)} \ + ${OECMAKE_WEBKIT_NO_INLINE_HINTS} \ -DENABLE_MINIBROWSER=ON \ -DENABLE_BUBBLEWRAP_SANDBOX=OFF \ -DUSE_GTK4=ON \ diff --git a/meta/recipes-support/vim/vim_9.1.bb b/meta/recipes-support/vim/vim_9.1.bb index fee9f055e9..a24a863ba5 100644 --- a/meta/recipes-support/vim/vim_9.1.bb +++ b/meta/recipes-support/vim/vim_9.1.bb @@ -20,4 +20,4 @@ ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd" # We override the default in security_flags.inc because vim (not vim-tiny!) will abort # in many places for _FORTIFY_SOURCE=2. Security flags become part of CC. # -lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=1',d)}" +lcl_maybe_fortify = "-D_FORTIFY_SOURCE=1" From patchwork Wed Dec 17 15:24:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 76839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A14EBD65C66 for ; Wed, 17 Dec 2025 15:24:37 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.17079.1765985067904822336 for ; Wed, 17 Dec 2025 07:24:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=jVuGddbr; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=4446d33a3f=hongxu.jia@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BH4KiQX3917019; Wed, 17 Dec 2025 15:24:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=uR7Zm8m+re9eTFkpGE2KddjE+kj2DupGor+3h0DEAXk=; b=jVuGddbrfCVy 57zDj15JhnP+oNw7BX8efYtYM4Vvv8Dlw4VARql9rlX2pX1KaNy6nzcxfeSHB7vm Z+KAVxdg0tXuOJjUTysLpD6yjyD0KNXJLtSGbu2KKOlClUjO9RytVkTCMOxkIgap dsU7TMU8uKDXaoTbrlMVncXQvDJe/cJQBmihi3+P9rKvFE7i8PsgDQEELlO6lWwK cE1H6vaKjlrJck71W+kiMhcx13pUBqyHG4+mOFj/ebONb/G2WA3fI5dxHKR63bxC lgUhvXeIEnLO/6hECQZlOAtL4CTR702h9ewodGmLTjhf0j/jU7InBGoTgMwFxFGC 6uli6xhnJQ== Received: from ala-exchng01.corp.ad.wrs.com ([128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4b3k68rr20-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 17 Dec 2025 15:24:25 +0000 (GMT) Received: from ala-exchng01.corp.ad.wrs.com (10.11.224.121) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Wed, 17 Dec 2025 07:24:25 -0800 Received: from pek-lpg-core5.wrs.com (10.11.232.110) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Wed, 17 Dec 2025 07:24:24 -0800 From: Hongxu Jia To: , Subject: [PATCH v6 3/8] {cross,native}.bbclass: drop DEBUG_BUILD Date: Wed, 17 Dec 2025 23:24:16 +0800 Message-ID: <20251217152421.1181080-3-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251217152421.1181080-1-hongxu.jia@windriver.com> References: <20251217152421.1181080-1-hongxu.jia@windriver.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE3MDEyMCBTYWx0ZWRfX6w3j+k9+kTFy ljixQcWkr/sJ/VySzy3q2koVkUeAMGIw93LU+3KQq8/+3EHWK1zYMDaGfXWazxVclvSwkZTWuY0 7kywouZ/elVE/m+YhIHtZYehHcbZvoEeTQ5ATCk/zIzpFEsJFH7aMV6aVo1pO3+1TmUoBgeYTsj EPw7Wkv7ZY818K7KHUYZvSFZE01p9NvZhnWp2beqZW8VpV81f7A+BV1U+wV2zmlIiq1tLR2r0OX LAXM7WoJLWs9VtECgNAxiUG91hjwhKqPBi+E6R2awe8plfd6Fg6oYaU4+93MYOhLX6Ar+NMxRqg cqAcdBUV2D/LZgSUjQTB4h7jS0XO68v0p2ZSpCfYGELvhErv0pf7d48J7ingH9rBBBMZLd4C6Sm m6O4UZvPRnRzdAtMI4GC4z7FzMtapA== X-Proofpoint-ORIG-GUID: igAtOUoQpUkaC04qrtmL6zQnT4oRqPZO X-Proofpoint-GUID: igAtOUoQpUkaC04qrtmL6zQnT4oRqPZO X-Authority-Analysis: v=2.4 cv=EpLfbCcA c=1 sm=1 tr=0 ts=6942cb29 cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=ag1SF4gXAAAA:8 a=t7CeM3EgAAAA:8 a=zWkU3xHhtq9XyjW21gUA:9 a=Yupwre4RP9_Eg_Bd0iYG:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-17_02,2025-12-16_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 spamscore=0 phishscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512170120 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Dec 2025 15:24:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228057 In most cases you want to debug target binaries, or native, or cross but it would be unusual to want to do all at the same time. Drop DEBUG_BUILD, and set INHIBIT_SYSROOT_STRIP ??= "" by default, user could use ?= to override in local.conf if needed Suggested-by: Richard Purdie Signed-off-by: Hongxu Jia --- meta/classes-recipe/cross.bbclass | 3 +-- meta/classes-recipe/native.bbclass | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/cross.bbclass b/meta/classes-recipe/cross.bbclass index c3eeade67b..574ce6988d 100644 --- a/meta/classes-recipe/cross.bbclass +++ b/meta/classes-recipe/cross.bbclass @@ -23,8 +23,7 @@ HOST_CC_ARCH = "${BUILD_CC_ARCH}" HOST_LD_ARCH = "${BUILD_LD_ARCH}" HOST_AS_ARCH = "${BUILD_AS_ARCH}" -# No strip sysroot when DEBUG_BUILD is enabled -INHIBIT_SYSROOT_STRIP ?= "${@oe.utils.vartrue('DEBUG_BUILD', '1', '', d)}" +INHIBIT_SYSROOT_STRIP ??= "" export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64" diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass index 7d1fe343fa..b3411d20ca 100644 --- a/meta/classes-recipe/native.bbclass +++ b/meta/classes-recipe/native.bbclass @@ -118,8 +118,7 @@ PATH:prepend = "${COREBASE}/scripts/native-intercept:" # reused if we manipulate the paths. SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}" -# No strip sysroot when DEBUG_BUILD is enabled -INHIBIT_SYSROOT_STRIP ?= "${@oe.utils.vartrue('DEBUG_BUILD', '1', '', d)}" +INHIBIT_SYSROOT_STRIP ??= "" python native_virtclass_handler () { import re From patchwork Wed Dec 17 15:24:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 76841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B30F0D65C6C for ; Wed, 17 Dec 2025 15:24:37 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.17517.1765985069104958713 for ; Wed, 17 Dec 2025 07:24:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=OOHmILuL; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=4446d33a3f=hongxu.jia@windriver.com) Received: from pps.filterd (m0250810.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BHAVSHO2092155; Wed, 17 Dec 2025 07:24:27 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=uUCEBesp0NGEp6OG3LnXRNpb8xxPp1A0qfI0/ao6Ni4=; b=OOHmILuLLUB5 7wmewQFr0vDYPZQVDym1RE0xIHXytXWhp0ZNlV1NBFVWAC9XG5oQjvDlBDHhMp0p lm68ggg9RTd3zNbIaXnyJSaYOCQC96aO9utW85KOW2M0mGrYcVs3WWZgfPVyJYEZ 50A+iiZXmpfd8ov5dDp+W36AD4AAE0AJZQ0r43bpq8WvolX3Eg4joj4aJD3ilHWy y1SVWkPTqtYpjpHIAneb26sxwi5KgVZwm7FM56yGeVcEG4Pkz5PYtqklKPGLLX9F 6tC29m7POpawH0lngyahBwp2oH08i9Y/uQCDbGwieGJ7mHGxDTbRv0BBa++m1nWG g+kwZixAHQ== Received: from ala-exchng01.corp.ad.wrs.com ([128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4b3k0sgqug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 17 Dec 2025 07:24:26 -0800 (PST) Received: from ala-exchng01.corp.ad.wrs.com (10.11.224.121) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Wed, 17 Dec 2025 07:24:26 -0800 Received: from pek-lpg-core5.wrs.com (10.11.232.110) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Wed, 17 Dec 2025 07:24:25 -0800 From: Hongxu Jia To: , Subject: [PATCH v6 4/8] debug_build.inc: override MESON_BUILDTYPE for target Date: Wed, 17 Dec 2025 23:24:17 +0800 Message-ID: <20251217152421.1181080-4-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251217152421.1181080-1-hongxu.jia@windriver.com> References: <20251217152421.1181080-1-hongxu.jia@windriver.com> MIME-Version: 1.0 X-Proofpoint-GUID: ybFCJUDNJtAgGVntbuB0s8hNIc6e2lec X-Proofpoint-ORIG-GUID: ybFCJUDNJtAgGVntbuB0s8hNIc6e2lec X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE3MDEyMCBTYWx0ZWRfX8Yw6T+8eohAA q9AgaFKJLGNQL+b5GQKaQnWfppLPOktN4BPeti9ZCZ4Re7pGFxuZncGuqQKFFJQlpSQnnevzPKb /eoGbuEBcah+u9jlBQdALyuIpXCnt1n9Hv1d0UPAKXFnINd/AdZ3pcOMTAh43/sEU+lk+0BP7yt C1aopXMi3PH+jk9IDzbvUEjYCU9n4BQ+8UFveI9FUnDOeWxtSHoIs7vQAez8LCyssMR8fJaEOL/ JiD5e/LbkqiEyDCGnoXoPROXQuevQFeI+ne+BjrvHvulxtapk7IVcJo4U/osK6l4vvTgMEwrcrl UzA1RKBCVG+GekdeotX/TaTIVvew91yU/TY5GTd0ZV1r6caYtG7ayB+cJ7PTqmndHkR1bBLYRTq PA+P99hS5ZmubnCz2/+p1bfh9q3Mnw== X-Authority-Analysis: v=2.4 cv=PqeergM3 c=1 sm=1 tr=0 ts=6942cb2a cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=ag1SF4gXAAAA:8 a=t7CeM3EgAAAA:8 a=rv3B5ZEdiUnhOF910woA:9 a=Yupwre4RP9_Eg_Bd0iYG:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-17_02,2025-12-16_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 suspectscore=0 spamscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512170120 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Dec 2025 15:24:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228058 The debug_build.inc is used to collect debug build configuration, override MESON_BUILDTYPE for target when debug build is enabled (fragment core/yocto/debug-build) Suggested-by: Richard Purdie Signed-off-by: Hongxu Jia --- meta/classes-recipe/meson.bbclass | 3 +-- meta/conf/distro/include/debug_build.inc | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index 2c098771fe..0b857ef22a 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass @@ -25,8 +25,7 @@ MESON_TARGET ?= "" # Since 0.60.0 you can specify custom tags to install MESON_INSTALL_TAGS ?= "" -MESON_BUILDTYPE ?= "${@oe.utils.vartrue('DEBUG_BUILD', 'debug', 'plain', d)}" -MESON_BUILDTYPE[vardeps] += "DEBUG_BUILD" +MESON_BUILDTYPE ??= "plain" MESONOPTS = " --buildtype ${MESON_BUILDTYPE} \ --prefix ${prefix} \ diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc index 5562cdee89..2fa0d513de 100644 --- a/meta/conf/distro/include/debug_build.inc +++ b/meta/conf/distro/include/debug_build.inc @@ -40,3 +40,6 @@ EXTRA_OECONF:append:pn-nativesdk-debugedit = " --disable-inlined-xxhash" lcl_maybe_fortify:pn-vim = "" CXXFLAGS:append:pn-vulkan-validation-layers = " -DXXH_NO_INLINE_HINTS=1" + +# For meson.bbclass +MESON_BUILDTYPE:class-target ?= "debug" From patchwork Wed Dec 17 15:24:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 76843 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFF58D65C6B for ; Wed, 17 Dec 2025 15:24:37 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.17081.1765985070999984561 for ; Wed, 17 Dec 2025 07:24:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=NnwlNaW/; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=4446d33a3f=hongxu.jia@windriver.com) Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BHDNgZ93275695; Wed, 17 Dec 2025 15:24:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=55b1FUEs+Dai53Zk0uAyd9++bj9HuEyH+WQZeSPSaG4=; b=NnwlNaW/JT/s FpKLRR2a2hnwA6VIHlQfwlECg4L8e4uBtUKUDSyZCQ3D1wGYd5IhncR/lYJnhBxf g2w4apS5ULaozqI8IpCAbiy/N4iscaLrbOqPDlhwYUKVHCXTDZ6M//rHrPiQGmhw APETeevs27IxraLwj7vGjLpxZXsD22vU9iuBRxbDzUqxBzPxyoovbneZg3eXIFac ff9oYK4x/MctIP0JpHLldC6b8eKv6QbMFRU4REM+JCSwljRFUrvSIgQXKN4myV2I tbYebqe1jLEOP/BwQWjQ/yE0Y5JLz5xJpyCV5ywi3zfB1kVxzPnPFaSovEXb6aas 2mWgPM6fhg== Received: from ala-exchng01.corp.ad.wrs.com ([128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4b3k0brr82-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 17 Dec 2025 15:24:28 +0000 (GMT) Received: from ala-exchng01.corp.ad.wrs.com (10.11.224.121) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Wed, 17 Dec 2025 07:24:27 -0800 Received: from pek-lpg-core5.wrs.com (10.11.232.110) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Wed, 17 Dec 2025 07:24:26 -0800 From: Hongxu Jia To: , Subject: [PATCH v6 5/8] debug_build.inc: override CARGO_BUILD_MODE and CARGO_BUILD_DIR for target Date: Wed, 17 Dec 2025 23:24:18 +0800 Message-ID: <20251217152421.1181080-5-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251217152421.1181080-1-hongxu.jia@windriver.com> References: <20251217152421.1181080-1-hongxu.jia@windriver.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE3MDEyMCBTYWx0ZWRfX7/KIkAjPk3dr JkBUR2F5WP42XVDJ2UFnR/gyNmBLjq9PfhvJm2qEvO/g0UGLLBiOqfjURJVkUuFLlVASbl7NSxE rJXUXaEfs/12y4oX07Ezgx06PDe7uVNNzD8wyPkys35oNYfKzdz7VfRwvMa4NXqUeg8SmpKlWAz jNTtS84G+ELIEWvcEdE3djdAVMMAMPBSdnxckdDQ4PCgBvYv1P5qQjcBcgiamtTheUiwwt3WX/H kgwxA9orTJH0e/fUEVkV+TTVAerMoOsIfiD+shTkYOtdaPgdOYvi0g4PKbQjLiU2y7DH24COrig 7G0BUivOUSPqte4Fu0bBC+V3hsDaSVZ9TqA26Tl0HaUaZG8kaNaO2BvXsVV3s+pbQNuHmI/y0Cp gqgwc2KvTZg0+4Ts5ExhL+C8SW9wAw== X-Proofpoint-ORIG-GUID: GfF3rvc9pwwRsLBa_GUEXaj0hezFRJfv X-Proofpoint-GUID: GfF3rvc9pwwRsLBa_GUEXaj0hezFRJfv X-Authority-Analysis: v=2.4 cv=C+HkCAP+ c=1 sm=1 tr=0 ts=6942cb2c cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=ag1SF4gXAAAA:8 a=t7CeM3EgAAAA:8 a=Z1FrW6rxTDoSltceh7wA:9 a=Yupwre4RP9_Eg_Bd0iYG:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-17_02,2025-12-16_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 suspectscore=0 spamscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512170120 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Dec 2025 15:24:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228060 Rename BUILD_MODE and BUILD_DIR with CARGO prefix, then in debug_build.inc, override CARGO_BUILD_MODE and CARGO_BUILD_DIR for target when debug build is enabled (fragment core/yocto/debug-build) Suggested-by: Richard Purdie Signed-off-by: Hongxu Jia --- meta/classes-recipe/cargo.bbclass | 8 ++++---- meta/conf/distro/include/debug_build.inc | 4 ++++ meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.9.0.bb | 4 ++-- meta/recipes-devtools/rust/libstd-rs_1.91.1.bb | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 2dd28e95d3..eff28b323a 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass @@ -31,18 +31,18 @@ B = "${WORKDIR}/build" export RUST_BACKTRACE = "1" RUSTFLAGS ??= "" -BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" +CARGO_BUILD_MODE ??= "--release" # --frozen flag will prevent network access (which is required since only # the do_fetch step is authorized to access network) # and will require an up to date Cargo.lock file. # This force the package being built to already ship a Cargo.lock, in the end # this is what we want, at least, for reproducibility of the build. -CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${CARGO_MANIFEST_PATH}" +CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${CARGO_BUILD_MODE} --manifest-path=${CARGO_MANIFEST_PATH}" # This is based on the content of CARGO_BUILD_FLAGS and generally will need to # change if CARGO_BUILD_FLAGS changes. -BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}" -CARGO_TARGET_SUBDIR = "${RUST_HOST_SYS}/${BUILD_DIR}" +CARGO_BUILD_DIR ??= "release" +CARGO_TARGET_SUBDIR = "${RUST_HOST_SYS}/${CARGO_BUILD_DIR}" oe_cargo_build () { export RUSTFLAGS="${RUSTFLAGS}" bbnote "Using rust targets from ${RUST_TARGET_PATH}" diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc index 2fa0d513de..28f6ac6f6b 100644 --- a/meta/conf/distro/include/debug_build.inc +++ b/meta/conf/distro/include/debug_build.inc @@ -43,3 +43,7 @@ CXXFLAGS:append:pn-vulkan-validation-layers = " -DXXH_NO_INLINE_HINTS=1" # For meson.bbclass MESON_BUILDTYPE:class-target ?= "debug" + +# For cargo.bbclass +CARGO_BUILD_MODE:class-target ?= "" +CARGO_BUILD_DIR:class-target ?= "debug" diff --git a/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.9.0.bb b/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.9.0.bb index 577acfdc86..9de4a07aeb 100644 --- a/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.9.0.bb +++ b/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.9.0.bb @@ -27,7 +27,7 @@ CARGO_INSTALL_LIBRARIES = "1" do_compile:prepend () { # rpm-sequoia.pc is generated in the source directory # but the target directory does not exist there. - mkdir -p ${S}/target/${BUILD_DIR} + mkdir -p ${S}/target/${CARGO_BUILD_DIR} # From rpm-sequoia's README.md: # @@ -59,7 +59,7 @@ do_install:append () { # rpm-sequoia does not install its pkgconfig file. Do it manually. mkdir -p ${D}${libdir}/pkgconfig - install -m644 ${S}/target/${BUILD_DIR}/rpm-sequoia.pc ${D}${libdir}/pkgconfig + install -m644 ${S}/target/${CARGO_BUILD_DIR}/rpm-sequoia.pc ${D}${libdir}/pkgconfig } do_install_ptest:append () { diff --git a/meta/recipes-devtools/rust/libstd-rs_1.91.1.bb b/meta/recipes-devtools/rust/libstd-rs_1.91.1.bb index 8af93bec57..30875200e4 100644 --- a/meta/recipes-devtools/rust/libstd-rs_1.91.1.bb +++ b/meta/recipes-devtools/rust/libstd-rs_1.91.1.bb @@ -44,8 +44,8 @@ do_install () { # With the incremental build support added in 1.24, the libstd deps directory also includes dependency # files that get installed. Those are really only needed to incrementally rebuild the libstd library # itself and don't need to be installed. - rm -f ${B}/target/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d - cp ${B}/target/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir} + rm -f ${B}/target/${RUST_TARGET_SYS}/${CARGO_BUILD_DIR}/deps/*.d + cp ${B}/target/${RUST_TARGET_SYS}/${CARGO_BUILD_DIR}/deps/* ${D}${rustlibdir} } BBCLASSEXTEND = "nativesdk" From patchwork Wed Dec 17 15:24:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 76842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEB22D65C6F for ; Wed, 17 Dec 2025 15:24:37 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.17080.1765985070731180575 for ; Wed, 17 Dec 2025 07:24:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=d9jIfS54; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=4446d33a3f=hongxu.jia@windriver.com) Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BHDNgZA3275695; Wed, 17 Dec 2025 15:24:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=qjkzWq3Bxqal+PlwxyR/idFTi9bDKH+QQPNJ0qB8S0c=; b=d9jIfS54bika 10EvlOOR2aPFVcnaNMtFyb0kYxQLT1Zan8rJK8ByiUtb7mQlqOaDpObus64ipXim CHqrwMU1KKZF6w75nnX4y0ejcbFT8ahUjQfPu/DiSI2CYmzwzsylept2bmRzj4dz SShWHGTxy1h7HMfVva7+nk+kbNd2HFEyGXZKDXQGz0z3pFdh0IYqNe4EdnY2yN2/ QX3dTZoqKlS3JLblBVwgSfkEsKyDqoXl+DIvw5+DbS+78M1R8NSrQ2TpUu2CvV6K ZzddI0/P2/MzSN1bTJRkLkfwrpZtzhy7G8Bo0L6uWx7sdqtj2arRdpZKFTGu+/vf nwFeKy2PEg== Received: from ala-exchng01.corp.ad.wrs.com ([128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4b3k0brr82-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 17 Dec 2025 15:24:29 +0000 (GMT) Received: from ala-exchng01.corp.ad.wrs.com (10.11.224.121) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Wed, 17 Dec 2025 07:24:28 -0800 Received: from pek-lpg-core5.wrs.com (10.11.232.110) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Wed, 17 Dec 2025 07:24:27 -0800 From: Hongxu Jia To: , Subject: [PATCH v6 6/8] debug_build.inc: disable debug build for qemu Date: Wed, 17 Dec 2025 23:24:19 +0800 Message-ID: <20251217152421.1181080-6-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251217152421.1181080-1-hongxu.jia@windriver.com> References: <20251217152421.1181080-1-hongxu.jia@windriver.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE3MDEyMCBTYWx0ZWRfX618vms207OhK 2vQX87jX29YffbiGImKn/1f6zhLCECnDtN2J10V+xaaDh+w77QDycp/XBy9UCkRzyngrG4WjmWz 9pxOKao8qkTs13tHB/F2oPXVJ2SiivB89cvdei3mgd5BuqJoO2gWyMSswdo5tPzUPhgS9Wo3gOM nRqYZL0m3f4LktI2mnGdSdN3MIQbteSrGnbGTDedu7im1q1L6rUTD30nN/D+12lCQ/yx9U3+LVv aGQSao9ubrLc9chOlKhBke0RzkGgtZGH8a3v8pU/s+vxJdKty43eS8ECGf4JvbJETRozgjAVJb8 J5KAQBYCW4U7RhFydeZsERPsrJ/P/Ok1lYs/lyfGiU4qNF7OwkbngUZMYXAglGfFz2MMLpdrvpO UnD9sIBzbKgh/uH9Z+0B3uN073a68g== X-Proofpoint-ORIG-GUID: YPbu71cmhk0OQSYSfpN9VtDluI84V2w_ X-Proofpoint-GUID: YPbu71cmhk0OQSYSfpN9VtDluI84V2w_ X-Authority-Analysis: v=2.4 cv=C+HkCAP+ c=1 sm=1 tr=0 ts=6942cb2d cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=69wJf7TsAAAA:8 a=t7CeM3EgAAAA:8 a=ZIF5ftZXvtxY9cnOiyQA:9 a=STXwoKBC1RUA:10 a=Fg1AiH1G6rFz08G2ETeA:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-17_02,2025-12-16_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 suspectscore=0 spamscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512170120 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Dec 2025 15:24:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228059 Drop DEBUG_BUILD, due to qemu doesn't work without optimization [1], disable it with -O2 even though debug build is enabled (fragment core/yocto/debug-build) [1] https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html Signed-off-by: Hongxu Jia --- meta/conf/distro/include/debug_build.inc | 10 ++++++++++ meta/recipes-devtools/qemu/qemu.inc | 4 ---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc index 28f6ac6f6b..aadc87e5f5 100644 --- a/meta/conf/distro/include/debug_build.inc +++ b/meta/conf/distro/include/debug_build.inc @@ -21,6 +21,11 @@ DEBUG_OPTIMIZATION:mips:pn-python3-lxml = "-O ${DEBUG_LEVELFLAG}" DEBUG_OPTIMIZATION:mipsel:pn-python3-lxml = "-O ${DEBUG_LEVELFLAG}" # used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] DEBUG_OPTIMIZATION:append:pn-gcc-sanitizers = " -Wno-error" +# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html +# upstream states qemu doesn't work without optimization +DEBUG_OPTIMIZATION:pn-qemu = "-O2 ${DEBUG_LEVELFLAG}" +DEBUG_OPTIMIZATION:pn-qemu-native = "-O2 ${DEBUG_LEVELFLAG}" +DEBUG_OPTIMIZATION:pn-nativesdk-qemu = "-O2 ${DEBUG_LEVELFLAG}" BUILD_OPTIMIZATION:mips:pn-kea = "-O -g" BUILD_OPTIMIZATION:mipsel:pn-kea = "-O -g" @@ -28,6 +33,11 @@ BUILD_OPTIMIZATION:mipsel:pn-kea = "-O -g" # {standard input}:1488805: Error: branch out of range BUILD_OPTIMIZATION:mips:pn-python3-lxml = "-O -g" BUILD_OPTIMIZATION:mipsel:pn-python3-lxml = "-O -g" +# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html +# upstream states qemu doesn't work without optimization +BUILD_OPTIMIZATION:pn-qemu = "-O2" +BUILD_OPTIMIZATION:pn-qemu-native = "-O2" +BUILD_OPTIMIZATION:pn-nativesdk-qemu = "-O2" CPPFLAGS:append:arm:pn-lttng-ust = " -DUATOMIC_NO_LINK_ERROR" diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 63414196fa..12312e5800 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -59,10 +59,6 @@ COMPATIBLE_HOST:mipsarchn32 = "null" COMPATIBLE_HOST:mipsarchn64 = "null" COMPATIBLE_HOST:riscv32 = "null" -# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html -# upstream states qemu doesn't work without optimization -DEBUG_BUILD = "0" - do_install:append() { # Prevent QA warnings about installed ${localstatedir}/run if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi From patchwork Wed Dec 17 15:24:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 76845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3AEFD65C70 for ; Wed, 17 Dec 2025 15:24:37 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.17520.1765985072265789546 for ; Wed, 17 Dec 2025 07:24:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=mL1ROoxJ; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=4446d33a3f=hongxu.jia@windriver.com) Received: from pps.filterd (m0250810.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BH4KvM91481957; Wed, 17 Dec 2025 07:24:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=MWiP+434t4or2dnaF50dTr99jk0po1WXjfFLC9HXTrk=; b=mL1ROoxJ0ClR JpEdTqjTxoPqyTD9vtyi7GqsSP3gazoAerkoGxVUULGaGNJ+8eojaB++GyTu5q9K bpA0kBNRjUNl9hkOTdJssj+YWh6SbecLztdx+JKR++CioomGKlaq06vaf8LGHqkG Q8tAnlLm+LwI1m9bJmpM+NKbQi2KgV8g+BNN8tzNcsnF0b6KoWoDxkpZ+opTX9ry BRzCboVY8ltrDsfg0VcQ/8WqO+xEnvUZNIUvv2fHowuMCc8eNi2+3t4/h8uvgQpf RoufgZEWaEKba78X26dVHFmEDHM0jXB4JAmgGgj4lR6XfQ0DLRMhnewyGeZdXkKH YqvlgMV3Mw== Received: from ala-exchng01.corp.ad.wrs.com ([128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4b3k0sgquj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 17 Dec 2025 07:24:30 -0800 (PST) Received: from ala-exchng01.corp.ad.wrs.com (10.11.224.121) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Wed, 17 Dec 2025 07:24:29 -0800 Received: from pek-lpg-core5.wrs.com (10.11.232.110) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Wed, 17 Dec 2025 07:24:28 -0800 From: Hongxu Jia To: , Subject: [PATCH v6 7/8] Clean up compiler optimization variable FULL_OPTIMIZATION Date: Wed, 17 Dec 2025 23:24:20 +0800 Message-ID: <20251217152421.1181080-7-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251217152421.1181080-1-hongxu.jia@windriver.com> References: <20251217152421.1181080-1-hongxu.jia@windriver.com> MIME-Version: 1.0 X-Proofpoint-GUID: hqM6ey6fHhjwCQn5NVRX84aJvRpMwERP X-Proofpoint-ORIG-GUID: hqM6ey6fHhjwCQn5NVRX84aJvRpMwERP X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE3MDEyMCBTYWx0ZWRfX1uMfeV6uyq16 VQ2yYvzRRvdZzEy5IVSjwM1Rt+YMalxMB/LMtAoMnoq1BzLFP7Uv+o1IeZ7jsjmbSjQq+Z+TAwC WIWve2d0Ddn2LeKDnIQFQlNdkI4j9HMA36h2xk9XGUJ12q1ZeFlGmubUF5fY48c/MR/Zz97MZdq MHlBq9s+rtVOhIwyHuuee6y2wCHxPZPI8KgiCw7xsYe9N4WFj1iGHUrnsUfjm3VzqvsD8PH7yHF DIOoLxeATSaWR/oYBTLMDuQG4IgfQX2LYs93KG3f1rOds7Uq+ku3KTsBjhnSfUC+UM4QxTzWiFr /g0j1/9cfnClSkSzRhR3ShjQZJaXo40GtlOWtbWdnfrxH2JujCEdNZba4BxCUOXtIx38hGkuTt2 aa7HXcD8RYwj6LTHkQQuLmaPy4omcw== X-Authority-Analysis: v=2.4 cv=PqeergM3 c=1 sm=1 tr=0 ts=6942cb2e cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=Ijn1RKaX0nAUqlVouMsA:9 a=X5K9hatliZlWjnsT:21 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-17_02,2025-12-16_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 suspectscore=0 spamscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512170120 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Dec 2025 15:24:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228061 In bitbake.conf, remove FULL_OPTIMIZATION, set "-O2 ${DEBUG_LEVELFLAG}" to SELECTED_OPTIMIZATION directly In mesa.inc, due to llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2), set -fno-omit-frame-pointer to TARGET_CFLAGS only if option -O2 existed Correct typo in clang.patch In recipe harfbuzz, use SELECTED_OPTIMIZATION to instead of FULL_OPTIMIZATION Signed-off-by: Hongxu Jia --- meta/conf/bitbake.conf | 3 +-- meta/conf/documentation.conf | 3 +-- meta/recipes-graphics/harfbuzz/harfbuzz_11.5.1.bb | 2 +- meta/recipes-graphics/mesa/mesa.inc | 2 +- meta/recipes-multimedia/lame/lame/clang.patch | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 653d396c79..c4e9b60ac3 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -659,8 +659,7 @@ DEBUG_PREFIX_MAP ?= "${DEBUG_PREFIX_MAP_EXTRA} \ " DEBUG_LEVELFLAG ?= "-g" -FULL_OPTIMIZATION ??= "-O2 ${DEBUG_LEVELFLAG}" -SELECTED_OPTIMIZATION ??= "${FULL_OPTIMIZATION}" +SELECTED_OPTIMIZATION ??= "-O2 ${DEBUG_LEVELFLAG}" # compiler flags for native/nativesdk BUILD_OPTIMIZATION ??= "-O2" diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf index cdd6566f3c..91912a288e 100644 --- a/meta/conf/documentation.conf +++ b/meta/conf/documentation.conf @@ -177,7 +177,6 @@ FILESPATH[doc] = "The default set of directories the OpenEmbedded build system u FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process." FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'." FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig." -FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-O2 ${DEBUG_LEVELFLAG}'." #G @@ -369,7 +368,7 @@ SDK_OUTPUT[doc] = "The location used by the OpenEmbedded build system when creat SDKIMAGE_FEATURES[doc] = "Equivalent to IMAGE_FEATURES. However, this variable applies to the SDK generated from an image using the command 'bitbake -c populate_sdk imagename'." SDKMACHINE[doc] = "Specifies the architecture (i.e. i686 or x86_64) for which to build SDK and ADT items." SECTION[doc] = "The section in which packages should be categorized. Package management utilities can make use of this variable." -SELECTED_OPTIMIZATION[doc] = "The variable takes the value of FULL_OPTIMIZATION unless fragment 'core/yocto/debug-build' is enabled. In this case, the value of DEBUG_OPTIMIZATION is used." +SELECTED_OPTIMIZATION[doc] = "The variable takes the value of '-O2 ${DEBUG_LEVELFLAG}' less fragment 'core/yocto/debug-build' is enabled. In this case, the value of DEBUG_OPTIMIZATION is used." SERIAL_CONSOLES[doc] = "Defines the serial consoles (TTYs) to enable using getty." SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS[doc] = "A list of recipe dependencies that should not be used to determine signatures of tasks from one recipe when they depend on tasks from another recipe." SIGGEN_EXCLUDERECIPES_ABISAFE[doc] = "A list of recipes that are completely stable and will never change." diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_11.5.1.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_11.5.1.bb index dd30c1237d..72840417f2 100644 --- a/meta/recipes-graphics/harfbuzz/harfbuzz_11.5.1.bb +++ b/meta/recipes-graphics/harfbuzz/harfbuzz_11.5.1.bb @@ -21,7 +21,7 @@ GTKDOC_MESON_ENABLE_FLAG = 'enabled' GTKDOC_MESON_DISABLE_FLAG = 'disabled' # As per upstream CONFIG.md, it is recommended to always build with -Os. -FULL_OPTIMIZATION = "-Os ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION ?= "-Os ${DEBUG_LEVELFLAG}" EXTRA_OEMESON = "-Dtests=disabled" diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 835e4d46ea..24d2435f00 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -221,7 +221,7 @@ PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${VIDEO_CODECS}, -Dvideo-codecs='' PACKAGECONFIG[teflon] = "-Dteflon=true, -Dteflon=false" # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) -FULL_OPTIMIZATION:append = " -fno-omit-frame-pointer" +TARGET_CFLAGS += "${@bb.utils.contains('SELECTED_OPTIMIZATION', '-O2', '-fno-omit-frame-pointer', '', d)}" CFLAGS:append:armv5 = " -DMISSING_64BIT_ATOMICS" CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS" diff --git a/meta/recipes-multimedia/lame/lame/clang.patch b/meta/recipes-multimedia/lame/lame/clang.patch index 116000c577..183a9d3212 100644 --- a/meta/recipes-multimedia/lame/lame/clang.patch +++ b/meta/recipes-multimedia/lame/lame/clang.patch @@ -9,7 +9,7 @@ and target hardware aligns, and leads to some amusing errors: unknown target CPU 'neoverse-n1' note: valid target CPU values are: i386, i486, ... -Move the HAVE_CLANG block up into the FULL_OPTIMIZATION case, alongside +Move the HAVE_CLANG block up into the OPTIMIZATION case, alongside HAVE_GCC. This option is never enabled (as it's basically "use native") so resolves the build failure. From patchwork Wed Dec 17 15:24:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 76840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93EDED65C62 for ; Wed, 17 Dec 2025 15:24:37 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.17083.1765985073711266449 for ; Wed, 17 Dec 2025 07:24:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=MFGEiUAk; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=4446d33a3f=hongxu.jia@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BHCuSkr574399; Wed, 17 Dec 2025 15:24:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=ve0OoTlKVsX9P4qwLJsyxgdZ9kNEiOeKEgyzTxrw8xY=; b=MFGEiUAkWBLg fjls1B0sTEixs9DwpP9QNUDgkwPL3HAMT0s0LFCSf9EcMk116WtUeKv09gREuoVy BanuH4G2KZPkfnYFXOA2B+qe0LJe7xB4faXJWidZUFiXEG1757WwLu2S7kgvh1vF vELyvG9dndp57w3kju4LfdxZ0mqSuRthk2HPhPdt+C/xGsDjjjiF6LpnJKX7+tTZ 3OV/tqRjbQpzN/tAn9HmOS/Bu/ym4GzPCX8Hl2YjwhNEbTUcr6AJKnsMupKNDlB4 BgY84yuZwZORvfu4gLbIwe2EJLMksxeDidQnSmp/u7Do0pesaLkIbF1yxRujsqkf eVK0RMaHng== Received: from ala-exchng01.corp.ad.wrs.com ([128.224.246.36]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4b3k68rr29-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 17 Dec 2025 15:24:32 +0000 (GMT) Received: from ala-exchng01.corp.ad.wrs.com (10.11.224.121) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Wed, 17 Dec 2025 07:24:30 -0800 Received: from pek-lpg-core5.wrs.com (10.11.232.110) by ala-exchng01.corp.ad.wrs.com (10.11.224.121) with Microsoft SMTP Server id 15.1.2507.61 via Frontend Transport; Wed, 17 Dec 2025 07:24:30 -0800 From: Hongxu Jia To: , Subject: [PATCH v6 8/8] Clean up compiler optimization variable DEBUG_OPTIMIZATION Date: Wed, 17 Dec 2025 23:24:21 +0800 Message-ID: <20251217152421.1181080-8-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251217152421.1181080-1-hongxu.jia@windriver.com> References: <20251217152421.1181080-1-hongxu.jia@windriver.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE3MDEyMCBTYWx0ZWRfX5WdCK4r4twGk 9HvUHSv13yJqUYd+CgWHCAhkCxmCP1pg4NT85Op4lf1t5GNDNZ7YXN3jnpacaq0jyzQd1w2+c1D SfeG6OVLEjX6Ju6uXLu1r6wLj2Mn7f980xDWwheKT/3D5XeXZfYNtBZPp6dpKmjHHWblS1xIFJd W/QlUi1IBI4exXoYJBSajfJadgiDpntKGGNyZ8+Gyy6CN3d3i8JiI5Greelblu73J+vukGaUlNi PsvsiYoG8oaxUI9m575rVH+XyIUzafU9P2nEfaQiyMEahz01Q2aMLr+paAdqoYFWaB4q8xe7wy1 tazVeW6ZTF4ImBE+xDW8PXMnaUrhtvk3HEgwFEi+rq015YfjCZXf+iLIsUmbNEhJ9yFuLPBX4Kj lZF6Ee05KWCcuCPYG33rDP2S1dr2OA== X-Proofpoint-ORIG-GUID: fODrKM4SqfBaJXvfkKedQDqHhj8e-Oa4 X-Proofpoint-GUID: fODrKM4SqfBaJXvfkKedQDqHhj8e-Oa4 X-Authority-Analysis: v=2.4 cv=EpLfbCcA c=1 sm=1 tr=0 ts=6942cb30 cx=c_pps a=AbJuCvi4Y3V6hpbCNWx0WA==:117 a=AbJuCvi4Y3V6hpbCNWx0WA==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=69wJf7TsAAAA:8 a=t7CeM3EgAAAA:8 a=N3d6yfmxjZLdeZyX-EkA:9 a=STXwoKBC1RUA:10 a=Fg1AiH1G6rFz08G2ETeA:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-17_02,2025-12-16_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 spamscore=0 phishscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512170120 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Dec 2025 15:24:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228062 Remove DEBUG_OPTIMIZATION, set "-Og ${DEBUG_LEVELFLAG}" to SELECTED_OPTIMIZATION when debug build is enabled (fragment core/yocto/debug-build) Use SELECTED_OPTIMIZATION to instead of DEBUG_OPTIMIZATION for debug tuning configuration Signed-off-by: Hongxu Jia --- meta/conf/distro/include/debug_build.inc | 31 +++++++++++----------- meta/conf/documentation.conf | 3 +-- meta/conf/fragments/yocto/debug-build.conf | 2 +- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc index aadc87e5f5..a9e9b0f439 100644 --- a/meta/conf/distro/include/debug_build.inc +++ b/meta/conf/distro/include/debug_build.inc @@ -1,31 +1,30 @@ # Override SELECTED_OPTIMIZATION and BUILD_OPTIMIZATION when fragment 'core/yocto/debug-build' is enabled. -DEBUG_OPTIMIZATION ?= "-Og ${DEBUG_LEVELFLAG}" -SELECTED_OPTIMIZATION ?= "${DEBUG_OPTIMIZATION}" +SELECTED_OPTIMIZATION ?= "-Og ${DEBUG_LEVELFLAG}" # compiler flags for native/nativesdk BUILD_OPTIMIZATION ?= "-Og -g" # The modern compilers and code seem to require extra steps to avoid DEBUG errors, # this file collects debug tuning configuration to address DEBUG errors. -DEBUG_OPTIMIZATION:append:pn-perf = " -Wno-error=maybe-uninitialized" -DEBUG_OPTIMIZATION:append:armv4:pn-libjpeg-turbo = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" -DEBUG_OPTIMIZATION:append:armv5:pn-libjpeg-turbo = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" -DEBUG_OPTIMIZATION:append:armv4:pn-bash = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" -DEBUG_OPTIMIZATION:append:armv5:pn-bash = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" -DEBUG_OPTIMIZATION:append:pn-mdadm = " -Wno-error" -DEBUG_OPTIMIZATION:mips:pn-kea = "-O ${DEBUG_LEVELFLAG}" -DEBUG_OPTIMIZATION:mipsel:pn-kea = "-O ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION:append:pn-perf = " -Wno-error=maybe-uninitialized" +SELECTED_OPTIMIZATION:append:armv4:pn-libjpeg-turbo = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +SELECTED_OPTIMIZATION:append:armv5:pn-libjpeg-turbo = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +SELECTED_OPTIMIZATION:append:armv4:pn-bash = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +SELECTED_OPTIMIZATION:append:armv5:pn-bash = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +SELECTED_OPTIMIZATION:append:pn-mdadm = " -Wno-error" +SELECTED_OPTIMIZATION:mips:pn-kea = "-O ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION:mipsel:pn-kea = "-O ${DEBUG_LEVELFLAG}" # {standard input}: Assembler messages: # {standard input}:1488805: Error: branch out of range -DEBUG_OPTIMIZATION:mips:pn-python3-lxml = "-O ${DEBUG_LEVELFLAG}" -DEBUG_OPTIMIZATION:mipsel:pn-python3-lxml = "-O ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION:mips:pn-python3-lxml = "-O ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION:mipsel:pn-python3-lxml = "-O ${DEBUG_LEVELFLAG}" # used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] -DEBUG_OPTIMIZATION:append:pn-gcc-sanitizers = " -Wno-error" +SELECTED_OPTIMIZATION:append:pn-gcc-sanitizers = " -Wno-error" # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html # upstream states qemu doesn't work without optimization -DEBUG_OPTIMIZATION:pn-qemu = "-O2 ${DEBUG_LEVELFLAG}" -DEBUG_OPTIMIZATION:pn-qemu-native = "-O2 ${DEBUG_LEVELFLAG}" -DEBUG_OPTIMIZATION:pn-nativesdk-qemu = "-O2 ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION:pn-qemu = "-O2 ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION:pn-qemu-native = "-O2 ${DEBUG_LEVELFLAG}" +SELECTED_OPTIMIZATION:pn-nativesdk-qemu = "-O2 ${DEBUG_LEVELFLAG}" BUILD_OPTIMIZATION:mips:pn-kea = "-O -g" BUILD_OPTIMIZATION:mipsel:pn-kea = "-O -g" diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf index 91912a288e..fd318b95c9 100644 --- a/meta/conf/documentation.conf +++ b/meta/conf/documentation.conf @@ -129,7 +129,6 @@ CVE_CHECK_LAYER_INCLUDELIST[doc] = "Defines which layers to include during cve-c D[doc] = "The destination directory." DATE[doc] = "The date the build was started using YMD format." DATETIME[doc] = "The date and time the build was started." -DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-Og ${DEBUG_LEVELFLAG}'." DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority." DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)." DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system." @@ -368,7 +367,7 @@ SDK_OUTPUT[doc] = "The location used by the OpenEmbedded build system when creat SDKIMAGE_FEATURES[doc] = "Equivalent to IMAGE_FEATURES. However, this variable applies to the SDK generated from an image using the command 'bitbake -c populate_sdk imagename'." SDKMACHINE[doc] = "Specifies the architecture (i.e. i686 or x86_64) for which to build SDK and ADT items." SECTION[doc] = "The section in which packages should be categorized. Package management utilities can make use of this variable." -SELECTED_OPTIMIZATION[doc] = "The variable takes the value of '-O2 ${DEBUG_LEVELFLAG}' less fragment 'core/yocto/debug-build' is enabled. In this case, the value of DEBUG_OPTIMIZATION is used." +SELECTED_OPTIMIZATION[doc] = "The variable takes the value of '-O2 ${DEBUG_LEVELFLAG}' less fragment 'core/yocto/debug-build' is enabled. In this case, the value of '-Og ${DEBUG_LEVELFLAG}' is used." SERIAL_CONSOLES[doc] = "Defines the serial consoles (TTYs) to enable using getty." SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS[doc] = "A list of recipe dependencies that should not be used to determine signatures of tasks from one recipe when they depend on tasks from another recipe." SIGGEN_EXCLUDERECIPES_ABISAFE[doc] = "A list of recipes that are completely stable and will never change." diff --git a/meta/conf/fragments/yocto/debug-build.conf b/meta/conf/fragments/yocto/debug-build.conf index 5bdc1366b4..dbd7bf114f 100644 --- a/meta/conf/fragments/yocto/debug-build.conf +++ b/meta/conf/fragments/yocto/debug-build.conf @@ -2,7 +2,7 @@ BB_CONF_FRAGMENT_SUMMARY = "Specifies to build recipes with debugging informatio This influences the value of the SELECTED_OPTIMIZATION variable." BB_CONF_FRAGMENT_DESCRIPTION = "Enables full debug and backtrace capabilities for all programs \ and libraries in the image, by modifying the SELECTED_OPTIMIZATION variable, \ -setting it to "DEBUG_OPTIMIZATION"." +setting it to '-Og ${DEBUG_LEVELFLAG}'." # Allow other layers to add their own debug build configurations include_all conf/distro/include/debug_build.inc