From patchwork Fri Dec 4 06:57:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 57701 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp376936lbb; Thu, 3 Dec 2015 23:06:45 -0800 (PST) X-Received: by 10.140.167.7 with SMTP id n7mr16862630qhn.41.1449212805827; Thu, 03 Dec 2015 23:06:45 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w135si7915902qka.87.2015.12.03.23.06.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 03 Dec 2015 23:06:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:39071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4kS5-0007YX-HS for patch@linaro.org; Fri, 04 Dec 2015 02:06:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4kR7-0006SK-Fe for qemu-devel@nongnu.org; Fri, 04 Dec 2015 02:05:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4kR3-00049Z-3W for qemu-devel@nongnu.org; Fri, 04 Dec 2015 02:05:45 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:43361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4kR2-00048n-SW; Fri, 04 Dec 2015 02:05:41 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id ECECC4063A; Fri, 4 Dec 2015 10:05:37 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 543D0AAD; Fri, 4 Dec 2015 09:57:43 +0300 (MSK) Received: (nullmailer pid 7959 invoked by uid 1000); Fri, 04 Dec 2015 06:57:42 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Fri, 4 Dec 2015 09:57:34 +0300 Message-Id: <0ef74c7496fd3c526b2259f86326eca4b3a03b78.1449211229.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Subject: [Qemu-devel] [PULL 3/9] configure: Diagnose broken linkers directly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell 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 Signed-off-by: Michael Tokarev --- configure | 3 +++ 1 file changed, 3 insertions(+) -- 2.1.4 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