build: don't pass LDFLAGS from environment to curl
After ea5929db ('build: fix OpenSSL linking problems on FreeBSD') we set CFLAGS explicitly (possibly to an empty value) when invoking a configure script for curl. When this parameter is set the script does not use a value of environment variable CFLAGS. Before this commit LDFLAGS environment variable can affect build of curl submodule. This can lead to a problem when a user or a tool set CFLAGS and LDFLAGS both and some linker flag assumes that some compilation flag is present. Here we set empty LDFLAGS explicitly to avoid using of the environment variable. A distributive build tool such as rpmbuild or emerge usually sets CFLAGS and LDFLAGS. The problem with incompatible compiler / linker options has been reveal under rpmbuild on CentOS 8 with hardened build enabled (which is so when backtraces are disabled). It is not clear whether we should follow environment variables or values determined by CMake for CFLAGS, CPPFLAGS and LDFLAGS when building a submodule (such as luajit and curl). Let's decide about this later. Part of #4543. Reviewed-by:Alexander V. Tikhonov <avtikhon@tarantool.org> Reviewed-by:
Igor Munkin <imun@tarantool.org>
Loading
Please register or sign in to comment