public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: Laszlo Ersek <lersek@redhat.com>, Heyi Guo <heyi.guo@linaro.org>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Why do we use -g option of gcc even for RELEASE build?
Date: Wed, 8 Nov 2017 15:32:04 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17A2B5@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <328f6c59-f41a-1b53-621c-a8ac000dcb45@redhat.com>

In build_rule.txt, GCC built image will be strip first, then be converted to EFI image by GenFw. There is no symbol in the final EFI image. All symbols are kept into original GCC built image. 

Thanks
Liming
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Wednesday, November 8, 2017 10:54 PM
> To: Heyi Guo <heyi.guo@linaro.org>; edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: Re: [edk2] Why do we use -g option of gcc even for RELEASE build?
> 
> On 11/08/17 03:25, Heyi Guo wrote:
> > Hi folks,
> >
> > From gcc manual, -g option seems to produce debugging information. In
> > tools_def.template, -g is included in GCC_ALL_CC_FLAGS, so it will also
> > be enabled for RELEASE build with gcc tool chain. Any special reason to
> > do that?
> 
> In the edk2 tree, -g was added to GCC_ALL_CC_FLAGS and
> GCC44_ALL_CC_FLAGS in commit 52302d4dee58 ("Sync EDKII BaseTools to
> BaseTools project r1903.", 2010-02-28).
> 
> If you check the history of the now-historical separate BaseTools
> project <https://github.com/tianocore/buildtools-BaseTools.git>, "-g"
> was introduced in commit 46c1e64305d4 ("Upgrade the binutil 2.18.50.0.5
> to 2.20.51.0.5 for UNIXGCC tool chain", 2010-02-25).
> 
> I guess that the same <Command.GCC> for [Dynamic-Library-File] must be
> able to work for both DEBUG/NOOPT and RELEASE builds. So -g is included
> for all of those build targets, in the C flags. Ultimately the debug
> symbols are not copied into the .efi binaries, for RELEASE, I believe.
> 
> Thanks
> Laszlo

  reply	other threads:[~2017-11-08 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08  2:25 Why do we use -g option of gcc even for RELEASE build? Heyi Guo
2017-11-08 14:53 ` Laszlo Ersek
2017-11-08 15:32   ` Gao, Liming [this message]
2017-11-09  0:44     ` Heyi Guo
2017-11-08 15:49 ` Paolo Bonzini

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=4A89E2EF3DFEDB4C8BFDE51014F606A14E17A2B5@SHSMSX104.ccr.corp.intel.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