Laszlo: > -----Original Message----- > From: Laszlo Ersek <ler...@redhat.com> > Sent: Tuesday, October 1, 2019 4:42 AM > To: devel@edk2.groups.io; Gao, Liming <liming....@intel.com> > Subject: Re: [edk2-devel] [Patch 11/12] OvmfPkg: Enable CLANG9 tool chain > > Hi Liming, > > On 09/27/19 09:46, Liming Gao wrote: > > 1. Apply CLANG9 Linker option. > > I'm confused by this, in two regards. > > - Why do we refer to CLANG9 first as being in the GCC toolchain family > (see near mmx/sse), and then under a totally different family name > (CLANGPE?)
CLANGPE is used to override GCC option. GCC is used to append GCC options. You can see XCODE5 take the same way. CLANG9 tool chain doesn't recognize -z common-page-size=0x1000 option. So, here CLANGPE is used to specify /ALIGN:4096 option. > > - Regarding the CLANGPE option, does the "/ALIGN:4096" option format > work on Linux too? (It seems quite unusual). > Yes. CLANG9 tool chain is CLANG compiler + LLVM LLD linker. This linker is to generate PE/COFF image. Its linker option is same to VS linker. This linker works on Linux and Mac. > Another question: > > - There is another XCODE5-specific exception in OvmfPkg, namely > TftpDynamicCommand. Does that build OK with CLANG9? > Yes. LLVM provides llvm-rc to generate resource section. > > 2. Add -mno-mmx -mno-sse compiler option > > I think this remark should be clarified -- the options are *excluded* > from the CLANG9 build. Right. I will update comments. > > Thanks > Laszlo > > > > > Signed-off-by: Liming Gao <liming....@intel.com> > > --- > > OvmfPkg/OvmfPkgIa32.dsc | 4 +++- > > OvmfPkg/OvmfPkgIa32X64.dsc | 4 +++- > > OvmfPkg/OvmfPkgX64.dsc | 4 +++- > > 3 files changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > > index 66e944436a..0fde8e6e84 100644 > > --- a/OvmfPkg/OvmfPkgIa32.dsc > > +++ b/OvmfPkg/OvmfPkgIa32.dsc > > @@ -66,7 +66,7 @@ > > GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG > > INTEL:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG > > MSFT:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG > > -!if $(TOOL_CHAIN_TAG) != "XCODE5" > > +!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(TOOL_CHAIN_TAG) != "CLANG9" > > GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse > > !endif > > > > @@ -80,12 +80,14 @@ > > [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] > > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > > XCODE:*_*_*_DLINK_FLAGS = > > + CLANGPE: *_*_*_DLINK_FLAGS = /ALIGN:4096 > > > > # Force PE/COFF sections to be aligned at 4KB boundaries to support page > > level > > # protection of DXE_SMM_DRIVER/SMM_CORE modules > > [BuildOptions.common.EDKII.DXE_SMM_DRIVER, > > BuildOptions.common.EDKII.SMM_CORE] > > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > > XCODE:*_*_*_DLINK_FLAGS = > > + CLANGPE: *_*_*_DLINK_FLAGS = /ALIGN:4096 > > > > > > ################################################################################ > > # > > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > > index 51c2bfb44f..c17329878e 100644 > > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > > @@ -66,7 +66,7 @@ > > GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG > > INTEL:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG > > MSFT:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG > > -!if $(TOOL_CHAIN_TAG) != "XCODE5" > > +!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(TOOL_CHAIN_TAG) != "CLANG9" > > GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse > > !endif > > !ifdef $(SOURCE_DEBUG_ENABLE) > > @@ -85,12 +85,14 @@ > > [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] > > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > > XCODE:*_*_*_DLINK_FLAGS = > > + CLANGPE: *_*_*_DLINK_FLAGS = /ALIGN:4096 > > > > # Force PE/COFF sections to be aligned at 4KB boundaries to support page > > level > > # protection of DXE_SMM_DRIVER/SMM_CORE modules > > [BuildOptions.common.EDKII.DXE_SMM_DRIVER, > > BuildOptions.common.EDKII.SMM_CORE] > > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > > XCODE:*_*_*_DLINK_FLAGS = > > + CLANGPE: *_*_*_DLINK_FLAGS = /ALIGN:4096 > > > > > > ################################################################################ > > # > > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > > index ba7a758844..af91265d05 100644 > > --- a/OvmfPkg/OvmfPkgX64.dsc > > +++ b/OvmfPkg/OvmfPkgX64.dsc > > @@ -66,7 +66,7 @@ > > GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG > > INTEL:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG > > MSFT:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG > > -!if $(TOOL_CHAIN_TAG) != "XCODE5" > > +!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(TOOL_CHAIN_TAG) != "CLANG9" > > GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse > > !endif > > !ifdef $(SOURCE_DEBUG_ENABLE) > > @@ -85,12 +85,14 @@ > > [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] > > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > > XCODE:*_*_*_DLINK_FLAGS = > > + CLANGPE: *_*_*_DLINK_FLAGS = /ALIGN:4096 > > > > # Force PE/COFF sections to be aligned at 4KB boundaries to support page > > level > > # protection of DXE_SMM_DRIVER/SMM_CORE modules > > [BuildOptions.common.EDKII.DXE_SMM_DRIVER, > > BuildOptions.common.EDKII.SMM_CORE] > > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 > > XCODE:*_*_*_DLINK_FLAGS = > > + CLANGPE: *_*_*_DLINK_FLAGS = /ALIGN:4096 > > > > > > ################################################################################ > > # > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48583): https://edk2.groups.io/g/devel/message/48583 Mute This Topic: https://groups.io/mt/34309064/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-