[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/56] configure: allow user to specify --cross-cc-cf
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PULL 03/56] configure: allow user to specify --cross-cc-cflags-foo= |
Date: |
Tue, 19 Jun 2018 16:43:42 +0100 |
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 <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
---
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="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
--
2.17.1
- [Qemu-devel] [PULL 00/56] add check-tcg and associated machinery, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 04/56] configure: set cross_cc_FOO for host compiler, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 01/56] configure: add support for --cross-cc-FOO, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 03/56] configure: allow user to specify --cross-cc-cflags-foo=,
Alex Bennée <=
- [Qemu-devel] [PULL 05/56] docker: Add "cc" subcommand, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 07/56] docker: allow "cc" command to run in user context, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 08/56] docker: Makefile.include introduce DOCKER_SCRIPT, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 02/56] configure: move i386_cc to cross_cc_i386, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 06/56] docker: extend "cc" command to accept compiler, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 09/56] tests/tcg: move architecture independent tests into subdir, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 16/56] tests/tcg/i386: Build fix for hello-i386, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 10/56] tests/tcg/multiarch: Build fix for linux-test, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 13/56] tests/tcg/multiarch: move most output to stdout, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 37/56] tests/tcg: enable building for sh4, Alex Bennée, 2018/06/19