summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure36
1 files changed, 20 insertions, 16 deletions
diff --git a/configure b/configure
index d268f59246..9f1641e79c 100755
--- a/configure
+++ b/configure
@@ -174,14 +174,14 @@ update_cxxflags() {
compile_object() {
local_cflags="$1"
- do_cc $CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -c -o $TMPO $TMPC
+ do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -c -o $TMPO $TMPC
}
compile_prog() {
local_cflags="$1"
local_ldflags="$2"
- do_cc $CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC \
- $LDFLAGS $CONFIGURE_LDFLAGS $QEMU_LDFLAGS $local_ldflags
+ do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC \
+ $LDFLAGS $EXTRA_LDFLAGS $CONFIGURE_LDFLAGS $QEMU_LDFLAGS $local_ldflags
}
# symbolically link $1 to $2. Portable version of "ln -sf".
@@ -286,6 +286,10 @@ for opt do
esac
done
+EXTRA_CFLAGS=""
+EXTRA_CXXFLAGS=""
+EXTRA_LDFLAGS=""
+
xen_ctrl_version="$default_feature"
xfs="$default_feature"
membarrier="$default_feature"
@@ -394,13 +398,13 @@ for opt do
;;
--cpu=*) cpu="$optarg"
;;
- --extra-cflags=*) QEMU_CFLAGS="$QEMU_CFLAGS $optarg"
- QEMU_LDFLAGS="$QEMU_LDFLAGS $optarg"
- ;;
- --extra-cxxflags=*) QEMU_CXXFLAGS="$QEMU_CXXFLAGS $optarg"
+ --extra-cflags=*)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $optarg"
+ EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $optarg"
+ ;;
+ --extra-cxxflags=*) EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $optarg"
;;
- --extra-ldflags=*) QEMU_LDFLAGS="$QEMU_LDFLAGS $optarg"
- EXTRA_LDFLAGS="$optarg"
+ --extra-ldflags=*) EXTRA_LDFLAGS="$EXTRA_LDFLAGS $optarg"
;;
--enable-debug-info) debug_info="yes"
;;
@@ -1346,8 +1350,8 @@ Advanced options (experts only):
build time
--cxx=CXX use C++ compiler CXX [$cxx]
--objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
- --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS
- --extra-cxxflags=CXXFLAGS append extra C++ compiler flags QEMU_CXXFLAGS
+ --extra-cflags=CFLAGS append extra C compiler flags CFLAGS
+ --extra-cxxflags=CXXFLAGS append extra C++ compiler flags 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
@@ -3402,7 +3406,7 @@ EOF
update_cxxflags
- if do_cxx $CXXFLAGS $CONFIGURE_CXXFLAGS $QEMU_CXXFLAGS -o $TMPE $TMPCXX $TMPO $QEMU_LDFLAGS; then
+ if do_cxx $CXXFLAGS $EXTRA_CXXFLAGS $CONFIGURE_CXXFLAGS $QEMU_CXXFLAGS -o $TMPE $TMPCXX $TMPO $QEMU_LDFLAGS; then
# C++ compiler $cxx works ok with C compiler $cc
:
else
@@ -3909,10 +3913,10 @@ if test "$skip_meson" = no; then
test -z "$cxx" && echo "link_language = 'c'" >> $cross
echo "[built-in options]" >> $cross
- echo "c_args = [$(meson_quote $CFLAGS)]" >> $cross
- echo "cpp_args = [$(meson_quote $CXXFLAGS)]" >> $cross
- echo "c_link_args = [$(meson_quote $LDFLAGS)]" >> $cross
- echo "cpp_link_args = [$(meson_quote $LDFLAGS)]" >> $cross
+ echo "c_args = [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross
+ echo "cpp_args = [$(meson_quote $CXXFLAGS $EXTRA_CXXFLAGS)]" >> $cross
+ echo "c_link_args = [$(meson_quote $CFLAGS $LDFLAGS $EXTRA_CFLAGS $EXTRA_LDFLAGS)]" >> $cross
+ echo "cpp_link_args = [$(meson_quote $CXXFLAGS $LDFLAGS $EXTRA_CXXFLAGS $EXTRA_LDFLAGS)]" >> $cross
echo "[binaries]" >> $cross
echo "c = [$(meson_quote $cc $CPU_CFLAGS)]" >> $cross
test -n "$cxx" && echo "cpp = [$(meson_quote $cxx $CPU_CFLAGS)]" >> $cross