summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2024-01-31 14:48:52 -0500
committerJakob Kaivo <jkk@ung.org>2024-01-31 14:48:52 -0500
commite30e935d35c5024a3d27abfda73957f28969584f (patch)
tree51c1a1888db16977ddcf59ab2330b1f333f9be45 /mk
parent78033913abfce71b1bcc075ed188c6b6ec087a13 (diff)
add dedicated undefined behavior handler, simplify most checks
Diffstat (limited to 'mk')
-rw-r--r--mk/__undefined.d8
1 files changed, 8 insertions, 0 deletions
diff --git a/mk/__undefined.d b/mk/__undefined.d
new file mode 100644
index 00000000..dda5ff29
--- /dev/null
+++ b/mk/__undefined.d
@@ -0,0 +1,8 @@
+libc_C.0: libc.a(__undefined.o)
+libc.a(__undefined.o): $(OBJDIR)/__undefined.o
+ @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$%
+
+$(OBJDIR)/__undefined.o: src/__undefined.c
+$(OBJDIR)/__undefined.o:
+ @mkdir -p $(@D)
+ $(CC) -c -o $@ $(CFLAGS) src/__undefined.c