|author||Peter Maydell <email@example.com>||2015-11-24 14:55:46 +0000|
|committer||Michael Tokarev <firstname.lastname@example.org>||2015-12-04 09:39:55 +0300|
configure: Diagnose broken linkers directly
Currently if the user's compiler works for creating .o files but their linker is broken such that compiling an executable from a C file does not work, we will report a misleading error message about the compiler not supporting __thread (since that happens to be the first test we run which requires a working linker). Explicitly check that compile_prog works as well as compile_object, so that people whose toolchain setup is broken get a more helpful error message. Signed-off-by: Peter Maydell <email@example.com> Signed-off-by: Michael Tokarev <firstname.lastname@example.org>
1 files changed, 3 insertions, 0 deletions
@@ -1428,6 +1428,9 @@ if compile_object ; then
error_exit "\"$cc\" either does not exist or does not work"
+if ! compile_prog ; then
+ error_exit "\"$cc\" cannot build an executable (is your linker broken?)"
# Check that the C++ compiler exists and works with the C compiler
if has $cxx; then