riscv: errata: andes: Makefile: Fix randconfig build issue
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Mon, 25 Sep 2023 15:38:44 +0000 (16:38 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 27 Sep 2023 14:02:48 +0000 (07:02 -0700)
Compile the andes errata with cflags set to " -mcmodel=medany"
when CONFIG_RISCV_ALTERNATIVE_EARLY is enabled.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309111311.8tcq3KVc-lkp@intel.com/
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20230925153844.26820-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/errata/andes/Makefile

index 2d644e1..6278c38 100644 (file)
@@ -1 +1,5 @@
+ifdef CONFIG_RISCV_ALTERNATIVE_EARLY
+CFLAGS_errata.o := -mcmodel=medany
+endif
+
 obj-y += errata.o