public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Ard Biesheuvel" <ard.biesheuvel@linaro.org>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH v2] BaseTools/tools_def GCC5: disable LTO for ASLC invocations
Date: Mon, 14 Jan 2019 14:10:42 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3B1706@SHSMSX152.ccr.corp.intel.com> (raw)
In-Reply-To: <153d57ac-f82a-b489-f834-71759d95d136@redhat.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Philippe Mathieu-Daudé [mailto:philmd@redhat.com]
> Sent: Monday, January 14, 2019 10:09 PM
> To: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> Cc: leif.lindholm@linaro.org
> Subject: Re: [PATCH v2] BaseTools/tools_def GCC5: disable LTO for ASLC invocations
> 
> On 1/14/19 3:04 PM, Ard Biesheuvel wrote:
> > GCC for 32-bit ARM chokes on .aslc files when running with LTO
> > enabled. Since LTO has no benefit whatsoever here, just disable
> > it globally for GCC5 and up when building .aslc files.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> > ---
> >  BaseTools/Conf/tools_def.template | 27 +++++++++++---------
> >  1 file changed, 15 insertions(+), 12 deletions(-)
> >
> > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> > index 4d74816837ab..2bd098287219 100755
> > --- a/BaseTools/Conf/tools_def.template
> > +++ b/BaseTools/Conf/tools_def.template
> > @@ -4155,6 +4155,7 @@ DEFINE GCC48_AARCH64_DLINK_FLAGS     = DEF(GCC_AARCH64_DLINK_FLAGS)
> >  DEFINE GCC48_AARCH64_DLINK2_FLAGS    = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228
> >  DEFINE GCC48_ARM_ASLDLINK_FLAGS      = DEF(GCC_ARM_ASLDLINK_FLAGS) -Wl,--oformat=elf32-littlearm
> >  DEFINE GCC48_AARCH64_ASLDLINK_FLAGS  = DEF(GCC_AARCH64_ASLDLINK_FLAGS)
> > +DEFINE GCC48_ASLCC_FLAGS             = DEF(GCC_ASLCC_FLAGS)
> >
> >  DEFINE GCC49_IA32_CC_FLAGS           = DEF(GCC48_IA32_CC_FLAGS)
> >  DEFINE GCC49_X64_CC_FLAGS            = DEF(GCC48_X64_CC_FLAGS)
> > @@ -4177,6 +4178,7 @@ DEFINE GCC49_AARCH64_DLINK_FLAGS     = DEF(GCC48_AARCH64_DLINK_FLAGS) -z common-
> >  DEFINE GCC49_AARCH64_DLINK2_FLAGS    = DEF(GCC48_AARCH64_DLINK2_FLAGS)
> >  DEFINE GCC49_ARM_ASLDLINK_FLAGS      = DEF(GCC48_ARM_ASLDLINK_FLAGS)
> >  DEFINE GCC49_AARCH64_ASLDLINK_FLAGS  = DEF(GCC48_AARCH64_ASLDLINK_FLAGS)
> > +DEFINE GCC49_ASLCC_FLAGS             = DEF(GCC48_ASLCC_FLAGS)
> >
> >  DEFINE GCC5_IA32_CC_FLAGS            = DEF(GCC49_IA32_CC_FLAGS) -fno-pic -fno-pie
> >  DEFINE GCC5_X64_CC_FLAGS             = DEF(GCC49_X64_CC_FLAGS)
> > @@ -4199,6 +4201,7 @@ DEFINE GCC5_AARCH64_DLINK_FLAGS      = DEF(GCC49_AARCH64_DLINK_FLAGS)
> >  DEFINE GCC5_AARCH64_DLINK2_FLAGS     = DEF(GCC49_AARCH64_DLINK2_FLAGS) -Wno-error
> >  DEFINE GCC5_ARM_ASLDLINK_FLAGS       = DEF(GCC49_ARM_ASLDLINK_FLAGS)
> >  DEFINE GCC5_AARCH64_ASLDLINK_FLAGS   = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
> > +DEFINE GCC5_ASLCC_FLAGS              = DEF(GCC49_ASLCC_FLAGS) -fno-lto
> >
> >  ####################################################################################
> >  #
> > @@ -4301,7 +4304,7 @@ DEFINE GCC5_AARCH64_ASLDLINK_FLAGS   = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
> >  *_GCC48_IA32_ASLPP_PATH           = DEF(GCC48_IA32_PREFIX)gcc
> >  *_GCC48_IA32_RC_PATH              = DEF(GCC48_IA32_PREFIX)objcopy
> >
> > -*_GCC48_IA32_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m32
> > +*_GCC48_IA32_ASLCC_FLAGS          = DEF(GCC48_ASLCC_FLAGS) -m32
> >  *_GCC48_IA32_ASLDLINK_FLAGS       = DEF(GCC48_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386
> >  *_GCC48_IA32_ASM_FLAGS            = DEF(GCC48_ASM_FLAGS) -m32 -march=i386
> >  *_GCC48_IA32_DLINK_FLAGS          = DEF(GCC48_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386
> > @@ -4329,7 +4332,7 @@ RELEASE_GCC48_IA32_CC_FLAGS       = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but
> >  *_GCC48_X64_ASLPP_PATH           = DEF(GCC48_X64_PREFIX)gcc
> >  *_GCC48_X64_RC_PATH              = DEF(GCC48_X64_PREFIX)objcopy
> >
> > -*_GCC48_X64_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m64
> > +*_GCC48_X64_ASLCC_FLAGS          = DEF(GCC48_ASLCC_FLAGS) -m64
> >  *_GCC48_X64_ASLDLINK_FLAGS       = DEF(GCC48_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
> >  *_GCC48_X64_ASM_FLAGS            = DEF(GCC48_ASM_FLAGS) -m64
> >  *_GCC48_X64_DLINK_FLAGS          = DEF(GCC48_X64_DLINK_FLAGS)
> > @@ -4359,7 +4362,7 @@ RELEASE_GCC48_X64_CC_FLAGS       = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-s
> >  *_GCC48_ARM_ARCHCC_FLAGS         = -mthumb
> >  *_GCC48_ARM_PLATFORM_FLAGS       = -march=armv7-a
> >
> > -*_GCC48_ARM_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS)
> > +*_GCC48_ARM_ASLCC_FLAGS          = DEF(GCC48_ASLCC_FLAGS)
> >  *_GCC48_ARM_ASLDLINK_FLAGS       = DEF(GCC48_ARM_ASLDLINK_FLAGS)
> >  *_GCC48_ARM_ASM_FLAGS            = DEF(GCC48_ARM_ASM_FLAGS)
> >  *_GCC48_ARM_DLINK_FLAGS          = DEF(GCC48_ARM_DLINK_FLAGS)
> > @@ -4389,7 +4392,7 @@ RELEASE_GCC48_ARM_CC_FLAGS       = DEF(GCC48_ARM_CC_FLAGS) -Wno-unused-but-set-v
> >  *_GCC48_AARCH64_ASLPP_PATH       = ENV(GCC48_AARCH64_PREFIX)gcc
> >  *_GCC48_AARCH64_RC_PATH          = ENV(GCC48_AARCH64_PREFIX)objcopy
> >
> > -*_GCC48_AARCH64_ASLCC_FLAGS      = DEF(GCC_ASLCC_FLAGS)
> > +*_GCC48_AARCH64_ASLCC_FLAGS      = DEF(GCC48_ASLCC_FLAGS)
> >  *_GCC48_AARCH64_ASLDLINK_FLAGS   = DEF(GCC48_AARCH64_ASLDLINK_FLAGS)
> >  *_GCC48_AARCH64_ASM_FLAGS        = DEF(GCC48_AARCH64_ASM_FLAGS)
> >  *_GCC48_AARCH64_DLINK_FLAGS      = DEF(GCC48_AARCH64_DLINK_FLAGS)
> > @@ -4440,7 +4443,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS   = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
> >  *_GCC49_IA32_ASLPP_PATH           = DEF(GCC49_IA32_PREFIX)gcc
> >  *_GCC49_IA32_RC_PATH              = DEF(GCC49_IA32_PREFIX)objcopy
> >
> > -*_GCC49_IA32_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m32
> > +*_GCC49_IA32_ASLCC_FLAGS          = DEF(GCC49_ASLCC_FLAGS) -m32
> >  *_GCC49_IA32_ASLDLINK_FLAGS       = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386
> >  *_GCC49_IA32_ASM_FLAGS            = DEF(GCC49_ASM_FLAGS) -m32 -march=i386
> >  *_GCC49_IA32_DLINK_FLAGS          = DEF(GCC49_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386
> > @@ -4468,7 +4471,7 @@ RELEASE_GCC49_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but
> >  *_GCC49_X64_ASLPP_PATH           = DEF(GCC49_X64_PREFIX)gcc
> >  *_GCC49_X64_RC_PATH              = DEF(GCC49_X64_PREFIX)objcopy
> >
> > -*_GCC49_X64_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m64
> > +*_GCC49_X64_ASLCC_FLAGS          = DEF(GCC49_ASLCC_FLAGS) -m64
> >  *_GCC49_X64_ASLDLINK_FLAGS       = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
> >  *_GCC49_X64_ASM_FLAGS            = DEF(GCC49_ASM_FLAGS) -m64
> >  *_GCC49_X64_DLINK_FLAGS          = DEF(GCC49_X64_DLINK_FLAGS)
> > @@ -4498,7 +4501,7 @@ RELEASE_GCC49_X64_CC_FLAGS       = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-s
> >  *_GCC49_ARM_ARCHCC_FLAGS         = -mthumb
> >  *_GCC49_ARM_PLATFORM_FLAGS       = -march=armv7-a
> >
> > -*_GCC49_ARM_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS)
> > +*_GCC49_ARM_ASLCC_FLAGS          = DEF(GCC49_ASLCC_FLAGS)
> >  *_GCC49_ARM_ASLDLINK_FLAGS       = DEF(GCC49_ARM_ASLDLINK_FLAGS)
> >  *_GCC49_ARM_ASM_FLAGS            = DEF(GCC49_ARM_ASM_FLAGS)
> >  *_GCC49_ARM_DLINK_FLAGS          = DEF(GCC49_ARM_DLINK_FLAGS)
> > @@ -4528,7 +4531,7 @@ RELEASE_GCC49_ARM_CC_FLAGS       = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-v
> >  *_GCC49_AARCH64_ASLPP_PATH       = ENV(GCC49_AARCH64_PREFIX)gcc
> >  *_GCC49_AARCH64_RC_PATH          = ENV(GCC49_AARCH64_PREFIX)objcopy
> >
> > -*_GCC49_AARCH64_ASLCC_FLAGS      = DEF(GCC_ASLCC_FLAGS)
> > +*_GCC49_AARCH64_ASLCC_FLAGS      = DEF(GCC49_ASLCC_FLAGS)
> >  *_GCC49_AARCH64_ASLDLINK_FLAGS   = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
> >  *_GCC49_AARCH64_ASM_FLAGS        = DEF(GCC49_AARCH64_ASM_FLAGS)
> >  *_GCC49_AARCH64_DLINK2_FLAGS     = DEF(GCC49_AARCH64_DLINK2_FLAGS)
> > @@ -4586,7 +4589,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
> >  *_GCC5_IA32_ASLPP_PATH           = DEF(GCC5_IA32_PREFIX)gcc
> >  *_GCC5_IA32_RC_PATH              = DEF(GCC5_IA32_PREFIX)objcopy
> >
> > -*_GCC5_IA32_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto
> > +*_GCC5_IA32_ASLCC_FLAGS          = DEF(GCC5_ASLCC_FLAGS) -m32
> >  *_GCC5_IA32_ASLDLINK_FLAGS       = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -no-pie
> >  *_GCC5_IA32_ASM_FLAGS            = DEF(GCC5_ASM_FLAGS) -m32 -march=i386
> >  *_GCC5_IA32_DLINK2_FLAGS         = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
> > @@ -4618,7 +4621,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS    = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
> >  *_GCC5_X64_ASLPP_PATH            = DEF(GCC5_X64_PREFIX)gcc
> >  *_GCC5_X64_RC_PATH               = DEF(GCC5_X64_PREFIX)objcopy
> >
> > -*_GCC5_X64_ASLCC_FLAGS           = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto
> > +*_GCC5_X64_ASLCC_FLAGS           = DEF(GCC5_ASLCC_FLAGS) -m64
> >  *_GCC5_X64_ASLDLINK_FLAGS        = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
> >  *_GCC5_X64_ASM_FLAGS             = DEF(GCC5_ASM_FLAGS) -m64
> >  *_GCC5_X64_DLINK2_FLAGS          = DEF(GCC5_X64_DLINK2_FLAGS)
> > @@ -4650,7 +4653,7 @@ RELEASE_GCC5_X64_DLINK_FLAGS     = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
> >  *_GCC5_ARM_RC_PATH               = ENV(GCC5_ARM_PREFIX)objcopy
> >
> >  *_GCC5_ARM_ARCHCC_FLAGS          = -mthumb
> > -*_GCC5_ARM_ASLCC_FLAGS           = DEF(GCC_ASLCC_FLAGS)
> > +*_GCC5_ARM_ASLCC_FLAGS           = DEF(GCC5_ASLCC_FLAGS)
> >  *_GCC5_ARM_ASLDLINK_FLAGS        = DEF(GCC5_ARM_ASLDLINK_FLAGS)
> >  *_GCC5_ARM_ASM_FLAGS             = DEF(GCC5_ARM_ASM_FLAGS)
> >  *_GCC5_ARM_DLINK2_FLAGS          = DEF(GCC5_ARM_DLINK2_FLAGS)
> > @@ -4684,7 +4687,7 @@ RELEASE_GCC5_ARM_DLINK_FLAGS     = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS
> >  *_GCC5_AARCH64_ASLPP_PATH        = ENV(GCC5_AARCH64_PREFIX)gcc
> >  *_GCC5_AARCH64_RC_PATH           = ENV(GCC5_AARCH64_PREFIX)objcopy
> >
> > -*_GCC5_AARCH64_ASLCC_FLAGS       = DEF(GCC_ASLCC_FLAGS)
> > +*_GCC5_AARCH64_ASLCC_FLAGS       = DEF(GCC5_ASLCC_FLAGS)
> >  *_GCC5_AARCH64_ASLDLINK_FLAGS    = DEF(GCC5_AARCH64_ASLDLINK_FLAGS)
> >  *_GCC5_AARCH64_ASM_FLAGS         = DEF(GCC5_AARCH64_ASM_FLAGS)
> >  *_GCC5_AARCH64_DLINK2_FLAGS      = DEF(GCC5_AARCH64_DLINK2_FLAGS)
> >

  reply	other threads:[~2019-01-14 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 14:04 [PATCH v2] BaseTools/tools_def GCC5: disable LTO for ASLC invocations Ard Biesheuvel
2019-01-14 14:08 ` Philippe Mathieu-Daudé
2019-01-14 14:10   ` Gao, Liming [this message]
2019-01-14 17:08     ` Ard Biesheuvel

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=4A89E2EF3DFEDB4C8BFDE51014F606A14E3B1706@SHSMSX152.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