public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Bruce Cran <bruce@cran.org.uk>,
	Yonghong Zhu <yonghong.zhu@intel.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@ml01.01.org>,
	Liming Gao <liming.gao@intel.com>
Subject: Re: [Patch V2] BaseTools: support the NOOPT target with the GCC tool chains
Date: Thu, 6 Oct 2016 09:20:41 +0100	[thread overview]
Message-ID: <CAKv+Gu91D3WNT1+EeGtK=h6D7Z4B4R4CjC1_eHMAPERLtkgmmQ@mail.gmail.com> (raw)
In-Reply-To: <896ca32b-3f51-6815-5c1b-1846b2cffd1c@redhat.com>

On 6 October 2016 at 09:19, Laszlo Ersek <lersek@redhat.com> wrote:
> On 10/06/16 00:39, Bruce Cran wrote:
>> On 10/04/2016 07:30 PM, Yonghong Zhu wrote:
>>
>>> Update the tools_def.template to add NOOPT support with GCC tool chains.
>>>
>>> Cc: Liming Gao <liming.gao@intel.com>
>>> Cc: Laszlo Ersek <lersek@redhat.com>
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>>
>> Reviewed-by: Bruce Cran <bruce.cran@gmail.com>
>> Tested-by: Bruce Cran <bruce.cran@gmail.com>
>>
>> Tested with both GCC49 and GCC5 toolchain settings (using gcc 6.2.1 for
>> both) and verified that both have functional debugging, though gdb skips
>> around with GCC5 as expected due to LTCG.
>>
>
> Right; as I mentioned up-thread, I wonder if we should disable -flto and -Os in NOOPT_GCC5_IA32_DLINK_FLAGS and NOOPT_GCC5_X64_DLINK_FLAGS.
>
> How about we add the following to Yonghong's v2?
> - first, move "-flto" from GCC5_IA32_X64_DLINK_FLAGS and GCC5_X64_DLINK_FLAGS to the users of those macros (both GCC5- and CLANG38-related users exist),
> - second, for the GCC5 users of these macros: split them into DEBUG/RELEASE/NOOPT, and remove -Os from NOOPT.
>
> The end result is that none of the earlier macro values change, except for NOOPT_GCC5_(IA32|X64)_DLINK_FLAGS; those two lose both -flto and -Os, which is our purpose. This would eliminate the skipping around that you mention.
>
> What do you guys think? See the patch below (again, to be applied on top of Yonghong's v2, or to be squashed into it).
>

I agree. If we are going through the trouble of having a separate
NOOPT flavor, it should at least do what it says on the tin. If it
skips around, using it has no advantage over using DEBUG


  reply	other threads:[~2016-10-06  8:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05  1:30 [Patch V2] BaseTools: support the NOOPT target with the GCC tool chains Yonghong Zhu
2016-10-05 14:48 ` Laszlo Ersek
2016-10-05 16:06   ` Ard Biesheuvel
2016-10-05 17:56     ` Laszlo Ersek
2016-10-05 18:06       ` Ard Biesheuvel
2016-10-05 22:46         ` B Cran
2016-10-05 22:39 ` Bruce Cran
2016-10-06  8:19   ` Laszlo Ersek
2016-10-06  8:20     ` Ard Biesheuvel [this message]
2016-10-08  7:20       ` Gao, Liming

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='CAKv+Gu91D3WNT1+EeGtK=h6D7Z4B4R4CjC1_eHMAPERLtkgmmQ@mail.gmail.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