From b36267f3d6c52888eba13e89b5e8c47f414661f0 Mon Sep 17 00:00:00 2001 From: nsz Date: Tue, 27 Mar 2012 02:10:58 +0200 Subject: [PATCH] update readme, add dist/config.mak --- README | 21 ++++++++------------- dist/config.mak | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 dist/config.mak diff --git a/README b/README index 2857b53..5fc8bb3 100644 --- a/README +++ b/README @@ -3,13 +3,13 @@ based on the libc-testsuit and libc-bench of dalias see http://git.etalabs.net/cgi-bin/gitweb.cgi build tests: - cp Makefile.conf.def Makefile.conf - # edit Makefile.conf + cp dist/config.mak . + # edit config.mak make run tests: - ./t + make run benchmarks: - ./b + make b framework: @@ -17,10 +17,6 @@ the only hook in the test framework is error(...) which prints a formatted message and sets the test to failed see common/test.h -in the root directory make builds an executable with all tests -in a src/* directory make builds only local tests -see Makefile.inc - a test function looks like void test_foo() { if (foo != 42) @@ -28,7 +24,6 @@ a test function looks like } extern functions with name ~ /^test/ are recognized to be test functions -see Makefile.inc a benchmark function looks like void bench_foo(int N) { @@ -36,8 +31,8 @@ a benchmark function looks like foo(); } benchmark functions are repeatedly called with an increasing -N until the runing time is long enough, then time/N is printed +N until the running time is long enough, then time/N is printed -edit the generated tests.h to exclude certain tests -see common/t.c for tests -see common/b.c for benchmarks +see Makefile.inc for build system details +see common/t.c for test details +see common/b.c for benchmark details diff --git a/dist/config.mak b/dist/config.mak new file mode 100644 index 0000000..8d10693 --- /dev/null +++ b/dist/config.mak @@ -0,0 +1,18 @@ +# copy to ../config.mak and edit + +# to test the native libc with native cc no config is required + +# to test non-native musl with gcc use +#CC = musl-gcc + +# to test non-native musl with installed pcc use +#prefix = /path/to/musl +#includedir = $(prefix)/include +#libdir = $(prefix)/lib +#CC = pcc +#LIBCC = $(shell pcc -v /dev/null 2>&1 |sed -n 's,/crtbegin.o.*,,;s,.* /,/,p') +#CFLAGS += -nostdinc -ffreestanding -fno-stack-protector -isystem $(includedir) +#LDFLAGS += -nostdlib -Wl,-e,_start,-Bstatic $(libdir)/crti.o $(libdir)/crt1.o $(libdir)/crtn.o -L$(libdir) -lc -L$(LIBCC) -l$(CC) + +# required for math tests +CFLAGS += -fno-builtin -ffloat-store -- 2.20.1