Commit 1c5be1f3 authored by Brad King's avatar Brad King 💬
Browse files

Makefile: Do not create an empty linker response file

Since commit v3.1.0-rc1~821^2 (Windows: Use response files to specify
link libraries for GNU tools, 2014-03-04) we use a response file to pass
possibly long linker flag lists to the GNU linker on Windows.  On MinGW,
this may cause gfortran to use a response file to pass some flags to its
own internal invocation.  This is okay except when we are parsing
implicit link flags from the compiler ABI detection build.  If gfortran
uses a response file in that case then we may miss extracting some of
the implicit link flags, such as -lgfortran.  Fortunately, in the
compiler ABI detection case we do not actually link to anything so the
response file is empty.  Work around this problem by simply not using a
response file when the list of flags it is used to pass is empty (or
just whitespace).
Reported-by: default avatarBill Somerville <>
parent 433c6d46
......@@ -1846,7 +1846,7 @@ cmMakefileTargetGenerator
linkLibs = frameworkPath + linkPath + linkLibs;
if(useResponseFile && linkLibs.find_first_not_of(" ") != linkLibs.npos)
// Lookup the response file reference flag.
std::string responseFlagVar = "CMAKE_";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment