[PATCH 2/4] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status

Paolo Bonzini posted 4 patches 4 years, 3 months ago
[PATCH 2/4] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status
Posted by Paolo Bonzini 4 years, 3 months ago
CFLAGS, CXXFLAGS and LDFLAGS influence the tests (for example if they include
-L or -I options), so they should be kept from the invocation of configure
to the subsequent reinvocations via config.status.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure b/configure
index 369b5455b6..d268f59246 100755
--- a/configure
+++ b/configure
@@ -4057,9 +4057,12 @@ preserve_env AR
 preserve_env AS
 preserve_env CC
 preserve_env CPP
+preserve_env CFLAGS
 preserve_env CXX
+preserve_env CXXFLAGS
 preserve_env INSTALL
 preserve_env LD
+preserve_env LDFLAGS
 preserve_env LD_LIBRARY_PATH
 preserve_env LIBTOOL
 preserve_env MAKE
-- 
2.33.1



Re: [PATCH 2/4] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status
Posted by Thomas Huth 4 years, 3 months ago
On 08/11/2021 09.43, Paolo Bonzini wrote:
> CFLAGS, CXXFLAGS and LDFLAGS influence the tests (for example if they include
> -L or -I options), so they should be kept from the invocation of configure
> to the subsequent reinvocations via config.status.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/configure b/configure
> index 369b5455b6..d268f59246 100755
> --- a/configure
> +++ b/configure
> @@ -4057,9 +4057,12 @@ preserve_env AR
>   preserve_env AS
>   preserve_env CC
>   preserve_env CPP
> +preserve_env CFLAGS
>   preserve_env CXX
> +preserve_env CXXFLAGS
>   preserve_env INSTALL
>   preserve_env LD
> +preserve_env LDFLAGS
>   preserve_env LD_LIBRARY_PATH
>   preserve_env LIBTOOL
>   preserve_env MAKE

Oh, we didn't preserve them yet? That's surprising!

Reviewed-by: Thomas Huth <thuth@redhat.com>