aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/csmith/Makefile
diff options
context:
space:
mode:
authorDavid Monniaux <David.Monniaux@univ-grenoble-alpes.fr>2021-09-23 18:32:53 +0200
committerDavid Monniaux <David.Monniaux@univ-grenoble-alpes.fr>2021-09-23 18:32:53 +0200
commit87e3508310e3e312e26f7d69357289a99242e243 (patch)
treef859db7e337dd74ce136509504397a1faf5ed792 /test/monniaux/csmith/Makefile
parent2a0096bc0c6057577f10d6343063d9eca76cbdea (diff)
parente893a80b4e9add0b765416ad9514d31e10131a73 (diff)
downloadcompcert-kvx-87e3508310e3e312e26f7d69357289a99242e243.tar.gz
compcert-kvx-87e3508310e3e312e26f7d69357289a99242e243.zip
Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into csmith
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