From 7e3add026e746b1f0d2e794709242fb50eeceef5 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Thu, 18 Feb 2021 01:09:47 -0700 Subject: [PATCH] configure: Prefer -Ox setting from --extra-cflags --- configure | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure b/configure index c4f8b9358d..bc175d9fa9 100755 --- a/configure +++ b/configure @@ -6610,9 +6610,12 @@ if test "$gcov" = "yes" ; then QEMU_CFLAGS="-fprofile-arcs -ftest-coverage -g $QEMU_CFLAGS" QEMU_LDFLAGS="-fprofile-arcs -ftest-coverage $QEMU_LDFLAGS" elif test "$fortify_source" = "yes" ; then - CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" -elif test "$debug" = "no"; then - CFLAGS="-O2 $CFLAGS" + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" + +# Note: xemu build.sh script will pass in appropriate optimization level +# CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" +# elif test "$debug" = "no"; then +# CFLAGS="-O2 $CFLAGS" fi if test "$have_asan" = "yes"; then