From mboxrd@z Thu Jan 1 00:00:00 1970 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Thu, 19 Apr 2018 14:58:23 +0100 Message-Id: <20180419135901.30035-6-alex.bennee@linaro.org> In-Reply-To: <20180419135901.30035-1-alex.bennee@linaro.org> References: <20180419135901.30035-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v2 05/43] configure: allow user to specify --cross-cc-cflags-foo= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Cc: qemu-devel@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= 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(+) 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) ;; -- 2.17.0