Lines Matching +full:arm +full:- +full:softmmu

1 # -*- Mode: makefile -*-
7 # ones we have cross-compilers for or docker images with
8 # cross-compilers.
11 # cross-compilers don't always have a large amount of libraries
17 # CC - the C compiler command
18 # EXTRA_CFLAGS - any extra CFLAGS
19 # BUILD_STATIC - are we building static binaries
23 # cross-compiler can only build dynamic libraries the user might need
29 # We also expect to be in the tests build dir for the FOO-(linux-user|softmmu).
33 -include ../config-host.mak
34 -include config-target.mak
36 # Get semihosting definitions for user-mode emulation
37 ifeq ($(filter %-softmmu, $(TARGET)),)
38 -include $(SRC_PATH)/configs/targets/$(TARGET).mak
47 quiet-@ = $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(strip $2)" && ))
48 quiet-command = $(call quiet-@,$2,$3)$1
50 cc-test = $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1
51 cc-option = if $(call cc-test, $1); then \
56 ifeq ($(filter %-softmmu, $(TARGET)),)
57 run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2 > $1.out, \
60 run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2, \
67 diff-out = $(call quiet-command, diff -q $1.out $2 || \
68 (diff -u $1.out $2 | head -n 10 && false), \
72 skip-test = @printf " SKIPPED %s on $(TARGET_NAME) because %s\n" $1 $2
77 conditional-diff-out = \
79 $(call diff-out,$1,$2), \
80 $(call skip-test,"$1 check","no reference"))
85 # additional tests which may re-use existing binaries
101 ifeq ($(filter %-softmmu, $(TARGET)),)
104 # sub-targets (e.g. ARM & AArch64) then it is up to
109 -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target
111 -include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
112 -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target
116 CFLAGS+=-Wall -Werror -O0 -g -fno-strict-aliasing
118 LDFLAGS+=-static
122 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
124 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack $< -o $@ $(LDFLAGS)
129 EXTRA_CFLAGS += -ffreestanding -fno-stack-protector
130 -include $(SRC_PATH)/tests/tcg/minilib/Makefile.target
131 -include $(SRC_PATH)/tests/tcg/multiarch/system/Makefile.softmmu-target
132 -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target
147 RUN_TESTS=$(patsubst %,run-%, $(TESTS))
156 # We need to ensure expand the run-plugin-TEST-with-PLUGIN
157 # pre-requistes manually here as we can't use stems to handle it. We
160 # add some special helpers the run-plugin- rules can use below.
166 $(eval run-plugin-$(t)-with-$(p): $t $p) \
167 $(eval RUN_TESTS+=run-plugin-$(t)-with-$(p))))
171 strip-plugin = $(wordlist 1, 1, $(subst -with-, ,$1))
172 extract-plugin = $(wordlist 2, 2, $(subst -with-, ,$1))
177 # exercise things. We can define them on a per-test basis here.
178 run-plugin-%-with-libmem.so: PLUGIN_ARGS=$(COMMA)inline=true
180 ifeq ($(filter %-softmmu, $(TARGET)),)
181 run-%: %
182 $(call run-test, $<, env QEMU=$(QEMU) $(QEMU) $(QEMU_OPTS) $<)
184 run-plugin-%:
185 $(call run-test, $@, env QEMU=$(QEMU) $(QEMU) $(QEMU_OPTS) \
186 -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \
187 -d plugin -D $*.pout \
188 $(call strip-plugin,$<))
190 $(call quiet-command, $(CHECK_PLUGIN_OUTPUT_COMMAND) $*.pout, \
191 TEST, check plugin $(call extract-plugin,$@) output \
192 with $(call strip-plugin,$<)))
194 run-%: %
195 $(call run-test, $<, \
196 $(QEMU) -monitor none -display none \
197 -chardev file$(COMMA)path=$<.out$(COMMA)id=output \
200 run-plugin-%:
201 $(call run-test, $@, \
202 $(QEMU) -monitor none -display none \
203 -chardev file$(COMMA)path=$@.out$(COMMA)id=output \
204 -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \
205 -d plugin -D $*.pout \
206 $(QEMU_OPTS) $(call strip-plugin,$<))
208 $(call quiet-command, $(CHECK_PLUGIN_OUTPUT_COMMAND) $*.pout, \
209 TEST, check plugin $(call extract-plugin,$@) output \
210 with $(call strip-plugin,$<)))
213 gdb-%: %
214 gdb --args $(QEMU) $(QEMU_OPTS) $<
220 rm -f $(TESTS) *.o $(CLEANFILES)
223 rm -f config-cc.mak config-target.mak ../config-$(TARGET).mak