diff --git a/examples/adc_polled/Makefile b/examples/adc_polled/Makefile
index d2635f68711ac0628f432da3c2ba5d7cb5906c50..ae735e683a7a7507587c7fcd91da3ce9f35088e7 100644
--- a/examples/adc_polled/Makefile
+++ b/examples/adc_polled/Makefile
@@ -9,16 +9,9 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -26,7 +19,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DSTDOUT_UART -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/blink/Makefile b/examples/blink/Makefile
index 903895a7dfe36edc07add43fa87c8924522fc280..4acaf267305e5c2c9e077040e92a05bea9a21b7e 100644
--- a/examples/blink/Makefile
+++ b/examples/blink/Makefile
@@ -9,19 +9,11 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 EVT:=../../ch32v003evt
 
 MINICHLINK:=../../minichlink
-
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CH32V003FUN:=../../ch32v003fun
 
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -29,7 +21,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DTINYVECTOR -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/bootload/Makefile b/examples/bootload/Makefile
index d39497d767c87bed9dd45d735f0758813c72142d..7d681ec3852dcc0169c82839231df5ee5690550e 100644
--- a/examples/bootload/Makefile
+++ b/examples/bootload/Makefile
@@ -9,19 +9,11 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 EVT:=../../ch32v003evt
 
 MINICHLINK:=../../minichlink
-
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CH32V003FUN:=../../ch32v003fun
 
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -29,7 +21,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DCUSTOM_INTERRUPT_VECTOR
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun-bootloader.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun-bootloader.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/debugprintfdemo/Makefile b/examples/debugprintfdemo/Makefile
index 09ebe05f5b8f6cb087cec48beb5f6621f54e0e08..01ae2f3754bfe67d3415ad6486d6bd7b61a83e7a 100644
--- a/examples/debugprintfdemo/Makefile
+++ b/examples/debugprintfdemo/Makefile
@@ -9,16 +9,9 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -26,7 +19,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/external_crystal/Makefile b/examples/external_crystal/Makefile
index 74326f1b80c99f4ed601439deb3c7f84d5aaf9b9..9ee7fc53f6559bc9ac71bf64c542ceed543cbfb0 100644
--- a/examples/external_crystal/Makefile
+++ b/examples/external_crystal/Makefile
@@ -9,19 +9,11 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 EVT:=../../ch32v003evt
 
 MINICHLINK:=../../minichlink
-
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CH32V003FUN:=../../ch32v003fun
 
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -29,7 +21,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DTINYVECTOR -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/i2c_oled/Makefile b/examples/i2c_oled/Makefile
index 2f71bfbeff3fb495afb03f3c1240be0259a52720..da354686c13ef4bf598c161b2b4bbe803b2d99ae 100644
--- a/examples/i2c_oled/Makefile
+++ b/examples/i2c_oled/Makefile
@@ -9,16 +9,9 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -26,7 +19,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DSTDOUT_UART -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/optionbytes/Makefile b/examples/optionbytes/Makefile
index 967b1fb14448928b5b09d24c68d325c5c9a41a31..1c2032c957c8082e16b953675dffbf0e337e62e9 100644
--- a/examples/optionbytes/Makefile
+++ b/examples/optionbytes/Makefile
@@ -9,19 +9,11 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 EVT:=../../ch32v003evt
 
 MINICHLINK:=../../minichlink
-
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CH32V003FUN:=../../ch32v003fun
 
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -29,7 +21,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DTINYVECTOR
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/run_from_ram/Makefile b/examples/run_from_ram/Makefile
index e6c6caa645228db5ff67ff6f952f52b1afa7e4a6..dd492af6c6231e3cfad208770d8bde0b96f96a7c 100644
--- a/examples/run_from_ram/Makefile
+++ b/examples/run_from_ram/Makefile
@@ -9,19 +9,11 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 EVT:=../../ch32v003evt
 
 MINICHLINK:=../../minichlink
