From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id bn+pJ5GWomEYbwAAWB0awg (envelope-from ) for ; Sat, 27 Nov 2021 15:35:29 -0500 Received: by simark.ca (Postfix, from userid 112) id 91B0F1F0CF; Sat, 27 Nov 2021 15:35:29 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D7CEA1E940 for ; Sat, 27 Nov 2021 15:35:24 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AFCCF3858022 for ; Sat, 27 Nov 2021 20:35:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFCCF3858022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1638045323; bh=3o5awuezw4V41u/CsfPpWus0tLDKhb6LMUX88714ITs=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=mJWfarxdXtceqcHhRCcAPGzyummDS70Ayz/toNY9+6QsOWx29a6gpbBsuJ6oFXMVE hU/GPGht9D9Tg0O1LOHn90gFayNlcDS8DgsCxnNtEQ0zfJNb9yfqxaCgATY5GZFoiO 4TVrOzc2z/1KBO3mp5Ys/2YWXO4xVnVjlZjZN5rU= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 04D7B3858C3A for ; Sat, 27 Nov 2021 20:35:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 04D7B3858C3A Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E64731FD26; Sat, 27 Nov 2021 20:35:00 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C9D4C13AA9; Sat, 27 Nov 2021 20:35:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1dahL3SWomHfaQAAMHmgww (envelope-from ); Sat, 27 Nov 2021 20:35:00 +0000 Subject: Re: [pushed] gdb: fix typos in configure To: Simon Marchi , gdb-patches@sourceware.org References: <20211127193420.722886-1-simon.marchi@polymtl.ca> Message-ID: Date: Sat, 27 Nov 2021 21:35:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211127193420.722886-1-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 11/27/21 8:34 PM, Simon Marchi via Gdb-patches wrote: > The variable names used to restore CFLAGS and LDFLAGS here don't quite > match the names used above, resulting in losing the original CFLAGS and > LDFLAGS. Fix that. > Hi Simon, thanks for fixing this mistake in my patch. Trying to understand what I could have done to catch his, I tried shellcheck: ... $ shellcheck src/gdb/configure 2>&1 | grep -i save save_CFLAGS=$CFLAGS ^---------^ SC2034: save_CFLAGS appears unused. Verify use (or export if used externally). save_LDFLAGS=$LDFLAGS ^----------^ SC2034: save_LDFLAGS appears unused. Verify use (or export if used externally). CFLAGS="$SAVE_CFLAGS" ^----------^ SC2153: Possible misspelling: SAVE_CFLAGS may not be assigned, but save_CFLAGS is. ... and indeed the problem was found. I'll try to use that next time I'll do a configure update. Thanks, - Tom > Change-Id: I9cc2c3b48b1dc30c31a7143563c893fd6f426a0a > --- > gdb/configure | 8 ++++---- > gdb/configure.ac | 8 ++++---- > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/gdb/configure b/gdb/configure > index 90c1e3d7948b..448167f3c6d9 100755 > --- a/gdb/configure > +++ b/gdb/configure > @@ -12138,8 +12138,8 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' > ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' > ac_compiler_gnu=$ac_cv_cxx_compiler_gnu > > - save_CFLAGS=$CFLAGS > - save_LDFLAGS=$LDFLAGS > + save_CFLAGS="$CFLAGS" > + save_LDFLAGS="$LDFLAGS" > CFLAGS="$CFLAGS $srchigh_pkg_cflags" > LDFLAGS="$LDFLAGS $srchigh_pkg_libs" > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > @@ -12163,8 +12163,8 @@ else > fi > rm -f core conftest.err conftest.$ac_objext \ > conftest$ac_exeext conftest.$ac_ext > - CFLAGS="$SAVE_CFLAGS" > - LDFLAGS="$SAVE_LDFLAGS" > + CFLAGS="$save_CFLAGS" > + LDFLAGS="$save_LDFLAGS" > ac_ext=c > ac_cpp='$CPP $CPPFLAGS' > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' > diff --git a/gdb/configure.ac b/gdb/configure.ac > index 29c1c4589c95..ada937316d73 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -1265,8 +1265,8 @@ either use --disable-source-highlight or dnl > # This situation can occur for instance when using a source highlight > # library compiled with g++ 7.5.0 while building gdb with g++ 4.8.5. > AC_LANG_PUSH(C++) > - save_CFLAGS=$CFLAGS > - save_LDFLAGS=$LDFLAGS > + save_CFLAGS="$CFLAGS" > + save_LDFLAGS="$LDFLAGS" > CFLAGS="$CFLAGS $srchigh_pkg_cflags" > LDFLAGS="$LDFLAGS $srchigh_pkg_libs" > AC_LINK_IFELSE( > @@ -1278,8 +1278,8 @@ either use --disable-source-highlight or dnl > [have_usable_source_highlight=yes], > [have_usable_source_highlight=no] > ) > - CFLAGS="$SAVE_CFLAGS" > - LDFLAGS="$SAVE_LDFLAGS" > + CFLAGS="$save_CFLAGS" > + LDFLAGS="$save_LDFLAGS" > AC_LANG_POP(C++) > > if test "${have_usable_source_highlight}" = "yes"; then >