Received: from eggs.gnu.org ([2001:4830:134:3::10]:47712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beiBX-0000Zj-4K for qemu-devel@nongnu.org; Tue, 30 Aug 2016 08:30:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beiBQ-0000Xy-UA for qemu-devel@nongnu.org; Tue, 30 Aug 2016 08:30:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beiBQ-0000Xu-Og for qemu-devel@nongnu.org; Tue, 30 Aug 2016 08:30:28 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D311C0006E8 for ; Tue, 30 Aug 2016 12:30:28 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7UCUQZV005755 for ; Tue, 30 Aug 2016 08:30:27 -0400 From: Paolo Bonzini Date: Tue, 30 Aug 2016 14:30:26 +0200 Message-Id: <1472560226-14831-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH for-2.7] optionrom: cope with multiple -O options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Reproducer: CFLAGS="-g3 -O0" ./configure --target-list=aarch64-softmmu,arm-softmmu --enable-vhost-net --enable-virtfs Here CFLAGS ends up with "-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ... -g3 -O0" and pc-bios/optionrom/Makefile forgets to add the -O2 it needs. Signed-off-by: Paolo Bonzini --- pc-bios/optionrom/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index 9bdc497..afa48f1 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -10,10 +10,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/optionrom) .PHONY : all clean build-all # Compiling with no optimization creates ROMs that are too large -ifeq ($(filter -O%, $(CFLAGS)),) -override CFLAGS += -O2 -endif -ifeq ($(filter -O%, $(CFLAGS)),-O0) +ifeq ($(lastword $(filter -O%, -O0 $(CFLAGS))),-O0) override CFLAGS += -O2 endif -- 2.7.4