From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1FFA1208F7A27 for ; Fri, 2 Jun 2017 14:47:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7411737EEC; Fri, 2 Jun 2017 21:48:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7411737EEC Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7411737EEC Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-179.phx2.redhat.com [10.3.116.179]) by smtp.corp.redhat.com (Postfix) with ESMTP id 949A1173C9; Fri, 2 Jun 2017 21:48:15 +0000 (UTC) To: Ard Biesheuvel , Jordan Justen Cc: "edk2-devel@lists.01.org" References: <20170601235640.25540-1-jordan.l.justen@intel.com> From: Laszlo Ersek Message-ID: <0e343bac-27a0-7c76-eb26-86105990d538@redhat.com> Date: Fri, 2 Jun 2017 23:48:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 02 Jun 2017 21:48:16 +0000 (UTC) Subject: Re: [PATCH 1/2] EmulatorPkg/Unix/Host: Add GCC5 CC/DLINK commands (for GCC >= 5) X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 21:47:14 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 06/02/17 11:03, Ard Biesheuvel wrote: > On 1 June 2017 at 23:56, Jordan Justen wrote: > > A commit log would be nice I agree. FWIW: > >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Jordan Justen >> Cc: Laszlo Ersek >> Cc: Ard Biesheuvel >> --- >> EmulatorPkg/Unix/Host/Host.inf | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/EmulatorPkg/Unix/Host/Host.inf b/EmulatorPkg/Unix/Host/Host.inf >> index d83857a1fd..33990fc20e 100644 >> --- a/EmulatorPkg/Unix/Host/Host.inf >> +++ b/EmulatorPkg/Unix/Host/Host.inf >> @@ -122,6 +122,7 @@ >> GCC:*_*_IA32_ASM_FLAGS == -m32 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h >> >> GCC:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/Host -m64 -L/usr/X11R6/lib >> + GCC:*_GCC5_X64_DLINK_FLAGS == -flto -o $(BIN_DIR)/Host -m64 -L/usr/X11R6/lib This looks good to me. >> GCC:*_*_X64_CC_FLAGS == -m64 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings (Mark this line.) >> GCC:*_GCC44_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" >> GCC:*_GCC45_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" >> @@ -129,6 +130,7 @@ >> GCC:*_GCC47_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" >> GCC:*_GCC48_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" >> GCC:*_GCC49_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" >> + GCC:*_GCC5_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto -DUSING_LTO -Os > > Single = is additive, so is it necessary to add the -Os as well? I think so; namely, the line I highlighted above uses ==, so it overwrites all other settings in effect earlier. *That* line does not have -Os, so when *this* line applies to the target / toolchain / arch triplet, and -Os is appended, we don't end up with two -Os optons, only one. If my argument is correct (and a hopefully similar commit message is added): Reviewed-by: Laszlo Ersek Thanks Laszlo > >> GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h >> GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h >> >> -- >> 2.11.0 >>