mirror of https://github.com/xemu-project/xemu.git
tests/tcg: compile system emulation tests as freestanding
System emulation tests do not run in a hosted environment, since they do not link with libc. They should only use freestanding headers (float.h, limits.h, stdarg.h, stddef.h, stdbool.h, stdint.h, stdalign.h, stdnoreturn.h) and should be compiled with -ffreestanding in order to use the compiler implementation of those headers rather than the one in libc. Some tests are using inttypes.h instead of stdint.h, so fix that. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e81785abba
commit
bb52a8a278
|
@ -111,6 +111,7 @@ else
|
|||
# For softmmu targets we include a different Makefile fragement as the
|
||||
# build options for bare programs are usually pretty different. They
|
||||
# are expected to provide their own build recipes.
|
||||
EXTRA_CFLAGS += -ffreestanding
|
||||
-include $(SRC_PATH)/tests/tcg/minilib/Makefile.target
|
||||
-include $(SRC_PATH)/tests/tcg/multiarch/system/Makefile.softmmu-target
|
||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <minilib.h>
|
||||
|
||||
int main()
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <minilib.h>
|
||||
|
||||
#define SYS_READC 0x7
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <minilib.h>
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* - sign extension when loading
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <minilib.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue