From patchwork Wed Feb 10 14:12:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1438973 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=CIt2oqJQ; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbMDh5bXzz9rx6 for ; Thu, 11 Feb 2021 01:13:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 393A6872F5; Wed, 10 Feb 2021 14:13:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uYFmkkBCl152; Wed, 10 Feb 2021 14:13:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4BC7C872ED; Wed, 10 Feb 2021 14:13:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 375CD1BF3FD for ; Wed, 10 Feb 2021 14:13:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 33E5586773 for ; Wed, 10 Feb 2021 14:13:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xnj2Tzc8tfCk for ; Wed, 10 Feb 2021 14:13:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by whitealder.osuosl.org (Postfix) with ESMTPS id 53FAF8679D for ; Wed, 10 Feb 2021 14:13:13 +0000 (UTC) Received: by mail-ej1-f52.google.com with SMTP id sa23so4529203ejb.0 for ; Wed, 10 Feb 2021 06:13:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XRNCqYwvO0MIV721ZaiXSaU8DLMTVBN49gXfAdGjpL4=; b=CIt2oqJQmUh7y2OFeGq9BAHwISCqoPXy+15mwOgq7HjNg+EIa5ZbnYhE0lt7mrxS1A yCEoi1OGFB/hK4MFySiVDtslPEtnwhPwCpMbRI3Z9oCi0ZoJDMcNEAeK6SZVU3CB73Me nn+ZOUk0IJgD7P+fFsUZRAA5npCwLQMzH0TzptuyTZ9cSV1aF5eB70LHV83V97W3c8CE OpTDhma5vuOEtGoJ/6lN/8ZmXkC8nYDppfjcGiyXQ/iHZ01Oddo/lD+izDDDfcRVa6MV GUeXhUMkqpIZaVmTQgOuFdVLsj6cfa5z9hX6L5HIJH/C55R5uvBHfV+wd+TlTEKR4z8D 92tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XRNCqYwvO0MIV721ZaiXSaU8DLMTVBN49gXfAdGjpL4=; b=AdU4eofYmGgiLkaaPVwwaiWvMYSDo2PYX8bETK5Xxli/Q9FuW+N6CPP4wRnpbbkuBV lLTIySx1Ju+cAr/GWkfZgza1sf99sCPyOGlYFVuWtpfOlYqjPVw4tqVgn1mJ8sn5p3Nx mlyTGudY7MjDssKQCi+n1DL1imG1PuzpscRL7MwWMCGN1+p1A9rEt7+GZwoenPe18c5e g6SsGlwc0Y2ShQCzrPFFEnDPMyhDFQOvl4aHgHwTZze8CSaftKTQYCJM2UmIG7bwvfZ7 sObWeIRcRK6tSf+Mut7H8Q//X+s4tBHgvxMAdzKIZYqlQfJ6mQBQUgh0VJWu1WqFPj7k uG9Q== X-Gm-Message-State: AOAM532IcYcmctMDA/zb2v0OuhAfBKEVBkE/KGDXrxr9Dxl7j0qUTt6q nCNcJKnggrgY/7394tnGLhseJsvmYd6YnkS7 X-Google-Smtp-Source: ABdhPJw/UCEk4tCBWX/PKbb+Nq1x9t1r9+5ZQnH21CAA2Vxs37DsjGSk49sSje39OkRVW/0jD0I2jw== X-Received: by 2002:a17:906:380c:: with SMTP id v12mr3079690ejc.65.1612966391640; Wed, 10 Feb 2021 06:13:11 -0800 (PST) Received: from localhost (ptr-5gw9txf6g5tndjqqqz.18120a2.ip6.access.telenet.be. [2a02:1810:510:3800:1b15:18e4:57d1:eb]) by smtp.gmail.com with ESMTPSA id ec18sm1348128ejb.24.2021.02.10.06.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 06:13:11 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Wed, 10 Feb 2021 15:12:50 +0100 Message-Id: <20210210141256.6438-2-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210141256.6438-1-patrickdepinguin@gmail.com> References: <20210210141256.6438-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/7] core: introduce BR2_ENABLE_RUNTIME_DEBUG X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Martin , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire Some packages have optional runtime assertions, extra traces, or other elements that can help in debugging problems. However, such runtime elements can negatively influence performance. In a test program performing 100K gRPC calls from a client to a local server and receiving the returned response, we see following execution time: - runtime debug enabled: 1065 seconds - runtime debug disabled: 48 seconds This is more than a factor 20 (!) difference. Analysis shows that the problem mostly stems from libabseil-cpp (a dependency of gRPC) which enables mutex deadlock analysis when the preprocessor flag 'NDEBUG' is not set, which adds a 'backtrace()' call on every lock/unlock. Potentially worse, when libunwind is enabled and linked with the test program, 'backtrace()' is not provided by glibc but by libunwind itself. For production systems, users expect good performance out-of-the-box. In the example above, the difference is huge and unless explicitly tested and analyzed, users may not realize that the performance could be much better. Address this problem by introducing a new option BR2_ENABLE_RUNTIME_DEBUG, which can be used by packages or package infrastructures to set the necessary flags. Note that BR2_ENABLE_RUNTIME_DEBUG is orthogonal to BR2_ENABLE_DEBUG: the former changes runtime behavior, while the latter is only expected to add debug symbols to the build. Today, the cmake build system does introduce a runtime impact when BR2_ENABLE_DEBUG is set, but that will be rectified in a subsequent commit. Signed-off-by: Thomas De Schampheleire --- Config.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Config.in b/Config.in index e35a78fb71..94e3076ca7 100644 --- a/Config.in +++ b/Config.in @@ -412,6 +412,19 @@ config BR2_DEBUG_3 endchoice endif +config BR2_ENABLE_RUNTIME_DEBUG + bool "build packages with runtime debugging info" + help + Some packages may have runtime assertions, extra traces, and + similar runtime elements that can help debugging. However, + these elements may negatively influence performance so should + normally not be enabled on production systems. + + Enable this option to enable such runtime debugging. + + Note: disabling this option is not a guarantee that all + packages effectively removed these runtime debugging elements. + config BR2_STRIP_strip bool "strip target binaries" default y From patchwork Wed Feb 10 14:12:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1438975 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sHTUjzZL; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbMDn6FK9z9sXM for ; Thu, 11 Feb 2021 01:13:29 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E8DD3868E3; Wed, 10 Feb 2021 14:13:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8RX8lN20aHjA; Wed, 10 Feb 2021 14:13:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DC9E8867E2; Wed, 10 Feb 2021 14:13:19 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 985951BF3FD for ; Wed, 10 Feb 2021 14:13:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 903BC85521 for ; Wed, 10 Feb 2021 14:13:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a24C4nzTeEga for ; Wed, 10 Feb 2021 14:13:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by fraxinus.osuosl.org (Postfix) with ESMTPS id DD5BF86226 for ; Wed, 10 Feb 2021 14:13:14 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id t5so3148827eds.12 for ; Wed, 10 Feb 2021 06:13:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P/ukevGgcCg/chxO+fct7rBVuYgOOJ+Cnp6aO0PG0+0=; b=sHTUjzZLFsRi6piLONV+lxIV6/DlqPnsSWOlUdYfmSwW15dsHiyPriV0BnoC+fpRTT eO5Cw9HVPw9v0YR89GuojmavL+pbqZiehlaPdha1mOKUmJDJUotXn4ifULlv25oL9OUS E+iSEnf+0VDCQlMPnyXTlmSYIX+l1tAwp/bDnrZK4dm1lwKDIcqDHZhV9JPj6EFBN5d0 nXnedTfUNzapT+24n7RaQCTh++ip8+eMpP0A0rmJa9vUhOTQSnkUbG9yli7hkyQNKWdI xrpQqdBv0qQLbDbBCfiKz/OfU8PL1akWjb3D/WE9XsNNZ/oxGOdUs7ARq/ZSgpITSMeR cSJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P/ukevGgcCg/chxO+fct7rBVuYgOOJ+Cnp6aO0PG0+0=; b=nD+xT5FXQRwFTRFby9nwwldb/IgazzDZ0M89XMDFWld9+0qw2o9nUWGmpgahy/Pyss yoyPJCbKVF//h+TGX7XvVejIHYPQZFpxMvHW9S2wsf5r9qnwciDWAsduVOY4wBvJraLL txoXVmM/3/YuUhWBDWGyY5vt0sj44ogo3dUp7k/3vKYbZR00GKF0jWLCHE6HJaGvtXek tN6hWOHsGDODVMLGIkc6UapQkvUrToEyWcWSoPsgA1eI+c53bhXsuPgjZjAKoEcw97k4 ToVQ7p5hEAWk+hQJurTOV6xYSsFtaEFoUHkedwAdjh61mHhbSWkZwsI/Yo5yfPrVMUv1 OdLw== X-Gm-Message-State: AOAM531imVZlgyC/Z1FNRvg9yMNRV2DISfi5rESzaPubqDHDaOrCgLqY M8fMxEN/kqWZ0jiaLUCibcRMBQCnSHLJ86YH X-Google-Smtp-Source: ABdhPJyy9vOQbVm1uerdPJyV01eenkyybQJNdbBhX0o12QOkNSid979Zgd1hp2W2xQIwIdJP0OuEtg== X-Received: by 2002:a50:c94b:: with SMTP id p11mr3272305edh.388.1612966393391; Wed, 10 Feb 2021 06:13:13 -0800 (PST) Received: from localhost (ptr-5gw9txf6g5tndjqqqz.18120a2.ip6.access.telenet.be. [2a02:1810:510:3800:1b15:18e4:57d1:eb]) by smtp.gmail.com with ESMTPSA id l1sm1267680eje.12.2021.02.10.06.13.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 06:13:13 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Wed, 10 Feb 2021 15:12:51 +0100 Message-Id: <20210210141256.6438-3-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210141256.6438-1-patrickdepinguin@gmail.com> References: <20210210141256.6438-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/7] core: enable 'NDEBUG' unless BR2_ENABLE_RUNTIME_DEBUG is set X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Martin , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire A common way to disable runtime assertions is by honoring the 'NDEBUG' preprocessor flag. Set it when BR2_ENABLE_RUNTIME_DEBUG is disabled (the default case). Signed-off-by: Thomas De Schampheleire --- package/Makefile.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/Makefile.in b/package/Makefile.in index 51f5cbce4f..9a18c05c6f 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -145,6 +145,9 @@ endif ifeq ($(BR2_DEBUG_3),y) TARGET_DEBUGGING = -g3 endif +ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),) +TARGET_DEBUGGING += -DNDEBUG +endif TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS)) From patchwork Wed Feb 10 14:12:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1438972 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=h5eKWVJM; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbMDh5bmKz9sWt for ; Thu, 11 Feb 2021 01:13:24 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0409186113; Wed, 10 Feb 2021 14:13:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OFmwqbRvWiK9; Wed, 10 Feb 2021 14:13:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id F05F3872F3; Wed, 10 Feb 2021 14:13:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 0E20D1BF3FD for ; Wed, 10 Feb 2021 14:13:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E05F28730A for ; Wed, 10 Feb 2021 14:13:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u0SJdWqsEE2e for ; Wed, 10 Feb 2021 14:13:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by hemlock.osuosl.org (Postfix) with ESMTPS id C6E34872F7 for ; Wed, 10 Feb 2021 14:13:16 +0000 (UTC) Received: by mail-ej1-f42.google.com with SMTP id hs11so4526113ejc.1 for ; Wed, 10 Feb 2021 06:13:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lm/gqswehri1ZWYaLHxgIGEAk37PQNVu6BNvA3Wny7k=; b=h5eKWVJM54Oy9l/XVMJlshWhOCt97ZNfZh5z39+/OIrGfuEaV3ZRyKeuzBZHrMl4w9 ET3e9c7VaN+Ct0DoLucC8WXhJMV1NT2AuXVRd/qoEnw3zhgtLie1JD3pojOZQJubl8LN 5PtHFIg10ZDUeef2bI7tUjkC5Hkae5o9G1Vy/Tj4Ay2gmqCnTCO0ZzYobMwmHMJPZlHa 1kdAAg1xOPp/7WX38Q/pVhWXEWR8lUms/RiZK/vbhU7XWE3eHlGq+O74OKZir9bOQUaI hQKeO0jpzp9hr/mncf46ipP0WS4QndALbh6tjv3MYdweqHZHLOUGZ1PfmAPm4IyedkRN oBUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lm/gqswehri1ZWYaLHxgIGEAk37PQNVu6BNvA3Wny7k=; b=YqSziW7qsyKCrZrisMPBJQ2QZ9BoTFrduDYtmZwhHptLtFq/fl9zu9/jWFi32WInnn OLyhrX3IQFLQhS0IwplbnEujNfgf2N9kw3PCsWCb+hX/P6YglFEhx4wvVR0UylQSQfVQ fY7UkdpNodqpfIvpyB3kOkvw/FKbjQdK5nzvtYaWZOvAEeWPJpdh8iJNKyy8IaT9tXEP MHO1syaz97xVxKzkNAzHXhwjAf6tP/HJqtZyLv3je9EjR12ySD7qyrBc1Z/nqO+9Kg2u mgQLndYwnpWvkF3cP0ECydXfsp3ZvkJEUMizcW6ASvjF7uDCeMeO2ndIcQ5exTGQd15s +dCQ== X-Gm-Message-State: AOAM532ve0w0BveaCrXUYhldwAPfR1Fv7nSNfpWcX5Qu7TpI/5IQdtUJ uERGrGpqv0aXxkrQ3S+u9+9a6tlf83AsS0mT X-Google-Smtp-Source: ABdhPJy9mpPWUTA2AoR6uMDl0Ou4IBmklMV/ht6Cayc/M9p2fMQnzfoG6kXShfCKiUyoUosHzQPCNQ== X-Received: by 2002:a17:906:b0d1:: with SMTP id bk17mr3245365ejb.310.1612966395109; Wed, 10 Feb 2021 06:13:15 -0800 (PST) Received: from localhost (ptr-5gw9txf6g5tndjqqqz.18120a2.ip6.access.telenet.be. [2a02:1810:510:3800:1b15:18e4:57d1:eb]) by smtp.gmail.com with ESMTPSA id y8sm1074065edd.97.2021.02.10.06.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 06:13:14 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Wed, 10 Feb 2021 15:12:52 +0100 Message-Id: <20210210141256.6438-4-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210141256.6438-1-patrickdepinguin@gmail.com> References: <20210210141256.6438-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/7] package/pkg-cmake.mk: determine CMAKE_BUILD_TYPE depending on BR2_ENABLE_RUNTIME_DEBUG X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Martin , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire The CMAKE_BUILD_TYPE is currently set as 'Debug' in case BR2_ENABLE_DEBUG is set, and as 'Release' in other cases. However, while the description of BR2_ENABLE_DEBUG is to enable debug symbols (no runtime impact), the 'Debug' build type in CMake can actually have runtime impact. For one, because it does not set -DNDEBUG like is done for 'Release', but also because packages may do custom things based on it. The question of which CMAKE_BUILD_TYPE Buildroot should set, be it 'Debug', 'Release', 'RelWithDebInfo' or others, has come up several times in the past. See some references below: - July 2016: switch from Debug to RelWithDebInfo: https://git.buildroot.org/buildroot/commit/?id=4b0120183404913f7f7788ef4f0f6b51498ef363 - October 2016: switch from RelWithDebInfo back to Debug: https://git.buildroot.org/buildroot/commit/?id=104bb29e0490bfb487e2e665448dd3ca07fcc2b5 and changes to make sure Buildroot's flags are respected: https://git.buildroot.org/buildroot/commit/?id=12494ef48f893684d0800e7f6fe39a2ceaed0451 - August 2017: bug #10246 - "BR2_ENABLE_DEBUG does not have the expected effect for cmake packages" https://bugs.busybox.net/show_bug.cgi?id=10246 - August 2017: mail thread following bug #10246: http://lists.busybox.net/pipermail/buildroot/2017-August/200778.html In the last mail thread, Samuel Martin confirmed that the 'Release' build type could be used in all cases, because Buildroot is actually making sure that the optimization flags are those determined by Buildroot, not the defaults of cmake, thanks to commit 12494ef48f. But Arnout Vandecappelle objected to using always 'Release', stating that users may actually want the extra assertions. With the introduction of BR2_ENABLE_RUNTIME_DEBUG, Buildroot can now cater for all cases: - use CMAKE_BUILD_TYPE=Release by default. This makes sure that there is no unexpected performance degradation triggered by enabling BR2_ENABLE_DEBUG. - users can optionally enable BR2_ENABLE_RUNTIME_DEBUG if they want runtime debug info like assertions, at the risk of introducing performance degradation. In this case, we switch to CMAKE_BUILD_TYPE=Debug. - orthogonally to the above, BR2_ENABLE_DEBUG still determines passing the '-g' flag to enable debug symbols, and BR2_OPTIMIZE_X still determines the used optimization flags. Signed-off-by: Thomas De Schampheleire --- docs/manual/adding-packages-cmake.txt | 2 +- package/pkg-cmake.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/manual/adding-packages-cmake.txt b/docs/manual/adding-packages-cmake.txt index 73f0943024..541d7422cf 100644 --- a/docs/manual/adding-packages-cmake.txt +++ b/docs/manual/adding-packages-cmake.txt @@ -100,7 +100,7 @@ typical packages will therefore only use a few of them. necessary to set them in the package's +*.mk+ file unless you want to override them: -** +CMAKE_BUILD_TYPE+ is driven by +BR2_ENABLE_DEBUG+; +** +CMAKE_BUILD_TYPE+ is driven by +BR2_ENABLE_RUNTIME_DEBUG+; ** +CMAKE_INSTALL_PREFIX+; ** +BUILD_SHARED_LIBS+ is driven by +BR2_STATIC_LIBS+; ** +BUILD_DOC+, +BUILD_DOCS+ are disabled; diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk index c001051002..07b8091117 100644 --- a/package/pkg-cmake.mk +++ b/package/pkg-cmake.mk @@ -265,7 +265,7 @@ define TOOLCHAIN_CMAKE_INSTALL_FILES -e 's#@@TARGET_FC@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_FC)))#' \ -e 's#@@CMAKE_SYSTEM_PROCESSOR@@#$(call qstrip,$(CMAKE_SYSTEM_PROCESSOR))#' \ -e 's#@@TOOLCHAIN_HAS_FORTRAN@@#$(if $(BR2_TOOLCHAIN_HAS_FORTRAN),1,0)#' \ - -e 's#@@CMAKE_BUILD_TYPE@@#$(if $(BR2_ENABLE_DEBUG),Debug,Release)#' \ + -e 's#@@CMAKE_BUILD_TYPE@@#$(if $(BR2_ENABLE_RUNTIME_DEBUG),Debug,Release)#' \ $(TOPDIR)/support/misc/toolchainfile.cmake.in \ > $(HOST_DIR)/share/buildroot/toolchainfile.cmake $(Q)$(INSTALL) -D -m 0644 support/misc/Buildroot.cmake \ From patchwork Wed Feb 10 14:12:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1438976 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=e9QFfBB3; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbMDx2QLQz9sW5 for ; Thu, 11 Feb 2021 01:13:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E9F626F6A8 for ; Wed, 10 Feb 2021 14:13:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Erza3B9P5vb4 for ; Wed, 10 Feb 2021 14:13:34 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id E54CE6F6E1; Wed, 10 Feb 2021 14:13:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 596C16F66B; Wed, 10 Feb 2021 14:13:24 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 8F2151BF3FD for ; Wed, 10 Feb 2021 14:13:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8615F872F3 for ; Wed, 10 Feb 2021 14:13:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e8kka3N2tlI3 for ; Wed, 10 Feb 2021 14:13:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by hemlock.osuosl.org (Postfix) with ESMTPS id 85E0F872F6 for ; Wed, 10 Feb 2021 14:13:18 +0000 (UTC) Received: by mail-ej1-f54.google.com with SMTP id jj19so4505256ejc.4 for ; Wed, 10 Feb 2021 06:13:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lMuCc0lNHDdcQD6BGnuHWL4QFdBhosqEw5oo8CYF7ZY=; b=e9QFfBB3Vw/d3EDsXXxw6YIHzoB50ujAa0HKzYlZ7bLnJzl4fSjTbBKnvNGzFEl1M2 r1LUsI474v7J6s6TbSaJChqa3hAuXp4+mL2WUHZr39Gu25VWxDs4K4rEasUPJaOkjuM4 QamPWeTbHH/zmCii0gLzP6rxu8IM3CpFJP2gtdxCKdxhxj6nhnuXPev0lIxUx4OHWBax kSKxXEkAB6c5E/aeVc5YkWBYUXlSlUx+hK1+4id8xFfejQg0F85BblgQFlj/6kOPat51 dTIIEdPelEpT0D+9F1XRo6kVYBoFk+GlA84Cix8d0pwPw/a6rxPYnkzCK+hTEeJgMA87 SYvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lMuCc0lNHDdcQD6BGnuHWL4QFdBhosqEw5oo8CYF7ZY=; b=A2tZhmQPOu7JmLQHnsammFyDPDV6eJLNjggeQ68b0m04jYsYV84r7zLu673bvVGj40 SxRPA6OnZ3GdgoyN/OCofJE7b8QfZP7nJR2RJkcQdVFcpzH9jj3lveduvqrtCiDRqyWg M8mdr2tZeLKiCeG94TU8DinDiN2KFzR025oJkgVw+3Q4kxk85xeEBhvZScwuyhEkO4rp LFu26wIq13m4B3i39sn2mMo0m5lNJG27k5Lmx7Z0caeJQB01y2HhaVEuZeia8RGLzTy5 n3h/ph6wcvA5Q+JDAVVUf4cXRSNmqNak+bThr1MR6IOiZTBPuKd2G+l9jHmns2SeQ9Rv FsOg== X-Gm-Message-State: AOAM530Ck66usqUavzu8qXRgQ5Hk+fwS1oA8Icihw1lenbhs39yaj7nt 2GIVgVqKt4QUMazTPDp+Cuw0eb9B/en3btSG X-Google-Smtp-Source: ABdhPJz4CkhNXGWic/GXZsbgk28Nq/qzr3482m8E4qEXUI9Hefhp0YKXzpH6+GHlyz2XNSc88+f3xQ== X-Received: by 2002:a17:906:4c4b:: with SMTP id d11mr3134499ejw.387.1612966396963; Wed, 10 Feb 2021 06:13:16 -0800 (PST) Received: from localhost (ptr-5gw9txf6g5tndjqqqz.18120a2.ip6.access.telenet.be. [2a02:1810:510:3800:1b15:18e4:57d1:eb]) by smtp.gmail.com with ESMTPSA id i18sm1157853eds.19.2021.02.10.06.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 06:13:16 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Wed, 10 Feb 2021 15:12:53 +0100 Message-Id: <20210210141256.6438-5-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210141256.6438-1-patrickdepinguin@gmail.com> References: <20210210141256.6438-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 4/7] package/libjson: drop explicit '-DNDEBUG' X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Dawson , Samuel Martin , Thomas Petazzoni , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire The passing of 'NDEBUG' is now steered by BR2_ENABLE_RUNTIME_DEBUG and commonly set from package/Makefile.in. Signed-off-by: Thomas De Schampheleire --- package/libjson/libjson.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/libjson/libjson.mk b/package/libjson/libjson.mk index d04ddc40f3..9d064e53c3 100644 --- a/package/libjson/libjson.mk +++ b/package/libjson/libjson.mk @@ -11,7 +11,7 @@ LIBJSON_INSTALL_STAGING = YES LIBJSON_LICENSE = BSD-2-Clause LIBJSON_LICENSE_FILES = License.txt -LIBJSON_CXXFLAGS = $(TARGET_CFLAGS) -DNDEBUG +LIBJSON_CXXFLAGS = $(TARGET_CFLAGS) ifeq ($(BR2_STATIC_LIBS),y) LIBJSON_MAKE_OPTS += SHARED=0 From patchwork Wed Feb 10 14:12:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1438978 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=l65F0zsf; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbMG84l1Hz9t0J for ; Thu, 11 Feb 2021 01:14:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4C41A6F6DC for ; Wed, 10 Feb 2021 14:14:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dGRrPEZHq7VZ for ; Wed, 10 Feb 2021 14:14:37 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 31DA96F70E; Wed, 10 Feb 2021 14:14:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id BC1E06F691; Wed, 10 Feb 2021 14:13:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C883F1BF3FD for ; Wed, 10 Feb 2021 14:13:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B82E686113 for ; Wed, 10 Feb 2021 14:13:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wbmqyzr3LC89 for ; Wed, 10 Feb 2021 14:13:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by hemlock.osuosl.org (Postfix) with ESMTPS id 240AF872ED for ; Wed, 10 Feb 2021 14:13:20 +0000 (UTC) Received: by mail-ej1-f49.google.com with SMTP id bl23so4497806ejb.5 for ; Wed, 10 Feb 2021 06:13:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X5C4SugViyyjdM+lZI5YIkCfQcVvxx9pCBRZBTN9z+M=; b=l65F0zsfb0YiJbGt0cxhFnyn3g3icu5Tqn7+IBF28KIQZ+iOEiamMpg7TAUU3L5UMu Y9xWa1J5qnqs9NI06CXL573xErvsU/e2ueei/kuYQkC3zQkvW7OQdtHtxVQ3ShAD36GX AxUD2RXvUxnrIg4NtMGlLaAdw8jDI/UlBAqW12f4IquvVgnnfT9wkvqT/yMmXZwnj601 HXQujzqjv77t1plqEwgw4K1NTuJj4cJ5MlB1xSbG0OEHWUIxK/TbLu+dw8gtg3EpxDQs G9r2i2QuutJXR3xAOg9HB+/6dgn7niBkQxWhZ/royeI8oBj+V5fFJtZWGImK7pRG24nk N8Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X5C4SugViyyjdM+lZI5YIkCfQcVvxx9pCBRZBTN9z+M=; b=YMnHSypgbwrjjsL1M8iacfF8KVdERVptY13Zt27YNZC7cUGvd6YlIKSMS59EidFXxh TrP4PtRF7nBs8kQ6UkmEUxoQIVILWwajuZvZLExXMeG7gdArppTvMpP0VbervLcDVRyA 8dgkxn6Tt8OWyZzQ+l8P/4LxHYc/q0yHHmLTLWx4f1hEhKaONPRV3VhNrSSXSsSshYp5 Sg447oCUPRq3Vyz5stc0IRhWGXLB8RwoSmw9Wi5psCO+7Cgdmx+ump4Dp+L1yzRUVufe PQstLyuEWjx8zg6bwDA5ZGlbgcJ68wTuFFpMnH+BB47xIGOVj03jCUOXrLfssxL4syS9 r4vw== X-Gm-Message-State: AOAM53334XgkZplBCeKkI7FSXCIossgU+iR4hlh4gI4DAbSOjjXepaaS 1VaGNaGd2SF8PVCmXOSlFqshtFlTEmne8vjG X-Google-Smtp-Source: ABdhPJy7rmE5CbGxoGbB+yJfR6qxyY5WADYLjC5E8NH97vjeGwhOFFByaBSH2wOTE9MRdvYx/7pUew== X-Received: by 2002:a17:906:3757:: with SMTP id e23mr3167663ejc.93.1612966398683; Wed, 10 Feb 2021 06:13:18 -0800 (PST) Received: from localhost (ptr-5gw9txf6g5tndjqqqz.18120a2.ip6.access.telenet.be. [2a02:1810:510:3800:1b15:18e4:57d1:eb]) by smtp.gmail.com with ESMTPSA id s15sm1322580ejy.68.2021.02.10.06.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 06:13:18 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Wed, 10 Feb 2021 15:12:54 +0100 Message-Id: <20210210141256.6438-6-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210141256.6438-1-patrickdepinguin@gmail.com> References: <20210210141256.6438-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 5/7] package/flare-engine: remove explicit setting of CMAKE_BUILD_TYPE X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Samuel Martin , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire flare-engine set CMAKE_BUILD_TYPE=RelWithDebInfo to avoid '-pg' for profiling. With the introduction of BR2_ENABLE_RUNTIME_DEBUG, this change should no longer be necessary. Users that do not wish to have profiling information, just keep BR2_ENABLE_RUNTIME_DEBUG disabled (default value), and those that enable BR2_ENABLE_RUNTIME_DEBUG will get profiling. Signed-off-by: Thomas De Schampheleire --- package/flare-engine/flare-engine.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/package/flare-engine/flare-engine.mk b/package/flare-engine/flare-engine.mk index e2f3eefa28..7022eac7ae 100644 --- a/package/flare-engine/flare-engine.mk +++ b/package/flare-engine/flare-engine.mk @@ -14,11 +14,6 @@ FLARE_ENGINE_DEPENDENCIES += sdl2 sdl2_image sdl2_mixer sdl2_ttf # Don't use /usr/games and /usr/share/games FLARE_ENGINE_CONF_OPTS += -DBINDIR=bin -DDATADIR=share/flare -# Don't use the default Debug type as it adds -pg (gprof) -ifeq ($(BR2_ENABLE_DEBUG),y) -FLARE_ENGINE_CONF_OPTS += -DCMAKE_BUILD_TYPE=RelWithDebInfo -endif - ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) # CMakeLists.txt sets CMAKE_CXX_FLAGS_ depending on # BUILD_TYPE, and this comes after the generic CMAKE_CXX_FLAGS. From patchwork Wed Feb 10 14:12:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1438979 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SoTWSCO2; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbMHg1vRmz9s1l for ; Thu, 11 Feb 2021 01:15:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3C3E46F73A for ; Wed, 10 Feb 2021 14:15:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RG-r8l7yXyzN for ; Wed, 10 Feb 2021 14:15:52 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 150446F79D; Wed, 10 Feb 2021 14:15:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 1A19F6F66B; Wed, 10 Feb 2021 14:14:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B7F4B1BF3FD for ; Wed, 10 Feb 2021 14:13:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B1A9585521 for ; Wed, 10 Feb 2021 14:13:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xsiQmkocs8qW for ; Wed, 10 Feb 2021 14:13:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by fraxinus.osuosl.org (Postfix) with ESMTPS id F17ED86226 for ; Wed, 10 Feb 2021 14:13:21 +0000 (UTC) Received: by mail-ej1-f45.google.com with SMTP id w1so4437612ejf.11 for ; Wed, 10 Feb 2021 06:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JfJx9EMOaQQHE+T9oIisLjdU4Xjeo+Tv8mWfwZrebtk=; b=SoTWSCO2xFWgFoUaBqK6Y84U8+FcxE6YsgkjOb4X64osWPm2rJ9egrHkzcYuPtI7up fKAiWKEblvXEdIG51d5L3RiFb661LLOF0mFN9lf8B12xnQ0MILD9z6atQ8PbElsVozpZ tLJwj1j55DmX1vuidgopaI9tLsLnMxmAwRU7QUX9jQwWgm060ei82nT7HJh6Ro0ex3P8 RW6Fd2XqVX3y5zEIXcfqDqU40yPBbTy703rwFr7AtE7BkVIg8+MIo2op74sPyHuQQ1w5 D8hipddq6+QmEohbGl5HqDd4C+e/AqbhWdVRuXFxh7i8x/JxrOAdqs0+PFA4fsUimjCI +ijA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JfJx9EMOaQQHE+T9oIisLjdU4Xjeo+Tv8mWfwZrebtk=; b=uE7THiz8SyDRaJKged/l01qQ3TO38kaaCJofMYGTllv/4bhoh+Kg6rq+VUtz8i8m8m CsgFrwnxhfBl9t5vF6lHmESNCjfFtR+8RiTgBWrGxRLcDjPeduu2Pj2FtUiToF0rJF+3 Scx+ZZmkAM1p8xDPTf/6GgYPzqX6bv5giER3bDH2TOliCp67TCaliwvoK9e1+DYvIYic JPhP7NM/JaC5hP7RKXnofbIS5DCje/DjIoTV7WhoM0Kcl2VYni0lrG7Yi0laPcO8y3es +j2BhNM4ukrPrgfjWgh3fg2XXT5e0Ny0S1GM4V6rnTpwbSV5AbbZ+NCxDTiP7go8Uhu2 cnag== X-Gm-Message-State: AOAM531RW/a2VBRvSzapiWGPjFpsfHuN8n0kxRXeemIZZsjHblk0Tkfj pT5NaSoOpYsQgK+gxkoc/97E/9V5+VK9657g X-Google-Smtp-Source: ABdhPJw6OPNzXjxet4UAICrUWzM4lIRke+DegcsjhYv0CH98orUfG+kK/3k7f6qQJjJPwuDoJNZHoA== X-Received: by 2002:a17:907:9810:: with SMTP id ji16mr3028531ejc.394.1612966400402; Wed, 10 Feb 2021 06:13:20 -0800 (PST) Received: from localhost (ptr-5gw9txf6g5tndjqqqz.18120a2.ip6.access.telenet.be. [2a02:1810:510:3800:1b15:18e4:57d1:eb]) by smtp.gmail.com with ESMTPSA id t19sm1280497ejc.62.2021.02.10.06.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 06:13:20 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Wed, 10 Feb 2021 15:12:55 +0100 Message-Id: <20210210141256.6438-7-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210141256.6438-1-patrickdepinguin@gmail.com> References: <20210210141256.6438-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 6/7] package/supertux: remove explicit setting of CMAKE_BUILD_TYPE X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Samuel Martin , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire supertux explicitly set CMAKE_BUILD_TYPE=Release, ignoring any possible value of BR2_ENABLE_DEBUG (previously) or BR2_ENABLE_RUNTIME_DEBUG (now). With the introduction of BR2_ENABLE_RUNTIME_DEBUG, this change should no longer be necessary. Users that do not wish to have profiling information, just keep BR2_ENABLE_RUNTIME_DEBUG disabled (default value), and those that enable BR2_ENABLE_RUNTIME_DEBUG will get profiling. Signed-off-by: Thomas De Schampheleire --- package/supertux/supertux.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/package/supertux/supertux.mk b/package/supertux/supertux.mk index e4a4630918..a339c42e42 100644 --- a/package/supertux/supertux.mk +++ b/package/supertux/supertux.mk @@ -18,7 +18,6 @@ SUPERTUX_LICENSE_FILES = LICENSE.txt data/AUTHORS SUPERTUX_DEPENDENCIES = host-pkgconf boost freetype libcurl libgl libglew \ libogg libpng libvorbis openal physfs sdl2 sdl2_image -# CMAKE_BUILD_TYPE=Release: disable profiling code (-pg) # ENABLE_BOOST_STATIC_LIBS=OFF: use boost shared libraries since supertux # depends on !BR2_STATIC_LIBS and boost provide only shared libraries with # BR2_SHARED_LIBS. @@ -29,7 +28,6 @@ SUPERTUX_DEPENDENCIES = host-pkgconf boost freetype libcurl libgl libglew \ # in physfs.h (CHECK_SYMBOL_EXISTS) doesn't work. # ENABLE_OPENGLES2=OFF: Disable opengles2 for now. SUPERTUX_CONF_OPTS += \ - -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -DGLEW_NO_GLU" \ -DENABLE_BOOST_STATIC_LIBS=OFF \ -DBUILD_DOCUMENTATION=OFF \ From patchwork Wed Feb 10 14:12:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1438977 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=XTnbOw7U; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbMFp5f6vz9srX for ; Thu, 11 Feb 2021 01:14:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id F22D084493; Wed, 10 Feb 2021 14:14:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ERPqnLLm8WS4; Wed, 10 Feb 2021 14:14:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6CF68844EB; Wed, 10 Feb 2021 14:14:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5CBC41BF3FD for ; Wed, 10 Feb 2021 14:13:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 55ADA8683D for ; Wed, 10 Feb 2021 14:13:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VGqe5JT6qDxO for ; Wed, 10 Feb 2021 14:13:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by whitealder.osuosl.org (Postfix) with ESMTPS id F0A50867C0 for ; Wed, 10 Feb 2021 14:13:23 +0000 (UTC) Received: by mail-ej1-f41.google.com with SMTP id jj19so4505898ejc.4 for ; Wed, 10 Feb 2021 06:13:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Iaty+N3ytYFFPRpTHhL0O6lNIS/1rbqN5y64DLlbZFE=; b=XTnbOw7U1qkPtwqkcZ2aZ+CSXJA1LrfQcosVu/nx5NLszlq0c0Ejz/R3rXKrppXLCJ /Z3Ap8nRHhfnN1iAPFJC3mL3i5boC+a0sLnCtZsNG4NoubXioiB5j+bp1ztW+hXHEsFO JH/hEMJYJDp0g8Rd6C1XzZH2P4O0ApJvRnLufmVWHp4HAwh+XPdOe6x+gX22cxsRtxAO FLMJGe3Wwl9e21o2Q/iNrd2ljE+kQmcV+LTXZ/XgxaSWtXUZSHxV5ymmInWPXyXw314r VYKj70y0BgyDLXHzw3X9ABvFQReZf8QTK1oMmIBF+FrO4wkQWRWn9vbQj6Nle1jI4NeA /6Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Iaty+N3ytYFFPRpTHhL0O6lNIS/1rbqN5y64DLlbZFE=; b=GgYklSwm6K/R+6v7iTuf3cRxkninFXAvr8wmYz+6ZXxE+uuwyEKoIhcvNiMo/H/CIp XAc+LrAINdtSm6skSnKeKOTDJs9V8TLzK/27Il3HvLJ+YeXZhdcuTyc3K2rLifYZzhyG xpejHtyGaMc4QqzKpC8A5hmlI4NF15rDaZpqQPWpu1mx/Y18z97AiYMN2ddC3yUofwvo VrvmEqi3Qo+2xLfJVSMUy6VLA0EdN0pL/Gd2Ff6zUglbkEYM+2BgV+bUqD+k1yuQ6ErB SU3+EpjhVcywbnmDM9e1L70lMS9ZyGBbwv5xAFTF95LstkR1bxn+Aqwn7vJeoK5X3TrK 0Uyw== X-Gm-Message-State: AOAM533pS+n4CqR0tUHBB+ZkDbGSjlSWPV9WIWvAZO55n399g9TuQHky vsRmSkC87RwpiCNnG8WTEFKrTwnZZRJjI6B6 X-Google-Smtp-Source: ABdhPJyZizOdygVCLutkvNhVsSrGfTu4zGP15N7g457X9anEpcJmKdjnXqIYkSOg4s9gbiBTt0qgcQ== X-Received: by 2002:a17:907:3fa6:: with SMTP id hr38mr3189916ejc.24.1612966402453; Wed, 10 Feb 2021 06:13:22 -0800 (PST) Received: from localhost (ptr-5gw9txf6g5tndjqqqz.18120a2.ip6.access.telenet.be. [2a02:1810:510:3800:1b15:18e4:57d1:eb]) by smtp.gmail.com with ESMTPSA id c3sm1119583edr.94.2021.02.10.06.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 06:13:22 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Wed, 10 Feb 2021 15:12:56 +0100 Message-Id: <20210210141256.6438-8-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210141256.6438-1-patrickdepinguin@gmail.com> References: <20210210141256.6438-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 7/7] package/sysrepo: remove explicit setting of CMAKE_BUILD_TYPE X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Thiery , Samuel Martin , =?utf-8?q?Jan_Kundr=C3=A1t?= , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire sysrepo explicitly set CMAKE_BUILD_TYPE=Release, ignoring any possible value of BR2_ENABLE_DEBUG (previously) or BR2_ENABLE_RUNTIME_DEBUG (now). With the introduction of BR2_ENABLE_RUNTIME_DEBUG, this change should no longer be necessary. Users that do not wish to have additional runtime debugging just keep BR2_ENABLE_RUNTIME_DEBUG disabled (default value). Signed-off-by: Thomas De Schampheleire --- package/sysrepo/sysrepo.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk index e4d553cdbd..e0ac4cd245 100644 --- a/package/sysrepo/sysrepo.mk +++ b/package/sysrepo/sysrepo.mk @@ -13,7 +13,6 @@ SYSREPO_DEPENDENCIES = libyang pcre host-sysrepo HOST_SYSREPO_DEPENDENCIES = host-libyang host-pcre SYSREPO_CONF_OPTS = \ - -DCMAKE_BUILD_TYPE=Release \ -DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_SYSREPO_EXAMPLES),ON,OFF) ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) @@ -26,7 +25,6 @@ define SYSREPO_INSTALL_INIT_SYSV endef HOST_SYSREPO_CONF_OPTS = \ - -DCMAKE_BUILD_TYPE=Release \ -DBUILD_EXAMPLES=OFF \ -DREPO_PATH=$(TARGET_DIR)/etc/sysrepo