From patchwork Thu Apr 19 13:58:23 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: 133765 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp673265ljf; Thu, 19 Apr 2018 07:02:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/6x6Uio7rw5jycXQAYgXw59HJlph+H90I+0K3dsu5mRxHKYWT0kDgLqYX1t0Ik9hbLnWw9 X-Received: by 2002:ac8:1382:: with SMTP id h2-v6mr6422354qtj.134.1524146553653; Thu, 19 Apr 2018 07:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524146553; cv=none; d=google.com; s=arc-20160816; b=hIsle4rg05QQyh2V7rUgtlraIUi+SDhyH8utWl3963j+qnQWmPhXOsNWvbBu/b4rQL qnMjNAck3uI3ryvcoRJpowfkwX5Bkp9Go9DVLDbfCpfSLXUxgbv8jeOWNGH9ptyfMLS9 3NK0AkcoE4idsG+WluCPVpCmrKREaQd35YdUfrV0/buYPzxGWN7OxMyA2Dv6RMUuOuk0 UACgG5x2xWqclS1PKbicj1EP9aMDueqn7YroUMCIGTUNblmVDXZ/5UC+ZoIWcRuHKpW2 SY0cd5gPUbfrO9PJWNRNt7pQedPLNjTsXrYSl+K3raAWm+Eu4awCCU6hR36Lymx3+UC8 JAcw== 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=EUerH2jG/RsWhx4ELeJ4/AmVZEOk4gNUNLMWrWMwnYM=; b=uV58lt8wZXN2BfPFYTmHCM0KFY6jjAnEW/8lNyitZB1zoNahpAEWRp6HYhpY7TknSl zUCI23KZc2W1ZGu2lWz+ESEIOPT/YqDu9Mdt2Zt1uiuqIGGoiMt6FxsDXXGm97FlYeqq kiUb16xBUGXh/YprSFVYdugSP77GMxFTUo4vHkBbTpVk514TnpaeRh+C78gU+kT+13iT h4pFzo5jHoHVeQ49p7Bf+CCGHc33MJiUsNwrwOEEMUlYIwT8suhH2m/XEoYb4hHAoYSu Uu+cVMc0oVQgZVJr7EH9HD2RNBI6Lftb+DpNT4jGGKJcjKyeTPR/SAtikve69uFqDT5Q C+6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PSRcCQwb; 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 o98si1607378qkh.137.2018.04.19.07.02.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:02: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=PSRcCQwb; 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]:49820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A8v-0000Nt-2N for patch@linaro.org; Thu, 19 Apr 2018 10:02:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9A5f-0005xO-J3 for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9A5e-00028x-PH for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:11 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:41554) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9A5e-00028B-Iz for qemu-devel@nongnu.org; Thu, 19 Apr 2018 09:59:10 -0400 Received: by mail-wr0-x242.google.com with SMTP id v24-v6so14330342wra.8 for ; Thu, 19 Apr 2018 06:59: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=EUerH2jG/RsWhx4ELeJ4/AmVZEOk4gNUNLMWrWMwnYM=; b=PSRcCQwbxYxYYhOxLU0mkFGUQ00lzVxjiXqCuALHhMZ46u3cfRZTXtMkxoPzrjIBWl Y+wnczkQAUkhUA3TXYzdHPWIbQq9Rz4RUfpvFaXYKQ5x6nei2c3ETWULktphpi9lNkKb uTBPyTTvb1rF6hJWuyzRdVkuyhxdsvfi/8AT4= 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=EUerH2jG/RsWhx4ELeJ4/AmVZEOk4gNUNLMWrWMwnYM=; b=HWX20mEoFDI2JZ5pGJYDE5dw3fnih0Qe9nhPXIGDlsvoRHeRpSANX7YKDj4xNts+51 KmanncbXK1rShEt83lutkoiyAOkn8xS5JSo6jNE9TYbOOwW1Pi5agzetXiJZYSahSB92 cDyATaak3KxdggOIeE25z1k1X3J+MWOYqIzPgSQgahzAUEegLViKdnsZ7wrdjPXhA2kX Dv4jq2B82+P296gMX2MsGddCXkuXX8nBICPQ9cELlFlZiuoD1eoWr3zaeFxtmijh4Xig UqYcaBr+BHxBELmbfAnLQGFH1SyuU6fK/+W3v8N6VE5yvTwE/mG+SOuP6K9FrZBuCkjj PbnA== X-Gm-Message-State: ALQs6tC8o5HmPxdsGk7NOvoMo0MGV2LsHgKQAdC4gEN0yrUvdJk9SR0Y kK5DQW5SQRj0vFbMbGZ+8Ljpbg== X-Received: by 2002:adf:ac64:: with SMTP id v91-v6mr4648060wrc.80.1524146349330; Thu, 19 Apr 2018 06:59:09 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a13-v6sm4073420wrc.19.2018.04.19.06.59.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:59:06 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E1A873E031F; 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:23 +0100 Message-Id: <20180419135901.30035-6-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::242 Subject: [Qemu-devel] [PATCH v2 05/43] configure: allow user to specify --cross-cc-cflags-foo= 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" As an individual compiler may be able to support several targets with the appropriate flags we need to expose this to the user as well. Signed-off-by: Alex Bennée --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.0 diff --git a/configure b/configure index 038fb9db7b..29af33716d 100755 --- a/configure +++ b/configure @@ -454,7 +454,10 @@ docker="no" # cross compilers defaults, can be overridden with --cross-cc-ARCH cross_cc_aarch64="aarch64-linux-gnu-gcc" +cross_cc_aarch64_be="$cross_cc_aarch64" +cross_cc_cflags_aarch64_be="-mbig-endian" cross_cc_arm="arm-linux-gnueabihf-gcc" +cross_cc_cflags_armeb="-mbig-endian" cross_cc_powerpc="powerpc-linux-gnu-gcc" cross_cc_i386="i386-pc-linux-gnu-gcc" cross_cc_cflags_i386="" @@ -493,6 +496,9 @@ for opt do ;; --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option" ;; + --cross-cc-cflags*) cc_arch=${opt#--cross-cc-flags} + eval "cross_cc_cflags_${cc_arch}=\$optarg" + ;; --cross-cc-*) cc_arch=${opt#--cross-cc-} eval "cross_cc_${cc_arch}=\$optarg" ;; @@ -6827,6 +6833,7 @@ case "$target_name" in mttcg="yes" gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" target_compiler=$cross_cc_arm + eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}" ;; aarch64|aarch64_be) TARGET_ARCH=aarch64 @@ -6835,6 +6842,7 @@ case "$target_name" in mttcg="yes" gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" target_compiler=$cross_cc_aarch64 + eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}" ;; cris) ;;