From cda428717106b73a505632f3bdd3757f66038350 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 9 Feb 2025 16:06:40 +0100 Subject: [PATCH] Split gcc linker-script-extraction line into several --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c152a45..71ef99e 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,11 @@ $(TARGET).elf: ch32fun.c blink.c | ch32v003.ld ch32fun.h ch32v003hw.h @$(CC) $(CFLAGS) $(LDFLAGS) $(EXTFLAGS) -o $@ $^ ch32v003.ld: ch32fun.ld - @riscv64-linux-gnu-gcc -E -P -x c -DTARGET_MCU=$(TARGET_MCU) -DMCU_PACKAGE= -DTARGET_MCU_LD=0 -DTARGET_MCU_MEMORY_SPLIT= $< > $@ + @$(CC) -E -P -x c $< > $@ \ + -DTARGET_MCU=$(TARGET_MCU) \ + -DMCU_PACKAGE= \ + -DTARGET_MCU_LD=0 \ + -DTARGET_MCU_MEMORY_SPLIT= # Rule to use curl to fetch all files beginning with ch32 ch32%: