[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 3/9] configure: Diagnose broken linkers directly
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 3/9] configure: Diagnose broken linkers directly |
Date: |
Fri, 4 Dec 2015 09:57:34 +0300 |
From: Peter Maydell <address@hidden>
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 <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
configure | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure b/configure
index 67801b0..2e8a672 100755
--- a/configure
+++ b/configure
@@ -1428,6 +1428,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
--
2.1.4
- [Qemu-trivial] [PULL for-2.5 0/9] Trivial patches for 2015-12-04, Michael Tokarev, 2015/12/04
- [Qemu-trivial] [PULL 5/9] configure: use appropriate code fragment for -fstack-protector checks, Michael Tokarev, 2015/12/04
- [Qemu-trivial] [PULL 1/9] util/id: fully allocate names table, Michael Tokarev, 2015/12/04
- [Qemu-trivial] [PULL 9/9] bt: check struct sizes, Michael Tokarev, 2015/12/04
- [Qemu-trivial] [PULL 6/9] gt64xxx: fix decoding of ISD register, Michael Tokarev, 2015/12/04
- [Qemu-trivial] [PULL 7/9] scsi: remove scsi_req_free prototype, Michael Tokarev, 2015/12/04
- [Qemu-trivial] [PULL 3/9] configure: Diagnose broken linkers directly,
Michael Tokarev <=
- [Qemu-trivial] [PULL 2/9] bt: avoid unintended sign extension, Michael Tokarev, 2015/12/04
- [Qemu-trivial] [PULL 8/9] typedefs: Put them back into alphabetical order, Michael Tokarev, 2015/12/04
- [Qemu-trivial] [PULL 4/9] crypto: avoid two coverity false positive error reports, Michael Tokarev, 2015/12/04
- Re: [Qemu-trivial] [Qemu-devel] [PULL for-2.5 0/9] Trivial patches for 2015-12-04, Peter Maydell, 2015/12/04