summaryrefslogtreecommitdiff
path: root/BaseTools/Conf/build_rule.template
AgeCommit message (Collapse)AuthorFilesLines
2023-05-10BaseTools: Remove the CLANGCC build rule for Hii-Binary-Package.UEFI_HIIRebecca Cran1-1/+1
The build rule for Hii-Binary-Package.UEFI_HII should be the same as for GCC, using $(RC) to embed the HII resource into the binary. Since the build rule defaults to GCC, just remove CLANGGCC from the section. 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>
2023-04-25BaseTools: Add quotes around OBJCOPY cmd in build_rule.templateRebecca Cran1-2/+2
Add quotes around the OBJCOPY command in build_rule.template to fix the case where LLVM is installed on Windows in a path with spaces such as C:\Program Files\LLVM. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2023-01-17Fix cyclic dependency error on OptionROM buildKonstantin Aladyshev1-1/+0
EDKII build system supports OptionROM generation if particular PCI_* defines are present in the module INF file: ``` [Defines] ... PCI_VENDOR_ID = <...> PCI_DEVICE_ID = <...> PCI_CLASS_CODE = <...> PCI_REVISION = <...> ``` Although after the commit d372ab585a2cdc5348af5f701c56c631235fe698 ("BaseTools/Conf: Fix Dynamic-Library-File template") it is no longer possible. The build system fails with the error: ``` Cyclic dependency detected while generating rule for "<...>/DEBUG/<...>.efi" file ``` Remove "$(DEBUG_DIR)(+)$(MODULE_NAME).efi" from the 'dll' output files to fix the cyclic dependency. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2022-12-30BaseTools: Generate deps for Arm targetsJake Garver via groups.io1-1/+1
Prior to this change, deps were not generated for Arm and AARCH64 libraries when MODULE_TYPE was BASE, SEC, PEI_CORE, or PIEM. That resulted in bad incremental builds. Signed-off-by: Jake Garver <jake@nvidia.com> Reviewed-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2022-10-24remove GCC build warningWu, JessyX1-1/+1
Fix gcc: warning: -x c after last input file has no effect These kind of flag can only affect the source code after them. For the build command in build_rule.template, we have no other source code or object after these two flag. It seems we don't need them here. 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: JessyX Wu <jessyx.wu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2022-05-13BaseTools: Remove RVCT supportedk2-stable202205-rc1Rebecca Cran1-33/+9
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>
2022-04-28BaseTools/Conf: Fix Dynamic-Library-File templateJake Garver via groups.io1-0/+2
In the Dynamic-Library-File template, add missing output file declarations. These files are generated by the template and other rules explicitly depend on them. This change resolves missing dependency issues we encountered while running a recursive make with job control. Signed-off-by: Jake Garver <jake@nvidia.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2022-02-07BaseTools/Conf: Add new macro for customizing dll file reduction.Wei6 Xu1-1/+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>
2021-06-04BaseTools: Update build_rule to skip CLANG resource section generationLiming Gao1-3/+2
LLVM/CLANG doesn't support resource section generation when ELF image generated. Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
2020-10-10BaseTools Build_Rule: Add the missing ASM16_FLAGS for ASM16 source filegaoliming1-1/+1
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-07-02BaseTools: Compile AML bytecode arrays into .obj filePierre Gondois1-2/+13
The AmlToHex script and Posix/WindowsLike wrappers convert an AML file to a .hex file, containing a C array storing AML bytecode. This ".hex" file can then be included in a C file, allowing to access the AML bytecode from this C file. The EDK2 build system doesn't allow to a depict dependency orders between files of different languages. For instance, in a module containing a ".c" file and a ".asl", the ".c" file may or may not be built prior to the ".asl" file. This prevents any inclusion of a generated ".hex" in a ".c" file since this later ".hex" file may or may not have been created yet. This patch modifies the AmlToC script to generate a C file instead of a ".hex" file. It also adds the generation of an intermediate ".amli" file when compiling an ASL file, and adds a rule to convert this ".amli" to a C file. This allows to generate a C file containing the AML bytecode from an ASL file. This C file will then be handled by the EDK2 build system to generate an object file. Thus, no file inclusion will be required anymore. The C file requiring the AML bytecode as a C array, and the ASL file, will be compiled independently. The C array must be defined as an external symbol. The linker is resolving the reference to the C array symbol. To summarize, the flow goes as: -1. ASL file is compiled to AML; -2. AML file is copied to a ".amli" intermediate file; -3. EDK2 build system applies the rule relevant to ".amli" files. This is, calling the "AmlToC" script, generating a C file from the ".amli" file; -4. EDK2 build system applies the rule relevant to C files. This is creating an object file. -5. EDK2 build system links the object file containing the AML bytecode with the object file requiring it. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Suggested-by: Tomas Pilar <Tomas.Pilar@arm.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-02-06BaseTools: Script for converting .aml to .hexPierre Gondois1-0/+3
The "-tc" option of the iasl compiler allows to generate a .hex file containing a C array storing AML bytecode. An online discussion suggested that this "-tc" option was specific to the iasl compiler and it shouldn't be relied on. This conversation is available at: https://edk2.groups.io/g/devel/topic/39786201#49659 A way to address this issue is to implement a compiler independent script that takes an AML file as input, and generates a .hex file. This patch implements a Python script that converts an AML file to a .hex file, containing a C array storing AML bytecode. This scipt has been tested with the AML output from the following compilers supported by the EDKII implementation: * Intel ASL compiler * Microsoft ASL compiler Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-12-10BaseTools: Update build_rule.txt to generate dependent files.Bob Feng1-42/+54
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2311 Enable the dependent files generation function for compilers and Trim tool. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-11-15BaseTools: Rename tool chain CLANG9 to CLANGPDBLiming Gao1-7/+7
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2341 Based on feedback from https://edk2.groups.io/g/devel/message/50466, CLANGPDB is the most acceptable tool chain name, because this tool chain generates PE/COFF image with PDB debug symbol. The following changes are made in this patch. 1. Update tool chain name from CLANG9 to CLANGPDB. 2. Update tool chain BUILDRULEFAMILY from CLANGPE to CLANGPDB. 3. Update CLANG9_BIN env name to CLANG_BIN without version info. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-10-24BaseTools tools_def: Add CLANG9 tool chain to directly generate PE imageLiming Gao1-10/+16
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com>
2019-07-12BaseTools: Add HOST_APPLICATION module type.Jiewen Yao1-1/+1
It can be used to indicate a module can be build to run as OS application and run in OS environment. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-04-10BaseTools: Fixed issue in MultiThread Genfds functionFeng, Bob C1-4/+4
https://bugzilla.tianocore.org/show_bug.cgi?id=1450 In the Multiple thread Genfds feature, build tool generates GenSec, GenFFS command in Makefile. The Non-Hii Driver does not generate .offset file for uni string offset, but the build tool has not knowledge about this in autogen phase. So in this patch, I add a check in Makefile for GenSec command. If the GenSec input file does not exist, the GenSec will not be called. And if GenSec command is not called, its output file, which is also the input file of GenFfs command, will also not exist.So for GenFfs command, I add a new command parameter -oi which means the input file is an optional input file which would not exist. so that I can generate GenFfs command with "-oi" parameter in Makefile. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-04-09BaseTools: Replace BSD License with BSD+Patent LicenseMichael D Kinney1-7/+1
https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-02-14BaseTools/build_rule.template: Remove GCCLDShenglei Zhang1-20/+13
GCCLD will be unused when UNIXGCC, CYGGCC and ELFGCC are removed. https://bugzilla.tianocore.org/show_bug.cgi?id=1377 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-02-14BaseTools: Various typoAntoine Coeur1-2/+2
Various typo in BaseTools. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-12-18BaseTools: Update nasm file build rule to support $(INC)zhijufan1-1/+2
https://bugzilla.tianocore.org/show_bug.cgi?id=1085 Update the build rule to: "$(NASM)" -I${s_path}(+) $(NASM_INC) $(NASM_FLAGS) -o $dst ${d_path}(+)${s_base}.iii Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2018-11-05BaseTools build_rule.template: Update aslc rule for XCODE tool chainLiming Gao1-2/+2
Update aslc rule to rename the temp output file from .efi to .pecoff. This change can avoid the conflict .efi file name in output directory. One is the driver image, another is aslc temp output file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-08-16BaseTools: Update the rule to remove .lib before link it for GCCYonghong Zhu1-1/+2
We met a case on GCC toolchain for increment build. the case is user build Helloworld first, then rename the source file Helloworld.c to Helloworld_new.c and also update the file name to Helloworld_new.c in .inf file's [sources] section. finally, he rebuild it again. It cause build failure due to multiple definition of `UefiMain' because in the .lib file it both have Helloworld.obj and Helloworld_new.obj. current we use the option 'cr' to create the .lib file while the 'r' cmd means replace existing or insert new files into the archive. so in this patch before we create the .lib file, we delete it first. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-07-05BaseTools Conf: Update tools_def and build_rule to remove IPF settingLiming Gao1-40/+0
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-03-19BaseTools/Conf: Add VS2017/ARM64 supportPete Batard1-1/+1
Build options for ARM64 are the same as for ARM, except for /BASE:0 which is removed from DLINK flags to avoid LNK1355 error: invalid base address 0x0; ARM64 image cannot have base address below 4GB Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-02-28BaseTools/tools_def: use separate PP definition for DTCArd Biesheuvel1-1/+1
Clang's preprocessor behaves differently from GCC's, and produces intermediate device tree source that still contains #pragma pack() and other directives that the device tree compiler chokes on. For assembling device tree sources, it matters very little which preprocessor is being used, so let's just use GNU CPP explicitly. 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: Liming Gao <liming.gao@intel.com>
2018-02-07BaseTools/Conf: Add VS2017/ARM supportPete Batard1-1/+30
We duplicate the Assembly-Code-File section from build_rule.template because --convert-hex cannot be used with the MSFT ARM assembler. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-02-06BaseTools/Conf: disable DTC legacy phandle formatArd Biesheuvel1-1/+1
By default, the device tree compiler emits phandle properties twice: once called 'phandle' and again called 'linux,phandle'. Given that Linux was updated in early 2010 [0] to accept the former (which is what is specified in the ePAPR and device tree specifications), there is no point in emitting both when compiling device trees for UEFI platforms. [0] 04b954a673dd02f585a2769c4945a43880faa989 "of/flattree: Make the kernel accept ePAPR style phandle information" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-31BaseTools/Gcc ARM AARCH64: add support for building device tree binariesArd Biesheuvel1-0/+14
While modern AARCH64 server systems use ACPI for describing the platform topology to the OS, ARM systems and AARCH64 outside of the server space mostly use device tree binaries, which are compiled from device tree source files using the device tree compiler. Currently, such source files and binaries may be kept in the EDK2 platform trees, but are not integrated with the build, which means they need to be kept in sync and recompiled manually, which is cumbersome. So let's wire up BaseTools support for them: add tool definitions for the DTC compiler and preprocessor flags that allow these source files to use FixedPcd expressions and other macros defined by AutoGen.h This way, a device tree binary can be built from source and emitted into a FFS file automatically using something like: DeviceTree.inf: [Defines] INF_VERSION = 0x00010019 BASE_NAME = SomePlatformDeviceTree FILE_GUID = 25462CDA-221F-47DF-AC1D-259CFAA4E326 # gDtPlatformDefaultDtbFileGuid MODULE_TYPE = USER_DEFINED VERSION_STRING = 1.0 [Sources] SomePlatform.dts [Packages] MdePkg/MdePkg.dec SomePlatform.fdf: INF RuleOverride = DTB xxx/yyy/DeviceTree.inf [Rule.Common.USER_DEFINED.DTB] FILE FREEFORM = $(NAMED_GUID) { RAW BIN |.dtb } where it can be picked at runtime by the DTB loader that may refer to it using gDtPlatformDefaultDtbFileGuid. Note that this is very similar to how ACPI tables may be emitted into a FFS file with a known GUID and picked up by AcpiTableDxe at runtime. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-29BaseTools: Support /WHOLEARCHIVE option in VS2015 tool chainLiming Gao1-0/+1
https://bugzilla.tianocore.org/show_bug.cgi?id=582 Don't enable this option in the default setting, because it may cause VS2015 linker crash. Platform can enable this option in PlatformPkg.dsc like below: [BuildOptions] *_*_*_DLINK2_FLAGS = /WHOLEARCHIVE Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-09-27BaseTools: support generating image package from BMP/JPEG/PNG filesYonghong Zhu1-0/+21
BaseTools add support to generating image package from BMP/JPEG/PNG files. 1) New file type *.idf Image definition file to describe HII image resource. It is the ASCII text file, and includes one or more "#image IMAGE_ID [TRANSPARENT] ImageFileName". 2) New IMAGE_TOKEN macro is used to refer to IMAGE_ID. 3) New AutoGen header file $(MODULE_NAME)ImgDefs.h to include the generated ImageId definition. 4) New $(MODULE_NAME)Idf.hpk or $(MODULE_NAME)Images are generated as the output binary HII image package. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-12BaseTools ARM AARCH64: pass CC flags to linker for XIP modules as wellArd Biesheuvel1-3/+3
Commit 478f50990a ("BaseTools GCC: add the compiler flags to the linker command line") added the compiler flags to the linker command line, which is required for LTO to function correctly, since it involves code generation at link time. This patch failed to update the build rules for XIP modules on AARCH64, which not only requires the ordinary CC flags but also the XIP CC flags to prevent the LTO backend to, e.g., emit code that does not adhere to the strict alignment rules we impose for code that may execute with the MMU off. So update the XIP link rules as well. Since AARCH64 and ARM are not supported by any toolchains in the GCCLD build rule family, drop the reference to GCCLD while we're at it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-10BaseTools-Conf:Remove short dash in ar flag for LLVMShi, Steven1-1/+1
Both binutils ar and LLVM ar support "cr", but LLVM ar doens't support add "-" in the flags, and llvm-ar cannot accept "-cr". So remove the short dash "-" to make llvm archives work. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-08-09BaseTools ARM: impose strict alignment only for XIP modulesArd Biesheuvel1-2/+2
Given that we only support ARMv7 and up in Tianocore (due to the fact that the PI spec mandates that the PEI services table pointer be stored in the TPIDRURW register, which is not available on earlier CPUs), we can assume that any code executing with the MMU on may perform unaligned accesses (since the AArch32 bindings in the UEFI spec stipulate that unaligned accesses should be allowed if supported by the CPU) So relax the alignment restrictions to XIP modules only, i.e., BASE, SEC, PEI_CORE and PEIM type modules, exactly like we do for AARCH64 already. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-03BaseTools GCC: add the compiler flags to the linker command lineArd Biesheuvel1-1/+1
Now that we invoke GCC as the linker for the GCC toolchain family, we can pass the CC flags to the linker as well. This is only required for LTO (which may involve code generation during the link stage), but does not interfere with non-LTO builds. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-03BaseTools GCC: move -c compiler flag to build rulesArd Biesheuvel1-5/+5
In order to be able to share the compiler flags with the linker (which is required for LTO since it involves the linker doing code generation based on the LTO bytecode), move the -c GCC argument to the build rules, and drop it from the GCC CC_FLAGS definitions in tools_def. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-02BaseTools AARCH64: override XIP module linker alignment to 32 bytesArd Biesheuvel1-0/+15
Now that GenFw converts small code model ADRP instructions to ADR on the fly, we can reduce the alignment for XIP modules, where large alignment values may cause considerable waste of flash space due to excessive padding. This limits the module size to 1 MB, but this is not a concern in practice. So set the XIP section alignment to 0x20 for DEBUG_GCC49, DEBUG_GCC5 and *_CLANG35, all of which use the small code model. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-02BaseTools GCC: use 'gcc' as the linker command for GCC44 and laterArd Biesheuvel1-2/+9
To accommodate upcoming GCCx toolchain versions that require 'gcc' to be used as the linker in order to support LTO, switch GCC44 and later (including CLANG35) to a new DLINK build rule that invokes 'gcc' as the linker instead of 'ld'. Since gcc expects its command line arguments in a different format, and expects arguments that it needs to pass to the linker to be prefixed with '-Wl,', this involves changes to most of the DLINK_FLAGS definitions in tools_def.template, as well as some changes to module .INF files that set their own linker options. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-02BaseTools UNIXGCC ELFGCC CYGGCC: clone GCC build rule family into GCCLDArd Biesheuvel1-14/+14
Before we can make non-backward compatible changes to the GCC build rules regarding the use of the 'gcc' binary as the linker, clone the existing GCC build rules into a 'GCCLD' build rule family, and move the legacy toolchains UNIXGCC, CYGGCC, CYGGCCxASL and ELFGCC over to it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-01-11BaseTools AARCH64: add separate GCC build rule for XIP objectsArd Biesheuvel1-0/+13
This introduces a special .c to .obj build rule for GCC/AARCH64 that takes into account additional compiler flags that have been specified via *_*_*_CC_XIPFLAGS. These will be passed after (and in addition to) the ordinary CC_FLAGS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19637 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-12BaseTools: remove ARMGCC and ARMLINUXGCC toolchainsArd Biesheuvel1-11/+5
The ARMGCC and ARMLINUXGCC toolchains are specific to the ARM and AARCH64 architectures, and overlap with the toolchain configuration that is provided by the GCC44 - GCC49 toolchains, which are defined for all architectures. To reduce the maintenance burden, and make it easier to keep these different architectures aligned, remove the ARMGCC and ARMLINUXGCC toolchains entirely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18212 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-06BaseTools/Trim: Fixed a bug that cannot trim long valuesYingke Liu1-2/+2
The long value substitution must move to the front of HEX substitution, and updated build_rule to add --trim-long Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18170 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-10BaseTools: Append FILE_GUID to BaseName.Yingke Liu1-6/+8
This patch makes sure the EFI file in $(BIN_DIR) is unique. If there are modules with same BaseName, the FILE_GUID is appended. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17608 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-08BaseTools: Update BuildRule for *.nasmbLiming Gao1-2/+3
*.nasmb is place of *.asm16. To keep the same output file, copy the output file with .com postfix. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17580 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-01BaseTools/Conf: Don't support upper case nasm extensionsJordan Justen1-2/+2
For *.asm and *.s, there have been cases of *.Asm and *.S files, but since the nasm extensions are new, we don't need to support the upper case extensions. In other words, remove .Nasm and .NASM. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17544 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-18BaseTools: Modify gcc 4.8 and 4.9 tool chain definition to support building ↵Scott Duplichan1-1/+23
from Windows. Here is a new patch that adds Windows support for both gcc 4.8.x and gcc 4.9.x. This time testing is more thorough: boot testing using Duet for all 4 combinations of IA32/X64 and gcc 4.8.2 and gcc 4.9.1 passes. A Windows hosted gcc 4.8.2 has been added here: http://sourceforge.net/projects/edk2developertoolsforwindows/ The environment variable settings for Windows look like: set UEFI_BUILD_TOOLS=%cd%\tools set NASM_PREFIX=%UEFI_BUILD_TOOLS%\nasm211\ set GCC48_BIN=%UEFI_BUILD_TOOLS%\gcc482-x86\bin\ set GCC48_DLL=%UEFI_BUILD_TOOLS%\gcc482-x86\dll\;%GCC48_BIN% set GCC48_ARM_PREFIX=%UEFI_BUILD_TOOLS%\gcc482-arm\bin\ set GCC48_AARCH64_PREFIX=%UEFI_BUILD_TOOLS%\gcc482-aarch64\bin\ set GCC49_BIN=%UEFI_BUILD_TOOLS%\gcc491-x86\bin\ set GCC49_DLL=%UEFI_BUILD_TOOLS%\gcc491-x86\dll\;%GCC49_BIN% set GCC49_ARM_PREFIX=%UEFI_BUILD_TOOLS%\gcc491-arm\bin\ set GCC49_AARCH64_PREFIX=%UEFI_BUILD_TOOLS%\gcc491-aarch64\bin\ No change is needed for building from Linux. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16400 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01BaseTools build_rule: Add .nasm => .obj build ruleJordan Justen1-0/+15
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16017 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29BaseTools: Cleanup XCODE build rulesAnderw Fish1-2/+2
Update C-Code-File rule since XCODE never needs the SYMRENAME step. Add *.S16 to Mash16-Code-File rule to supoprt 16-bit assmebly with XCODE Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anderw Fish <afish@apple.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15980 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28License header updated to match correct format.Yingke Liu1-1/+1
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15971 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-18BaseTools: Add rules to build NASM source file into a binaryJordan Justen1-0/+16
v2: * Use EDK II tool name of NASMB rather than NASMBIN * Use EDK II extension of .nasmb rather than .nasmbin v3: * Create listing file * Don't change into source directory * Add ENV(NASM_PREFIX) before nasm for NASM_PATH Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15820 6f19259b-4bc3-4df7-8a09-765794883524