commit 5c8293050bf3288cccd5249ee120460a49a43631
parent 98d3c2df3d621e41173a06550316aac4a17c7fb1
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Thu, 30 Apr 2026 19:14:56 +0200
tests/libc: Export LDFLAGS to runtests.sh
Diffstat:
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/libc/execute/Makefile b/tests/libc/execute/Makefile
@@ -4,13 +4,17 @@ PROJECTDIR = ../../..
include $(PROJECTDIR)/scripts/rules.mk
PROJ_CFLAGS = $(CFLAGS)
+PROJ_LDFLAGS = $(LDFLAGS)
CC=$(SCC)
# Uncomment following line to use gcc to test the libc
# CC = $(BINDIR)/gcc-scc
all:
- CC=$(CC) ./runtests.sh libc-tests.lst
+ @CC='$(CC)' \
+ CFLAGS='$(PROJ_CFLAGS)' \
+ LDFLAGS='$(PROJ_CFLAGS)' \
+ ./runtests.sh libc-tests.lst
tests:
@$(MAKE) |\
diff --git a/tests/libc/execute/runtests.sh b/tests/libc/execute/runtests.sh
@@ -15,7 +15,7 @@ do
rm -f *.o $i $tmp1 $tmp2
(echo $i
- $CC $CFLAGS -o $i $i.c
+ $CC $CFLAGS $LDFLAGS -o $i $i.c
echo '/^output:$/+;/^end:$/-'w $tmp1 | ed -s $i.c
$EXEC ./$i >$tmp2 2>&1 &