From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxGCU-0000NW-QH for qemu-devel@nongnu.org; Tue, 04 Sep 2018 14:37:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxGCP-0002ze-8H for qemu-devel@nongnu.org; Tue, 04 Sep 2018 14:37:18 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:48854 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fxGCO-0002vl-Fb for qemu-devel@nongnu.org; Tue, 04 Sep 2018 14:37:13 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A42AE7788F for ; Tue, 4 Sep 2018 18:37:06 +0000 (UTC) References: <20180904123603.10016-1-berrange@redhat.com> From: Thomas Huth Message-ID: <6dce6639-c945-8851-8a4c-364944e4b043@redhat.com> Date: Tue, 4 Sep 2018 20:37:04 +0200 MIME-Version: 1.0 In-Reply-To: <20180904123603.10016-1-berrange@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3] configure: preserve various environment variables in config.status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "=?UTF-8?Q?Daniel_P._Berrang=c3=a9?=" , qemu-devel@nongnu.org Cc: Eric Blake , Paolo Bonzini On 2018-09-04 14:36, Daniel P. Berrang=C3=A9 wrote: > The config.status script is auto-generated by configure upon > completion. The intention is that config.status can be later invoked by > the developer directly, or by make indirectly, to re-detect the same > environment that configure originally used. >=20 > The current config.status script, however, only contains a record of th= e > command line arguments to configure. Various environment variables have > an effect on what configure will find. In particular PKG_CONFIG_LIBDIR = & > PKG_CONFIG_PATH vars will affect what libraries pkg-config finds. The > PATH var will affect what toolchain binaries and XXXX-config scripts ar= e > found. The LD_LIBRARY_PATH var will affect what libraries are > found. Most commands have env variables that will override the name/pat= h > of the default version configure finds. >=20 > All these key env variables should be recorded in the config.status scr= ipt. >=20 > Autoconf would also preserve CFLAGS, LDFLAGS, LIBS, CPPFLAGS, but QEMU > deals with those differently, expecting extra flags to be set using > configure args, rather than env variables. At the end of the script we > also don't have the original values of those env vars, as we modify the= m > during configure. It's a little bit inconsequent to ignore CFLAGS etc., but to save the CC and CXX variable, since we've got a configure option for setting $CC and $CXX, too ("--cc" and "--cxx"). Maybe we should clean that up one day, but that's for another patch... For this one here: Reviewed-by: Thomas Huth