-
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CH32V003FUN:=../../ch32v003fun
 
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -29,7 +21,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DTINYVECTOR -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/sandbox/Makefile b/examples/sandbox/Makefile
index b61a370414ec92c0764b3e9bcdd24e1131165686..e45f9822f64a9e7cb5bdcf2b7cff5eea59b4cd7c 100644
--- a/examples/sandbox/Makefile
+++ b/examples/sandbox/Makefile
@@ -9,16 +9,9 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -26,7 +19,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/self_modify_code/Makefile b/examples/self_modify_code/Makefile
index 32004066b8d126730961ae6e3397d4b9493dea21..abafa8a2c73fa7c91248a8beeb393994cec39a59 100644
--- a/examples/self_modify_code/Makefile
+++ b/examples/self_modify_code/Makefile
@@ -9,16 +9,9 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -26,7 +19,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/systick_irq/Makefile b/examples/systick_irq/Makefile
index 7e9ef9e4110c27f0b73b7bc95c713c88c7ac9e09..d8910e1af3c5bb2b1b2190683ccf197d01863650 100644
--- a/examples/systick_irq/Makefile
+++ b/examples/systick_irq/Makefile
@@ -9,16 +9,9 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -26,7 +19,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DSTDOUT_UART -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/tim1_pwm/Makefile b/examples/tim1_pwm/Makefile
index 56fff1135994d77e7e5783f0bddd69bacc93f88b..0aecad001ed074adb358ccef9c4252b83cc0fe11 100644
--- a/examples/tim1_pwm/Makefile
+++ b/examples/tim1_pwm/Makefile
@@ -9,16 +9,9 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -26,7 +19,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DSTDOUT_UART -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
diff --git a/examples/uartdemo/Makefile b/examples/uartdemo/Makefile
index a4e1a7c7a9bb6d22577991e6a6c5c893cd9f9a70..25b0efadffd3d5015fba6059a3a8c7a9437de357 100644
--- a/examples/uartdemo/Makefile
+++ b/examples/uartdemo/Makefile
@@ -9,16 +9,9 @@ GPIO_Toggle:=EXAM/GPIO/GPIO_Toggle/User
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -26,7 +19,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -DSTDOUT_UART -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c
 
@@ -41,7 +34,6 @@ $(TARGET).bin : $(TARGET).elf
 	$(PREFIX)-objcopy -O ihex $< $(TARGET).hex
 
 flash : $(TARGET).bin
-	make -C $(MINICHLINK) all
 	$(MINICHLINK)/minichlink -w $< flash -b
 
 clean :
diff --git a/examples/ws2812bdemo/Makefile b/examples/ws2812bdemo/Makefile
index 8f7bb985e542b0cb45f74454aeaa5dc99964d7fd..c6af022ccd8361416768fe0a4f27e0fa2214cfaf 100644
--- a/examples/ws2812bdemo/Makefile
+++ b/examples/ws2812bdemo/Makefile
@@ -7,16 +7,9 @@ PREFIX:=riscv64-unknown-elf
 CH32V003FUN:=../../ch32v003fun
 MINICHLINK:=../../minichlink
 
-ifeq ($(OS),Windows_NT)
-# On Windows, all the major RISC-V GCC installs are missing the -ec libgcc.
-LIB_GCC=../../misc/libgcc.a
-else
-LIB_GCC=-lgcc
-endif
-
 CFLAGS:= \
 	-g -Os -flto -ffunction-sections \
-	-static-libgcc $(LIB_GCC) \
+	-static-libgcc \
 	-march=rv32ec \
 	-mabi=ilp32e \
 	-I/usr/include/newlib \
@@ -24,7 +17,7 @@ CFLAGS:= \
 	-nostdlib \
 	-I. -Wall
 
-LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections
+LDFLAGS:=-T $(CH32V003FUN)/ch32v003fun.ld -Wl,--gc-sections -L../../misc -lgcc
 
 SYSTEM_C:=$(CH32V003FUN)/ch32v003fun.c