From nobody Wed Feb 11 02:09:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529423472215559.3186316849873; Tue, 19 Jun 2018 08:51:12 -0700 (PDT) Received: from localhost ([::1]:43362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVIuV-0002uW-FJ for importer@patchew.org; Tue, 19 Jun 2018 11:51:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVIoD-0006Uq-U9 for qemu-devel@nongnu.org; Tue, 19 Jun 2018 11:44:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVIoC-0006KU-DL for qemu-devel@nongnu.org; Tue, 19 Jun 2018 11:44:41 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:40448) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVIoC-0006Jb-34 for qemu-devel@nongnu.org; Tue, 19 Jun 2018 11:44:40 -0400 Received: by mail-wm0-x241.google.com with SMTP id n5-v6so1299455wmc.5 for ; Tue, 19 Jun 2018 08:44:39 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s2-v6sm20434578wrn.75.2018.06.19.08.44.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jun 2018 08:44:36 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B5B913E08B3; Tue, 19 Jun 2018 16:44:35 +0100 (BST) 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=cvehJuDYPMZZqdlegd4RYj4DgePqyiE6cHaMBkQSQAE=; b=UoR0Rs+A4IHuC74IG+7nIrrUbq69vIE99S+z6nmnIIWfy7YeWU7EF9KFoezCPY/+BD XcNH2ynhv7fO+zxi/SaVh62gPVL5Xn3PvJOAzq/YqO5cuHqdbpjyeTVXFD376Ps2tdSs UAi9Tav/b19rp/NMh5f/c6H2jls8W49M3zqsk= 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=cvehJuDYPMZZqdlegd4RYj4DgePqyiE6cHaMBkQSQAE=; b=odCnFho2w3UHe9e2qr3Vnt3SoQmWdr0Pil5AigMe5Ui4lYqv9Ee4zBTGart+T6Lrmx 6/+MmfYRvKnVzzK/6++2EJrlinzU4guiPWd4nJOy95uiVct/YvSmAdBNcD9TLR8jXQ7+ vV8EmhC3k2T9QMmSPzmP0uFWMWHQAJTEtgyp/ED7NCNGcfdvRdICKFmjOdJ4CFGM8nhj 5nWiPHzWcE2CtA5kkWMHxzCdpOFuEUCQ7bNC8Dd/tWXC9QQ88iD+SrYuJppaCycZm2Tl Fr2tOBnTPWF07z4WQiGcuE7PhZSguj15iJRYGFLuxTodIiNuPZGH13P4MFUHnSzq04QV kt8Q== X-Gm-Message-State: APt69E31A9FGp1M/FLlqBjy3nOW8QsQD49opJyokL/28obYcBqLEeXQc b5/KLx4gQmiPOeio3E6Udcu8IA== X-Google-Smtp-Source: ADUXVKJQs/wgHJZyCYn46Kirt7Hzv8t8l4RXk0ucnSGPHzzELXtOswLFU+uU382pVooewyy5vVAhTw== X-Received: by 2002:a1c:a54e:: with SMTP id o75-v6mr12738905wme.157.1529423079013; Tue, 19 Jun 2018 08:44:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 19 Jun 2018 16:43:42 +0100 Message-Id: <20180619154435.18898-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180619154435.18898-1-alex.bennee@linaro.org> References: <20180619154435.18898-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PULL 03/56] 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: agraf@suse.de, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, qemu-devel@nongnu.org, f4bug@amsat.org, cota@braap.org, famz@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 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=C3=A9e Reviewed-by: Richard Henderson --- v3 - fix up the cross-cc v4 - add --help text - sort cross_cc_foo lines diff --git a/configure b/configure index 6e33dbbe10..b96017b423 100755 --- a/configure +++ b/configure @@ -459,10 +459,14 @@ docker=3D"no" =20 # cross compilers defaults, can be overridden with --cross-cc-ARCH cross_cc_aarch64=3D"aarch64-linux-gnu-gcc" +cross_cc_aarch64_be=3D"$cross_cc_aarch64" +cross_cc_cflags_aarch64_be=3D"-mbig-endian" cross_cc_arm=3D"arm-linux-gnueabihf-gcc" +cross_cc_cflags_armeb=3D"-mbig-endian" cross_cc_i386=3D"i386-pc-linux-gnu-gcc" cross_cc_cflags_i386=3D"" cross_cc_powerpc=3D"powerpc-linux-gnu-gcc" +cross_cc_powerpc=3D"powerpc-linux-gnu-gcc" =20 enabled_cross_compilers=3D"" =20 @@ -498,6 +502,9 @@ for opt do ;; --cross-cc-*[!a-zA-Z0-9_-]*=3D*) error_exit "Passed bad --cross-cc-FOO o= ption" ;; + --cross-cc-cflags-*) cc_arch=3D${opt#--cross-cc-flags-}; cc_arch=3D${cc_= arch%%=3D*} + eval "cross_cc_cflags_${cc_arch}=3D\$optarg" + ;; --cross-cc-*) cc_arch=3D${opt#--cross-cc-}; cc_arch=3D${cc_arch%%=3D*} eval "cross_cc_${cc_arch}=3D\$optarg" ;; @@ -1527,6 +1534,7 @@ Advanced options (experts only): --extra-cxxflags=3DCXXFLAGS append extra C++ compiler flags QEMU_CXXFLAGS --extra-ldflags=3DLDFLAGS append extra linker flags LDFLAGS --cross-cc-ARCH=3DCC use compiler when building ARCH guest test ca= ses + --cross-cc-flags-ARCH=3D use compiler flags when building ARCH guest t= ests --make=3DMAKE use specified make [$make] --install=3DINSTALL use specified install [$install] --python=3DPYTHON use specified python [$python] @@ -6882,6 +6890,7 @@ case "$target_name" in mttcg=3D"yes" gdb_xml_files=3D"arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" target_compiler=3D$cross_cc_arm + eval "target_compiler_cflags=3D\$cross_cc_cflags_${target_name}" ;; aarch64|aarch64_be) TARGET_ARCH=3Daarch64 @@ -6890,6 +6899,7 @@ case "$target_name" in mttcg=3D"yes" gdb_xml_files=3D"aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp= .xml arm-vfp3.xml arm-neon.xml" target_compiler=3D$cross_cc_aarch64 + eval "target_compiler_cflags=3D\$cross_cc_cflags_${target_name}" ;; cris) target_compiler=3D$cross_cc_cris --=20 2.17.1