From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvpT4-0003Ag-2y for qemu-devel@nongnu.org; Mon, 09 Nov 2015 11:38:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvpT0-0008JU-Qc for qemu-devel@nongnu.org; Mon, 09 Nov 2015 11:38:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvpT0-0008JQ-Ll for qemu-devel@nongnu.org; Mon, 09 Nov 2015 11:38:50 -0500 References: <1447082049-25099-1-git-send-email-peter.maydell@linaro.org> <5640BB98.8050001@redhat.com> From: John Snow Message-ID: <5640CC18.1070803@redhat.com> Date: Mon, 9 Nov 2015 11:38:48 -0500 MIME-Version: 1.0 In-Reply-To: <5640BB98.8050001@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.5] configure: Don't disable optimization for non-fortify builds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Peter Maydell , qemu-devel@nongnu.org Cc: patches@linaro.org On 11/09/2015 10:28 AM, Paolo Bonzini wrote: > > > On 09/11/2015 16:14, Peter Maydell wrote: >> Commit b553a0428014636bc inadvertently disabled optimization >> for all non-fortify builds. Fix this bug so we only do an >> unoptimized build if we want debug. >> >> Signed-off-by: Peter Maydell >> --- >> configure | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/configure b/configure >> index b687764..46fd8bd 100755 >> --- a/configure >> +++ b/configure >> @@ -4451,6 +4451,8 @@ if test "$gcov" = "yes" ; then >> LDFLAGS="-fprofile-arcs -ftest-coverage $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" >> fi > > I think what was intended is: > > if test "$gcov" = "yes" ; then > CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" > LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" > elif test "$debug" = "no" ; then > if test "$fortify_source" = "yes"; then > CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" > fi > CFLAGS="-O2 $CFLAGS" > fi > > ... so that --enable-debug does not disable _FORTIFY_SOURCE. > > Paolo > >> ########################################## >> I was trying to maintain the behavior before my clang/ccache fixes where --enable-debug did indeed disable _FORTIFY_SOURCE. --js