From patchwork Fri Jun 15 19:46:13 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: 138785 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1269884lji; Fri, 15 Jun 2018 13:12:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJBlslVIbU+pDZYpMAudywp10FTipv1kXAtg3Q+xRWB5V4dNWQdSaqG8xKFTYVDMs2GDFis X-Received: by 2002:aed:3e26:: with SMTP id l35-v6mr2959413qtf.102.1529093522987; Fri, 15 Jun 2018 13:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529093522; cv=none; d=google.com; s=arc-20160816; b=CgFrVANYMMpos899woxXhLPyXn5lxaQkPvRl3HKB0cIcaRZgXAZeIZmohGZkc2hqPP HhVbRGfljEFdenj73Y0uVyqmhDN1TpxLxApyMn/R56nCUUJDNVrTBl7Q83e8uECzsovA sJR7oIeILy3hwZ8jthgNH0VDdT/+1BJp4t1cAG4OLkd+yW0eTvQgkmgVY+PlqvkJ7aqr pI7cRD6q71ES7GFwPzqG16YVfzsIP07qnU9KbBeb+DoxqjddyKedYB8IDIvPv5sBy0zv YBfW4Iyw6zCBltwfugn3QQfG2D2em1GCtrEvygVQLYF8Q7yJ5rfd2mMl/a/Y+9Jb3vTA FLzQ== 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=HdNrYZ+uztEn0ejF+buyuKzMry2R7TpadccVwznGlWE=; b=lP3xiHwal0Rc6sodVhSctD2Gj3qEG/WMXcQwhVcSzZyOlk8l0RBM6SZMiFyCQ3+ujw I3zde1yWNXfVhDj+wRITFqzM07w8UTDcmRZoEnbmjsdZ+2PwRs7nj6P02FXNXS/A0ssp UC7lAddYj58nV67ldMoHxlIqgCVi8Nodn2Ec2dRP6ryWYWjY3vhygCnVffjW5EGEDiq6 cNS5YXTh3o/2W3Maz8IU9El/rzu3GiRqm4fJf7J6qjeKKCzbvxCfEVwGSFTlq5SsNEDj clHEYDwyurjk9yJiOoXRFyPxX0Dit56yG/d1pg699xR0f3N4e5MIKo8jAUC1fK9hbCIw NZPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RvBIhGv5; 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 z34-v6si8297876qvc.154.2018.06.15.13.12.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 15 Jun 2018 13:12:02 -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=RvBIhGv5; 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]:49105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTv4k-0005dQ-EM for patch@linaro.org; Fri, 15 Jun 2018 16:12:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTugj-0002Ub-Dl for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTugg-0005Ei-Jj for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:13 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:46488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTugg-0005Dy-D8 for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:10 -0400 Received: by mail-wr0-x242.google.com with SMTP id v13-v6so10940278wrp.13 for ; Fri, 15 Jun 2018 12:47:10 -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=HdNrYZ+uztEn0ejF+buyuKzMry2R7TpadccVwznGlWE=; b=RvBIhGv5OJhPTZM9Tk7laR67IQ6bBKcktZvyecl5NnueR0VSUC0p5b//FFm/aowHsQ 2so4WfKeCnSe9Htpr4XJhciaQJDpp4sYgpC1tYKSUbsawL2Wih16Qm+ilIc2kiEH+oEd RfPmU7TCrcrpFRqd5SJ3wSQV6FT0mFqeH5o54= 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=HdNrYZ+uztEn0ejF+buyuKzMry2R7TpadccVwznGlWE=; b=R1tmM8KpqglNFfslQUmVt1pIyMd/gBrjIPmXWfQz8rP6aVElljySkDKRjzmoWJAs4t gpQD0Q5WH4NZwOizIqqOLhnCyckb1VKjFQ4DpYKzEn4p9JWEDW+pGIGc2RISWWnelVHB +6OO4gXjK0/deOw0yqvwg6SqMP6/BSzxH+obAtEJ0LWqQG3jMZu/UWrb9DDZtg0o00gB JjsuTn8YRO5xGesq/FTZaNgu2Cbch+mHb7JfX3gJIbRrPNM1cUAkeO50qG/T+47KM6vu PVAPC5TE41F7aR2Z22jnVNo5GqotdVNiMZP8i7B5xDIDa4I6cfpI7NbwW5+cfxS8LvI5 Yc7w== X-Gm-Message-State: APt69E2dLOqeFjLBg+oclZ8OKDYFboiEX1pLuzWbj5ZcCCKeaoD41Hov umX/cDf6ilk5dTarDKgBmV4Eqg== X-Received: by 2002:a5d:470b:: with SMTP id y11-v6mr2761445wrq.107.1529092029242; Fri, 15 Jun 2018 12:47:09 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id g105-v6sm10382090wrd.37.2018.06.15.12.47.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jun 2018 12:47:07 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 964E33E043B; Fri, 15 Jun 2018 20:47:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: 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, peter.maydell@linaro.org Date: Fri, 15 Jun 2018 20:46:13 +0100 Message-Id: <20180615194705.28019-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180615194705.28019-1-alex.bennee@linaro.org> References: <20180615194705.28019-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 v7 02/54] 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é Reviewed-by: Richard Henderson --- v2 - drop using system x86_64 compiler for i386 compiles v3 - fix cross_cc_i386 when on i386 v4 - fix merge conflicts - sort cross_cc defines --- configure | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) -- 2.17.1 diff --git a/configure b/configure index 089de03918..6e33dbbe10 100755 --- a/configure +++ b/configure @@ -289,7 +289,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="" @@ -461,6 +460,8 @@ docker="no" # cross compilers defaults, can be overridden with --cross-cc-ARCH cross_cc_aarch64="aarch64-linux-gnu-gcc" cross_cc_arm="arm-linux-gnueabihf-gcc" +cross_cc_i386="i386-pc-linux-gnu-gcc" +cross_cc_cflags_i386="" cross_cc_powerpc="powerpc-linux-gnu-gcc" enabled_cross_compilers="" @@ -1447,7 +1448,8 @@ case "$cpu" in i386) CPU_CFLAGS="-m32" LDFLAGS="-m32 $LDFLAGS" - cc_i386='$(CC) -m32' + cross_cc_i386=$cc + cross_cc_cflags_i386=$CPU_CFLAGS ;; x86_64) # ??? Only extremely old AMD cpus do not have cmpxchg16b. @@ -1455,12 +1457,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 @@ -6723,7 +6727,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 @@ -6844,6 +6847,7 @@ esac target_compiler="" target_compiler_static="" +target_compiler_cflags="" mkdir -p $target_dir echo "# Automatically generated by configure - do not modify" > $config_target_mak @@ -6861,6 +6865,7 @@ 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_ccflags_i386 ;; x86_64) TARGET_BASE_ARCH=i386 @@ -7033,9 +7038,9 @@ if has $target_compiler; then write_c_skeleton - if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then + if ! do_compiler $target_compiler $target_compiler_cflags -o $TMPE $TMPC -static ; then # For host systems we might get away with building without -static - if ! do_compiler $target_compiler -o $TMPE $TMPC ; then + if ! do_compiler $target_compiler $target_compiler_cflags -o $TMPE $TMPC ; then target_compiler="" else enabled_cross_compilers="${enabled_cross_compilers} ${target_compiler}" @@ -7128,8 +7133,13 @@ if test -n "$target_compiler"; then if test -n "$target_compiler_static"; then echo "CROSS_CC_GUEST_STATIC=$target_compiler_static" >> $config_target_mak fi + + 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=""