Received: from eggs.gnu.org ([2001:4830:134:3::10]:53900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1F0X-0005sL-Ef for qemu-devel@nongnu.org; Tue, 24 Nov 2015 09:55:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1F0W-0003D7-Le for qemu-devel@nongnu.org; Tue, 24 Nov 2015 09:55:49 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:58970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1F0W-0003Cw-F2 for qemu-devel@nongnu.org; Tue, 24 Nov 2015 09:55:48 -0500 From: Peter Maydell Date: Tue, 24 Nov 2015 14:55:46 +0000 Message-Id: <1448376946-10572-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] configure: Diagnose broken linkers directly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, patches@linaro.org 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 --- 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