From patchwork Thu Apr 19 13:58:22 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: 133763 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp669244ljf; Thu, 19 Apr 2018 06:59:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/utPO97l9f4p4qytzw+j9Vwz84cUo5wXOvReiHJ6Lc0Lt2cgQnQBESOXfTbILsVhNMxL0c X-Received: by 2002:ac8:1e82:: with SMTP id c2-v6mr6122655qtm.402.1524146379710; Thu, 19 Apr 2018 06:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146379; cv=none; d=google.com; s=arc-20160816; b=Eei//FETD4Ny59qo89Bhceb9WA0Nq2lnIjwprHYbgTh/iHek9grA7OKt3kvUnLkHE/ lXbSHK1xyo8MBeOIi2MovCt6McEniNQ7dxOYVUjyRsTXFKLjmO/lqK0SFxnZfRo4GZ2K dIPX3zafydFPtoLhniGefKuSzh6BDBDOzbp7Xm/niyoW1IE5F4/RXCBUwt7MZuB2h0Lx p62YfNhZR/tfiztihprsFpGqrjrCDMKRVynKuARj0+3NOMDR+Fqjnhm46ncqtelSqsvE nIgzPmY5QGVZjUxIiq9RJzSfv4vR6df9wL1FBgeNn2aZnj5Hgzn1/++LkvuaNBxdbzWh KJ1A== 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=lUgYhW8e6LyPBKtB7xAbRk2VE1K63xWnhPqjL/790ko=; b=SEva/BYqv6qjrg2sbg/hS7TodcTgImEt3Y64Twc4vmAfiGr74HX1KHLajmORtEU4y5 ZR7qSLTnjYBzJ3CCA9fgNUuuAgdB1SGIBsgML1wszZd4WkHk3syjsDZE2A1BgS76pFRV /xOuuk+1Wn+VHZNLG91D5+UcTBvPuI3tEWsH152uw2GUJg+HNB2aLjbj8UL4dPkL0w0D heTgUc1RdkgdZSpGorcK1YGIU6HBKGQ3+WtWVVtDoAmXCGdZYxOoradzzEkPX23T6XNT s7KwCAssai/TfRwprvNLKruo1t50wX9Vml0w0ndueNBTJdg4oBYxOhRfjYbjugz7N0tT Uumw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DBkgMq8Z; 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 v126si1778260qkh.27.2018.04.19.06.59.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 06:59:39 -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=DBkgMq8Z; 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]:49800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A67-0005y8-2N for patch@linaro.org; Thu, 19 Apr 2018 09:59:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5d-0005wK-La for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5c-00026h-4i for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:09 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:43519) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5b-00026O-U9 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:08 -0400 Received: by mail-wr0-x241.google.com with SMTP id u4-v6so14330667wrg.10 for ; Thu, 19 Apr 2018 06:59:07 -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=lUgYhW8e6LyPBKtB7xAbRk2VE1K63xWnhPqjL/790ko=; b=DBkgMq8ZKGIlUp4oztcpBYSV78Qqmy1xg7Q04485ZV/nPLl8rSX6cMtePtBTQ/1xSZ j/cEVcibQPNBNcqd0/TxYLI8WWTTCA6HFE0I/7/+RSJlNveZmXL3TMWEypRrPFlxk0xR G2jhMu+s8JhAAgPj/9R6mAn8zzpY3j3W6KuMk= 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=lUgYhW8e6LyPBKtB7xAbRk2VE1K63xWnhPqjL/790ko=; b=hOu1K0nu3nlIkGC4G+C+IiyyYPpdNTe4FnJli37AsCyeX0EHzYGFE85ro2pe8A43JG DdZczcWI7QDGVJUZ5auOOYLd11sLttxcWNnhGIjUbi+6go3ze7mi7PjZEEKQQuI2AET9 JsfYC5yywJ7A7/S3lyAz97SOR8QKFXtWWPA6TlnLJoyvgd6KHadsRHeCYjIchRQl/aqw 6kP7yZANzCMefmmKuLiN/egJR447tloY8dSMllzlUZInUp33oPEqZimw6aVhCYl9r09i h3WDAEWCXCxx3KkaUd8aIP9Ie2TPFdw0JiAvjb3XgzVClBaKuU8ZajNtLKfhAX9lozxX c8bQ== X-Gm-Message-State: ALQs6tBWKTHZaw2nnWRjLL9oLghKv+5Zxz+fSAIQ8g5CnnJ5RZ4XZZlm M5xujswm04W8fAuSbjT34oLSfQ== X-Received: by 2002:adf:ba50:: with SMTP id t16-v6mr2567696wrg.237.1524146346731; Thu, 19 Apr 2018 06:59:06 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b18-v6sm166283wrb.55.2018.04.19.06.59.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:02 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D00A03E031E; Thu, 19 Apr 2018 14:59:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Thu, 19 Apr 2018 14:58:22 +0100 Message-Id: <20180419135901.30035-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180419135901.30035-1-alex.bennee@linaro.org> References: <20180419135901.30035-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::241 Subject: [Qemu-devel] [PATCH v2 04/43] 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Also dont assume x86_64 compiler can build i386 binaries. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- v2 - drop using system x86_64 compiler for i386 compiles --- configure | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) -- 2.17.0 diff --git a/configure b/configure index 0dca341f2a..038fb9db7b 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_cflags_i386="" 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_x86_64=$cc + cross_cc_cflags_x86_64=$CPU_CFLAGS ;; x32) CPU_CFLAGS="-mx32" LDFLAGS="-mx32 $LDFLAGS" - cc_i386='$(CC) -m32' + cross_cc_i386=$cc + cross_cc_cflags_i386="-m32" ;; # No special flags required for other host CPUs esac @@ -6675,7 +6675,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 @@ -6794,6 +6793,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 @@ -6810,10 +6810,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_cflags_i386 ;; 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" @@ -6958,7 +6961,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}" @@ -7042,8 +7045,13 @@ fi if test -n "$target_compiler"; then echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + + if test -n "$target_compiler_cflags"; then + echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak + fi fi + # generate QEMU_CFLAGS/LDFLAGS for targets cflags=""