public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Jordan Justen <jordan.l.justen@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH 1/2] EmulatorPkg/Unix/Host: Add GCC5 CC/DLINK commands (for GCC >= 5)
Date: Fri, 2 Jun 2017 23:48:14 +0200	[thread overview]
Message-ID: <0e343bac-27a0-7c76-eb26-86105990d538@redhat.com> (raw)
In-Reply-To: <CAKv+Gu-XWy2Yqas3GkHu4+VCfaAxpF1Zht2ipx7K6emVb7y=RA@mail.gmail.com>

On 06/02/17 11:03, Ard Biesheuvel wrote:
> On 1 June 2017 at 23:56, Jordan Justen <jordan.l.justen@intel.com> wrote:
> 
> A commit log would be nice

I agree. FWIW:

> 
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Laszlo Ersek <lersek@redhat.com>
>> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  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 <lersek@redhat.com>

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
>>



  reply	other threads:[~2017-06-02 21:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 23:56 [PATCH 1/2] EmulatorPkg/Unix/Host: Add GCC5 CC/DLINK commands (for GCC >= 5) Jordan Justen
2017-06-01 23:56 ` [PATCH 2/2] EmulatorPkg/build.sh: Merge GCC toolchain detection from OVMF Jordan Justen
2017-06-02 21:50   ` Laszlo Ersek
2017-06-02  9:03 ` [PATCH 1/2] EmulatorPkg/Unix/Host: Add GCC5 CC/DLINK commands (for GCC >= 5) Ard Biesheuvel
2017-06-02 21:48   ` Laszlo Ersek [this message]
2017-06-05 18:33     ` Jordan Justen
2017-06-06 11:10       ` Ard Biesheuvel
2017-06-06 17:18         ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e343bac-27a0-7c76-eb26-86105990d538@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox