From patchwork Tue Jun 1 14:34:07 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: 1486007 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=smtp2.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=oTImg0KC; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 4FvZSP021gz9sj1 for ; Wed, 2 Jun 2021 00:35:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5B6C440421; Tue, 1 Jun 2021 14:34:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xbeda-1nKFAp; Tue, 1 Jun 2021 14:34:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 8D5994028D; Tue, 1 Jun 2021 14:34:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3881E1BF577 for ; Tue, 1 Jun 2021 14:34:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1F9FA606C9 for ; Tue, 1 Jun 2021 14:34:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 U0L6FMxY2iTg for ; Tue, 1 Jun 2021 14:34:31 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6BD286082E for ; Tue, 1 Jun 2021 14:34:31 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id g20so6592851ejt.0 for ; Tue, 01 Jun 2021 07:34:31 -0700 (PDT) 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=jv+mADvILPMdhq22I+mt6T30UGDtLbYj5vbJgJsSV24=; b=oTImg0KC5d28Y8KfspfXWzE99wJQeg8/89uCTodcAoo2BZJL2LmzEgLGmeQekFwdov xvTk+kiEmE7btPwJABd75rwVDfiIqE1P2XIyGf/UeznhD9xOBHlu+wXIxYoI+HJtqtW7 GSKo9sZfa+z9aFPluKSbVtOl2iNGOafjG0a36Tt/e2iy6siipnOo7uaCau9ge7uCx5Y2 pbggL1BkEJZKdOmVSVcTuJn24Lf7H/1MzCWj/mAUSlJmizeesEoCFlKj7RL4/ih0UqY2 e2pj8C+2rlNuiFeV3sOVmMlLK86wpOflZIthOEZ7KnP1hbKrkeYylU8eQQTfguDzGVAX 4Oew== 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=jv+mADvILPMdhq22I+mt6T30UGDtLbYj5vbJgJsSV24=; b=pA2rZkYsegh/ayPP9GPcprQMYgUCA+gxjrSi2Bce4eanS99If4VCTXx/XoMw0f+rY4 /4TPWR8CRyG90YU0VEtxe2pvzzveO6xQG7rio0b/0dW3TXMREPLSCaCzeTNZSIoHUsO3 VFa9FCZvgl39fcCbjjy6c3oaRPwlYq23t17gambJR6N+EOkRHlH9CiD+fsIQeacI/0gM AksXbZ2g3hgQn0ZAnkRPAZ5AvCBmlhhydpf6+2nz2khU6UW21V0Zl3zo5PcCUYM+Jr8A qj1LUOfByR/2WZ2Gvg2zh6mKbmRwyCSpEL7+ycMmoOKL7GmhR3PS+kqhsVnqoGIZySao hw+A== X-Gm-Message-State: AOAM533RcPYFW9jAZNpdXWL6XQYgf5Z4icGcMyyrMxLAp9GG1OeYsIal 2jFFKpmZZ67X4xgB4t5OSE2YJEfVji+pFs/Y X-Google-Smtp-Source: ABdhPJyPEw3hAY6DnXAtBCgYYtDDb7cn/lK4lP73HMo0QN+ZguYip2R1MGPv7UeHhdST8KlLOlq5HQ== X-Received: by 2002:a17:906:518b:: with SMTP id y11mr22792647ejk.178.1622558069753; Tue, 01 Jun 2021 07:34:29 -0700 (PDT) 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 h9sm8476779edt.18.2021.06.01.07.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 07:34:29 -0700 (PDT) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Tue, 1 Jun 2021 16:34:07 +0200 Message-Id: <20210601143422.25064-3-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210601143422.25064-1-patrickdepinguin@gmail.com> References: <20210601143422.25064-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCHv4 02/16] 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: Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire The 'assert' statement in glibc honors the 'NDEBUG' preprocessor macro: if it is set, then the assert statement is compiled away. Define this 'NDEBUG' macro when BR2_ENABLE_RUNTIME_DEBUG is disabled (the default case). Signed-off-by: Thomas De Schampheleire Reviewed-by: Yann E. MORIN --- v4: reintroduced patch on suggestion of Arnout. I had previously dropped it from the series based on an incorrect conclusion. package/Makefile.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/Makefile.in b/package/Makefile.in index 86db62ba5b..955e6a8e8c 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -148,6 +148,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))