aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/csmith/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/csmith/Makefile')
-rw-r--r--test/monniaux/csmith/Makefile29
1 files changed, 20 insertions, 9 deletions
diff --git a/test/monniaux/csmith/Makefile b/test/monniaux/csmith/Makefile
index aa4eccab..1412921d 100644
--- a/test/monniaux/csmith/Makefile
+++ b/test/monniaux/csmith/Makefile
@@ -1,9 +1,16 @@
+all:
+
+.SECONDARY:
+
INCLUDES=-I csmith/include/csmith-2.3.0/
TARGET_CCOMP=../../../ccomp
+
+ifndef TARGET_CC
TARGET_CC=gcc
+endif
ifndef EXECUTE
-EXECUTE=timeout 2s
+EXECUTE=timeout 10s
endif
CFLAGS += -Wno-incompatible-pointer-types
@@ -11,12 +18,13 @@ CFLAGS += -Wno-incompatible-pointer-types
ifndef CSMITH
CSMITH=csmith/bin/csmith
endif
+CSMITHOPT=--max-funcs 10 --no-packed-struct
-MAX=300
+MAX=500
PREFIX=ran%06.f
-CCOMPOTS=-static
-CCOMPFLAGS+= -fstruct-passing -fbitfields -fno-cse2 -stdlib ../../../runtime
+# CCOMPOPTS=-Wl,--defsym=USER_STACK_SIZE=0x80000
+CCOMPFLAGS+= -fstruct-passing -fbitfields -fno-cse2 -fno-cse -fno-cse3 -stdlib ../../../runtime
TESTS_C=$(shell seq --format $(PREFIX)/source.c 1 $(MAX))
@@ -69,12 +77,13 @@ ran%/example.gcc.host: ran%/source.gcc.host.o
ran%/source.c:
mkdir -p ran$*
- $(CSMITH) --seed $* --output ran$*/source.c
+ $(CSMITH) $(CSMITHOPT) --seed $* --output ran$*/source.c
-ran%/example.target.cmp : ran%/example.gcc.target.out ran%/example.ccomp.target.out
+ran%/example.target.cmp : ran%/example.ccomp.target.out ran%/example.gcc.target.out
cmp $+ > $@
+ cat $<
-ran%/example.host_target.cmp : ran%/example.gcc.host.out ran%/example.ccomp.target.out
+ran%/example.host_target.cmp : ran%/example.ccomp.target.out ran%/example.gcc.host.out
cmp $+ > $@
.PHONY: all clean tests_c tests_c
@@ -82,7 +91,9 @@ ran%/example.host_target.cmp : ran%/example.gcc.host.out ran%/example.ccomp.targ
clean:
-rm -rf ran*
-csmith/bin/csmith:
- curl -L -o csmith-2.3.0.tar.gz https://embed.cs.utah.edu/csmith/csmith-2.3.0.tar.gz
+csmith-2.3.0.tar.gz:
+ curl -L -o $@ https://embed.cs.utah.edu/csmith/csmith-2.3.0.tar.gz
+
+csmith/bin/csmith: csmith-2.3.0.tar.gz
tar xfz csmith-2.3.0.tar.gz
WD=`pwd` && cd csmith-2.3.0 && ./configure --prefix=$$WD/csmith && make install