diff --git a/stmhal/Makefile b/stmhal/Makefile
index 03b00fbd37dfeee50dbf716cf0228167a30b9e6e..f39818eb579216fe2170fa2bcb2dfd332f0edd76 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -76,7 +76,7 @@ COPT += -Os -DNDEBUG
 endif
 
 # uncomment this if you want libgcc
-#LIBS += $(shell $(CC) -print-libgcc-file-name)
+#LIBS += $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
 
 SRC_LIB = $(addprefix lib/,\
 	libc/string0.c \