All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] configure: Diagnose broken linkers directly
@ 2015-11-24 14:55 ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-11-24 14:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, patches

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 <peter.maydell@linaro.org>
---
 configure | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure b/configure
index 71d6cbc..21a8536 100755
--- a/configure
+++ b/configure
@@ -1426,6 +1426,9 @@ if compile_object ; then
 else
     error_exit "\"$cc\" either does not exist or does not work"
 fi
+if ! compile_prog ; then
+    error_exit "\"$cc\" cannot build an executable (is your linker broken?)"
+fi
 
 # Check that the C++ compiler exists and works with the C compiler
 if has $cxx; then
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-29 10:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-24 14:55 [Qemu-trivial] [PATCH] configure: Diagnose broken linkers directly Peter Maydell
2015-11-24 14:55 ` [Qemu-devel] " Peter Maydell
2015-11-29 10:41 ` [Qemu-trivial] " Michael Tokarev
2015-11-29 10:41   ` [Qemu-devel] " Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.