From patchwork Fri Jun 8 12:32:21 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: 138001 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp862486lji; Fri, 8 Jun 2018 06:16:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLFTJM+YbA0xCpEb1zfXvNceidDgn3kJNJSqyrlBY9VgMOLvtkBa3eRN0UffjIeQRT/4l3/ X-Received: by 2002:a37:a8ce:: with SMTP id r197-v6mr5115032qke.93.1528463779151; Fri, 08 Jun 2018 06:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528463779; cv=none; d=google.com; s=arc-20160816; b=zGGwBlmeYnuOpnPwi6a203P8qOdA9AtNvn8U9UpZmc9JCJT8vMFNlUH9cLbfngm0DT DUPBU0ExcV/Vmsvn6yPaaJeVdjZVvMgGgHWQ4PuHJRb01bYDGVBY82rhAPO+7g8TuysF br+hlcCxoBVlsHLfSyXxKIb1TyIab204fs8fYtmU7QiJBaq73XSiPWqZgrtdmEPHzY33 Mui77iD7sea44vnvWUA4wc/NVq8kb6RPsLpoc13PHt7IRmKFseLrsOhw59xfxw++QWNq pG/TfCjqkB3CG+gCGj4JjgxjAJ86QK2DhSI13PLjxV42V+IocD/aVVb9172znXDDlOQV xNng== 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=NuhQI5nw2plpNPWlDsLr+C3gN34aCWGauAf+9y3KV2U=; b=NKH70DKtJbyOpXk4LZHZgfDg7IOZFrk/OgVYPaezzJnHV7rF/fg57NTST1akaktFc1 U7MkdAN2KNUhD5nrfkR0/VTRIONJz3e4/JDROoE+wdcFppMdIDON5oum6V53wv57zWVt stgnjo/DcyJFA26RYSfp9ZP0Byu7I2bvAfJF/T5A/rcD1vWQZg7hdW5vF2C1DG9K3+8o ZIWXYRImb0X+i7Ay6wV4paJxUar9D3DgxqOyBvqYtFURtC4zk+nN4L1oJKqKYHwCZiZq X1IqXE2sffg1tsR20LobNzEJyPF3yZk0YTyFJyYKFFTsdIZqHwOKH6VhAhHGKGQWUseX OtzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OqTjhP+m; 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 y9-v6si2304013qvf.270.2018.06.08.06.16.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 08 Jun 2018 06:16:19 -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=OqTjhP+m; 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]:35597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRHFa-0003dN-H6 for patch@linaro.org; Fri, 08 Jun 2018 09:16:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRGZy-0001BL-1f for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRGZs-0006AJ-3D for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:18 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:54283) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRGZr-00069s-S5 for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:12 -0400 Received: by mail-wm0-x243.google.com with SMTP id o13-v6so3046455wmf.4 for ; Fri, 08 Jun 2018 05:33:11 -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=NuhQI5nw2plpNPWlDsLr+C3gN34aCWGauAf+9y3KV2U=; b=OqTjhP+mWvNXuHItB1g+GofnNFHUn0bT7BbBchRxPB1bhPsDNDrmkEfD3qQH0Rb2Ps zMPedLlnw+pPZXeMAn/7MYwGg6Tpgf/dPgI3KlObuPpp4HAKI1GHhKVZq3UdWVekXL8x WZY9KPG+jbhVY0A7y9TIfxRenpyxRWwgpGsW4= 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=NuhQI5nw2plpNPWlDsLr+C3gN34aCWGauAf+9y3KV2U=; b=HVgRbl3apQ/dRp/izMsD4HM9//AnJaiaSekPpTXOm2wh0RidLxdYXLSUttRzXPasI2 1Zse1GOJYus9wTBkdD3FQ046IUJnbyA4FE5OUutave83Dp+spk9np+aeGA4HwdaFO5P4 3/tno2DLqAMpojz/w+Vq3DlgKWw3tBqwpkoWEUIsWfAfR3Syfer5xHh8ryhVZ1z0iXh0 4E85cBhSVjAg3xMMpV6/96xVr/KDYhkcttlFBtFy+vj5in3EKl+90cwP6KSmu2TSglw+ v6Q7I5EdE7JTS3g/uPhEpeRsJP2EnFy/BSBNSlJugQKoGecqFX/vplUbgw2iGAw3C67y whsA== X-Gm-Message-State: APt69E1vrYMsVo9XEQ86k7apVbuBgJ2PqTEklsxVYqod73d2KAi8A6gC hdYJ9j9hlkHKuKaf+LW918paLg== X-Received: by 2002:a1c:574b:: with SMTP id l72-v6mr1528400wmb.56.1528461190697; Fri, 08 Jun 2018 05:33:10 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u11-v6sm2077860wrq.68.2018.06.08.05.33.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 05:33:09 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 516423E0260; Fri, 8 Jun 2018 13:33:07 +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, pbonzini@redhat.com, stefanha@redhat.com, stefanb@linux.vnet.ibm.com, marcandre.lureau@redhat.com Date: Fri, 8 Jun 2018 13:32:21 +0100 Message-Id: <20180608123307.24773-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608123307.24773-1-alex.bennee@linaro.org> References: <20180608123307.24773-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:c09::243 Subject: [Qemu-devel] [PATCH v6 03/49] 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 Reviewed-by: Richard Henderson --- v3 - fix up the cross-cc v4 - add --help text - sort cross_cc_foo lines --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.17.1 diff --git a/configure b/configure index 6b59366e0d..2d6e095196 100755 --- a/configure +++ b/configure @@ -459,10 +459,14 @@ 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_i386="i386-pc-linux-gnu-gcc" cross_cc_cflags_i386="" cross_cc_powerpc="powerpc-linux-gnu-gcc" +cross_cc_powerpc="powerpc-linux-gnu-gcc" enabled_cross_compilers="" @@ -498,6 +502,9 @@ for opt do ;; --cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-cc-FOO option" ;; + --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-flags-}; cc_arch=${cc_arch%%=*} + eval "cross_cc_cflags_${cc_arch}=\$optarg" + ;; --cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*} eval "cross_cc_${cc_arch}=\$optarg" ;; @@ -1527,6 +1534,7 @@ Advanced options (experts only): --extra-cxxflags=CXXFLAGS append extra C++ compiler flags QEMU_CXXFLAGS --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS --cross-cc-ARCH=CC use compiler when building ARCH guest test cases + --cross-cc-flags-ARCH= use compiler flags when building ARCH guest tests --make=MAKE use specified make [$make] --install=INSTALL use specified install [$install] --python=PYTHON use specified python [$python] @@ -6882,6 +6890,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 @@ -6890,6 +6899,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) target_compiler=$cross_cc_cris