public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Gao, Liming" <liming.gao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] BaseTools/tools_def IA32: drop -no-pie linker option for GCC49
Date: Mon, 18 Jun 2018 17:53:53 +0200	[thread overview]
Message-ID: <CAKv+Gu_ar6ELVKB9MfGg+YAi84cMuF_T2b6KoZ+5gbVJS2gZfA@mail.gmail.com> (raw)
In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E29839E@SHSMSX104.ccr.corp.intel.com>

On 18 June 2018 at 16:47, Gao, Liming <liming.gao@intel.com> wrote:
> Our build machine uses GCC4.9.2. I expect GCC49 can work on all GCC49 version.
>
> Reviewed-by: Liming Gao <liming.gao@intel.com>
>

Thanks

Pushed as 11d0cd23dd1bc15a6e6a1598250ea2e0c4c36e9a


>> -----Original Message-----
>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek
>> Sent: Monday, June 18, 2018 8:44 PM
>> To: Ard Biesheuvel <ard.biesheuvel@linaro.org>; edk2-devel@lists.01.org
>> Cc: Gao, Liming <liming.gao@intel.com>
>> Subject: Re: [edk2] [PATCH] BaseTools/tools_def IA32: drop -no-pie linker option for GCC49
>>
>> On 06/18/18 10:27, Ard Biesheuvel wrote:
>> > As reported by Liming, GCC 4.9.2 does not support the -no-pie
>> > linker option that we added to the GCC49 and GCC5 toolchain
>> > profiles in commit c25d3905523a ("BaseTools/tools_def IA32:
>> > disable PIE code generation explicitly") to work around issues
>> > with recent distro toolchains that enable PIE code generation
>> > by default.
>> >
>> > So rollback the changes for GCC49 but preserve them for GCC5
>> >
>> > Contributed-under: TianoCore Contribution Agreement 1.1
>> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> > ---
>> >  BaseTools/Conf/tools_def.template | 8 ++++----
>> >  1 file changed, 4 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>> > index 733c6ec71709..ab57f9c706e3 100755
>> > --- a/BaseTools/Conf/tools_def.template
>> > +++ b/BaseTools/Conf/tools_def.template
>> > @@ -4648,7 +4648,7 @@ DEFINE GCC48_AARCH64_DLINK2_FLAGS    = DEF(GCC47_AARCH64_DLINK2_FLAGS)
>> >  DEFINE GCC48_ARM_ASLDLINK_FLAGS      = DEF(GCC47_ARM_ASLDLINK_FLAGS)
>> >  DEFINE GCC48_AARCH64_ASLDLINK_FLAGS  = DEF(GCC47_AARCH64_ASLDLINK_FLAGS)
>> >
>> > -DEFINE GCC49_IA32_CC_FLAGS           = DEF(GCC48_IA32_CC_FLAGS) -fno-pic -fno-pie
>> > +DEFINE GCC49_IA32_CC_FLAGS           = DEF(GCC48_IA32_CC_FLAGS)
>> >  DEFINE GCC49_X64_CC_FLAGS            = DEF(GCC48_X64_CC_FLAGS)
>> >  DEFINE GCC49_IA32_X64_DLINK_COMMON   = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40
>> >  DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u
>> ReferenceAcpiTable
>> > @@ -4670,7 +4670,7 @@ 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 GCC5_IA32_CC_FLAGS            = DEF(GCC49_IA32_CC_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)
>> >  DEFINE GCC5_IA32_X64_DLINK_COMMON    = DEF(GCC49_IA32_X64_DLINK_COMMON)
>> >  DEFINE GCC5_IA32_X64_ASLDLINK_FLAGS  = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS)
>> > @@ -5357,10 +5357,10 @@ RELEASE_GCC48_AARCH64_CC_FLAGS   = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
>> >  *_GCC49_IA32_RC_PATH              = DEF(GCC49_IA32_PREFIX)objcopy
>> >
>> >  *_GCC49_IA32_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m32
>> > -*_GCC49_IA32_ASLDLINK_FLAGS       = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -no-pie
>> > +*_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
>> > -*_GCC49_IA32_DLINK2_FLAGS         = DEF(GCC49_IA32_DLINK2_FLAGS) -no-pie
>> > +*_GCC49_IA32_DLINK2_FLAGS         = DEF(GCC49_IA32_DLINK2_FLAGS)
>> >  *_GCC49_IA32_RC_FLAGS             = DEF(GCC_IA32_RC_FLAGS)
>> >  *_GCC49_IA32_OBJCOPY_FLAGS        =
>> >  *_GCC49_IA32_NASM_FLAGS           = -f elf32
>> >
>>
>> The latest release in the gcc-4.9 series is 4.9.4, according to the
>> online docs, not 4.9.2. Perhaps rechecking with 4.9.4 would make sense;
>> I'm not sure. Anyway,
>>
>> Acked-by: Laszlo Ersek <lersek@redhat.com>
>>
>> Thanks!
>> Laszlo
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel


      reply	other threads:[~2018-06-18 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18  8:27 [PATCH] BaseTools/tools_def IA32: drop -no-pie linker option for GCC49 Ard Biesheuvel
2018-06-18 12:44 ` Laszlo Ersek
2018-06-18 14:47   ` Gao, Liming
2018-06-18 15:53     ` Ard Biesheuvel [this message]

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+Gu_ar6ELVKB9MfGg+YAi84cMuF_T2b6KoZ+5gbVJS2gZfA@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