From patchwork Tue Apr 10 19:38:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 133100 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1636052ljb; Tue, 10 Apr 2018 12:45:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx48V+qTReqnzC38Ec1NnTtpPUJiLAfM8V+ZWQ7pSdcu14E0vDf3pidr4YZF/Q2Pud4AZS20M X-Received: by 10.55.26.145 with SMTP id l17mr2664431qkh.206.1523389533875; Tue, 10 Apr 2018 12:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523389533; cv=none; d=google.com; s=arc-20160816; b=lL7XwYjh9Rc2fqF328GkjammxqN1I6//ESM88Y+F7ymHrqGaYKcelyyq5iqyRZqdEI eGSMEv4ZV+J1CANyr8YXeJ359iVuTtwpxMC6CL4/o1BnAzPkujfSncLOgBNGH8RuAYzD 9tP1PgN/b8WFsDyMBuKudKxpHq7Krb5zDav/ID79qeaGtTbZHvZ+ZVB7rX6/TB1DX+9c my2rNNS0qaSYZlPAut4rQaOAvt88COYTDJR2+O9KY/3cLiciUfGY0Wyqp3Mm2uEvTG5E KPZqdo581qQ9K4hqvL20oYATKCLTQFjfCgMbzt4PsB4NpCET3+nv0OtZW3nuNmuw5ybF N8bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=Uzy047/gY1EqQGqYbLI/hhYon801wleqkK8xCwcLyMg=; b=ZP7wcpZKp+oCcrtNk+vAia+q/pa67BnPtEtsIPoy2z5kjBa/wlrdtcsfHtXVEwWquK egcVZg2S31sc9keGbNcfO98iAq9WVBv9ROtQp1PlVo14uHC+wUaX+cirDNYm0+4HYRuc Np43UWO/ttB+jJVYp8s/arEQZhiaN8oIH4o6qywK4Qh/6eJxuyta+zdB+FEB+hbQbfIl 8XErnQLlENuZ1Xb59hByER54hM4vumat7iFecMUp3Oem2d7GaRLbejanW+3QDPxRpVNY 1UkeHytQSg+eefv+pNSm2KFNAjRWtkwu2ioaOzR549posrRAOH7a8tdihqPrAB/uiWVH abgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QK2V12En; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w46si4334712qta.96.2018.04.10.12.45.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 10 Apr 2018 12:45:33 -0700 (PDT) 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; dkim=fail header.i=@linaro.org header.s=google header.b=QK2V12En; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zCv-0004Nd-8R for patch@linaro.org; Tue, 10 Apr 2018 15:45:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z70-00006R-K6 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z6z-0006Ha-HU for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:26 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:44349) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z6z-0006Gg-Ar for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:25 -0400 Received: by mail-wr0-x242.google.com with SMTP id u46so13917358wrc.11 for ; Tue, 10 Apr 2018 12:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Uzy047/gY1EqQGqYbLI/hhYon801wleqkK8xCwcLyMg=; b=QK2V12Enti1VkzXz1jGC6xYS4p+EYZHU5UfcQOv5gG/fd/PoOQx5+K4ne8adGAPe97 KJw+5ylK4mVlofUDp2yIRWWVKP/1N6hewEFspZQhr7l8aEwxvlTRqZZL14ofpvqImG+c 9uZi+GnRxncTW7wU5nhOltf43XRt0pFRmr06A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Uzy047/gY1EqQGqYbLI/hhYon801wleqkK8xCwcLyMg=; b=KdhK7Z6TOtUTZEC24qw/jN4fgU8o1kc8vmKTN8Qbff9yZfhf3F34fxgqBuzmj+wnkW n1xns8V2WkZhQoVfHzrQ2A80MJD3OkM+tgCFeq9xoS1RiQ+gtXD84f4t0DKFM0FQYHLx 3el4L3VGgwxovmmn5KYwd4aXEFGb2SnMfX3FERDqpEaUo+65NJR3J10uqYPIH7gSIyzt +i3n8g2+xxuQ7exHhqFWvvNaUngS38mLMyEQ/kPp/7ULPloQcgZ7HbXtW6V3VaOyYJpL dtOy0hLboUHiSnqnLeSQXCmiM0mirOvkRXzvC84yIcBRkjW7h+y8aN/cwp7p9rrHd1q2 kIWA== X-Gm-Message-State: ALQs6tAU63Wb8UWb/0MSitIKMLrpDN6RQFdqX9aQ8Wm8geisp6gQHP/G Ih7vI76SwmdTpgoyI7jmVaFu2G9ay3o= X-Received: by 10.223.226.66 with SMTP id n2mr1382028wri.228.1523389164168; Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w18sm3875932wra.25.2018.04.10.12.39.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:20 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 990D23E08F9; Tue, 10 Apr 2018 20:39:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:38:58 +0100 Message-Id: <20180410193919.28026-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PATCH v1 03/24] configure: move i386_cc to cross_cc_i386 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , famz@redhat.com, cota@braap.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We should still be able to use the system cross compiler with the appropriate flags on x86_64 hosts. Signed-off-by: Alex Bennée --- configure | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) -- 2.16.2 Tested-by: Philippe Mathieu-Daudé diff --git a/configure b/configure index b5f3b3fe29..add87ff4d4 100755 --- a/configure +++ b/configure @@ -284,7 +284,6 @@ libs_softmmu="" libs_tools="" audio_pt_int="" audio_win_int="" -cc_i386=i386-pc-linux-gnu-gcc libs_qga="" debug_info="yes" stack_protector="" @@ -457,6 +456,8 @@ docker="no" cross_cc_aarch64="aarch64-linux-gnu-gcc" cross_cc_arm="arm-linux-gnueabihf-gcc" cross_cc_powerpc="powerpc-linux-gnu-gcc" +cross_cc_i386="i386-pc-linux-gnu-gcc" +cross_cc_i386_cflags="" enabled_cross_compilers="" @@ -687,12 +688,10 @@ case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu="i386" supported_cpu="yes" - cross_cc_i386=gcc ;; x86_64|amd64) cpu="x86_64" supported_cpu="yes" - cross_cc_x86_64=gcc ;; armv*b|armv*l|arm) cpu="arm" @@ -1435,7 +1434,6 @@ case "$cpu" in i386) CPU_CFLAGS="-m32" LDFLAGS="-m32 $LDFLAGS" - cc_i386='$(CC) -m32' ;; x86_64) # ??? Only extremely old AMD cpus do not have cmpxchg16b. @@ -1443,12 +1441,14 @@ case "$cpu" in # runtime and generate the fallback to serial emulation. CPU_CFLAGS="-m64 -mcx16" LDFLAGS="-m64 $LDFLAGS" - cc_i386='$(CC) -m32' + cross_cc_i386=$cc + cross_cc_i386_cflags="-m32" ;; x32) CPU_CFLAGS="-mx32" LDFLAGS="-mx32 $LDFLAGS" - cc_i386='$(CC) -m32' + cross_cc_i386=$cc + cross_cc_i386_cflags="-m32" ;; # No special flags required for other host CPUs esac @@ -6664,7 +6664,6 @@ echo "CC=$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "IASL=$iasl" >> $config_host_mak fi -echo "CC_I386=$cc_i386" >> $config_host_mak echo "HOST_CC=$host_cc" >> $config_host_mak echo "CXX=$cxx" >> $config_host_mak echo "OBJCC=$objcc" >> $config_host_mak @@ -6783,6 +6782,7 @@ case "$target" in esac target_compiler="" +target_compiler_cflags="" mkdir -p $target_dir echo "# Automatically generated by configure - do not modify" > $config_target_mak @@ -6799,10 +6799,13 @@ TARGET_ABI_DIR="" case "$target_name" in i386) gdb_xml_files="i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml" + target_compiler=$cross_cc_i386 + target_compiler_cflags=$cross_cc_i386_cflags ;; x86_64) TARGET_BASE_ARCH=i386 gdb_xml_files="i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml" + target_compiler=$cross_cc_x86_64 ;; alpha) mttcg="yes" @@ -6947,7 +6950,7 @@ int main(void) { } EOF - if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then + if ! do_compiler $target_compiler $target_compiler_cflags -o $TMPE $TMPC -static ; then target_compiler="" else enabled_cross_compilers="${enabled_cross_compilers} ${target_compiler}" @@ -7033,6 +7036,10 @@ if test -n "$target_compiler"; then echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak fi +if test -n "$target_compiler_cflags"; then + echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak +fi + # generate QEMU_CFLAGS/LDFLAGS for targets cflags=""