mirror of
https://github.com/qemu/qemu.git
synced 2024-12-02 00:03:35 +08:00
52a96afaa2
add clock_gettime64/clock_settime64 add AT_EXECFN v4: restore syscall.tbl series but remove vsyscall series v3: remove syscall.tbl series v2: guard copy_to_user_timezone() with TARGET_NR_gettimeofday remove "Support futex_time64" patch guard sys_futex with TARGET_NR_exit -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAl503/ESHGxhdXJlbnRA dml2aWVyLmV1AAoJEPMMOL0/L7480UAP/jLzW/ANfq2DN+xdJdTHtmgVvyp/8AGJ WNYqTKcs51qR20Ra6JlALko5/MS4oQsZEMUItIr6idCzruUWBuVUE8sc78XXPoGE qGbNsNlD9dbcBkKFc9HRlZG+bbXeHgwRcmn0trmTIf7jaJ1e/R0XHaYNjhwAp+1e a5uQfuCbtYzZuFvho8ZtWMR8Y2L60rz/zKYLSGovgu6+udQSdTBS/n+WkDnjemkI 5v3ZAjilG88B1FwQrDeZbQbeJrA1j5AihSEziwspICgsR5kGyEx3/UgFe30l7qNE OpUQhhg8rLcI6IWMTJoosYaYYQZvOV96mDYOliXqkfhiKqzUk4H5f56W/Xt1QaEU fq+5SUovpNB1KnmB0WAvitePL6jG+L+w11Yz8lBSgNIOe4SulL6oQh/I/vqpMvHT YONE/bldHCgeIV5mpb8p3r3Xt/8xF21I80G+Ub3wYK848AsyHGJftsZxZSB+BKgw eYQ6rXASAf+kXRf5ctsLgLsVo/1zvc0zJuz6BGXIrs2nZFOqFhudLOwN2Cbuakqj tet5MqKXgRRc4v2cEAFhlh9sF8MsnbWKKZGHwoHTnwe5dxJ1cEEQg95tg906txLV llzLladbwIIblzldi0X5SFFYfnVvOeCM4/JxgCk/IOTzljZY6rTsC6W02jYHBSuX x3BlAFDpJvZg =+8o+ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.0-pull-request' into staging update syscall numbers to linux 5.5 (with scripts) add clock_gettime64/clock_settime64 add AT_EXECFN v4: restore syscall.tbl series but remove vsyscall series v3: remove syscall.tbl series v2: guard copy_to_user_timezone() with TARGET_NR_gettimeofday remove "Support futex_time64" patch guard sys_futex with TARGET_NR_exit # gpg: Signature made Fri 20 Mar 2020 15:23:29 GMT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-5.0-pull-request: (32 commits) linux-user, openrisc: sync syscall numbers with kernel v5.5 linux-user, nios2: sync syscall numbers with kernel v5.5 linux-user, aarch64: sync syscall numbers with kernel v5.5 scripts: add a script to generate syscall_nr.h linux-user,mips: update syscall-args-o32.c.inc linux-user,mips: move content of mips_syscall_args linux-user: update syscall.tbl from linux 0bf999f9c5e7 linux-user, scripts: add a script to update syscall.tbl linux-user, mips64: add syscall table generation support linux-user, mips: add syscall table generation support linux-user, x86_64: add syscall table generation support linux-user, i386: add syscall table generation support linux-user, x86_64, i386: cleanup TARGET_NR_arch_prctl linux-user, sparc, sparc64: add syscall table generation support linux-user, s390x: add syscall table generation support linux-user, s390x: remove syscall definitions for !TARGET_S390X linux-user, ppc: add syscall table generation support linux-user, arm: add syscall table generation support linux-user, microblaze: add syscall table generation support linux-user, sh4: add syscall table generation support ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
277 lines
7.9 KiB
Makefile
277 lines
7.9 KiB
Makefile
# -*- Mode: makefile -*-
|
|
|
|
BUILD_DIR?=$(CURDIR)/..
|
|
|
|
include ../config-host.mak
|
|
include config-target.mak
|
|
include $(SRC_PATH)/rules.mak
|
|
|
|
ifdef CONFIG_SOFTMMU
|
|
include config-devices.mak
|
|
endif
|
|
|
|
$(call set-vpath, $(SRC_PATH):$(BUILD_DIR))
|
|
ifdef CONFIG_LINUX
|
|
QEMU_CFLAGS += -isystem ../linux-headers
|
|
endif
|
|
QEMU_CFLAGS += -iquote .. -iquote $(SRC_PATH)/target/$(TARGET_BASE_ARCH) -DNEED_CPU_H
|
|
|
|
QEMU_CFLAGS+=-iquote $(SRC_PATH)/include
|
|
|
|
ifdef CONFIG_USER_ONLY
|
|
# user emulator name
|
|
QEMU_PROG=qemu-$(TARGET_NAME)
|
|
QEMU_PROG_BUILD = $(QEMU_PROG)
|
|
else
|
|
# system emulator name
|
|
QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF)
|
|
ifneq (,$(findstring -mwindows,$(SDL_LIBS)))
|
|
# Terminate program name with a 'w' because the linker builds a windows executable.
|
|
QEMU_PROGW=qemu-system-$(TARGET_NAME)w$(EXESUF)
|
|
$(QEMU_PROG): $(QEMU_PROGW)
|
|
$(call quiet-command,$(OBJCOPY) --subsystem console $(QEMU_PROGW) $(QEMU_PROG),"GEN","$(TARGET_DIR)$(QEMU_PROG)")
|
|
QEMU_PROG_BUILD = $(QEMU_PROGW)
|
|
else
|
|
QEMU_PROG_BUILD = $(QEMU_PROG)
|
|
endif
|
|
endif
|
|
|
|
PROGS=$(QEMU_PROG) $(QEMU_PROGW)
|
|
STPFILES=
|
|
|
|
config-target.h: config-target.h-timestamp
|
|
config-target.h-timestamp: config-target.mak
|
|
|
|
config-devices.h: config-devices.h-timestamp
|
|
config-devices.h-timestamp: config-devices.mak
|
|
|
|
ifdef CONFIG_TRACE_SYSTEMTAP
|
|
stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace.stp $(QEMU_PROG)-log.stp
|
|
|
|
ifdef CONFIG_USER_ONLY
|
|
TARGET_TYPE=user
|
|
else
|
|
TARGET_TYPE=system
|
|
endif
|
|
|
|
tracetool-y = $(SRC_PATH)/scripts/tracetool.py
|
|
tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
|
|
|
|
$(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all $(tracetool-y)
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
--group=all \
|
|
--format=stap \
|
|
--backends=$(TRACE_BACKENDS) \
|
|
--binary=$(bindir)/$(QEMU_PROG) \
|
|
--target-name=$(TARGET_NAME) \
|
|
--target-type=$(TARGET_TYPE) \
|
|
$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp-installed")
|
|
|
|
$(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
--group=all \
|
|
--format=stap \
|
|
--backends=$(TRACE_BACKENDS) \
|
|
--binary=$(realpath .)/$(QEMU_PROG) \
|
|
--target-name=$(TARGET_NAME) \
|
|
--target-type=$(TARGET_TYPE) \
|
|
$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp")
|
|
|
|
$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
--group=all \
|
|
--format=simpletrace-stap \
|
|
--backends=$(TRACE_BACKENDS) \
|
|
--probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \
|
|
$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-simpletrace.stp")
|
|
|
|
$(QEMU_PROG)-log.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
--group=all \
|
|
--format=log-stap \
|
|
--backends=$(TRACE_BACKENDS) \
|
|
--probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \
|
|
$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-log.stp")
|
|
|
|
else
|
|
stap:
|
|
endif
|
|
.PHONY: stap
|
|
|
|
all: $(PROGS) stap
|
|
|
|
# Dummy command so that make thinks it has done something
|
|
@true
|
|
|
|
obj-y += trace/
|
|
|
|
#########################################################
|
|
# cpu emulator library
|
|
obj-y += exec.o exec-vary.o
|
|
obj-y += accel/
|
|
obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/tcg-op-vec.o tcg/tcg-op-gvec.o
|
|
obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o
|
|
obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
|
|
obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
|
|
obj-$(CONFIG_TCG) += fpu/softfloat.o
|
|
obj-y += target/$(TARGET_BASE_ARCH)/
|
|
obj-y += disas.o
|
|
obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
|
|
LIBS := $(libs_cpu) $(LIBS)
|
|
|
|
obj-$(CONFIG_PLUGIN) += plugins/
|
|
|
|
#########################################################
|
|
# Linux user emulator target
|
|
|
|
ifdef CONFIG_LINUX_USER
|
|
|
|
QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \
|
|
-I$(SRC_PATH)/linux-user/host/$(ARCH) \
|
|
-I$(SRC_PATH)/linux-user \
|
|
-Ilinux-user/$(TARGET_ABI_DIR)
|
|
|
|
obj-y += linux-user/
|
|
obj-y += gdbstub.o thunk.o
|
|
|
|
endif #CONFIG_LINUX_USER
|
|
|
|
#########################################################
|
|
# BSD user emulator target
|
|
|
|
ifdef CONFIG_BSD_USER
|
|
|
|
QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ABI_DIR) \
|
|
-I$(SRC_PATH)/bsd-user/$(HOST_VARIANT_DIR)
|
|
|
|
obj-y += bsd-user/
|
|
obj-y += gdbstub.o
|
|
|
|
endif #CONFIG_BSD_USER
|
|
|
|
#########################################################
|
|
# System emulator target
|
|
ifdef CONFIG_SOFTMMU
|
|
obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o
|
|
obj-y += qtest.o
|
|
obj-y += dump/
|
|
obj-y += hw/
|
|
obj-y += monitor/
|
|
obj-y += qapi/
|
|
obj-y += memory.o
|
|
obj-y += memory_mapping.o
|
|
obj-y += migration/ram.o
|
|
obj-y += softmmu/
|
|
LIBS := $(libs_softmmu) $(LIBS)
|
|
|
|
# Hardware support
|
|
ifeq ($(TARGET_NAME), sparc64)
|
|
obj-y += hw/sparc64/
|
|
else
|
|
obj-y += hw/$(TARGET_BASE_ARCH)/
|
|
endif
|
|
|
|
generated-files-y += hmp-commands.h hmp-commands-info.h
|
|
generated-files-y += config-devices.h
|
|
|
|
endif # CONFIG_SOFTMMU
|
|
|
|
dummy := $(call unnest-vars,,obj-y)
|
|
all-obj-y := $(obj-y)
|
|
|
|
include $(SRC_PATH)/Makefile.objs
|
|
dummy := $(call unnest-vars,.., \
|
|
authz-obj-y \
|
|
block-obj-y \
|
|
block-obj-m \
|
|
chardev-obj-y \
|
|
crypto-obj-y \
|
|
qom-obj-y \
|
|
io-obj-y \
|
|
common-obj-y \
|
|
common-obj-m)
|
|
all-obj-y += $(common-obj-y)
|
|
all-obj-y += $(qom-obj-y)
|
|
all-obj-$(CONFIG_SOFTMMU) += $(authz-obj-y)
|
|
all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y) $(chardev-obj-y)
|
|
all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
|
|
all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
|
|
|
|
ifdef CONFIG_SOFTMMU
|
|
$(QEMU_PROG_BUILD): config-devices.mak
|
|
endif
|
|
|
|
COMMON_LDADDS = ../libqemuutil.a
|
|
|
|
# build either PROG or PROGW
|
|
$(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS) $(softmmu-main-y)
|
|
$(call LINK, $(filter-out %.mak, $^))
|
|
ifdef CONFIG_DARWIN
|
|
$(call quiet-command,Rez -append $(SRC_PATH)/pc-bios/qemu.rsrc -o $@,"REZ","$(TARGET_DIR)$@")
|
|
$(call quiet-command,SetFile -a C $@,"SETFILE","$(TARGET_DIR)$@")
|
|
endif
|
|
|
|
gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
|
|
$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES),"GEN","$(TARGET_DIR)$@")
|
|
|
|
hmp-commands.h: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool
|
|
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$(TARGET_DIR)$@")
|
|
|
|
hmp-commands-info.h: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/hxtool
|
|
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$(TARGET_DIR)$@")
|
|
|
|
clean: clean-target
|
|
rm -f *.a *~ $(PROGS)
|
|
rm -f $(shell find . -name '*.[od]')
|
|
rm -f hmp-commands.h gdbstub-xml.c
|
|
rm -f trace/generated-helpers.c trace/generated-helpers.c-timestamp
|
|
ifdef CONFIG_TRACE_SYSTEMTAP
|
|
rm -f *.stp
|
|
endif
|
|
|
|
ifdef CONFIG_FUZZ
|
|
include $(SRC_PATH)/tests/qtest/fuzz/Makefile.include
|
|
include $(SRC_PATH)/tests/qtest/Makefile.include
|
|
|
|
fuzz: fuzz-vars
|
|
fuzz-vars: QEMU_CFLAGS := $(FUZZ_CFLAGS) $(QEMU_CFLAGS)
|
|
fuzz-vars: QEMU_LDFLAGS := $(FUZZ_LDFLAGS) $(QEMU_LDFLAGS)
|
|
fuzz-vars: $(QEMU_PROG_FUZZ)
|
|
dummy := $(call unnest-vars,, fuzz-obj-y)
|
|
|
|
|
|
$(QEMU_PROG_FUZZ): config-devices.mak $(all-obj-y) $(COMMON_LDADDS) $(fuzz-obj-y)
|
|
$(call LINK, $(filter-out %.mak, $^))
|
|
|
|
endif
|
|
|
|
install: all
|
|
ifneq ($(PROGS),)
|
|
$(call install-prog,$(PROGS),$(DESTDIR)$(bindir))
|
|
endif
|
|
ifdef CONFIG_TRACE_SYSTEMTAP
|
|
$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
|
|
$(INSTALL_DATA) $(QEMU_PROG).stp-installed "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG).stp"
|
|
$(INSTALL_DATA) $(QEMU_PROG)-simpletrace.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-simpletrace.stp"
|
|
$(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp"
|
|
endif
|
|
|
|
generated-files-y += config-target.h
|
|
Makefile: $(generated-files-y)
|
|
|
|
# Reports/Analysis
|
|
#
|
|
# The target specific coverage report only cares about target specific
|
|
# blobs and not the shared code.
|
|
#
|
|
|
|
%/coverage-report.html:
|
|
@mkdir -p $*
|
|
$(call quiet-command,\
|
|
gcovr -r $(SRC_PATH) --object-directory $(CURDIR) \
|
|
-p --html --html-details -o $@, \
|
|
"GEN", "coverage-report.html")
|
|
|
|
.PHONY: coverage-report
|
|
coverage-report: $(CURDIR)/reports/coverage/coverage-report.html
|