summaryrefslogtreecommitdiff
path: root/test/stdlib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/stdlib/Makefile')
-rw-r--r--test/stdlib/Makefile31
1 files changed, 29 insertions, 2 deletions
diff --git a/test/stdlib/Makefile b/test/stdlib/Makefile
index e882d8f85..4cd6e5765 100644
--- a/test/stdlib/Makefile
+++ b/test/stdlib/Makefile
@@ -19,8 +19,9 @@ ifndef $(STRIPTOOL)
endif
STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
-TARGETS=testmalloc_source testmalloc testmalloc_glibc
-TARGETS+=teststrtol_source teststrtol teststrtol_glibc teststrtol_diff
+TARGETS=testmalloc testmalloc_glibc
+TARGETS=mallocbug mallocbug_glibc
+TARGETS+=teststrtol teststrtol_glibc teststrtol_diff
all: $(TARGETS)
@@ -57,6 +58,32 @@ testmalloc_glibc: testmalloc.c Makefile $(TOPDIR)libc.a
-./$@
-@ echo " "
+mallocbug: mallocbug.c Makefile $(TOPDIR)libc.a
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs uC-Libc: "
+ -@ echo " "
+ $(CC) -g $(XCFLAGS) -c $< -o $@.o
+ $(CC) -g $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIP)
+ -ldd $@
+ ls $(LSFLAGS) $@
+ -./$@
+ -@ echo " "
+
+mallocbug_glibc: mallocbug.c Makefile $(TOPDIR)libc.a
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs GNU libc: "
+ -@ echo " "
+ $(CC) $(YCFLAGS) -c $< -o $@.o
+ $(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIP)
+ -ldd $@
+ ls $(LSFLAGS) $@
+ -./$@
+ -@ echo " "
+
teststrtol_source:
-@ echo "-------"
-@ echo "teststrtol.c source: "