summaryrefslogtreecommitdiffstats
path: root/BaseTools/Conf/tools_def.template
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-01-05 15:29:39 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-17 14:06:43 +0000
commit096cd41ce734a5959f3afa535bb88c6fb78bd1c7 (patch)
treeadd735b540700919e588a48e1b8cc6597032f401 /BaseTools/Conf/tools_def.template
parentd05739a3ff88457ae3ce90db3e91e9d2a11949c8 (diff)
downloadedk2-096cd41ce734a5959f3afa535bb88c6fb78bd1c7.tar.gz
edk2-096cd41ce734a5959f3afa535bb88c6fb78bd1c7.tar.bz2
edk2-096cd41ce734a5959f3afa535bb88c6fb78bd1c7.zip
BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only
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>
Diffstat (limited to 'BaseTools/Conf/tools_def.template')
-rwxr-xr-xBaseTools/Conf/tools_def.template3
1 files changed, 1 insertions, 2 deletions
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 805e903b23..4733040e3e 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1979,8 +1979,6 @@ DEFINE GCC5_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_ASLDLINK_FLAGS)
DEFINE GCC5_LOONGARCH64_ASM_FLAGS = -x assembler-with-cpp -mabi=lp64d -march=loongarch64 -fno-builtin -c -Wall -mno-explicit-relocs
DEFINE GCC5_LOONGARCH64_PP_FLAGS = -mabi=lp64d -march=loongarch64 DEF(GCC_PP_FLAGS)
-DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h DEF(GCC5_RISCV_OPENSBI_TYPES)
-
####################################################################################
#
# GCC 4.8 - This configuration is used to compile under Linux to produce
@@ -2456,6 +2454,7 @@ RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
*_GCC5_RISCV64_RC_FLAGS = DEF(GCC_RISCV64_RC_FLAGS)
*_GCC5_RISCV64_OBJCOPY_FLAGS =
*_GCC5_RISCV64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
+*_GCC5_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(GCC5_RISCV_OPENSBI_TYPES)
##################
# GCC5 LOONGARCH64 definitions