From patchwork Thu May 17 17:46:34 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: 915643 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="iUWs5jcI"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40mzPx4RHFz9s3M for ; Fri, 18 May 2018 03:51:33 +1000 (AEST) Received: from localhost ([::1]:38443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJN3r-0000gR-8T for incoming@patchwork.ozlabs.org; Thu, 17 May 2018 13:51:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJMzx-0006GH-LC for qemu-devel@nongnu.org; Thu, 17 May 2018 13:47:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJMzw-0003Tz-Il for qemu-devel@nongnu.org; Thu, 17 May 2018 13:47:29 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:43300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJMzw-0003Sl-CO for qemu-devel@nongnu.org; Thu, 17 May 2018 13:47:28 -0400 Received: by mail-wr0-x244.google.com with SMTP id v15-v6so6531180wrm.10 for ; Thu, 17 May 2018 10:47:28 -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=M4PiLUyfp7mmXwLQiGEdljxqbXkUK4mjHnopObYV6qA=; b=iUWs5jcI5bYZQZiQEp3aAGKDkRGItjqDbdDUmpih7KvXOp+R1jT8PSWflyECs+FS8V f6vGqQiZ4I5BewaJiOUHCWy2t6VEAz8yD9ekKff6bo+O7SNeMfT9SW15pvTdu7LfEDN3 ZZRPySv8650yOAprbAW87hM90ORRy0Be+J9ac= 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=M4PiLUyfp7mmXwLQiGEdljxqbXkUK4mjHnopObYV6qA=; b=MTHvR8Avy2J7QL6jOwFAeAn/yLI6jl9+z9VimrxEqnCMy49eOOqaNt38j3Cjx3LzUE DQ81+qzN0qa6U+4fFPbVtUoVRdyqdi+uMaXjAlGhBZFL990Pt0xcp434Vrab5HeUgRDr eUqIb+KjMKUWr+M7268q8fSmrE+gVpcE4lss/Fxb2w+ZqrJaXm4HW3/fzlos6VrFgRMG OWnJIrbNs3li8KRR0QFzHqSxTl2ftm7m3yQqL+xvt9XnWVT05hxdq50gux4ytmn49ByK JTcFuyNVLg+L5gaOnZcMpWSu79HlixtRegolFtRlr58R5EtLmYzztNZZhOfjV0u/Q1CQ SJaQ== X-Gm-Message-State: ALKqPweGWkUwTuRJ1fARSOXDg2ZznoyMCMVPDdB+PmIeGdQzsczNlLVE oYobvstxk7VhRk2Nh8z2Lack8A== X-Google-Smtp-Source: AB8JxZqE0CsZrYEIgMLBgh7UjL9CIz4r+fdzz6jKUhDn/3nFIHs2Sjh9igE0rSaW14jMMTaLeKib+A== X-Received: by 2002:adf:90cd:: with SMTP id i71-v6mr5080966wri.136.1526579247188; Thu, 17 May 2018 10:47:27 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id i26-v6sm5883155wmb.19.2018.05.17.10.47.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 May 2018 10:47:22 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 2AC9D3E0D7F; Thu, 17 May 2018 18:47:19 +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 Date: Thu, 17 May 2018 18:46:34 +0100 Message-Id: <20180517174718.10107-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180517174718.10107-1-alex.bennee@linaro.org> References: <20180517174718.10107-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::244 Subject: [Qemu-devel] [PATCH v4 05/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+incoming=patchwork.ozlabs.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(+) diff --git a/configure b/configure index 52a5d747e4..2c2f27b755 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] @@ -6873,6 +6881,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 @@ -6881,6 +6890,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