Makefile: Avoid using built-in stpcpy during clang build
[fio.git] / Makefile
index ef3173737100f78c1a24c2eb0d06872b89b9dca9..f57569d5f66461f85a54a69e53d4f161a2d6fba8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,11 @@ ifdef CONFIG_PDB
   LDFLAGS += -fuse-ld=lld $(LINK_PDBFILE)
 endif
 
+# If clang, do not use builtin stpcpy as it breaks the build
+ifeq ($(CC),clang)
+  FIO_CFLAGS += -fno-builtin-stpcpy
+endif
+
 ifdef CONFIG_GFIO
   PROGS += gfio
 endif