]> git.ipfire.org Git - thirdparty/openssl.git/commit - Configure
Configure: Don't fail if there were "make variables" set in env
authorRichard Levitte <levitte@openssl.org>
Fri, 16 Mar 2018 07:24:50 +0000 (08:24 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 16 Mar 2018 09:27:36 +0000 (10:27 +0100)
commitac6ae8a9fe25df159d04b7ea7c121c63fc05aae9
tree0cb3c48468338c1604b905c62c55953c438c4613
parent8ed5f094584203855a2bc8cf35c02267e6f64780
Configure: Don't fail if there were "make variables" set in env

The original intent was that if someone had a "make variable" set in
any kind of way, be it as an environment variable or as an argument to
Configure, we wouldn't allow compiler or linker flags as arguments as
well.  That made both of these configurations equivalently impossible:

    ./Configure target CFLAGS=-foo -lextra

     CFLAGS=-foo ./Configure target -lextra

While this makes things look nice and consistent, real world use makes
this hard, as many projects where OpenSSL is a component also set
these variables for other components that use GNU autotools.

Therefore, we need to adapt our Configure accordingly.  By
consequence, the two Configure lines above will not be equivalent any
more:

    ./Configure target CFLAGS=-foo -lextra

This command line will still fail, because the "make variable" was
given as a command line argument.  This cannot be a mistake and is
therefore not allowed.

     CFLAGS=-foo ./Configure target -lextra

This command line will work, but because there is a linker flag as
a command line argument, the environment (i.e. CFLAGS) is ignored.
That isn't quite consistent with the previous command, but is the old
Configure behavior, before the support for "make variables" was added,
and is therefore the backward compatible behavior.

Fixes google/oss-fuzz#1244

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5641)
Configure