On 2015-12-07 07:03:47, Laszlo Ersek wrote:
> After SVN r17510 ("BaseTools: Add default BuildRuleOrder in
> tools_def.template") and SVN r17544 ("BaseTools/Conf: Don't support upper
> case nasm extensions"), the following suffix priorities were in place:
>
> - For XCODE32, XCLANG, XCODE5: S s nasm
> - Other toolchains: nasm asm Asm ASM S s
>
> When building assembly files with the GCC toolchains, the priority order
> on the second line above was active.
>
> Due to SVN r19143 ("BaseTools: process the files by the priority in
> BUILDRULEORDER"), AutoGen.py now only selects the source file for building
> whose suffix matches BUILDRULEORDER first, regardless of whether the
> toolchain has a utility to build files with that suffix.
>
> This has regressed the build of at least
> "UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf":
>
> [Sources.IA32]
> Ia32/InitializeFpu.asm
> Ia32/InitializeFpu.S
>
> [Sources.X64]
> X64/InitializeFpu.asm
> X64/InitializeFpu.S
>
> In this case, AutoGen.py selects the *.asm files for building:
> - the INF file associates no toolchain families with the source files,
> - there is no assembly file with "nasm" suffix,
> - the "asm" suffix comes before "S" in the priority order (see near the
> top).
>
> Specialize the build rule order for GCC toolchains by removing the "asm"
> suffixes from between "nasm" and "S".
I think this is a bug in the BUILDRULEORDER implementation. It should
still ignore .asm for toolchain families that don't have a build rule
for that extension.
But, in the commit message for r17509 / fe4bf2f9, it says:
"Note that the build_rule.txt file also impacts the decision, because,
for instance there is no build rule for .asm files on GCC
toolchains."
Which sounds like .asm files should be ignored for GCC families.
-Jordan
>
> Cc: Yonghong Zhu <[email protected]>
> Cc: Liming Gao <[email protected]>
> Cc: Jordan Justen <[email protected]>
> Cc: Ard Biesheuvel <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek <[email protected]>
> ---
> BaseTools/Conf/tools_def.template | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/BaseTools/Conf/tools_def.template
> b/BaseTools/Conf/tools_def.template
> index 1a44fbd..e5e89f1 100644
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -4540,6 +4540,7 @@ DEFINE GCC49_AARCH64_ASLDLINK_FLAGS =
> DEF(GCC48_AARCH64_ASLDLINK_FLAGS)
> #
>
> ####################################################################################
> *_GCC44_*_*_FAMILY = GCC
> +*_GCC44_*_*_BUILDRULEORDER = nasm S s
>
> *_GCC44_*_MAKE_PATH = DEF(GCC44_IA32_PREFIX)make
> *_GCC44_*_*_DLL = ENV(GCC44_DLL)
> @@ -4610,6 +4611,7 @@ DEFINE GCC49_AARCH64_ASLDLINK_FLAGS =
> DEF(GCC48_AARCH64_ASLDLINK_FLAGS)
> #
>
> ####################################################################################
> *_GCC45_*_*_FAMILY = GCC
> +*_GCC45_*_*_BUILDRULEORDER = nasm S s
>
> *_GCC45_*_MAKE_PATH = DEF(GCC45_IA32_PREFIX)make
> *_GCC45_*_*_DLL = ENV(GCC45_DLL)
> @@ -4680,6 +4682,7 @@ DEFINE GCC49_AARCH64_ASLDLINK_FLAGS =
> DEF(GCC48_AARCH64_ASLDLINK_FLAGS)
> #
>
> ####################################################################################
> *_GCC46_*_*_FAMILY = GCC
> +*_GCC46_*_*_BUILDRULEORDER = nasm S s
>
> *_GCC46_*_MAKE_PATH = DEF(GCC46_IA32_PREFIX)make
> *_GCC46_*_*_DLL = ENV(GCC46_DLL)
> @@ -4781,6 +4784,7 @@ RELEASE_GCC46_ARM_CC_FLAGS =
> DEF(GCC46_ARM_CC_FLAGS) -D__ARM_FEATURE_UNALI
> #
>
> ####################################################################################
> *_GCC47_*_*_FAMILY = GCC
> +*_GCC47_*_*_BUILDRULEORDER = nasm S s
>
> *_GCC47_*_MAKE_PATH = DEF(GCC47_IA32_PREFIX)make
> *_GCC47_*_*_DLL = ENV(GCC47_DLL)
> @@ -4908,6 +4912,7 @@ RELEASE_GCC47_AARCH64_CC_FLAGS =
> DEF(GCC47_AARCH64_CC_FLAGS) -Wno-unused-but-s
> #
>
> ####################################################################################
> *_GCC48_*_*_FAMILY = GCC
> +*_GCC48_*_*_BUILDRULEORDER = nasm S s
>
> *_GCC48_*_MAKE_PATH = DEF(GCC48_IA32_PREFIX)make
> *_GCC48_*_*_DLL = ENV(GCC48_DLL)
> @@ -5035,6 +5040,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS =
> DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
> #
>
> ####################################################################################
> *_GCC49_*_*_FAMILY = GCC
> +*_GCC49_*_*_BUILDRULEORDER = nasm S s
>
> *_GCC49_*_MAKE_PATH = DEF(GCC49_IA32_PREFIX)make
> *_GCC49_*_*_DLL = ENV(GCC49_DLL)
> --
> 1.8.3.1
>
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel