From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nXWNx-0001VI-4R for mharc-grub-devel@gnu.org; Thu, 24 Mar 2022 18:56:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXWNv-0001V7-N4 for grub-devel@gnu.org; Thu, 24 Mar 2022 18:56:51 -0400 Received: from [2607:f8b0:4864:20::f36] (port=38583 helo=mail-qv1-xf36.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXWNr-0003sE-92 for grub-devel@gnu.org; Thu, 24 Mar 2022 18:56:51 -0400 Received: by mail-qv1-xf36.google.com with SMTP id jo24so4937139qvb.5 for ; Thu, 24 Mar 2022 15:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/lvm/cp5ff2nVdQ5BTOxZiWvd+tHzVn51L2SjSvPWiA=; b=ZtCaJxh8Xl5bKpBCg69hJ4YkSEXB1MS2EWgN+Pks02cy2+KjKilD+8VbOQ+pJuo01/ 61tEYYa6BxcbDCWvejNFEDoxh9WKVfqU5OkBSM9M9ilYBXAFD60GyHjDgSZ2xBlngEVQ 5UDwq1MAXg4wYXVB815TdspkY++W4csj/3nh3JdgwbCYAEE6ySiO2fWwqCI2YisiIuhr /eKzbnQy5vFdMHMLSd2veNs6jXTsiU8+ku+4fUaw4VHhwW9eRYM92dz3Q+MzoZ4DzvHt KKH+pVmfiLeigQiDKauOD3KTncmwQZB9txVubPCv26sphhxTNtszKL0wlvg6ZxZ1hFlq qN9g== 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:mime-version :content-transfer-encoding; bh=/lvm/cp5ff2nVdQ5BTOxZiWvd+tHzVn51L2SjSvPWiA=; b=YORgI7/ZVJeolkmL1bfgORfUohB2EAoRiYr82ikNNfO/oiMXRNP8lmZkoYknSkT8mN zvhT29dCISamY4aQa6A/0CJJtoIfOe5DKedAFZT311La0utt+C22O85I3M/L87YhnbeR B7vIZcpRCD5fqdYMEzn5HMIvJFqByO2eoZBPy8Rg7aZhBQ2SYo7oYFtSfwB/us7EazLK NHCWti93e/DRj3tdj8SbVKmZzsJSNHh3he/W4f8wfx+w2LE6LsAI4P7J+bLALubCK3uL G3AN3Hqbb0JC0fTJjU/uK3W4ttqR+IXC+SqFPTpVm+9YlU8dtxx5fk4oxJXzuGW0DSVA jkFg== X-Gm-Message-State: AOAM530sRzAoDl5PySeNy1AMPUoS9s1YJ3dQe20j0kZmP/lCzZRIz7Yh dVTtPo3vpnSv3jFw/pdPwXbmeBMK51g0Og== X-Google-Smtp-Source: ABdhPJyofNx+4jn+uTaqE/Vhw775Uz/vMhYtrrLhCif8B6ONDJzGnbvwVVTC7kwFBGAIzoivEWXV9w== X-Received: by 2002:a05:6214:248a:b0:441:36b9:186f with SMTP id gi10-20020a056214248a00b0044136b9186fmr6360326qvb.13.1648162605738; Thu, 24 Mar 2022 15:56:45 -0700 (PDT) Received: from localhost.localdomain ([199.58.83.10]) by smtp.gmail.com with ESMTPSA id h24-20020a37de18000000b0067ec1f8670fsm2159343qkj.119.2022.03.24.15.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 15:56:45 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH] configure: Fix default -O2 being added when CFLAGS not set Date: Thu, 24 Mar 2022 17:31:16 -0500 Message-Id: <20220324223116.3222258-1-development@efficientek.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f36 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f36; envelope-from=development@efficientek.com; helo=mail-qv1-xf36.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2022 22:56:51 -0000 Autoconf will set a default CFLAGS of "-g -O2" if CFLAGS is not set. CFLAGS was defaulted to "" early in configure to prevent this. Apparently something changed in autoconf and now AC_USE_SYSTEM_EXTENSIONS, which is before the default setting of CFLAGS, will pull in this check. Move the default setting of CFLAGS to before this so that if will see CFLAGS as set and not give it a default. Signed-off-by: Glenn Washburn --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 3ffbc7c57b..c1e50c9d75 100644 --- a/configure.ac +++ b/configure.ac @@ -36,12 +36,12 @@ dnl description of the relationships between them. AC_INIT([GRUB],[2.11],[bug-grub@gnu.org]) -AC_USE_SYSTEM_EXTENSIONS -AC_CONFIG_AUX_DIR([build-aux]) - # We don't want -g -O2 by default in CFLAGS : ${CFLAGS=""} +AC_USE_SYSTEM_EXTENSIONS +AC_CONFIG_AUX_DIR([build-aux]) + # Checks for build, host and target systems. AC_CANONICAL_BUILD AC_CANONICAL_HOST -- 2.27.0