diff options
author | Alex Bennée | 2019-03-05 12:40:31 +0100 |
---|---|---|
committer | Alex Bennée | 2019-03-12 18:05:21 +0100 |
commit | a113ec989b74acf6a8eac68bbe41aab141d0235c (patch) | |
tree | 672d32e72dca462ad9710f899ad33ae3bc6fe8b7 /tests/tcg/minilib/Makefile.target | |
parent | tests/tcg: enable cris base user-mode tests (diff) | |
download | qemu-a113ec989b74acf6a8eac68bbe41aab141d0235c.tar.gz qemu-a113ec989b74acf6a8eac68bbe41aab141d0235c.tar.xz qemu-a113ec989b74acf6a8eac68bbe41aab141d0235c.zip |
tests/tcg: provide a minilib for system tests
We will likely want a few common functions to make up for the fact we
don't have a libc and we don't want to feel like we are programming by
banging rocks together.
I've purloined the printf function from:
https://git.virtualopensystems.com/dev/tcg_baremetal_tests
Although I have tweaked the names to avoid confusing GCC about clashing
with builtins.
Cc: Alexander Spyridakis <a.spyridakis@virtualopensystems.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'tests/tcg/minilib/Makefile.target')
-rw-r--r-- | tests/tcg/minilib/Makefile.target | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/tcg/minilib/Makefile.target b/tests/tcg/minilib/Makefile.target new file mode 100644 index 0000000000..3ed8077d0f --- /dev/null +++ b/tests/tcg/minilib/Makefile.target @@ -0,0 +1,21 @@ +# +# System test minilib objects +# +# The system tests are very constrained in terms of the library they +# support but we are not savages. We provide a few helpful routines +# that can be shared with the tests for basic I/O. +# +# They assume each arch has provided a putc function. +# + +SYSTEM_MINILIB_SRC=$(SRC_PATH)/tests/tcg/minilib +MINILIB_SRCS=$(wildcard $(SYSTEM_MINILIB_SRC)/*.c) +MINILIB_OBJS=$(patsubst $(SYSTEM_MINILIB_SRC)/%.c, %.o, $(MINILIB_SRCS)) + +MINILIB_CFLAGS+=-nostdlib -ggdb -O0 +MINILIB_INC=-isystem $(SYSTEM_MINILIB_SRC) + +.PRECIOUS: $(MINILIB_OBJS) + +%.o: $(SYSTEM_MINILIB_SRC)/%.c + $(CC) $(CFLAGS) -c $< -o $@ |