Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1maCFN-00076X-9N for mharc-grub-devel@gnu.org; Tue, 12 Oct 2021 03:30:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maCFM-00074w-5n for grub-devel@gnu.org; Tue, 12 Oct 2021 03:30:48 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:39575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maCFH-0006Us-Gy for grub-devel@gnu.org; Tue, 12 Oct 2021 03:30:47 -0400 Received: by mail-pj1-x102d.google.com with SMTP id ls18-20020a17090b351200b001a00250584aso1232897pjb.4 for ; Tue, 12 Oct 2021 00:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VE82wXlSgwZxIHlukP1YYyHytUvnpKmPhqKlEspnmPQ=; b=ecj26kbsahq0lMbrcKiuZWth8CQMLhwZWMCWxScZOBIj+W3NQli2S8xWHwTmWBKFbY HuDd1wFLPh60Omrzz3OFs6M5QnHRkowc+w8GCMIyyNZiCQD//G34bBPlOCwrxHos8G4k pdy7ZmqPdoWSAqk8uuZj3BVngxcP4vf108p0M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VE82wXlSgwZxIHlukP1YYyHytUvnpKmPhqKlEspnmPQ=; b=ycPYfJ03oUB24lY97SzqxJrqqyKYWYGSoGHaTHYLnFUtM4JtzuKs5MYGyFF2igtQhk vnqQp235FYUInuU3Vf+/Iq0+UL7fQeJ8nvLjy3Egs+oNCXprn73F2UNE5HkajHpTcGWK 3WLy/IA18KPsG9s9mu8uRDqYhGgqJGs4WGJNJr7X3+ToOYCbaZvkNvGnBwx5T2e6dfKl twvZyVha+5849HLFLCLf7qMTFh2PJUx7ohJDh6LQi/RYbhc+eiMfDAQI+S5vaaMuqBi3 sky53GheBmMAG0+6sBp6zwsMPzH41VpujczgNbXbQLs8zGliNetdjlcTafxpRbDPDRvH XYUw== X-Gm-Message-State: AOAM530UExQZcKv5Bl3UVPYNYX879V2wV/B19CDyyQDwPjA5kT0ExhtE ui1NiOabRpZjHa1zvn8MzeKVWBPFUukjsw== X-Google-Smtp-Source: ABdhPJzECqXc/C9D8xcSx9g95oLPurVwX4nKVK6l7vDBpS42xUbYm8SfZ34kGj6Rpr8a2Lf+gKkHsg== X-Received: by 2002:a17:902:db0e:b0:13e:f4d3:84c with SMTP id m14-20020a170902db0e00b0013ef4d3084cmr28301431plx.2.1634023841953; Tue, 12 Oct 2021 00:30:41 -0700 (PDT) Received: from localhost ([2001:4479:e300:600:41fe:d15:934f:4029]) by smtp.gmail.com with ESMTPSA id d24sm10247893pgv.52.2021.10.12.00.30.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 00:30:41 -0700 (PDT) From: Daniel Axtens To: grub-devel@gnu.org Cc: leif@nuviainc.com, stefanb@linux.ibm.com, ps@pks.im, dkiper@net-space.pl, Daniel Axtens Subject: [PATCH 06/19] configure: properly pass through MM_DEBUG Date: Tue, 12 Oct 2021 18:29:55 +1100 Message-Id: <20211012073008.4059133-7-dja@axtens.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211012073008.4059133-1-dja@axtens.net> References: <20211012073008.4059133-1-dja@axtens.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=dja@axtens.net; helo=mail-pj1-x102d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2021 07:30:48 -0000 I noticed that compiling with --enable-mm-debug didn't cause the functions in #ifdef MM_DEBUG to be compiled in. Somehow the variable wasn't actually being substituted into anything that was built. Change configure.ac to do AC_SUBST(), and put a substitution into config.h.in. This makes MM_DEBUG available to any file which includes config.h. Signed-off-by: Daniel Axtens --- config.h.in | 3 +++ configure.ac | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config.h.in b/config.h.in index 9e8f9911b183..8cf62616cad7 100644 --- a/config.h.in +++ b/config.h.in @@ -13,6 +13,9 @@ #define DISK_CACHE_STATS @DISK_CACHE_STATS@ #define BOOT_TIME_STATS @BOOT_TIME_STATS@ +/* Define to 1 to enable mm debugging */ +#define MM_DEBUG @MM_DEBUG@ + /* We don't need those. */ #define MINILZO_CFG_SKIP_LZO_PTR 1 #define MINILZO_CFG_SKIP_LZO_UTIL 1 diff --git a/configure.ac b/configure.ac index 8d1c81a7316e..889d07b3c1d0 100644 --- a/configure.ac +++ b/configure.ac @@ -1511,9 +1511,11 @@ AC_ARG_ENABLE([mm-debug], AS_HELP_STRING([--enable-mm-debug], [include memory manager debugging])) if test x$enable_mm_debug = xyes; then - AC_DEFINE([MM_DEBUG], [1], - [Define to 1 if you enable memory manager debugging.]) + MM_DEBUG=1 +else + MM_DEBUG=0 fi +AC_SUBST([MM_DEBUG]) AC_ARG_ENABLE([cache-stats], AS_HELP_STRING([--enable-cache-stats], -- 2.30.2