summaryrefslogtreecommitdiffstats
path: root/BaseTools/Conf/tools_def.template
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools/tools_def: drop -mgeneral-regs-only for AArch64 CLANGDWARFYeping Song2023-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit 0df6c8c157af9 ("BaseTools/tools_def AARCH64: avoid SIMD registers in XIP code") adds -mgeneral-regs-only to GCC_AARCH64_CC_XIPFLAGS, in order to avoid a bug present in certain versions of GCC. This was never a problem for clang. That's given the history of what the problem is. Then we can describe how we fix it: Change *_CLANGDWARF_AARCH64_CC_XIPFLAGS to set the required -mstrict-align option instead of importing the whole GCC variable. Signed-off-by: Yeping Song <quic_yepings@quicinc.com> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* BaseTools: drop tautological warning overrides for CLANGDWARFLeif Lindholm2023-08-291-1/+1
| | | | | | | | | | | | | | | | The CLANGDWARF profile sets both -Wno-tautological-compare and -Wno-tautological-constant-out-of-range-compare, but this prevents compile-time detection of certain errors. Drop these flags. Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* BaseTools/tools_def: Add CLANGDWARF support for RISC-VSunil V L2023-07-311-0/+53
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4478 Add tools_def definitions to support CLANGDWARF toolchain for RISC-V. This uses clang and the llvm LLD linker. This helps people by not requiring to install multiple cross compilers for different architectures. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> # Debian clang version 14.0.6 Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* BaseTools/tools_def: Add "-fno-unwind-tables" to GCC5_RISCV64_CC_FLAGSSunil V L2023-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | gcc-13 for RISC-V enables unwind tables by default similar to ARM64. This generates .eh_frame_hdr section which is not handled well by GenFw causing failures. Disable the unwind tables by adding -fno-unwind-tables flag similar to [1]. [1] - https://github.com/tianocore/edk2/commit/cbf00651eda6 Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* BaseTools: add -fdirect-access-external-data to clang pie buildsGerd Hoffmann2023-06-011-3/+3
| | | | | | | | Tell clang to not use external (via got) references for data access. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
* BaseTools/tools_def: Disable overzealous unused variable warning on ClangArd Biesheuvel2023-05-121-1/+1
| | | | | | | | | | | | | The warnings Clang emits when enabling -Wunneeded-internal-declaration (which is part of -Wall) are generating false positives for variables whose size gets taken but are not referenced beyond yet. This may happen legitimately in debug code, so let's disable this warning for Clang, rather than tiptoe around it in the code. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* BaseTools/tools_def: Drop ref to undefined CLANGDWARF_ARM_PREFIXArd Biesheuvel2023-05-121-1/+1
| | | | | | | | | | | | | | When using CLANGDWARF to build for the ARM architecture, objcopy is references via the wrong environment variable, resulting in the wrong llvm-objcopy to be used (if one exists), or the build to fail (if CLANGDWARF_BIN points to the only available instance) So use CLANGDWARF_BIN instead, which was what was intended. Fixes: ecbc394365f50f3c ("BaseTools: Set CLANGDWARF RC path ...") Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* BaseTools: Revert Set the CLANGDWARF OBJCOPY path in tools_def.templateRebecca Cran2023-05-111-4/+0
| | | | | | | | | | This reverts commit 11f62f4cc09f16d265da1a737dabfd8ed65f8c00. While GCC uses objcopy for the OBJCOPY command, it's not needed for the CLANGDWARF toolchain and can be left as echo. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Ard BIesheuvel <ardb@kernel.org>
* BaseTools: Set CLANGDWARF RC path to llvm-objcopy in tools_def.templateRebecca Cran2023-05-101-4/+4
| | | | | | | | | | The llvm-rc tool is for Windows PE resources. Since the CLANGDWARF toolchain creates ELF binaries, update the RC path to be llvm-objcopy. This follows the GCC toolchain which uses objcopy for the RC path. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.templateRebecca Cran2023-05-101-0/+4
| | | | | | | | | Set the OBJCOPY path for the CLANGDWARF toolchain to 'llvm-objcopy' to override the default of 'echo'. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in tools_def.templateRebecca Cran2023-05-101-1/+1
| | | | | | | | | | There's only a single rule in build_rule.template for CLANGGCC, and it's incorrect. We should instead just use the rules for GCC, so remove the BUILDRULEFAMILY line for the CLANGDWARF toolchain definition. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools/Conf: Add quotes to ADDDEBUGFLAG in tools_def.txtMichael D Kinney2023-05-061-2/+2
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4448 Update tools_def.txt to add quotes around the file target in OBJCOPY_ADDDEBUGFLAGS for compatibility with GCC like tool chains used on Windows. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* BaseTools/Conf: Align CLANGDWARF and CLANGPDB warning overridesMichael D Kinney2023-05-061-1/+1
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4447 Fix build error related to use of DEBUG_CODE_BEGIN() and DEBUG_CODE_END(). CLANGPDB requires extra warning disables for use of DebugLib.h macros. This change aligns the warning disables between CLANGDWARF and CLANGPDB. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* BaseTools/Conf/tools_def.template: Bump VERSION to 3.00Rebecca Cran2023-05-051-1/+6
| | | | | | | | | Bump VERSION to 3.00 and explain the changes made to the toolchains. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Delete CLANG38 from tools_def.templateRebecca Cran2023-05-051-211/+22
| | | | | | | | | Clang 3.8 is a very old release and is no longer relevant. Delete the CLANG38 toolchain from tools_def.template. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Remove CLANG35 toolchain from tools_def.templateRebecca Cran2023-05-051-88/+0
| | | | | | | | | Clang 3.5 is a very old release and is no longer relevant. Remove the CLANG35 toolchain from tools_def.template. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: As with CLANGDWARF IA32 and X64, use lld for ARM and AARCH64Rebecca Cran2023-05-051-6/+6
| | | | | | | | | | | | As with the IA32 and X64 CLANGDWARF toolchain definitions, use ld.lld for ARM and AARCH64. Add -Wl,--no-pie,--no-relax to the command line to fix linking when using lld. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Add ARM and AARCH64 CLANGDWARF support in tools_def.templateRebecca Cran2023-05-051-0/+90
| | | | | | | | | Add ARM and AARCH64 support to CLANGDWARF in tools_def.template, copying the CLANG38 definitions. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools/Conf/tools_def.template: Add section for deprecated toolchainsRebecca Cran2023-05-051-8/+23
| | | | | | | | | | | In order to make it clear for anyone reading tools_def.template, add a section for deprecated tool chains and move GCC48, GCC49 and GCC5 into it. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* Add GCC and GCCNOLTO toolchains to tools_def.txt and update packagesRebecca Cran2023-05-051-0/+366
| | | | | | | | | | Add a 'GCC' toolchain that's a copy of the existing GCC5 definition. Add a 'GCCNOLTO' toolchain that's a copy of the existing GCC49 toolchain. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Update VS toolchain descriptions in tools_def.txt.templateRebecca Cran2023-05-051-5/+2
| | | | | | | | | | | | | | Update the Visual Studio toolchain descriptions in tools_def.txt.template: - The WinDDK is no longer needed. - Update 3 is required for VS 2015. - VS 2005 has been removed. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Remove EBC (EFI Byte Code) compiler definitionsRebecca Cran2023-05-051-98/+0
| | | | | | | | | | | | | | | | The edk2-stable202302 release was the last to support building EFI Byte Code drivers. Since the Intel EFI Byte Code Compiler is no longer available, a decision has been made to remove support for EBC from edk2. Remove the definitions for Intel's EBC compiler from Conf/tools_def.template. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Remove unused IPHONE_TOOLS and SOURCERY_CYGWIN_TOOLS defsRebecca Cran2023-05-051-4/+0
| | | | | | | | | | | Remove the unused IPHONE_TOOLS and SOURCERY_CYGWIN_TOOLS definitions from Conf/tools_def.template. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Remove VS2008-VS2013 remnantsRebecca Cran2023-05-051-12/+0
| | | | | | | | | | | Remove remnants of Visual Studio 2008-2013 support from Conf/tools_def.txt and various batch scripts. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Remove VS2008, 2010, 2012 and 2013 toolchain definitionsRebecca Cran2023-05-051-1005/+0
| | | | | | | | | | | | | | | With recent changes, Visual Studio versions older than VS2015 are unable to build EDK2 code. To avoid confusion, remove VS2008, 2010, 2012 and 2013 toolchain definitions from Conf/tools_def.template, leaving only versions that can be used to successfully build firmware. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools/tools_def CLANGDWARF: Permit text relocationsArd Biesheuvel2023-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | We rely on PIE executables to get the codegen that is suitable for PE/COFF conversion where the resulting executables can be loaded anywhere in the address space. However, ELF linkers may default to disallowing text relocations in PIE executables, as this would require text segments to be updated at runtime, which is bad for security and increases the copy-on-write footprint of ELF executables and shared libraries. However, none of those concerns apply to PE/COFF executables in the context of EFI, which are copied into memory rather than mmap()'ed, and fixed up by the loader before launch. So pass -z notext to the LLD linker to permit runtime relocations in read-only sections. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* BaseTools/Conf/tools_def: Fix linking using CLANGDWARF_IA32Rebecca Cran2023-04-051-7/+7
| | | | | | | | | | | | | | | | The clang toolchain might default to fPIE/fPIC, which prevents lld from linking the objects into a binary. Specify -fno-pie -fno-pic as done on GCC to fix linking. Test: Building the Universal Payload using the command 'python UefiPayloadPkg/UniversalPayloadBuild.py -a IA32' actually works. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4356
* ArmPkg, BaseTools AARCH64: Add BTI ELF note to .hii objectsArd Biesheuvel2023-03-301-2/+3
| | | | | | | | | | | | | | | | The ELF based toolchains use objcopy to create HII object files, which contain only a single .hii section. This means no GNU note is inserted that describes the object as compatible with BTI, even though the lack of executable code in such an object makes the distinction irrelevant. However, the linker will not add the note globally to the resulting ELF executable, and this breaks BTI compatibility. So let's insert a GNU BTI-compatible ELF note by hand when generating such object files. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
* BaseTools/tools_def.template: Update -march parameter for RISC-VSunil V L2023-02-231-1/+1
| | | | | | | | | | | | | | | | | | Replace rv64imafdc with rv64gc so that it works for gcc 12. "g" means imafd in gcc < 12 and imafd_zifencei_zicsr in gcc >= 12. So, replacing rv64imafdc with rv64gc will work for both gcc <12 and gcc >=12. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* tools_def: Remove duplicated -OsPierre Gondois2023-01-301-12/+12
| | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2928 commit 17bd834eb5fd ("BaseTools: Factorize GCC flags") makes GCC48_ALL_CC_FLAGS inherit from GCC_ALL_CC_FLAGS. GCC_ALL_CC_FLAGS contains the '-Os' flag. The latest flag in a command line overrides the previous optimization option. This allows more specific build configuration to override the inherited '-Os' flag. If a build configuration includes GCC48_ALL_CC_FLAGS, hard-coded '-Os' options are not necessary anymore. Remove them. Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/tools_def CLANG38: Suppress unaligned access warningArd Biesheuvel2023-01-171-1/+1
| | | | | | | | | | | | Even though the presence of the 'packed' pragma should be a strong hint that the misaligned placement of a GUID in a struct is intentional, recent Clang versions will object nonetheless, and break the build due to the presence of such GUIDs in the FPDT ACPI tables. This is obviously not something we can fix in the code, so let's just suppress the warning/error instead. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* BaseTools/tools_def ARM: Make choice for soft float ABI explicitArd Biesheuvel2023-01-171-2/+2
| | | | | | | | | | | | | | Recent GCC for ARM will complain when selecting the hard float ABI without specifying the FPU implementation, even when just running the preprocessor. This all happens under the hood, and we never bothered in the past, given that we don't emit floating point code anyway. However, to placate newer compilers, make it explicit that the floating point ABI is always the softfloat one, by moving the -msoft-float compiler option to PLATFORM_FLAGS. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* BaseTools/tools_def ARM AARCH64: Get rid of ARCHCC and ARCHASM flagsArd Biesheuvel2023-01-171-48/+41
| | | | | | | ARCHCC_FLAGS and ARCHASM_FLAGS no longer serve a useful purpose so drop all the definitions and references. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* BaseTools/tools_def RISCV: Make OpenSBI references RISCV-onlyArd Biesheuvel2023-01-171-2/+1
| | | | | | | | | | | | | | | The global GCC_PP_FLAGS tools_def variable now contains a reference to OpenSBI specific C preprocessor variables, which means they are added to the command line on every architecture, not just RISC-V. This does not currently result in any issues, but it is a bit sloppy so let's clean this up. Given that the GCC_PP_FLAGS definition appears twice, drop the one that carries the OpenSBI reference, and move that reference to a new RISC-V specific variable. Acked-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* BaseTools: Fix IA32 UINT64 alignment for CLANG toolchainsPedro Falcato2022-12-301-9/+9
| | | | | | | | | | | | | | | | | Currently, UINT64 is not 8-byte aligned for CLANG* toolchains on IA32, which causes ABI differences between IA32 and X64 in such simple examples as: struct S {UINT32 A; UINT64 B;}; Pass -malign-double to align it to 8 bytes, as is done for GCC already. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com> Cc: Marvin H?user <mhaeuser@posteo.de> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* tools_def: add -fno-omit-frame-pointer to GCC48_{IA32,X64}_CC_FLAGSGerd Hoffmann2022-12-221-2/+2
| | | | | | | | Fixes problems due to code assuming it runs with frame pointers and thus updates rbp / ebp registers when switching stacks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Liming Gao <gaoliming@byosoft.com.cn>
* tools_def: remove GCC_IA32_CC_FLAGS/GCC_X64_CC_FLAGSGerd Hoffmann2022-12-221-2/+0
| | | | | | | They are not used anywhere. Remove them. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* BaseTools: Updated for GCC5 tool chain for LoongArch platfrom.Chao Li2022-10-141-6/+48
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4053 BaseTools define template files changes for building EDK2 LoongArch platform. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Co-authored-by: Dongyan Qian <qiandongyan@loongson.cn> Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* Revert "OvmfPkg/Sec: fix stack switch"Gerd Hoffmann2022-06-101-3/+3
| | | | | | | | | This reverts commit ff36b2550f94dc5fac838cf298ae5a23cfddf204. Has no effect because GCC_IA32_CC_FLAGS and GCC_X64_CC_FLAGS are unused. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* OvmfPkg/Sec: fix stack switchGerd Hoffmann2022-06-081-3/+3
| | | | | | | | | | | | | | | | | | | | The ebp/rbp register can either be used for the frame pointer or as general purpose register. With gcc (and clang) this depends on the -f(no-)omit-frame-pointer switch. This patch updates tools_def.template to explicitly set the compiler option and also add a define to allow conditionally compile code. The new define is used to fix stack switching in TemporaryRamMigration. The ebp/rbp must not be touched when the compiler can use it as general purpose register. With version 12 gcc starts actually using the register, so changing it leads to firmware crashes in some configurations. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3934 Reported-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* BaseTools: Remove RVCT supportedk2-stable202205-rc1Rebecca Cran2022-05-131-157/+0
| | | | | | | | RVCT is obsolete and no longer used. Remove support for it. Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* BaseTools: Upgrade the version of NASM toolJason2022-03-011-3/+3
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3790 Upgrade the version of NASM tool to avoid compilation errors when compiling NASM code change. Signed-off-by: Jason Lou <yun.lou@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
* BaseTools: Update CLANG{35,38}_WARNING_OVERRIDES to ignore unused varsedk2-stable202202-rc1Rebecca Cran2022-02-101-2/+2
| | | | | | | | | | | | Building with the CLANG35 and CLANG38 toolset fails because of variables which are set but not otherwise used in the RELEASE build. GCC added -Wno-unused-but-set-variable back in 2016, and later added -Wno-unused-const-variable. Add those to CLANG35_WARNING_OVERRIDES and CLANG38_WARNING_OVERRIDES. Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools/Conf: Add new macro for customizing dll file reduction.Wei6 Xu2022-02-071-0/+1
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3810 New macro OBJCOPY_STRIPFLAG is added in build_rule.template to replace '--strip-unneeded -R .eh_frame', so that module can have some unique objcopy flags for its own purpose. In tools_def.template, set '--strip-unneeded -R .eh_frame' as default value of OBJCOPY_STRIPFLAG. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* BaseTools: Change CLANG8ELF to CLANGDWARFNi, Ray2021-06-041-90/+91
| | | | | | | | | | | | | CLANGDWARF is more proper because it's similar to CLANGPDB that generates PE images but with DWARF debug symbols. This toolchain is needed for creating ELF format universal payload that follows https://universalpayload.github.io/documentation/. Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* BaseTools: Add new CLANG8ELF tool chain for new LLVM/CLANG8Liming Gao2021-06-041-0/+102
| | | | | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1603 LLVM/CLANG8 formal release http://releases.llvm.org/download.html#8.0.0 It can be downloaded and installed in Windows/Linux/Mac OS. CLANG8ELF tool chain is added to generate ELF image, and convert to PE/COFF. On Windows OS, set CLANG_HOST_BIN=n, set CLANG8_BIN=LLVM installed directory For example: set CLANG_HOST_BIN=n # use windows nmake set CLANG8_BIN=C:\Program Files\LLVM\bin\ On Linux/Mac, set CLANG8_BIN=LLVM installed directory This tool chain can be used to compile the firmware code. On windows OS, Visual Studio is still required to compile BaseTools C tools and nmake.exe. On Linux/Mac OS, gcc is used to compile BaseTools C tools. make is used for makefile. This tool chain is verified on OVMF Ia32, X64 and Ia32X64 to boot Shell. This tool chain is verified in Windows/Linux and Mac OS. Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* BaseTools: Add DTCPP_FLAGS for GCC5 RISCV64 toolchainDaniel Schaefer2021-05-171-0/+1
| | | | | | | | | | | | | | Some/all platforms are going to require EDK2 to build a device tree and use it in the early stages of boot. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Abner Chang <abner.chang@hpe.com> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com> Reviewed-by: Abner Chang <abner.chang@hpe.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* BaseTools/Conf/tools_def.template: Remove redundant MAKE statementsMichael D Kinney2021-04-191-55/+0
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3337 Remove redundant MAKE_PATH and MAKE_FLAGS statements for VS20xx tool chains. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
* BaseTools/Conf: Fix MAKE_FLAGS typos in tools_def.templateMichael D Kinney2021-04-121-8/+8
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3313 Change MAKE_FLAG to MAKE_FLAGS to match required name from EDK II Build Specifications for VS20xx tool chains. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
* Revert "BaseTools: Add gcc flag to warn on void* pointer arithmetic"Bob Feng2020-07-241-3/+3
| | | | | | | | | | | | | | | | | This reverts commit dbd546a32d5abe225306e22d43a7d86e3a042eee. This patch also breaks about half of the ARM/AARCH64 platforms in edk2-platforms Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>