From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com [209.85.217.41]) by mx.groups.io with SMTP id smtpd.web08.19352.1656551165069910304 for ; Wed, 29 Jun 2022 18:06:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=f23Ws5oc; spf=pass (domain: gmail.com, ip: 209.85.217.41, mailfrom: pedro.falcato@gmail.com) Received: by mail-vs1-f41.google.com with SMTP id j1so16784775vsj.12 for ; Wed, 29 Jun 2022 18:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qDmM0/RgNCrU7iPoLNY64nidoVZOUwXR1RTCi15wSmo=; b=f23Ws5ocLvQifotjOQM5W42JLT2qGnliYKXITQ+EYJifZuexKPEGNv3Q1NBnm8LNT6 z6cJ4LyhPCKq5INkbdOd6BNSzggfVglfVynW4lH6bDb6xipptSlWTq1a2Ht+orYR/EEW DiyFH8H8ITOr4Yoxi3nZO1uju4/2VAVMmU/K/Bybrzj/+JwO3Wsjha2nL18uBmtLZHLd e72D76ZtqYLgRjxld52o71g9ASFxug1UWSZ6fJxQ/A9zie1M9yryja3aF340b2DqjZzb v4KfYv3iy+/VIt/3g+gNTohAYcyldvaulkEaR29DF6AmpcyfdGEtfgDsIVtcZTWiBTrG jtww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qDmM0/RgNCrU7iPoLNY64nidoVZOUwXR1RTCi15wSmo=; b=ABWP0yifFmWSNvjpT0TjVTdBHJAI7VDmE9R1F/IaXwhpGoNatcyzOOD7Fn4akYG5tS 9vgidxbhZkzbp7zsmUBs0Ro1TRXAgOT81iWLRHYT1iVeEVVKY/WyU3Cr0ZDJiLHKaPHP DpGogiGUIjTW5zfC2c+7Z6rhG3Sn/wo9PPCdGUUpnYqI2ohS+3NdphpB6bXbEhYKs8yB blnTvcKkov3ePvQDsyvUdweCuG1SDioh2c7Wzxmwl+ONecNBAPAkd2LmDgYeRR92hyRg Et6qNs9vIIIYJBz7aU+r6/jfk1TQZLf94rl0/CAmwZftmzhUHuiDpAi7V1Rf990IQ1qn T9yQ== X-Gm-Message-State: AJIora9P7+sgMVIQeTSo95lf5FwLtxseYmYBAaLfGRq2Tw3Mvg2v1X74 LfoJqHp46O1cUJyIBnSRmqLXQTOn+ky/zrb6zfQ= X-Google-Smtp-Source: AGRyM1sFfq+7TX24tQ91/yo45vfXEu8eaXiCbQUiSj2fyHTkZHN4DASO9W+BchOV0VnUElJPAQ4GUUxKbTKRID9pGXo= X-Received: by 2002:a67:f305:0:b0:354:2ce9:a752 with SMTP id p5-20020a67f305000000b003542ce9a752mr6429864vsf.15.1656551164069; Wed, 29 Jun 2022 18:06:04 -0700 (PDT) MIME-Version: 1.0 References: <20220610180918.673822-1-dannf@debian.org> In-Reply-To: From: "Pedro Falcato" Date: Thu, 30 Jun 2022 02:05:52 +0100 Message-ID: Subject: Re: [edk2-devel] [PATCH] BaseTools/tools_def.txt: Add -march=x86-64 for X64 CLANG and GCC targets To: dann frazier Cc: edk2-devel-groups-io , Bob Feng , Liming Gao , Yuwei Chen Content-Type: multipart/alternative; boundary="000000000000afcd6605e29fdf7e" --000000000000afcd6605e29fdf7e Content-Type: text/plain; charset="UTF-8" GCC 5.4 documentation ( https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/x86-Options.html#x86-Options) doesn't include x86-64. I assume that specific option was added somewhere in the last 2-3 years when this x86-64-v* concept was added? I went looking around in linux and they don't seem to specify anything of sorts either. I can't speak for ARM but for IA32 it's pretty logic: the Pentium 1 (i586) was the first processor with CPUID, RDTSC, RD/WRMSR, etc. Essentials for firmware code that will never really even run on a processor that old. On Thu, Jun 30, 2022 at 12:25 AM dann frazier wrote: > On Wed, Jun 29, 2022 at 11:06:01PM +0100, Pedro Falcato wrote: > > This may be a strong opinion but I would consider toolchains that > > explicitly change the default -march from the well understood x86-64 > (which > > all 64-bit processors support) to be totally broken. If a distro wants to > > switch the -march for the packages, override CFLAGS :) > > Opinion noted. But is there a downside to edk2 being explicit about > its target CPU level on x86-64, given it already does so for IA32 and > ARM? > > -dann > > > On Wed, Jun 29, 2022 at 10:57 PM dann frazier < > dann.frazier@canonical.com> > > wrote: > > > > > Ping on this. Would it be more palatable if I limited the change only > > > to tested toolchains (gcc/clang)? Alternatively, is there a way to > > > submit this code to CI to verify the !(gcc|clang) variants? > > > > > > -dann > > > > > > On Fri, Jun 10, 2022 at 12:09:18PM -0600, dann frazier wrote: > > > > From: dann frazier > > > > > > > > Some Linux distributions are experimenting with builds that target a > > > > higher x86-64 psABI, such as x86-64-v3. To avoid inheriting these > > > > compiler defaults in edk2 builds, and therefore breaking > compatibility > > > > with machines using older CPUs, explicitly target the generic x86-64 > > > > psABI. This is similar to how we explicitly specify the cpu type for > > > > some other architectures (-march=i586 for IA32, -march=armv7-a for > ARM). > > > > > > > > Spot tested with OVMF builds using GCC5 and CLANG38. > > > > > > > > Signed-off-by: dann frazier > > > > --- > > > > BaseTools/Conf/tools_def.template | 20 ++++++++++---------- > > > > 1 file changed, 10 insertions(+), 10 deletions(-) > > > > > > > > diff --git a/BaseTools/Conf/tools_def.template > > > b/BaseTools/Conf/tools_def.template > > > > index adcd23f727..569d16fb3e 100755 > > > > --- a/BaseTools/Conf/tools_def.template > > > > +++ b/BaseTools/Conf/tools_def.template > > > > @@ -1885,7 +1885,7 @@ DEFINE GCC_DEPS_FLAGS = -MMD -MF > > > $@.deps > > > > DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) > > > -ffunction-sections -fdata-sections > -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings > > > > DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib > > > -Wl,-n,-q,--gc-sections -z common-page-size=0x20 > > > > DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 > > > -march=i586 -malign-double -fno-stack-protector -D EFI32 > > > -fno-asynchronous-unwind-tables -Wno-address > > > > -DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 > > > -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" > > > -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small > -fpie > > > -fno-asynchronous-unwind-tables -Wno-address > > > > +DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 > > > -march=x86-64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" > > > -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small > -fpie > > > -fno-asynchronous-unwind-tables -Wno-address > > > > DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = > DEF(GCC48_IA32_X64_DLINK_COMMON) > > > -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable > > > > DEFINE GCC48_IA32_X64_DLINK_FLAGS = > DEF(GCC48_IA32_X64_DLINK_COMMON) > > > -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) > > > -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive > > > > DEFINE GCC48_IA32_DLINK2_FLAGS = > > > -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) > > > > @@ -2613,15 +2613,15 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS = > > > DEF(GCC5_IA32_DLINK2_FLAGS) -O0 > > > > *_CLANG38_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) > > > DEF(CLANG38_X64_TARGET) > > > > *_CLANG38_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) > > > DEF(CLANG38_X64_TARGET) > > > > > > > > -DEBUG_CLANG38_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie > -Oz > > > -flto DEF(CLANG38_X64_TARGET) -g > > > > +DEBUG_CLANG38_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -fpie -Oz -flto DEF(CLANG38_X64_TARGET) -g > > > > DEBUG_CLANG38_X64_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) > > > -flto -Wl,-Oz -Wl,-melf_x86_64 -Wl,--oformat=elf64-x86-64 -Wl,-pie > > > -mcmodel=small > > > > DEBUG_CLANG38_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS) -O3 > > > > > > > > -RELEASE_CLANG38_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie > -Oz > > > -flto DEF(CLANG38_X64_TARGET) > > > > +RELEASE_CLANG38_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -fpie -Oz -flto DEF(CLANG38_X64_TARGET) > > > > RELEASE_CLANG38_X64_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) > > > -flto -Wl,-Oz -Wl,-melf_x86_64 -Wl,--oformat=elf64-x86-64 -Wl,-pie > > > -mcmodel=small > > > > RELEASE_CLANG38_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS) -O3 > > > > > > > > -NOOPT_CLANG38_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie > -O0 > > > DEF(CLANG38_X64_TARGET) -g > > > > +NOOPT_CLANG38_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -fpie -O0 DEF(CLANG38_X64_TARGET) -g > > > > NOOPT_CLANG38_X64_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) > > > -Wl,-O0 -Wl,-melf_x86_64 -Wl,--oformat=elf64-x86-64 -Wl,-pie > -mcmodel=small > > > > NOOPT_CLANG38_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS) -O0 > > > > > > > > @@ -2798,17 +2798,17 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS = > > > > *_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) > > > DEF(CLANGPDB_X64_TARGET) > > > > *_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) > > > DEF(CLANGPDB_X64_TARGET) > > > > > > > > -DEBUG_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) > -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -Oz > -flto > > > DEF(CLANGPDB_X64_TARGET) -gcodeview -funwind-tables > > > > +DEBUG_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) > -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -Oz -flto DEF(CLANGPDB_X64_TARGET) -gcodeview > > > -funwind-tables > > > > DEBUG_CLANGPDB_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB > > > /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /Machine:X64 > /DLL > > > /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER > /SAFESEH:NO > > > /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap > > > > DEBUG_CLANGPDB_X64_DLINK2_FLAGS = > > > > DEBUG_CLANGPDB_X64_GENFW_FLAGS = --keepexceptiontable > > > > > > > > -RELEASE_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) > -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -Oz > -flto > > > DEF(CLANGPDB_X64_TARGET) -fno-unwind-tables > > > > +RELEASE_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) > -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -Oz -flto DEF(CLANGPDB_X64_TARGET) -fno-unwind-tables > > > > RELEASE_CLANGPDB_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB > > > /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 > > > /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /DLL > > > /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER > /SAFESEH:NO > > > /BASE:0 /MERGE:.rdata=.data /MLLVM:-exception-model=wineh /lldmap > > > > RELEASE_CLANGPDB_X64_DLINK2_FLAGS = > > > > RELEASE_CLANGPDB_X64_GENFW_FLAGS = > > > > > > > > -NOOPT_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) > -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -O0 > > > DEF(CLANGPDB_X64_TARGET) -gcodeview -funwind-tables > > > > +NOOPT_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) > -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -O0 DEF(CLANGPDB_X64_TARGET) -gcodeview -funwind-tables > > > > NOOPT_CLANGPDB_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB > > > /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /Machine:X64 > /DLL > > > /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER > /SAFESEH:NO > > > /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap > > > > NOOPT_CLANGPDB_X64_DLINK2_FLAGS = > > > > NOOPT_CLANGPDB_X64_GENFW_FLAGS = --keepexceptiontable > > > > @@ -2901,15 +2901,15 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = > > > DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 - > > > > *_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) > > > DEF(CLANG38_X64_TARGET) > > > > *_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) > > > DEF(CLANG38_X64_TARGET) > > > > > > > > -DEBUG_CLANGDWARF_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) > -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie > -Oz > > > -flto DEF(CLANG38_X64_TARGET) -g > > > > +DEBUG_CLANGDWARF_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) > -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -fpie -Oz -flto DEF(CLANG38_X64_TARGET) -g > > > > DEBUG_CLANGDWARF_X64_DLINK_FLAGS = > > > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_x86_64 > > > -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=small > > > -Wl,--apply-dynamic-relocs > > > > DEBUG_CLANGDWARF_X64_DLINK2_FLAGS = > > > DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O3 -fuse-ld=lld > > > > > > > > -RELEASE_CLANGDWARF_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) > -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie > -Oz > > > -flto DEF(CLANG38_X64_TARGET) > > > > +RELEASE_CLANGDWARF_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) > -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -fpie -Oz -flto DEF(CLANG38_X64_TARGET) > > > > RELEASE_CLANGDWARF_X64_DLINK_FLAGS = > > > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_x86_64 > > > -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=small > > > -Wl,--apply-dynamic-relocs > > > > RELEASE_CLANGDWARF_X64_DLINK2_FLAGS = > > > DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O3 -fuse-ld=lld > > > > > > > > -NOOPT_CLANGDWARF_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) > -m64 > > > "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie > -O0 > > > DEF(CLANG38_X64_TARGET) -g > > > > +NOOPT_CLANGDWARF_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) > -m64 > > > -march=x86-64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone > > > -mcmodel=small -fpie -O0 DEF(CLANG38_X64_TARGET) -g > > > > NOOPT_CLANGDWARF_X64_DLINK_FLAGS = > > > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_x86_64 > > > -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=small > > > -Wl,--apply-dynamic-relocs > > > > NOOPT_CLANGDWARF_X64_DLINK2_FLAGS = > > > DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O0 -fuse-ld=lld > > > > > > > > > > > > > > > > > > > > > > > > > -- Pedro Falcato --000000000000afcd6605e29fdf7e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
GCC 5.4 documentation (https://gcc.gnu.org= /onlinedocs/gcc-5.4.0/gcc/x86-Options.html#x86-Options) doesn't inc= lude x86-64. I assume that specific option was added somewhere in the last = 2-3 years when this x86-64-v* concept was added?

I= went looking around in linux and they don't seem to specify anything o= f sorts either.

I can't speak for ARM but for = IA32 it's pretty logic: the Pentium 1 (i586) was the first processor wi= th CPUID, RDTSC, RD/WRMSR, etc. Essentials for firmware code that will neve= r really even run on a processor that old.

On Thu, Jun 30, 2022 at= 12:25 AM dann frazier <da= nn.frazier@canonical.com> wrote:
On Wed, Jun 29, 2022 at 11:06:01PM +0100, Pedro Fal= cato wrote:
> This may be a strong opinion but I would consider toolchains that
> explicitly change the default -march from the well understood x86-64 (= which
> all 64-bit processors support) to be totally broken. If a distro wants= to
> switch the -march for the packages, override CFLAGS :)

Opinion noted. But is there a downside to edk2 being explicit about
its target CPU level on x86-64, given it already does so for IA32 and
ARM?

=C2=A0 -dann

> On Wed, Jun 29, 2022 at 10:57 PM dann frazier <dann.frazier@canonical.com&= gt;
> wrote:
>
> > Ping on this. Would it be more palatable if I limited the change = only
> > to tested toolchains (gcc/clang)? Alternatively, is there a way t= o
> > submit this code to CI to verify the !(gcc|clang) variants?
> >
> >=C2=A0 =C2=A0-dann
> >
> > On Fri, Jun 10, 2022 at 12:09:18PM -0600, dann frazier wrote:
> > > From: dann frazier <dann.frazier@canonical.com>
> > >
> > > Some Linux distributions are experimenting with builds that = target a
> > > higher x86-64 psABI, such as x86-64-v3. To avoid inheriting = these
> > > compiler defaults in edk2 builds, and therefore breaking com= patibility
> > > with machines using older CPUs, explicitly target the generi= c x86-64
> > > psABI. This is similar to how we explicitly specify the cpu = type for
> > > some other architectures (-march=3Di586 for IA32, -march=3Da= rmv7-a for ARM).
> > >
> > > Spot tested with OVMF builds using GCC5 and CLANG38.
> > >
> > > Signed-off-by: dann frazier <dann.frazier@canonical.com>
> > > ---
> > >=C2=A0 BaseTools/Conf/tools_def.template | 20 ++++++++++-----= -----
> > >=C2=A0 1 file changed, 10 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/BaseTools/Conf/tools_def.template
> > b/BaseTools/Conf/tools_def.template
> > > index adcd23f727..569d16fb3e 100755
> > > --- a/BaseTools/Conf/tools_def.template
> > > +++ b/BaseTools/Conf/tools_def.template
> > > @@ -1885,7 +1885,7 @@ DEFINE GCC_DEPS_FLAGS=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D -MMD -MF
> > $@.deps
> > >=C2=A0 DEFINE GCC48_ALL_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =3D DEF(GCC_ALL_CC_FLAGS)
> > -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=3D$(BASE_= NAME)Strings
> > >=C2=A0 DEFINE GCC48_IA32_X64_DLINK_COMMON=C2=A0 =C2=A0=3D -no= stdlib
> > -Wl,-n,-q,--gc-sections -z common-page-size=3D0x20
> > >=C2=A0 DEFINE GCC48_IA32_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0=3D DEF(GCC48_ALL_CC_FLAGS) -m32
> > -march=3Di586 -malign-double -fno-stack-protector -D EFI32
> > -fno-asynchronous-unwind-tables -Wno-address
> > > -DEFINE GCC48_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =3D DEF(GCC48_ALL_CC_FLAGS) -m64
> > -fno-stack-protector "-DEFIAPI=3D__attribute__((ms_abi))&quo= t;
> > -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=3D= small -fpie
> > -fno-asynchronous-unwind-tables -Wno-address
> > > +DEFINE GCC48_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =3D DEF(GCC48_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 -fno-stack-protector "-DEFIAPI=3D__attribute= __((ms_abi))"
> > -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=3D= small -fpie
> > -fno-asynchronous-unwind-tables -Wno-address
> > >=C2=A0 DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS =3D DEF(GCC48_IA3= 2_X64_DLINK_COMMON)
> > -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
> > >=C2=A0 DEFINE GCC48_IA32_X64_DLINK_FLAGS=C2=A0 =C2=A0 =3D DEF= (GCC48_IA32_X64_DLINK_COMMON)
> > -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)
> > -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
> > >=C2=A0 DEFINE GCC48_IA32_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D
> > -Wl,--defsym=3DPECOFF_HEADER_SIZE=3D0x220 DEF(GCC_DLINK2_FLAGS_CO= MMON)
> > > @@ -2613,15 +2613,15 @@ NOOPT_CLANG38_IA32_DLINK2_FLAGS=C2= =A0 =C2=A0 =C2=A0=3D
> > DEF(GCC5_IA32_DLINK2_FLAGS) -O0
> > >=C2=A0 *_CLANG38_X64_ASLPP_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =3D DEF(GCC_ASLPP_FLAGS)
> > DEF(CLANG38_X64_TARGET)
> > >=C2=A0 *_CLANG38_X64_VFRPP_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =3D DEF(GCC_VFRPP_FLAGS)
> > DEF(CLANG38_X64_TARGET)
> > >
> > > -DEBUG_CLANG38_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -fpie -Oz
> > -flto DEF(CLANG38_X64_TARGET) -g
> > > +DEBUG_CLANG38_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -fpie -Oz -flto DEF(CLANG38_X64_TARGET) -g
> > >=C2=A0 DEBUG_CLANG38_X64_DLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D = DEF(GCC5_IA32_X64_DLINK_FLAGS)
> > -flto -Wl,-Oz -Wl,-melf_x86_64 -Wl,--oformat=3Delf64-x86-64 -Wl,-= pie
> > -mcmodel=3Dsmall
> > >=C2=A0 DEBUG_CLANG38_X64_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0=3D = DEF(GCC5_X64_DLINK2_FLAGS) -O3
> > >
> > > -RELEASE_CLANG38_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D = DEF(CLANG38_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -fpie -Oz
> > -flto DEF(CLANG38_X64_TARGET)
> > > +RELEASE_CLANG38_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D = DEF(CLANG38_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -fpie -Oz -flto DEF(CLANG38_X64_TARGET)
> > >=C2=A0 RELEASE_CLANG38_X64_DLINK_FLAGS=C2=A0 =C2=A0 =3D DEF(G= CC5_IA32_X64_DLINK_FLAGS)
> > -flto -Wl,-Oz -Wl,-melf_x86_64 -Wl,--oformat=3Delf64-x86-64 -Wl,-= pie
> > -mcmodel=3Dsmall
> > >=C2=A0 RELEASE_CLANG38_X64_DLINK2_FLAGS=C2=A0 =C2=A0=3D DEF(G= CC5_X64_DLINK2_FLAGS) -O3
> > >
> > > -NOOPT_CLANG38_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -fpie -O0
> > DEF(CLANG38_X64_TARGET) -g
> > > +NOOPT_CLANG38_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -fpie -O0 DEF(CLANG38_X64_TARGET) -g
> > >=C2=A0 NOOPT_CLANG38_X64_DLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D = DEF(GCC5_IA32_X64_DLINK_FLAGS)
> > -Wl,-O0 -Wl,-melf_x86_64 -Wl,--oformat=3Delf64-x86-64 -Wl,-pie -m= cmodel=3Dsmall
> > >=C2=A0 NOOPT_CLANG38_X64_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0=3D = DEF(GCC5_X64_DLINK2_FLAGS) -O0
> > >
> > > @@ -2798,17 +2798,17 @@ NOOPT_CLANGPDB_IA32_DLINK2_FLAGS=C2= =A0 =C2=A0 =C2=A0=3D
> > >=C2=A0 *_CLANGPDB_X64_ASLPP_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =3D DEF(GCC_ASLPP_FLAGS)
> > DEF(CLANGPDB_X64_TARGET)
> > >=C2=A0 *_CLANGPDB_X64_VFRPP_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =3D DEF(GCC_VFRPP_FLAGS)
> > DEF(CLANGPDB_X64_TARGET)
> > >
> > > -DEBUG_CLANGPDB_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D DEF(CLANGPDB_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -Oz -flto
> > DEF(CLANGPDB_X64_TARGET) -gcodeview=C2=A0 -funwind-tables
> > > +DEBUG_CLANGPDB_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D DEF(CLANGPDB_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -Oz -flto DEF(CLANGPDB_X64_TARGET) -gcodeview > > -funwind-tables
> > >=C2=A0 DEBUG_CLANGPDB_X64_DLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D= /NOLOGO /NODEFAULTLIB
> > /IGNORE:4001 /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEALIGN:32 /Mach= ine:X64 /DLL
> > /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /S= AFESEH:NO
> > /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=3Dwineh /lldmap
> > >=C2=A0 DEBUG_CLANGPDB_X64_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0=3D=
> > >=C2=A0 DEBUG_CLANGPDB_X64_GENFW_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D= --keepexceptiontable
> > >
> > > -RELEASE_CLANGPDB_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D= DEF(CLANGPDB_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -Oz -flto
> > DEF(CLANGPDB_X64_TARGET) -fno-unwind-tables
> > > +RELEASE_CLANGPDB_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D= DEF(CLANGPDB_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -Oz -flto DEF(CLANGPDB_X64_TARGET) -fno-unwind-t= ables
> > >=C2=A0 RELEASE_CLANGPDB_X64_DLINK_FLAGS=C2=A0 =C2=A0 =3D /NOL= OGO /NODEFAULTLIB
> > /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEA= LIGN:32
> > /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /DLL
> > /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /S= AFESEH:NO
> > /BASE:0 /MERGE:.rdata=3D.data /MLLVM:-exception-model=3Dwineh /ll= dmap
> > >=C2=A0 RELEASE_CLANGPDB_X64_DLINK2_FLAGS=C2=A0 =C2=A0=3D
> > >=C2=A0 RELEASE_CLANGPDB_X64_GENFW_FLAGS=C2=A0 =C2=A0 =3D
> > >
> > > -NOOPT_CLANGPDB_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D DEF(CLANGPDB_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -O0
> > DEF(CLANGPDB_X64_TARGET) -gcodeview -funwind-tables
> > > +NOOPT_CLANGPDB_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=3D DEF(CLANGPDB_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -O0 DEF(CLANGPDB_X64_TARGET) -gcodeview -funwind= -tables
> > >=C2=A0 NOOPT_CLANGPDB_X64_DLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D= /NOLOGO /NODEFAULTLIB
> > /IGNORE:4001 /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEALIGN:32 /Mach= ine:X64 /DLL
> > /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /S= AFESEH:NO
> > /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=3Dwineh /lldmap
> > >=C2=A0 NOOPT_CLANGPDB_X64_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0=3D=
> > >=C2=A0 NOOPT_CLANGPDB_X64_GENFW_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D= --keepexceptiontable
> > > @@ -2901,15 +2901,15 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS= =C2=A0 =C2=A0 =C2=A0=3D
> > DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
> > >=C2=A0 *_CLANGDWARF_X64_ASLPP_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =3D DEF(GCC_ASLPP_FLAGS)
> > DEF(CLANG38_X64_TARGET)
> > >=C2=A0 *_CLANGDWARF_X64_VFRPP_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =3D DEF(GCC_VFRPP_FLAGS)
> > DEF(CLANG38_X64_TARGET)
> > >
> > > -DEBUG_CLANGDWARF_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -fpie -Oz
> > -flto DEF(CLANG38_X64_TARGET) -g
> > > +DEBUG_CLANGDWARF_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -fpie -Oz -flto DEF(CLANG38_X64_TARGET) -g
> > >=C2=A0 DEBUG_CLANGDWARF_X64_DLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 = =3D
> > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_x86_= 64
> > -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=3Dsmall
> > -Wl,--apply-dynamic-relocs
> > >=C2=A0 DEBUG_CLANGDWARF_X64_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0= =3D
> > DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld
> > >
> > > -RELEASE_CLANGDWARF_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0= =3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -fpie -Oz
> > -flto DEF(CLANG38_X64_TARGET)
> > > +RELEASE_CLANGDWARF_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0= =3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -fpie -Oz -flto DEF(CLANG38_X64_TARGET)
> > >=C2=A0 RELEASE_CLANGDWARF_X64_DLINK_FLAGS=C2=A0 =C2=A0 =3D > > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_x86_= 64
> > -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=3Dsmall
> > -Wl,--apply-dynamic-relocs
> > >=C2=A0 RELEASE_CLANGDWARF_X64_DLINK2_FLAGS=C2=A0 =C2=A0=3D > > DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld
> > >
> > > -NOOPT_CLANGDWARF_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcm= odel=3Dsmall -fpie -O0
> > DEF(CLANG38_X64_TARGET) -g
> > > +NOOPT_CLANGDWARF_X64_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=3D DEF(CLANG38_ALL_CC_FLAGS) -m64
> > -march=3Dx86-64 "-DEFIAPI=3D__attribute__((ms_abi))" -m= no-red-zone
> > -mcmodel=3Dsmall -fpie -O0 DEF(CLANG38_X64_TARGET) -g
> > >=C2=A0 NOOPT_CLANGDWARF_X64_DLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 = =3D
> > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_x86_64
> > -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=3Dsmall
> > -Wl,--apply-dynamic-relocs
> > >=C2=A0 NOOPT_CLANGDWARF_X64_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0= =3D
> > DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O0 -fuse-ld=3Dlld
> > >
> >
> >
> >
> >
> >
> >
>


--
Pedro Falcato
--000000000000afcd6605e29fdf7e--