From patchwork Fri Aug 21 10:20:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8A4FC433E1 for ; Fri, 21 Aug 2020 10:25:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83CE620732 for ; Fri, 21 Aug 2020 10:25:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fzYEivJz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83CE620732 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94EF-0002UZ-Hc for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:24:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94D6-0000ZJ-4U for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:48 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:29100 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94D1-0001Qb-RX for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EMlbhp5fTK8J6EyIxi+TH4Gxywk6oqtzcXV/xxOWG0c=; b=fzYEivJzdIEqIDnPQwrOvkLbF7zb5bfuykEUS7cUjw+erHk5ymp3ZHfsogViuiTLkeoIz/ RYJqtOAebrElzlW0H3WSRpeJjoMU6nMYVltIUnN5Fk2wgD2T07I4mNddGM6/GL7QQnLSbn +TLOIn9p117PF/DjelBwW0cGE0YCh0w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-mS45LNvUMf-25x-9C4p1mg-1; Fri, 21 Aug 2020 06:23:37 -0400 X-MC-Unique: mS45LNvUMf-25x-9C4p1mg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2336C873073 for ; Fri, 21 Aug 2020 10:23:37 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5DFE19C78; Fri, 21 Aug 2020 10:23:30 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 002/152] optionrom: simplify Makefile Date: Fri, 21 Aug 2020 06:20:59 -0400 Message-Id: <20200821102329.29777-3-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Make it independent from the rules.mak, and clean up to use pattern rules. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- pc-bios/optionrom/Makefile | 67 +++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index e33a24da0d..51cb6ca9d8 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -1,13 +1,16 @@ -all: build-all +CURRENT_MAKEFILE := $(realpath $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) +SRC_DIR := $(dir $(CURRENT_MAKEFILE)) +TOPSRC_DIR := $(SRC_DIR)/../.. +VPATH = $(SRC_DIR) + +all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin # Dummy command so that make thinks it has done something @true include ../../config-host.mak -include $(SRC_PATH)/rules.mak - -$(call set-vpath, $(SRC_PATH)/pc-bios/optionrom) -.PHONY : all clean build-all +quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) +cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2) # Compiling with no optimization creates ROMs that are too large ifeq ($(lastword $(filter -O%, -O0 $(CFLAGS))),-O0) @@ -15,48 +18,60 @@ override CFLAGS += -O2 endif override CFLAGS += -march=i486 -# Drop -fstack-protector and the like -QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) $(CFLAGS_NOPIE) -ffreestanding -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -m16) -ifeq ($(filter -m16, $(QEMU_CFLAGS)),) +# Flags for dependency generation +override CPPFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d + +override CFLAGS += $(filter -W%, $(QEMU_CFLAGS)) +override CFLAGS += $(CFLAGS_NOPIE) -ffreestanding -I$(TOPSRC_DIR)/include +override CFLAGS += $(call cc-option, -fno-stack-protector) +override CFLAGS += $(call cc-option, -m16) + +ifeq ($(filter -m16, $(CFLAGS)),) # Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??) # On GCC we add -fno-toplevel-reorder to keep the order of asm blocks with # respect to the rest of the code. clang does not have -fno-toplevel-reorder, # but it places all asm blocks at the beginning and we're relying on it for # the option ROM header. So just force clang not to use the integrated # assembler, which doesn't support .code16gcc. -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-toplevel-reorder) -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -no-integrated-as) -QEMU_CFLAGS += -m32 -include $(SRC_PATH)/pc-bios/optionrom/code16gcc.h +override CFLAGS += $(call cc-option, -fno-toplevel-reorder) +override CFLAGS += $(call cc-option, -no-integrated-as) +override CFLAGS += -m32 -include $(SRC_DIR)/code16gcc.h endif -QEMU_INCLUDES += -I$(SRC_PATH) - Wa = -Wa, -ASFLAGS += -32 -QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32) +override ASFLAGS += -32 +override CFLAGS += $(call cc-option, $(Wa)-32) -build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin -# suppress auto-removal of intermediate files -.SECONDARY: +LD_I386_EMULATION ?= elf_i386 +override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds +override LDFLAGS += $(LDFLAGS_NOPIE) +all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin + +pvh.img: pvh.o pvh_main.o %.o: %.S - $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@") + $(call quiet-command,$(CPP) $(CPPFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$@") -pvh.img: pvh.o pvh_main.o - $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $^,"BUILD","$(TARGET_DIR)$@") +%.o: %.c + $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@,"CC","$@") %.img: %.o - $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@") + $(call quiet-command,$(LD) $(LDFLAGS) -s -o $@ $^,"BUILD","$@") %.raw: %.img - $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"BUILD","$(TARGET_DIR)$@") + $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"BUILD","$@") %.bin: %.raw - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/signrom.py $< $@,"SIGN","$(TARGET_DIR)$@") + $(call quiet-command,$(PYTHON) $(TOPSRC_DIR)/scripts/signrom.py $< $@,"SIGN","$@") + +include $(wildcard *.d) clean: rm -f *.o *.d *.raw *.img *.bin *~ + +# suppress auto-removal of intermediate files +.SECONDARY: + +.PHONY: all clean From patchwork Fri Aug 21 10:21:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37D8FC433DF for ; Fri, 21 Aug 2020 10:34:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB79A204EA for ; Fri, 21 Aug 2020 10:34:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PcfQiF8m" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB79A204EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94NC-00044T-3I for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:34:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94D7-0000cS-Dn for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:49 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:54627 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94D1-0001QX-Eh for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wrH4oLDMfp8u5znftCFCDiyZ0RKXJ1kiD6I+ERshom8=; b=PcfQiF8mKLGDiRwBrAPgfQa2oEOC9boxO9kQ75orj3FQM5LI8/A6O3OqiJAbdUWY+J0Eud xGcOjqeoMfeiR7d1NspmyfKfqGRMokVBTvTmrouq86kcKUWaW9+rn4EP2/hJmhNyYobyxa stzkSSKuy8V+lcg3e/HOit6pkAsYEpE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-428-y67ix2MtNpuUIqF_j_QicA-1; Fri, 21 Aug 2020 06:23:39 -0400 X-MC-Unique: y67ix2MtNpuUIqF_j_QicA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2AE1A1DE0D for ; Fri, 21 Aug 2020 10:23:38 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA79F19C78 for ; Fri, 21 Aug 2020 10:23:37 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 005/152] meson: rename included C source files to .c.inc Date: Fri, 21 Aug 2020 06:21:02 -0400 Message-Id: <20200821102329.29777-6-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" With Makefiles that have automatically generated dependencies, you generated includes are set as dependencies of the Makefile, so that they are built before everything else and they are available when first building the .c files. Alternatively you can use a fine-grained dependency, e.g. target/arm/translate.o: target/arm/decode-neon-shared.inc.c With Meson you have only one choice and it is a third option, namely "build at the beginning of the corresponding target"; the way you express it is to list the includes in the sources of that target. The problem is that Meson decides if something is a source vs. a generated include by looking at the extension: '.c', '.cc', '.m', '.C' are sources, while everything else is considered an include---including '.inc.c'. Use '.c.inc' to avoid this, as it is consistent with our other convention of using '.rst.inc' for included reStructuredText files. The editorconfig file is adjusted. Signed-off-by: Paolo Bonzini --- .editorconfig | 3 +- .gitignore | 4 +- Makefile | 36 ++++++++--------- ...tomic_common.inc.c => atomic_common.c.inc} | 0 accel/tcg/cputlb.c | 2 +- accel/tcg/user-exec.c | 2 +- contrib/gitdm/filetypes.txt | 2 +- exec.c | 4 +- ...alize.inc.c => softfloat-specialize.c.inc} | 0 fpu/softfloat.c | 2 +- include/tcg/tcg.h | 2 +- memory_ldst.inc.c => memory_ldst.c.inc | 0 scripts/clean-includes | 2 +- target/arm/Makefile.objs | 40 +++++++++---------- ...nslate-neon.inc.c => translate-neon.c.inc} | 6 +-- target/arm/translate-sve.c | 2 +- ...ranslate-vfp.inc.c => translate-vfp.c.inc} | 4 +- target/arm/translate.c | 12 +++--- target/avr/Makefile.objs | 4 +- target/avr/disas.c | 2 +- target/avr/translate.c | 2 +- target/cris/translate.c | 2 +- ...ranslate_v10.inc.c => translate_v10.c.inc} | 0 target/hppa/Makefile.objs | 4 +- target/hppa/translate.c | 2 +- target/mips/translate.c | 2 +- ...nslate_init.inc.c => translate_init.c.inc} | 0 target/openrisc/Makefile.objs | 6 +-- target/openrisc/disas.c | 2 +- target/openrisc/translate.c | 2 +- target/ppc/int_helper.c | 2 +- .../{mfrom_table.inc.c => mfrom_table.c.inc} | 0 target/ppc/translate.c | 22 +++++----- .../{dfp-impl.inc.c => dfp-impl.c.inc} | 0 .../{dfp-ops.inc.c => dfp-ops.c.inc} | 0 .../{fp-impl.inc.c => fp-impl.c.inc} | 0 .../translate/{fp-ops.inc.c => fp-ops.c.inc} | 0 .../{spe-impl.inc.c => spe-impl.c.inc} | 0 .../{spe-ops.inc.c => spe-ops.c.inc} | 0 .../{vmx-impl.inc.c => vmx-impl.c.inc} | 0 .../{vmx-ops.inc.c => vmx-ops.c.inc} | 0 .../{vsx-impl.inc.c => vsx-impl.c.inc} | 0 .../{vsx-ops.inc.c => vsx-ops.c.inc} | 0 ...nslate_init.inc.c => translate_init.c.inc} | 0 target/riscv/Makefile.objs | 8 ++-- ...rivileged.inc.c => trans_privileged.c.inc} | 0 .../{trans_rva.inc.c => trans_rva.c.inc} | 0 .../{trans_rvd.inc.c => trans_rvd.c.inc} | 0 .../{trans_rvf.inc.c => trans_rvf.c.inc} | 0 .../{trans_rvh.inc.c => trans_rvh.c.inc} | 0 .../{trans_rvi.inc.c => trans_rvi.c.inc} | 0 .../{trans_rvm.inc.c => trans_rvm.c.inc} | 0 .../{trans_rvv.inc.c => trans_rvv.c.inc} | 0 target/riscv/translate.c | 20 +++++----- target/rx/Makefile.objs | 6 +-- target/rx/disas.c | 2 +- target/rx/translate.c | 2 +- target/s390x/translate.c | 2 +- ...{translate_vx.inc.c => translate_vx.c.inc} | 0 target/xtensa/core-dc232b.c | 4 +- .../{gdb-config.inc.c => gdb-config.c.inc} | 0 ...nsa-modules.inc.c => xtensa-modules.c.inc} | 0 target/xtensa/core-dc233c.c | 4 +- .../{gdb-config.inc.c => gdb-config.c.inc} | 0 ...nsa-modules.inc.c => xtensa-modules.c.inc} | 0 target/xtensa/core-de212.c | 4 +- .../{gdb-config.inc.c => gdb-config.c.inc} | 0 ...nsa-modules.inc.c => xtensa-modules.c.inc} | 0 target/xtensa/core-fsf.c | 2 +- ...nsa-modules.inc.c => xtensa-modules.c.inc} | 0 target/xtensa/core-sample_controller.c | 4 +- .../{gdb-config.inc.c => gdb-config.c.inc} | 0 ...nsa-modules.inc.c => xtensa-modules.c.inc} | 0 target/xtensa/core-test_kc705_be.c | 4 +- .../{gdb-config.inc.c => gdb-config.c.inc} | 0 ...nsa-modules.inc.c => xtensa-modules.c.inc} | 0 target/xtensa/core-test_mmuhifi_c3.c | 4 +- .../{gdb-config.inc.c => gdb-config.c.inc} | 0 ...nsa-modules.inc.c => xtensa-modules.c.inc} | 0 target/xtensa/import_core.sh | 8 ++-- tcg/README | 2 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 4 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 4 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 4 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 2 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 4 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 4 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 4 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 2 +- tcg/{tcg-ldst.inc.c => tcg-ldst.c.inc} | 0 tcg/{tcg-pool.inc.c => tcg-pool.c.inc} | 2 +- tcg/tcg.c | 6 +-- tcg/tci/README | 4 +- .../{tcg-target.inc.c => tcg-target.c.inc} | 0 tests/fp/fp-test.c | 2 +- tests/fp/{wrap.inc.c => wrap.c.inc} | 0 ui/input-keymap.c | 34 ++++++++-------- ui/vnc-enc-zrle.c | 22 +++++----- ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.c.inc} | 0 99 files changed, 175 insertions(+), 174 deletions(-) rename accel/tcg/{atomic_common.inc.c => atomic_common.c.inc} (100%) rename fpu/{softfloat-specialize.inc.c => softfloat-specialize.c.inc} (100%) rename memory_ldst.inc.c => memory_ldst.c.inc (100%) rename target/arm/{translate-neon.inc.c => translate-neon.c.inc} (99%) rename target/arm/{translate-vfp.inc.c => translate-vfp.c.inc} (99%) rename target/cris/{translate_v10.inc.c => translate_v10.c.inc} (100%) rename target/mips/{translate_init.inc.c => translate_init.c.inc} (100%) rename target/ppc/{mfrom_table.inc.c => mfrom_table.c.inc} (100%) rename target/ppc/translate/{dfp-impl.inc.c => dfp-impl.c.inc} (100%) rename target/ppc/translate/{dfp-ops.inc.c => dfp-ops.c.inc} (100%) rename target/ppc/translate/{fp-impl.inc.c => fp-impl.c.inc} (100%) rename target/ppc/translate/{fp-ops.inc.c => fp-ops.c.inc} (100%) rename target/ppc/translate/{spe-impl.inc.c => spe-impl.c.inc} (100%) rename target/ppc/translate/{spe-ops.inc.c => spe-ops.c.inc} (100%) rename target/ppc/translate/{vmx-impl.inc.c => vmx-impl.c.inc} (100%) rename target/ppc/translate/{vmx-ops.inc.c => vmx-ops.c.inc} (100%) rename target/ppc/translate/{vsx-impl.inc.c => vsx-impl.c.inc} (100%) rename target/ppc/translate/{vsx-ops.inc.c => vsx-ops.c.inc} (100%) rename target/ppc/{translate_init.inc.c => translate_init.c.inc} (100%) rename target/riscv/insn_trans/{trans_privileged.inc.c => trans_privileged.c.inc} (100%) rename target/riscv/insn_trans/{trans_rva.inc.c => trans_rva.c.inc} (100%) rename target/riscv/insn_trans/{trans_rvd.inc.c => trans_rvd.c.inc} (100%) rename target/riscv/insn_trans/{trans_rvf.inc.c => trans_rvf.c.inc} (100%) rename target/riscv/insn_trans/{trans_rvh.inc.c => trans_rvh.c.inc} (100%) rename target/riscv/insn_trans/{trans_rvi.inc.c => trans_rvi.c.inc} (100%) rename target/riscv/insn_trans/{trans_rvm.inc.c => trans_rvm.c.inc} (100%) rename target/riscv/insn_trans/{trans_rvv.inc.c => trans_rvv.c.inc} (100%) rename target/s390x/{translate_vx.inc.c => translate_vx.c.inc} (100%) rename target/xtensa/core-dc232b/{gdb-config.inc.c => gdb-config.c.inc} (100%) rename target/xtensa/core-dc232b/{xtensa-modules.inc.c => xtensa-modules.c.inc} (100%) rename target/xtensa/core-dc233c/{gdb-config.inc.c => gdb-config.c.inc} (100%) rename target/xtensa/core-dc233c/{xtensa-modules.inc.c => xtensa-modules.c.inc} (100%) rename target/xtensa/core-de212/{gdb-config.inc.c => gdb-config.c.inc} (100%) rename target/xtensa/core-de212/{xtensa-modules.inc.c => xtensa-modules.c.inc} (100%) rename target/xtensa/core-fsf/{xtensa-modules.inc.c => xtensa-modules.c.inc} (100%) rename target/xtensa/core-sample_controller/{gdb-config.inc.c => gdb-config.c.inc} (100%) rename target/xtensa/core-sample_controller/{xtensa-modules.inc.c => xtensa-modules.c.inc} (100%) rename target/xtensa/core-test_kc705_be/{gdb-config.inc.c => gdb-config.c.inc} (100%) rename target/xtensa/core-test_kc705_be/{xtensa-modules.inc.c => xtensa-modules.c.inc} (100%) rename target/xtensa/core-test_mmuhifi_c3/{gdb-config.inc.c => gdb-config.c.inc} (100%) rename target/xtensa/core-test_mmuhifi_c3/{xtensa-modules.inc.c => xtensa-modules.c.inc} (100%) rename tcg/aarch64/{tcg-target.inc.c => tcg-target.c.inc} (99%) rename tcg/arm/{tcg-target.inc.c => tcg-target.c.inc} (99%) rename tcg/i386/{tcg-target.inc.c => tcg-target.c.inc} (99%) rename tcg/mips/{tcg-target.inc.c => tcg-target.c.inc} (99%) rename tcg/ppc/{tcg-target.inc.c => tcg-target.c.inc} (99%) rename tcg/riscv/{tcg-target.inc.c => tcg-target.c.inc} (99%) rename tcg/s390/{tcg-target.inc.c => tcg-target.c.inc} (99%) rename tcg/sparc/{tcg-target.inc.c => tcg-target.c.inc} (99%) rename tcg/{tcg-ldst.inc.c => tcg-ldst.c.inc} (100%) rename tcg/{tcg-pool.inc.c => tcg-pool.c.inc} (99%) rename tcg/tci/{tcg-target.inc.c => tcg-target.c.inc} (100%) rename tests/fp/{wrap.inc.c => wrap.c.inc} (100%) rename ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.c.inc} (100%) diff --git a/.editorconfig b/.editorconfig index a001f340bd..22681d91c6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,9 +22,10 @@ indent_style = tab indent_size = 8 file_type_emacs = makefile -[*.{c,h}] +[*.{c,h,c.inc,h.inc}] indent_style = space indent_size = 4 +file_type_emacs = c [*.sh] indent_style = space diff --git a/.gitignore b/.gitignore index 656e39050b..f8b3cd6fd5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ /ui/shader/texture-blit-frag.h /ui/shader/texture-blit-vert.h /ui/shader/texture-blit-flip-vert.h -/ui/input-keymap-*.c +/ui/input-keymap-*.c.inc *-timestamp /*-softmmu /*-darwin-user @@ -161,4 +161,4 @@ trace-dtrace-root.h trace-dtrace-root.dtrace trace-ust-all.h trace-ust-all.c -/target/arm/decode-sve.inc.c +/target/arm/decode-sve.c.inc diff --git a/Makefile b/Makefile index 00cadebf99..5596482dbd 100644 --- a/Makefile +++ b/Makefile @@ -289,28 +289,28 @@ KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv KEYCODEMAP_FILES = \ - ui/input-keymap-atset1-to-qcode.c \ - ui/input-keymap-linux-to-qcode.c \ - ui/input-keymap-qcode-to-atset1.c \ - ui/input-keymap-qcode-to-atset2.c \ - ui/input-keymap-qcode-to-atset3.c \ - ui/input-keymap-qcode-to-linux.c \ - ui/input-keymap-qcode-to-qnum.c \ - ui/input-keymap-qcode-to-sun.c \ - ui/input-keymap-qnum-to-qcode.c \ - ui/input-keymap-usb-to-qcode.c \ - ui/input-keymap-win32-to-qcode.c \ - ui/input-keymap-x11-to-qcode.c \ - ui/input-keymap-xorgevdev-to-qcode.c \ - ui/input-keymap-xorgkbd-to-qcode.c \ - ui/input-keymap-xorgxquartz-to-qcode.c \ - ui/input-keymap-xorgxwin-to-qcode.c \ - ui/input-keymap-osx-to-qcode.c \ + ui/input-keymap-atset1-to-qcode.c.inc \ + ui/input-keymap-linux-to-qcode.c.inc \ + ui/input-keymap-qcode-to-atset1.c.inc \ + ui/input-keymap-qcode-to-atset2.c.inc \ + ui/input-keymap-qcode-to-atset3.c.inc \ + ui/input-keymap-qcode-to-linux.c.inc \ + ui/input-keymap-qcode-to-qnum.c.inc \ + ui/input-keymap-qcode-to-sun.c.inc \ + ui/input-keymap-qnum-to-qcode.c.inc \ + ui/input-keymap-usb-to-qcode.c.inc \ + ui/input-keymap-win32-to-qcode.c.inc \ + ui/input-keymap-x11-to-qcode.c.inc \ + ui/input-keymap-xorgevdev-to-qcode.c.inc \ + ui/input-keymap-xorgkbd-to-qcode.c.inc \ + ui/input-keymap-xorgxquartz-to-qcode.c.inc \ + ui/input-keymap-xorgxwin-to-qcode.c.inc \ + ui/input-keymap-osx-to-qcode.c.inc \ $(NULL) generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES) -ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs +ui/input-keymap-%.c.inc: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs $(call quiet-command,\ stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \ test -e $(KEYCODEMAP_GEN) && \ diff --git a/accel/tcg/atomic_common.inc.c b/accel/tcg/atomic_common.c.inc similarity index 100% rename from accel/tcg/atomic_common.inc.c rename to accel/tcg/atomic_common.c.inc diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 5349ee6b0e..2d48281942 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2354,7 +2354,7 @@ void cpu_stq_le_data(CPUArchState *env, target_ulong ptr, uint64_t val) #define ATOMIC_MMU_CLEANUP #define ATOMIC_MMU_IDX get_mmuidx(oi) -#include "atomic_common.inc.c" +#include "atomic_common.c.inc" #define DATA_SIZE 1 #include "atomic_template.h" diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 1d34c57ff5..bb039eb32d 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1189,7 +1189,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr, #define ATOMIC_NAME(X) HELPER(glue(glue(atomic_ ## X, SUFFIX), END)) #define EXTRA_ARGS -#include "atomic_common.inc.c" +#include "atomic_common.c.inc" #define DATA_SIZE 1 #include "atomic_template.h" diff --git a/contrib/gitdm/filetypes.txt b/contrib/gitdm/filetypes.txt index 2d5002fea0..9e9c505205 100644 --- a/contrib/gitdm/filetypes.txt +++ b/contrib/gitdm/filetypes.txt @@ -42,7 +42,7 @@ order build,interface,tests,code,documentation,devel-doc,blobs # (most common languages first # filetype code \.c$ # C -filetype code \.inc.c$ # C +filetype code \.c.inc$ # C filetype code \.C$ # C++ filetype code \.cpp$ # C++ filetype code \.c\+\+$ # C++ diff --git a/exec.c b/exec.c index 8047bf2ff9..7683afb6a8 100644 --- a/exec.c +++ b/exec.c @@ -3659,7 +3659,7 @@ void cpu_physical_memory_unmap(void *buffer, hwaddr len, #define TRANSLATE(...) address_space_translate(as, __VA_ARGS__) #define RCU_READ_LOCK(...) rcu_read_lock() #define RCU_READ_UNLOCK(...) rcu_read_unlock() -#include "memory_ldst.inc.c" +#include "memory_ldst.c.inc" int64_t address_space_cache_init(MemoryRegionCache *cache, AddressSpace *as, @@ -3795,7 +3795,7 @@ address_space_write_cached_slow(MemoryRegionCache *cache, hwaddr addr, #define TRANSLATE(...) address_space_translate_cached(cache, __VA_ARGS__) #define RCU_READ_LOCK() ((void)0) #define RCU_READ_UNLOCK() ((void)0) -#include "memory_ldst.inc.c" +#include "memory_ldst.c.inc" /* virtual memory access for debug (includes writing to ROM) */ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, diff --git a/fpu/softfloat-specialize.inc.c b/fpu/softfloat-specialize.c.inc similarity index 100% rename from fpu/softfloat-specialize.inc.c rename to fpu/softfloat-specialize.c.inc diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 79be4f5840..5dce791eb6 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -621,7 +621,7 @@ static inline float64 float64_pack_raw(FloatParts p) | are propagated from function inputs to output. These details are target- | specific. *----------------------------------------------------------------------------*/ -#include "softfloat-specialize.inc.c" +#include "softfloat-specialize.c.inc" /* Canonicalize EXP and FRAC, setting CLS. */ static FloatParts sf_canonicalize(FloatParts part, const FloatFmt *parm, diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index e63450a893..d40c925d04 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -636,7 +636,7 @@ struct TCGContext { /* Track which vCPU triggers events */ CPUState *cpu; /* *_trans */ - /* These structures are private to tcg-target.inc.c. */ + /* These structures are private to tcg-target.c.inc. */ #ifdef TCG_TARGET_NEED_LDST_LABELS QSIMPLEQ_HEAD(, TCGLabelQemuLdst) ldst_labels; #endif diff --git a/memory_ldst.inc.c b/memory_ldst.c.inc similarity index 100% rename from memory_ldst.inc.c rename to memory_ldst.c.inc diff --git a/scripts/clean-includes b/scripts/clean-includes index 795b3bea31..aaa7d4ceb3 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -113,7 +113,7 @@ EOT for f in "$@"; do case "$f" in - *.inc.c) + *.c.inc) # These aren't standalone C source files echo "SKIPPING $f (not a standalone source file)" continue diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs index fa39fd7c83..317eed993f 100644 --- a/target/arm/Makefile.objs +++ b/target/arm/Makefile.objs @@ -13,66 +13,66 @@ obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o DECODETREE = $(SRC_PATH)/scripts/decodetree.py -target/arm/decode-sve.inc.c: $(SRC_PATH)/target/arm/sve.decode $(DECODETREE) +target/arm/decode-sve.c.inc: $(SRC_PATH)/target/arm/sve.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --decode disas_sve -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-neon-shared.inc.c: $(SRC_PATH)/target/arm/neon-shared.decode $(DECODETREE) +target/arm/decode-neon-shared.c.inc: $(SRC_PATH)/target/arm/neon-shared.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --static-decode disas_neon_shared -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-neon-dp.inc.c: $(SRC_PATH)/target/arm/neon-dp.decode $(DECODETREE) +target/arm/decode-neon-dp.c.inc: $(SRC_PATH)/target/arm/neon-dp.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --static-decode disas_neon_dp -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-neon-ls.inc.c: $(SRC_PATH)/target/arm/neon-ls.decode $(DECODETREE) +target/arm/decode-neon-ls.c.inc: $(SRC_PATH)/target/arm/neon-ls.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --static-decode disas_neon_ls -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-vfp.inc.c: $(SRC_PATH)/target/arm/vfp.decode $(DECODETREE) +target/arm/decode-vfp.c.inc: $(SRC_PATH)/target/arm/vfp.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --static-decode disas_vfp -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-vfp-uncond.inc.c: $(SRC_PATH)/target/arm/vfp-uncond.decode $(DECODETREE) +target/arm/decode-vfp-uncond.c.inc: $(SRC_PATH)/target/arm/vfp-uncond.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --static-decode disas_vfp_uncond -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-a32.inc.c: $(SRC_PATH)/target/arm/a32.decode $(DECODETREE) +target/arm/decode-a32.c.inc: $(SRC_PATH)/target/arm/a32.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --static-decode disas_a32 -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-a32-uncond.inc.c: $(SRC_PATH)/target/arm/a32-uncond.decode $(DECODETREE) +target/arm/decode-a32-uncond.c.inc: $(SRC_PATH)/target/arm/a32-uncond.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --static-decode disas_a32_uncond -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-t32.inc.c: $(SRC_PATH)/target/arm/t32.decode $(DECODETREE) +target/arm/decode-t32.c.inc: $(SRC_PATH)/target/arm/t32.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --static-decode disas_t32 -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/decode-t16.inc.c: $(SRC_PATH)/target/arm/t16.decode $(DECODETREE) +target/arm/decode-t16.c.inc: $(SRC_PATH)/target/arm/t16.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) -w 16 --static-decode disas_t16 -o $@ $<,\ "GEN", $(TARGET_DIR)$@) -target/arm/translate-sve.o: target/arm/decode-sve.inc.c -target/arm/translate.o: target/arm/decode-neon-shared.inc.c -target/arm/translate.o: target/arm/decode-neon-dp.inc.c -target/arm/translate.o: target/arm/decode-neon-ls.inc.c -target/arm/translate.o: target/arm/decode-vfp.inc.c -target/arm/translate.o: target/arm/decode-vfp-uncond.inc.c -target/arm/translate.o: target/arm/decode-a32.inc.c -target/arm/translate.o: target/arm/decode-a32-uncond.inc.c -target/arm/translate.o: target/arm/decode-t32.inc.c -target/arm/translate.o: target/arm/decode-t16.inc.c +target/arm/translate-sve.o: target/arm/decode-sve.c.inc +target/arm/translate.o: target/arm/decode-neon-shared.c.inc +target/arm/translate.o: target/arm/decode-neon-dp.c.inc +target/arm/translate.o: target/arm/decode-neon-ls.c.inc +target/arm/translate.o: target/arm/decode-vfp.c.inc +target/arm/translate.o: target/arm/decode-vfp-uncond.c.inc +target/arm/translate.o: target/arm/decode-a32.c.inc +target/arm/translate.o: target/arm/decode-a32-uncond.c.inc +target/arm/translate.o: target/arm/decode-t32.c.inc +target/arm/translate.o: target/arm/decode-t16.c.inc obj-y += tlb_helper.o debug_helper.o obj-y += translate.o op_helper.o diff --git a/target/arm/translate-neon.inc.c b/target/arm/translate-neon.c.inc similarity index 99% rename from target/arm/translate-neon.inc.c rename to target/arm/translate-neon.c.inc index f6cb921573..8fbe8cef9f 100644 --- a/target/arm/translate-neon.inc.c +++ b/target/arm/translate-neon.c.inc @@ -50,9 +50,9 @@ static inline int rsub_8(DisasContext *s, int x) } /* Include the generated Neon decoder */ -#include "decode-neon-dp.inc.c" -#include "decode-neon-ls.inc.c" -#include "decode-neon-shared.inc.c" +#include "decode-neon-dp.c.inc" +#include "decode-neon-ls.c.inc" +#include "decode-neon-shared.c.inc" /* Return the offset of a 2**SIZE piece of a NEON register, at index ELE, * where 0 is the least significant end of the register. diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 88a2fb271d..8c7fbbd503 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -100,7 +100,7 @@ static inline int msz_dtype(DisasContext *s, int msz) * Include the generated decoder. */ -#include "decode-sve.inc.c" +#include "decode-sve.c.inc" /* * Implement all of the translator functions referenced by the decoder. diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.c.inc similarity index 99% rename from target/arm/translate-vfp.inc.c rename to target/arm/translate-vfp.c.inc index afa8a5f888..2d63fa0d39 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.c.inc @@ -27,8 +27,8 @@ */ /* Include the generated VFP decoder */ -#include "decode-vfp.inc.c" -#include "decode-vfp-uncond.inc.c" +#include "decode-vfp.c.inc" +#include "decode-vfp-uncond.c.inc" /* * The imm8 encodes the sign bit, enough bits to represent an exponent in diff --git a/target/arm/translate.c b/target/arm/translate.c index c39a929b93..556588d92f 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1176,8 +1176,8 @@ static TCGv_ptr vfp_reg_ptr(bool dp, int reg) #define ARM_CP_RW_BIT (1 << 20) /* Include the VFP and Neon decoders */ -#include "translate-vfp.inc.c" -#include "translate-neon.inc.c" +#include "translate-vfp.c.inc" +#include "translate-neon.c.inc" static inline void iwmmxt_load_reg(TCGv_i64 var, int reg) { @@ -5217,10 +5217,10 @@ static int t16_pop_list(DisasContext *s, int x) * Include the generated decoders. */ -#include "decode-a32.inc.c" -#include "decode-a32-uncond.inc.c" -#include "decode-t32.inc.c" -#include "decode-t16.inc.c" +#include "decode-a32.c.inc" +#include "decode-a32-uncond.c.inc" +#include "decode-t32.c.inc" +#include "decode-t16.c.inc" /* Helpers to swap operands for reverse-subtract. */ static void gen_rsb(TCGv_i32 dst, TCGv_i32 a, TCGv_i32 b) diff --git a/target/avr/Makefile.objs b/target/avr/Makefile.objs index 6e35ba2c5c..fb94a0b069 100644 --- a/target/avr/Makefile.objs +++ b/target/avr/Makefile.objs @@ -21,12 +21,12 @@ DECODETREE = $(SRC_PATH)/scripts/decodetree.py decode-y = $(SRC_PATH)/target/avr/insn.decode -target/avr/decode_insn.inc.c: $(decode-y) $(DECODETREE) +target/avr/decode_insn.c.inc: $(decode-y) $(DECODETREE) $(call quiet-command, \ $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn --insnwidth 16 $<, \ "GEN", $(TARGET_DIR)$@) -target/avr/translate.o: target/avr/decode_insn.inc.c +target/avr/translate.o: target/avr/decode_insn.c.inc obj-y += translate.o cpu.o helper.o obj-y += gdbstub.o diff --git a/target/avr/disas.c b/target/avr/disas.c index 8e1bac4d76..f15dc7911a 100644 --- a/target/avr/disas.c +++ b/target/avr/disas.c @@ -60,7 +60,7 @@ static int append_16(DisasContext *ctx, int x) /* Include the auto-generated decoder. */ static bool decode_insn(DisasContext *ctx, uint16_t insn); -#include "decode_insn.inc.c" +#include "decode_insn.c.inc" #define output(mnemonic, format, ...) \ (pctx->info->fprintf_func(pctx->info->stream, "%-9s " format, \ diff --git a/target/avr/translate.c b/target/avr/translate.c index 648dcd5c3e..9eb14f63f0 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -198,7 +198,7 @@ static bool avr_have_feature(DisasContext *ctx, int feature) } static bool decode_insn(DisasContext *ctx, uint16_t insn); -#include "decode_insn.inc.c" +#include "decode_insn.c.inc" /* * Arithmetic Instructions diff --git a/target/cris/translate.c b/target/cris/translate.c index aaa46b5bca..ee5e359c77 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -3037,7 +3037,7 @@ static unsigned int crisv32_decoder(CPUCRISState *env, DisasContext *dc) return insn_len; } -#include "translate_v10.inc.c" +#include "translate_v10.c.inc" /* * Delay slots on QEMU/CRIS. diff --git a/target/cris/translate_v10.inc.c b/target/cris/translate_v10.c.inc similarity index 100% rename from target/cris/translate_v10.inc.c rename to target/cris/translate_v10.c.inc diff --git a/target/hppa/Makefile.objs b/target/hppa/Makefile.objs index 174f50a96c..190cbff197 100644 --- a/target/hppa/Makefile.objs +++ b/target/hppa/Makefile.objs @@ -4,8 +4,8 @@ obj-$(CONFIG_SOFTMMU) += machine.o DECODETREE = $(SRC_PATH)/scripts/decodetree.py -target/hppa/decode.inc.c: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE) +target/hppa/decode.c.inc: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@) -target/hppa/translate.o: target/hppa/decode.inc.c +target/hppa/translate.o: target/hppa/decode.c.inc diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 4bd22d4820..316f58562e 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -334,7 +334,7 @@ static int expand_shl11(DisasContext *ctx, int val) /* Include the auto-generated decoder. */ -#include "decode.inc.c" +#include "decode.c.inc" /* We are not using a goto_tb (for whatever reason), but have updated the iaq (for whatever reason), so don't do it again on exit. */ diff --git a/target/mips/translate.c b/target/mips/translate.c index 9fad58ea2c..899b90ae0f 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -31322,7 +31322,7 @@ void mips_tcg_init(void) #endif } -#include "translate_init.inc.c" +#include "translate_init.c.inc" void cpu_mips_realize_env(CPUMIPSState *env) { diff --git a/target/mips/translate_init.inc.c b/target/mips/translate_init.c.inc similarity index 100% rename from target/mips/translate_init.inc.c rename to target/mips/translate_init.c.inc diff --git a/target/openrisc/Makefile.objs b/target/openrisc/Makefile.objs index b5432f4684..423d64512e 100644 --- a/target/openrisc/Makefile.objs +++ b/target/openrisc/Makefile.objs @@ -6,10 +6,10 @@ obj-y += gdbstub.o DECODETREE = $(SRC_PATH)/scripts/decodetree.py -target/openrisc/decode.inc.c: \ +target/openrisc/decode.c.inc: \ $(SRC_PATH)/target/openrisc/insns.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@) -target/openrisc/translate.o: target/openrisc/decode.inc.c -target/openrisc/disas.o: target/openrisc/decode.inc.c +target/openrisc/translate.o: target/openrisc/decode.c.inc +target/openrisc/disas.o: target/openrisc/decode.c.inc diff --git a/target/openrisc/disas.c b/target/openrisc/disas.c index ce112640b9..cc91775344 100644 --- a/target/openrisc/disas.c +++ b/target/openrisc/disas.c @@ -25,7 +25,7 @@ typedef disassemble_info DisasContext; /* Include the auto-generated decoder. */ -#include "decode.inc.c" +#include "decode.c.inc" #define output(mnemonic, format, ...) \ (info->fprintf_func(info->stream, "%-9s " format, \ diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 52323a16df..573428b8ea 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -65,7 +65,7 @@ static inline bool is_user(DisasContext *dc) } /* Include the auto-generated decoder. */ -#include "decode.inc.c" +#include "decode.c.inc" static TCGv cpu_sr; static TCGv cpu_regs[32]; diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index d8bd3c234a..43ebf1daad 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -398,7 +398,7 @@ target_ulong helper_divso(CPUPPCState *env, target_ulong arg1, target_ulong helper_602_mfrom(target_ulong arg) { if (likely(arg < 602)) { -#include "mfrom_table.inc.c" +#include "mfrom_table.c.inc" return mfrom_ROM_table[arg]; } else { return 0; diff --git a/target/ppc/mfrom_table.inc.c b/target/ppc/mfrom_table.c.inc similarity index 100% rename from target/ppc/mfrom_table.inc.c rename to target/ppc/mfrom_table.c.inc diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 4ce3d664b5..04db0d865c 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -6900,15 +6900,15 @@ static inline void set_avr64(int regno, TCGv_i64 src, bool high) tcg_gen_st_i64(src, cpu_env, avr64_offset(regno, high)); } -#include "translate/fp-impl.inc.c" +#include "translate/fp-impl.c.inc" -#include "translate/vmx-impl.inc.c" +#include "translate/vmx-impl.c.inc" -#include "translate/vsx-impl.inc.c" +#include "translate/vsx-impl.c.inc" -#include "translate/dfp-impl.inc.c" +#include "translate/dfp-impl.c.inc" -#include "translate/spe-impl.inc.c" +#include "translate/spe-impl.c.inc" /* Handles lfdp, lxsd, lxssp */ static void gen_dform39(DisasContext *ctx) @@ -7587,19 +7587,19 @@ GEN_HANDLER2_E(treclaim, "treclaim", 0x1F, 0x0E, 0x1D, 0x03E0F800, \ GEN_HANDLER2_E(trechkpt, "trechkpt", 0x1F, 0x0E, 0x1F, 0x03FFF800, \ PPC_NONE, PPC2_TM), -#include "translate/fp-ops.inc.c" +#include "translate/fp-ops.c.inc" -#include "translate/vmx-ops.inc.c" +#include "translate/vmx-ops.c.inc" -#include "translate/vsx-ops.inc.c" +#include "translate/vsx-ops.c.inc" -#include "translate/dfp-ops.inc.c" +#include "translate/dfp-ops.c.inc" -#include "translate/spe-ops.inc.c" +#include "translate/spe-ops.c.inc" }; #include "helper_regs.h" -#include "translate_init.inc.c" +#include "translate_init.c.inc" /*****************************************************************************/ /* Misc PowerPC helpers */ diff --git a/target/ppc/translate/dfp-impl.inc.c b/target/ppc/translate/dfp-impl.c.inc similarity index 100% rename from target/ppc/translate/dfp-impl.inc.c rename to target/ppc/translate/dfp-impl.c.inc diff --git a/target/ppc/translate/dfp-ops.inc.c b/target/ppc/translate/dfp-ops.c.inc similarity index 100% rename from target/ppc/translate/dfp-ops.inc.c rename to target/ppc/translate/dfp-ops.c.inc diff --git a/target/ppc/translate/fp-impl.inc.c b/target/ppc/translate/fp-impl.c.inc similarity index 100% rename from target/ppc/translate/fp-impl.inc.c rename to target/ppc/translate/fp-impl.c.inc diff --git a/target/ppc/translate/fp-ops.inc.c b/target/ppc/translate/fp-ops.c.inc similarity index 100% rename from target/ppc/translate/fp-ops.inc.c rename to target/ppc/translate/fp-ops.c.inc diff --git a/target/ppc/translate/spe-impl.inc.c b/target/ppc/translate/spe-impl.c.inc similarity index 100% rename from target/ppc/translate/spe-impl.inc.c rename to target/ppc/translate/spe-impl.c.inc diff --git a/target/ppc/translate/spe-ops.inc.c b/target/ppc/translate/spe-ops.c.inc similarity index 100% rename from target/ppc/translate/spe-ops.inc.c rename to target/ppc/translate/spe-ops.c.inc diff --git a/target/ppc/translate/vmx-impl.inc.c b/target/ppc/translate/vmx-impl.c.inc similarity index 100% rename from target/ppc/translate/vmx-impl.inc.c rename to target/ppc/translate/vmx-impl.c.inc diff --git a/target/ppc/translate/vmx-ops.inc.c b/target/ppc/translate/vmx-ops.c.inc similarity index 100% rename from target/ppc/translate/vmx-ops.inc.c rename to target/ppc/translate/vmx-ops.c.inc diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.c.inc similarity index 100% rename from target/ppc/translate/vsx-impl.inc.c rename to target/ppc/translate/vsx-impl.c.inc diff --git a/target/ppc/translate/vsx-ops.inc.c b/target/ppc/translate/vsx-ops.c.inc similarity index 100% rename from target/ppc/translate/vsx-ops.inc.c rename to target/ppc/translate/vsx-ops.c.inc diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.c.inc similarity index 100% rename from target/ppc/translate_init.inc.c rename to target/ppc/translate_init.c.inc diff --git a/target/riscv/Makefile.objs b/target/riscv/Makefile.objs index ff38df6219..1cd4c58005 100644 --- a/target/riscv/Makefile.objs +++ b/target/riscv/Makefile.objs @@ -14,15 +14,15 @@ decode16-y = $(SRC_PATH)/target/riscv/insn16.decode decode16-$(TARGET_RISCV32) += $(SRC_PATH)/target/riscv/insn16-32.decode decode16-$(TARGET_RISCV64) += $(SRC_PATH)/target/riscv/insn16-64.decode -target/riscv/decode_insn32.inc.c: $(decode32-y) $(DECODETREE) +target/riscv/decode_insn32.c.inc: $(decode32-y) $(DECODETREE) $(call quiet-command, \ $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn32 \ $(decode32-y), "GEN", $(TARGET_DIR)$@) -target/riscv/decode_insn16.inc.c: $(decode16-y) $(DECODETREE) +target/riscv/decode_insn16.c.inc: $(decode16-y) $(DECODETREE) $(call quiet-command, \ $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn16 \ --insnwidth 16 $(decode16-y), "GEN", $(TARGET_DIR)$@) -target/riscv/translate.o: target/riscv/decode_insn32.inc.c \ - target/riscv/decode_insn16.inc.c +target/riscv/translate.o: target/riscv/decode_insn32.c.inc \ + target/riscv/decode_insn16.c.inc diff --git a/target/riscv/insn_trans/trans_privileged.inc.c b/target/riscv/insn_trans/trans_privileged.c.inc similarity index 100% rename from target/riscv/insn_trans/trans_privileged.inc.c rename to target/riscv/insn_trans/trans_privileged.c.inc diff --git a/target/riscv/insn_trans/trans_rva.inc.c b/target/riscv/insn_trans/trans_rva.c.inc similarity index 100% rename from target/riscv/insn_trans/trans_rva.inc.c rename to target/riscv/insn_trans/trans_rva.c.inc diff --git a/target/riscv/insn_trans/trans_rvd.inc.c b/target/riscv/insn_trans/trans_rvd.c.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvd.inc.c rename to target/riscv/insn_trans/trans_rvd.c.inc diff --git a/target/riscv/insn_trans/trans_rvf.inc.c b/target/riscv/insn_trans/trans_rvf.c.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvf.inc.c rename to target/riscv/insn_trans/trans_rvf.c.inc diff --git a/target/riscv/insn_trans/trans_rvh.inc.c b/target/riscv/insn_trans/trans_rvh.c.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvh.inc.c rename to target/riscv/insn_trans/trans_rvh.c.inc diff --git a/target/riscv/insn_trans/trans_rvi.inc.c b/target/riscv/insn_trans/trans_rvi.c.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvi.inc.c rename to target/riscv/insn_trans/trans_rvi.c.inc diff --git a/target/riscv/insn_trans/trans_rvm.inc.c b/target/riscv/insn_trans/trans_rvm.c.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvm.inc.c rename to target/riscv/insn_trans/trans_rvm.c.inc diff --git a/target/riscv/insn_trans/trans_rvv.inc.c b/target/riscv/insn_trans/trans_rvv.c.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvv.inc.c rename to target/riscv/insn_trans/trans_rvv.c.inc diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 9632e79cf3..5ef5613909 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -583,7 +583,7 @@ static int ex_rvc_shifti(DisasContext *ctx, int imm) } /* Include the auto-generated decoder for 32 bit insn */ -#include "decode_insn32.inc.c" +#include "decode_insn32.c.inc" static bool gen_arith_imm_fn(DisasContext *ctx, arg_i *a, void (*func)(TCGv, TCGv, target_long)) @@ -718,17 +718,17 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, } /* Include insn module translation function */ -#include "insn_trans/trans_rvi.inc.c" -#include "insn_trans/trans_rvm.inc.c" -#include "insn_trans/trans_rva.inc.c" -#include "insn_trans/trans_rvf.inc.c" -#include "insn_trans/trans_rvd.inc.c" -#include "insn_trans/trans_rvh.inc.c" -#include "insn_trans/trans_rvv.inc.c" -#include "insn_trans/trans_privileged.inc.c" +#include "insn_trans/trans_rvi.c.inc" +#include "insn_trans/trans_rvm.c.inc" +#include "insn_trans/trans_rva.c.inc" +#include "insn_trans/trans_rvf.c.inc" +#include "insn_trans/trans_rvd.c.inc" +#include "insn_trans/trans_rvh.c.inc" +#include "insn_trans/trans_rvv.c.inc" +#include "insn_trans/trans_privileged.c.inc" /* Include the auto-generated decoder for 16 bit insn */ -#include "decode_insn16.inc.c" +#include "decode_insn16.c.inc" static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode) { diff --git a/target/rx/Makefile.objs b/target/rx/Makefile.objs index a0018d5bc5..cc3c4204a1 100644 --- a/target/rx/Makefile.objs +++ b/target/rx/Makefile.objs @@ -2,10 +2,10 @@ obj-y += translate.o op_helper.o helper.o cpu.o gdbstub.o disas.o DECODETREE = $(SRC_PATH)/scripts/decodetree.py -target/rx/decode.inc.c: \ +target/rx/decode.c.inc: \ $(SRC_PATH)/target/rx/insns.decode $(DECODETREE) $(call quiet-command,\ $(PYTHON) $(DECODETREE) --varinsnwidth 32 -o $@ $<, "GEN", $(TARGET_DIR)$@) -target/rx/translate.o: target/rx/decode.inc.c -target/rx/disas.o: target/rx/decode.inc.c +target/rx/translate.o: target/rx/decode.c.inc +target/rx/disas.o: target/rx/decode.c.inc diff --git a/target/rx/disas.c b/target/rx/disas.c index 6dee7a0342..60eff6f55f 100644 --- a/target/rx/disas.c +++ b/target/rx/disas.c @@ -100,7 +100,7 @@ static int bdsp_s(DisasContext *ctx, int d) } /* Include the auto-generated decoder. */ -#include "decode.inc.c" +#include "decode.c.inc" static void dump_bytes(DisasContext *ctx) { diff --git a/target/rx/translate.c b/target/rx/translate.c index 61e86653a4..bc49614cbb 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -124,7 +124,7 @@ static int bdsp_s(DisasContext *ctx, int d) } /* Include the auto-generated decoder. */ -#include "decode.inc.c" +#include "decode.c.inc" void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags) { diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 4f6f1e31cd..a777343821 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -5120,7 +5120,7 @@ static DisasJumpType op_mpcifc(DisasContext *s, DisasOps *o) } #endif -#include "translate_vx.inc.c" +#include "translate_vx.c.inc" /* ====================================================================== */ /* The "Cc OUTput" generators. Given the generated output (and in some cases diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.c.inc similarity index 100% rename from target/s390x/translate_vx.inc.c rename to target/s390x/translate_vx.c.inc diff --git a/target/xtensa/core-dc232b.c b/target/xtensa/core-dc232b.c index 7851bcb636..c982d09c24 100644 --- a/target/xtensa/core-dc232b.c +++ b/target/xtensa/core-dc232b.c @@ -35,13 +35,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_dc232b -#include "core-dc232b/xtensa-modules.inc.c" +#include "core-dc232b/xtensa-modules.c.inc" static XtensaConfig dc232b __attribute__((unused)) = { .name = "dc232b", .gdb_regmap = { .reg = { -#include "core-dc232b/gdb-config.inc.c" +#include "core-dc232b/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-dc232b/gdb-config.inc.c b/target/xtensa/core-dc232b/gdb-config.c.inc similarity index 100% rename from target/xtensa/core-dc232b/gdb-config.inc.c rename to target/xtensa/core-dc232b/gdb-config.c.inc diff --git a/target/xtensa/core-dc232b/xtensa-modules.inc.c b/target/xtensa/core-dc232b/xtensa-modules.c.inc similarity index 100% rename from target/xtensa/core-dc232b/xtensa-modules.inc.c rename to target/xtensa/core-dc232b/xtensa-modules.c.inc diff --git a/target/xtensa/core-dc233c.c b/target/xtensa/core-dc233c.c index f8204f7045..595ab9a90f 100644 --- a/target/xtensa/core-dc233c.c +++ b/target/xtensa/core-dc233c.c @@ -34,13 +34,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_dc233c -#include "core-dc233c/xtensa-modules.inc.c" +#include "core-dc233c/xtensa-modules.c.inc" static XtensaConfig dc233c __attribute__((unused)) = { .name = "dc233c", .gdb_regmap = { .reg = { -#include "core-dc233c/gdb-config.inc.c" +#include "core-dc233c/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-dc233c/gdb-config.inc.c b/target/xtensa/core-dc233c/gdb-config.c.inc similarity index 100% rename from target/xtensa/core-dc233c/gdb-config.inc.c rename to target/xtensa/core-dc233c/gdb-config.c.inc diff --git a/target/xtensa/core-dc233c/xtensa-modules.inc.c b/target/xtensa/core-dc233c/xtensa-modules.c.inc similarity index 100% rename from target/xtensa/core-dc233c/xtensa-modules.inc.c rename to target/xtensa/core-dc233c/xtensa-modules.c.inc diff --git a/target/xtensa/core-de212.c b/target/xtensa/core-de212.c index a061158f6e..50c995ba79 100644 --- a/target/xtensa/core-de212.c +++ b/target/xtensa/core-de212.c @@ -34,13 +34,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_de212 -#include "core-de212/xtensa-modules.inc.c" +#include "core-de212/xtensa-modules.c.inc" static XtensaConfig de212 __attribute__((unused)) = { .name = "de212", .gdb_regmap = { .reg = { -#include "core-de212/gdb-config.inc.c" +#include "core-de212/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-de212/gdb-config.inc.c b/target/xtensa/core-de212/gdb-config.c.inc similarity index 100% rename from target/xtensa/core-de212/gdb-config.inc.c rename to target/xtensa/core-de212/gdb-config.c.inc diff --git a/target/xtensa/core-de212/xtensa-modules.inc.c b/target/xtensa/core-de212/xtensa-modules.c.inc similarity index 100% rename from target/xtensa/core-de212/xtensa-modules.inc.c rename to target/xtensa/core-de212/xtensa-modules.c.inc diff --git a/target/xtensa/core-fsf.c b/target/xtensa/core-fsf.c index 1221a296fa..3327c50b4f 100644 --- a/target/xtensa/core-fsf.c +++ b/target/xtensa/core-fsf.c @@ -34,7 +34,7 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_fsf -#include "core-fsf/xtensa-modules.inc.c" +#include "core-fsf/xtensa-modules.c.inc" static XtensaConfig fsf __attribute__((unused)) = { .name = "fsf", diff --git a/target/xtensa/core-fsf/xtensa-modules.inc.c b/target/xtensa/core-fsf/xtensa-modules.c.inc similarity index 100% rename from target/xtensa/core-fsf/xtensa-modules.inc.c rename to target/xtensa/core-fsf/xtensa-modules.c.inc diff --git a/target/xtensa/core-sample_controller.c b/target/xtensa/core-sample_controller.c index a1d220bb9a..fd5de5576b 100644 --- a/target/xtensa/core-sample_controller.c +++ b/target/xtensa/core-sample_controller.c @@ -34,13 +34,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_sample_controller -#include "core-sample_controller/xtensa-modules.inc.c" +#include "core-sample_controller/xtensa-modules.c.inc" static XtensaConfig sample_controller __attribute__((unused)) = { .name = "sample_controller", .gdb_regmap = { .reg = { -#include "core-sample_controller/gdb-config.inc.c" +#include "core-sample_controller/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-sample_controller/gdb-config.inc.c b/target/xtensa/core-sample_controller/gdb-config.c.inc similarity index 100% rename from target/xtensa/core-sample_controller/gdb-config.inc.c rename to target/xtensa/core-sample_controller/gdb-config.c.inc diff --git a/target/xtensa/core-sample_controller/xtensa-modules.inc.c b/target/xtensa/core-sample_controller/xtensa-modules.c.inc similarity index 100% rename from target/xtensa/core-sample_controller/xtensa-modules.inc.c rename to target/xtensa/core-sample_controller/xtensa-modules.c.inc diff --git a/target/xtensa/core-test_kc705_be.c b/target/xtensa/core-test_kc705_be.c index ab73c3885f..294c16f2f4 100644 --- a/target/xtensa/core-test_kc705_be.c +++ b/target/xtensa/core-test_kc705_be.c @@ -34,13 +34,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_test_kc705_be -#include "core-test_kc705_be/xtensa-modules.inc.c" +#include "core-test_kc705_be/xtensa-modules.c.inc" static XtensaConfig test_kc705_be __attribute__((unused)) = { .name = "test_kc705_be", .gdb_regmap = { .reg = { -#include "core-test_kc705_be/gdb-config.inc.c" +#include "core-test_kc705_be/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-test_kc705_be/gdb-config.inc.c b/target/xtensa/core-test_kc705_be/gdb-config.c.inc similarity index 100% rename from target/xtensa/core-test_kc705_be/gdb-config.inc.c rename to target/xtensa/core-test_kc705_be/gdb-config.c.inc diff --git a/target/xtensa/core-test_kc705_be/xtensa-modules.inc.c b/target/xtensa/core-test_kc705_be/xtensa-modules.c.inc similarity index 100% rename from target/xtensa/core-test_kc705_be/xtensa-modules.inc.c rename to target/xtensa/core-test_kc705_be/xtensa-modules.c.inc diff --git a/target/xtensa/core-test_mmuhifi_c3.c b/target/xtensa/core-test_mmuhifi_c3.c index 089ed7da5d..123c630b0d 100644 --- a/target/xtensa/core-test_mmuhifi_c3.c +++ b/target/xtensa/core-test_mmuhifi_c3.c @@ -35,13 +35,13 @@ #include "overlay_tool.h" #define xtensa_modules xtensa_modules_test_mmuhifi_c3 -#include "core-test_mmuhifi_c3/xtensa-modules.inc.c" +#include "core-test_mmuhifi_c3/xtensa-modules.c.inc" static XtensaConfig test_mmuhifi_c3 __attribute__((unused)) = { .name = "test_mmuhifi_c3", .gdb_regmap = { .reg = { -#include "core-test_mmuhifi_c3/gdb-config.inc.c" +#include "core-test_mmuhifi_c3/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-test_mmuhifi_c3/gdb-config.inc.c b/target/xtensa/core-test_mmuhifi_c3/gdb-config.c.inc similarity index 100% rename from target/xtensa/core-test_mmuhifi_c3/gdb-config.inc.c rename to target/xtensa/core-test_mmuhifi_c3/gdb-config.c.inc diff --git a/target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c b/target/xtensa/core-test_mmuhifi_c3/xtensa-modules.c.inc similarity index 100% rename from target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c rename to target/xtensa/core-test_mmuhifi_c3/xtensa-modules.c.inc diff --git a/target/xtensa/import_core.sh b/target/xtensa/import_core.sh index 8f844cf9e2..c8626a8c02 100755 --- a/target/xtensa/import_core.sh +++ b/target/xtensa/import_core.sh @@ -23,7 +23,7 @@ tar -xf "$OVERLAY" -C "$TARGET" --strip-components=2 \ xtensa/config/core-isa.h \ xtensa/config/core-matmap.h tar -xf "$OVERLAY" -O gdb/xtensa-config.c | \ - sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.inc.c + sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.c.inc # # Fix up known issues in the xtensa-modules.c # @@ -35,7 +35,7 @@ tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \ -e '/^#include "ansidecl.h"/d' \ -e '/^Slot_[a-zA-Z0-9_]\+_decode (const xtensa_insnbuf insn)/,/^}/s/^ return 0;$/ return XTENSA_UNDEFINED;/' \ -e 's/#include /#include "xtensa-isa.h"/' \ - > "$TARGET"/xtensa-modules.inc.c + > "$TARGET"/xtensa-modules.c.inc cat < "${TARGET}.c" #include "qemu/osdep.h" @@ -49,13 +49,13 @@ cat < "${TARGET}.c" #include "overlay_tool.h" #define xtensa_modules xtensa_modules_$NAME -#include "core-$NAME/xtensa-modules.inc.c" +#include "core-$NAME/xtensa-modules.c.inc" static XtensaConfig $NAME __attribute__((unused)) = { .name = "$NAME", .gdb_regmap = { .reg = { -#include "core-$NAME/gdb-config.inc.c" +#include "core-$NAME/gdb-config.c.inc" } }, .isa_internal = &xtensa_modules, diff --git a/tcg/README b/tcg/README index a64f67809b..2f051e5c97 100644 --- a/tcg/README +++ b/tcg/README @@ -652,7 +652,7 @@ function tcg_gen_xxx(args). 4) Backend -tcg-target.h contains the target specific definitions. tcg-target.inc.c +tcg-target.h contains the target specific definitions. tcg-target.c.inc contains the target specific code; it is #included by tcg/tcg.c, rather than being a standalone C file. diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.c.inc similarity index 99% rename from tcg/aarch64/tcg-target.inc.c rename to tcg/aarch64/tcg-target.c.inc index 760b0e742d..948c35d825 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.c.inc @@ -10,7 +10,7 @@ * See the COPYING file in the top-level directory for details. */ -#include "../tcg-pool.inc.c" +#include "../tcg-pool.c.inc" #include "qemu/bitops.h" /* We're going to re-use TCGType in setting of the SF bit, which controls @@ -1542,7 +1542,7 @@ static void tcg_out_cltz(TCGContext *s, TCGType ext, TCGReg d, } #ifdef CONFIG_SOFTMMU -#include "../tcg-ldst.inc.c" +#include "../tcg-ldst.c.inc" /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr, * TCGMemOpIdx oi, uintptr_t ra) diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.c.inc similarity index 99% rename from tcg/arm/tcg-target.inc.c rename to tcg/arm/tcg-target.c.inc index 6aa7757aac..bc1e1b5a71 100644 --- a/tcg/arm/tcg-target.inc.c +++ b/tcg/arm/tcg-target.c.inc @@ -23,7 +23,7 @@ */ #include "elf.h" -#include "../tcg-pool.inc.c" +#include "../tcg-pool.c.inc" int arm_arch = __ARM_ARCH; @@ -1131,7 +1131,7 @@ static TCGCond tcg_out_cmp2(TCGContext *s, const TCGArg *args, } #ifdef CONFIG_SOFTMMU -#include "../tcg-ldst.inc.c" +#include "../tcg-ldst.c.inc" /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr, * int mmu_idx, uintptr_t ra) diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.c.inc similarity index 99% rename from tcg/i386/tcg-target.inc.c rename to tcg/i386/tcg-target.c.inc index ae0228238b..0155c0691c 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.c.inc @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "../tcg-pool.inc.c" +#include "../tcg-pool.c.inc" #ifdef CONFIG_DEBUG_TCG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { @@ -1647,7 +1647,7 @@ static void tcg_out_nopn(TCGContext *s, int n) } #if defined(CONFIG_SOFTMMU) -#include "../tcg-ldst.inc.c" +#include "../tcg-ldst.c.inc" /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr, * int mmu_idx, uintptr_t ra) diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.c.inc similarity index 99% rename from tcg/mips/tcg-target.inc.c rename to tcg/mips/tcg-target.c.inc index 4d32ebc1df..bd5b8e09a0 100644 --- a/tcg/mips/tcg-target.inc.c +++ b/tcg/mips/tcg-target.c.inc @@ -1107,7 +1107,7 @@ static void tcg_out_call(TCGContext *s, tcg_insn_unit *arg) } #if defined(CONFIG_SOFTMMU) -#include "../tcg-ldst.inc.c" +#include "../tcg-ldst.c.inc" static void * const qemu_ld_helpers[16] = { [MO_UB] = helper_ret_ldub_mmu, diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.c.inc similarity index 99% rename from tcg/ppc/tcg-target.inc.c rename to tcg/ppc/tcg-target.c.inc index c8d1e765d9..3bef3789b3 100644 --- a/tcg/ppc/tcg-target.inc.c +++ b/tcg/ppc/tcg-target.c.inc @@ -23,7 +23,7 @@ */ #include "elf.h" -#include "../tcg-pool.inc.c" +#include "../tcg-pool.c.inc" #if defined _CALL_DARWIN || defined __APPLE__ #define TCG_TARGET_CALL_DARWIN @@ -1845,7 +1845,7 @@ static const uint32_t qemu_exts_opc[4] = { }; #if defined (CONFIG_SOFTMMU) -#include "../tcg-ldst.inc.c" +#include "../tcg-ldst.c.inc" /* helper signature: helper_ld_mmu(CPUState *env, target_ulong addr, * int mmu_idx, uintptr_t ra) diff --git a/tcg/riscv/tcg-target.inc.c b/tcg/riscv/tcg-target.c.inc similarity index 99% rename from tcg/riscv/tcg-target.inc.c rename to tcg/riscv/tcg-target.c.inc index 3c11ab8b7a..2dfb07e247 100644 --- a/tcg/riscv/tcg-target.inc.c +++ b/tcg/riscv/tcg-target.c.inc @@ -27,7 +27,7 @@ * THE SOFTWARE. */ -#include "../tcg-pool.inc.c" +#include "../tcg-pool.c.inc" #ifdef CONFIG_DEBUG_TCG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { @@ -919,7 +919,7 @@ static void tcg_out_mb(TCGContext *s, TCGArg a0) */ #if defined(CONFIG_SOFTMMU) -#include "../tcg-ldst.inc.c" +#include "../tcg-ldst.c.inc" /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr, * TCGMemOpIdx oi, uintptr_t ra) diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.c.inc similarity index 99% rename from tcg/s390/tcg-target.inc.c rename to tcg/s390/tcg-target.c.inc index b07e9ff7d6..985115acfb 100644 --- a/tcg/s390/tcg-target.inc.c +++ b/tcg/s390/tcg-target.c.inc @@ -29,7 +29,7 @@ #error "unsupported code generation mode" #endif -#include "../tcg-pool.inc.c" +#include "../tcg-pool.c.inc" #include "elf.h" /* ??? The translation blocks produced by TCG are generally small enough to @@ -1536,7 +1536,7 @@ static void tcg_out_qemu_st_direct(TCGContext *s, MemOp opc, TCGReg data, } #if defined(CONFIG_SOFTMMU) -#include "../tcg-ldst.inc.c" +#include "../tcg-ldst.c.inc" /* We're expecting to use a 20-bit negative offset on the tlb memory ops. */ QEMU_BUILD_BUG_ON(TLB_MASK_TABLE_OFS(0) > 0); diff --git a/tcg/sparc/tcg-target.inc.c b/tcg/sparc/tcg-target.c.inc similarity index 99% rename from tcg/sparc/tcg-target.inc.c rename to tcg/sparc/tcg-target.c.inc index 65fddb310d..0f1d91fc21 100644 --- a/tcg/sparc/tcg-target.inc.c +++ b/tcg/sparc/tcg-target.c.inc @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "../tcg-pool.inc.c" +#include "../tcg-pool.c.inc" #ifdef CONFIG_DEBUG_TCG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { diff --git a/tcg/tcg-ldst.inc.c b/tcg/tcg-ldst.c.inc similarity index 100% rename from tcg/tcg-ldst.inc.c rename to tcg/tcg-ldst.c.inc diff --git a/tcg/tcg-pool.inc.c b/tcg/tcg-pool.c.inc similarity index 99% rename from tcg/tcg-pool.inc.c rename to tcg/tcg-pool.c.inc index 4eaa84b631..82cbcc89bd 100644 --- a/tcg/tcg-pool.inc.c +++ b/tcg/tcg-pool.c.inc @@ -118,7 +118,7 @@ static inline void new_pool_l8(TCGContext *s, int rtype, tcg_insn_unit *label, new_pool_insert(s, n); } -/* To be provided by cpu/tcg-target.inc.c. */ +/* To be provided by cpu/tcg-target.c.inc. */ static void tcg_out_nop_fill(tcg_insn_unit *p, int count); static int tcg_out_pool_finalize(TCGContext *s) diff --git a/tcg/tcg.c b/tcg/tcg.c index 1362bc6101..62f299e36e 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -65,7 +65,7 @@ #include "exec/log.h" #include "sysemu/sysemu.h" -/* Forward declarations for functions declared in tcg-target.inc.c and +/* Forward declarations for functions declared in tcg-target.c.inc and used here. */ static void tcg_target_init(TCGContext *s); static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode); @@ -101,7 +101,7 @@ static void tcg_register_jit_int(void *buf, size_t size, size_t debug_frame_size) __attribute__((unused)); -/* Forward declarations for functions declared and used in tcg-target.inc.c. */ +/* Forward declarations for functions declared and used in tcg-target.c.inc. */ static const char *target_parse_constraint(TCGArgConstraint *ct, const char *ct_str, TCGType type); static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1, @@ -341,7 +341,7 @@ static void set_jmp_reset_offset(TCGContext *s, int which) assert(s->tb_jmp_reset_offset[which] == off); } -#include "tcg-target.inc.c" +#include "tcg-target.c.inc" /* compare a pointer @ptr and a tb_tc @s */ static int ptr_cmp_tb_tc(const void *ptr, const struct tb_tc *s) diff --git a/tcg/tci/README b/tcg/tci/README index 386c3c7507..9bb7d7a5d3 100644 --- a/tcg/tci/README +++ b/tcg/tci/README @@ -21,7 +21,7 @@ This is what TCI (Tiny Code Interpreter) does. 2) Implementation Like each TCG host frontend, TCI implements the code generator in -tcg-target.inc.c, tcg-target.h. Both files are in directory tcg/tci. +tcg-target.c.inc, tcg-target.h. Both files are in directory tcg/tci. The additional file tcg/tci.c adds the interpreter. @@ -123,7 +123,7 @@ u1 = linux-user-test works would also improve speed for hosts which support byte alignment). * A better disassembler for the pseudo code would be nice (a very primitive - disassembler is included in tcg-target.inc.c). + disassembler is included in tcg-target.c.inc). * It might be useful to have a runtime option which selects the native TCG or TCI, so QEMU would have to include two TCGs. Today, selecting TCI diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.c.inc similarity index 100% rename from tcg/tci/tcg-target.inc.c rename to tcg/tci/tcg-target.c.inc diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c index 43ef9628c4..06ffebd6db 100644 --- a/tests/fp/fp-test.c +++ b/tests/fp/fp-test.c @@ -116,7 +116,7 @@ static void usage_complete(int argc, char *argv[]) } /* keep wrappers separate but do not bother defining headers for all of them */ -#include "wrap.inc.c" +#include "wrap.c.inc" static void not_implemented(void) { diff --git a/tests/fp/wrap.inc.c b/tests/fp/wrap.c.inc similarity index 100% rename from tests/fp/wrap.inc.c rename to tests/fp/wrap.c.inc diff --git a/ui/input-keymap.c b/ui/input-keymap.c index c4301851bd..1b756a6970 100644 --- a/ui/input-keymap.c +++ b/ui/input-keymap.c @@ -4,23 +4,23 @@ #include "standard-headers/linux/input.h" -#include "ui/input-keymap-atset1-to-qcode.c" -#include "ui/input-keymap-linux-to-qcode.c" -#include "ui/input-keymap-qcode-to-atset1.c" -#include "ui/input-keymap-qcode-to-atset2.c" -#include "ui/input-keymap-qcode-to-atset3.c" -#include "ui/input-keymap-qcode-to-linux.c" -#include "ui/input-keymap-qcode-to-qnum.c" -#include "ui/input-keymap-qcode-to-sun.c" -#include "ui/input-keymap-qnum-to-qcode.c" -#include "ui/input-keymap-usb-to-qcode.c" -#include "ui/input-keymap-win32-to-qcode.c" -#include "ui/input-keymap-x11-to-qcode.c" -#include "ui/input-keymap-xorgevdev-to-qcode.c" -#include "ui/input-keymap-xorgkbd-to-qcode.c" -#include "ui/input-keymap-xorgxquartz-to-qcode.c" -#include "ui/input-keymap-xorgxwin-to-qcode.c" -#include "ui/input-keymap-osx-to-qcode.c" +#include "ui/input-keymap-atset1-to-qcode.c.inc" +#include "ui/input-keymap-linux-to-qcode.c.inc" +#include "ui/input-keymap-qcode-to-atset1.c.inc" +#include "ui/input-keymap-qcode-to-atset2.c.inc" +#include "ui/input-keymap-qcode-to-atset3.c.inc" +#include "ui/input-keymap-qcode-to-linux.c.inc" +#include "ui/input-keymap-qcode-to-qnum.c.inc" +#include "ui/input-keymap-qcode-to-sun.c.inc" +#include "ui/input-keymap-qnum-to-qcode.c.inc" +#include "ui/input-keymap-usb-to-qcode.c.inc" +#include "ui/input-keymap-win32-to-qcode.c.inc" +#include "ui/input-keymap-x11-to-qcode.c.inc" +#include "ui/input-keymap-xorgevdev-to-qcode.c.inc" +#include "ui/input-keymap-xorgkbd-to-qcode.c.inc" +#include "ui/input-keymap-xorgxquartz-to-qcode.c.inc" +#include "ui/input-keymap-xorgxwin-to-qcode.c.inc" +#include "ui/input-keymap-osx-to-qcode.c.inc" int qemu_input_linux_to_qcode(unsigned int lnx) { diff --git a/ui/vnc-enc-zrle.c b/ui/vnc-enc-zrle.c index b4f71e32cf..bd33b89063 100644 --- a/ui/vnc-enc-zrle.c +++ b/ui/vnc-enc-zrle.c @@ -199,56 +199,56 @@ static void zrle_write_u8(VncState *vs, uint8_t value) #define ZRLE_BPP 8 #define ZYWRLE_ENDIAN ENDIAN_NO -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZRLE_BPP #define ZRLE_BPP 15 #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_LITTLE -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZRLE_BPP #define ZRLE_BPP 16 #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_LITTLE -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZRLE_BPP #define ZRLE_BPP 32 #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_LITTLE -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #define ZRLE_COMPACT_PIXEL 24a #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_LITTLE -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZRLE_COMPACT_PIXEL #define ZRLE_COMPACT_PIXEL 24b #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_LITTLE -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.c.inc" #undef ZRLE_COMPACT_PIXEL #undef ZRLE_BPP diff --git a/ui/vnc-enc-zrle.inc.c b/ui/vnc-enc-zrle.c.inc similarity index 100% rename from ui/vnc-enc-zrle.inc.c rename to ui/vnc-enc-zrle.c.inc From patchwork Fri Aug 21 10:21:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E55D7C433DF for ; Fri, 21 Aug 2020 10:25:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3BF7207BB for ; Fri, 21 Aug 2020 10:25:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XfB/0WVP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3BF7207BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94F9-0003iF-QC for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:25:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94D2-0000QJ-3Z for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:38443 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Cz-0001QQ-Vp for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Mp8BiBSVdEYc0+9oVuuotBn7iphkJ1Zxzn3sgGCr1c=; b=XfB/0WVP7hOtgjwsvjodkXnpuF96BK0NIuengRD7V4eiPWTeDhP7NI6LUtzKxH4dOwYcYC T3IIkdIlZjA165VRqhj32fgtO+15x3WOVpARJXVrHheiPCwgnyQDmSQKQnOM9CtqEda4tY WUuetCVaQAse3Ip6S3KuQBCHj4gZFnI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-565-WQzb7d9iOHWSSjAai_Md4Q-1; Fri, 21 Aug 2020 06:23:39 -0400 X-MC-Unique: WQzb7d9iOHWSSjAai_Md4Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5F621014DF9 for ; Fri, 21 Aug 2020 10:23:38 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9199419C78; Fri, 21 Aug 2020 10:23:38 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 007/152] build-sys hack: ensure target directory is there Date: Fri, 21 Aug 2020 06:21:04 -0400 Message-Id: <20200821102329.29777-8-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau By removing some unnest-vars calls, we miss some directory creation that may be required by some/dir/object.d. This will go away once everything is converted to Meson. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- rules.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/rules.mak b/rules.mak index 694865b63e..56ba540a32 100644 --- a/rules.mak +++ b/rules.mak @@ -66,6 +66,7 @@ expand-objs = $(strip $(sort $(filter %.o,$1)) \ $(filter-out %.o %.mo,$1)) %.o: %.c + @mkdir -p $(dir $@) $(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \ $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) \ -c -o $@ $<,"CC","$(TARGET_DIR)$@") From patchwork Fri Aug 21 10:21:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC4B3C433E1 for ; Fri, 21 Aug 2020 10:27:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6BF220748 for ; Fri, 21 Aug 2020 10:27:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="N6DcAZBB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6BF220748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Gt-0007hD-OE for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:27:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94D6-0000a7-Hn for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94D4-0001RX-GF for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wCwinYbY8KogL6MVGmLHlxl2ZdviDPrAvyQ0cEAXXVE=; b=N6DcAZBB8ZQMaVO/ui6gGo0tDJflN5ub+8kK4h3KmadWTOuJlFZ/LuukzVAy6P6FN/UNpp m+Q4xjsF8dbJUUroBfp0wBx6zguuhA0tsxLW6qPPzhjD2kkIUwgxPS1D3Gri/iFOEuyk2y R7SrQ07ierRe8xVRmo8aZDf/75YOHeE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-501-8BWqzBB5PnCLfVuhLbLmyA-1; Fri, 21 Aug 2020 06:23:44 -0400 X-MC-Unique: 8BWqzBB5PnCLfVuhLbLmyA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35205873085 for ; Fri, 21 Aug 2020 10:23:43 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 021D15DA74 for ; Fri, 21 Aug 2020 10:23:42 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 010/152] tests/docker: add test script for static linux-user builds Date: Fri, 21 Aug 2020 06:21:07 -0400 Message-Id: <20200821102329.29777-11-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- tests/docker/test-static | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tests/docker/test-static diff --git a/tests/docker/test-static b/tests/docker/test-static new file mode 100755 index 0000000000..372ef6fac7 --- /dev/null +++ b/tests/docker/test-static @@ -0,0 +1,24 @@ +#!/bin/bash -e +# +# Compile QEMU user mode emulators as static binaries on Linux. +# +# Copyright (c) 2020 Red Hat Inc. +# +# Authors: +# Paolo Bonzini +# +# This work is licensed under the terms of the GNU GPL, version 2 +# or (at your option) any later version. See the COPYING file in +# the top-level directory. + +. common.rc + +cd "$BUILD_DIR" + +build_qemu \ + --disable-system \ + --disable-tools \ + --disable-guest-agent \ + --disable-docs \ + --static +install_qemu From patchwork Fri Aug 21 10:21:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275956 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99B5AC433E1 for ; Fri, 21 Aug 2020 10:29:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63D7320748 for ; Fri, 21 Aug 2020 10:29:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="If6nUiX6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63D7320748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94IC-0002dl-Ls for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:29:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DB-0000my-Be for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94D8-0001SN-Uu for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rgLa8OOgysOf7Sl9OK2QDbGQukQVDXrVrkDaQKpgc84=; b=If6nUiX6b5/CirERaLZb5mNdcyANTf8Dw3YsHXx0MLaINrv+N5pWeO6UtqyLt6K8TdyMpl uYswYosSIvl6taJUisSn6LXL3DsC4MLN6sRMsMCrgkpQRCqinWkVinlL16GOyPdT8jCLc7 BOZRQd/EKysTwhHEAlFlCKsCwMZBCCs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-211-6JMFfSczNLqJQfJTOjmoZw-1; Fri, 21 Aug 2020 06:23:48 -0400 X-MC-Unique: 6JMFfSczNLqJQfJTOjmoZw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C32838030D1 for ; Fri, 21 Aug 2020 10:23:47 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 909805DA74 for ; Fri, 21 Aug 2020 10:23:47 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 015/152] tests/vm: include setuptools Date: Fri, 21 Aug 2020 06:21:12 -0400 Message-Id: <20200821102329.29777-16-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" They are a dependency of Meson, so install them. Signed-off-by: Paolo Bonzini --- tests/vm/freebsd | 1 + tests/vm/netbsd | 1 + tests/vm/openbsd | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 29252fa4a6..b34b14fc53 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -33,6 +33,7 @@ class FreeBSDVM(basevm.BaseVM): "pkgconf", "bzip2", "python37", + "py37-setuptools", # gnu tools "bash", diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 2e87199211..93d48b6fdd 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -31,6 +31,7 @@ class NetBSDVM(basevm.BaseVM): "pkgconf", "xz", "python37", + "py37-setuptools", # gnu tools "bash", diff --git a/tests/vm/openbsd b/tests/vm/openbsd index dfe633e453..7e27fda642 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -30,6 +30,7 @@ class OpenBSDVM(basevm.BaseVM): "git", "pkgconf", "bzip2", "xz", + "py3-setuptools", # gnu tools "bash", From patchwork Fri Aug 21 10:21:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275942 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F310C433E3 for ; Fri, 21 Aug 2020 10:41:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F50620738 for ; Fri, 21 Aug 2020 10:41:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q9Qqh36M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F50620738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94U0-0001C5-C0 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:41:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DM-0001JB-Rw for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:04 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:23264 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DG-0001UT-GX for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XmKnaWHB81y16y00mCRDkSFBk0El+GR3bcHjGydPyFg=; b=Q9Qqh36M2tXdf4x9D4PGuU5gE3/+Lkm3k5H09RDD11Ir1LRlXRB6AK5XR9R5782Ha7YaYd J997StasfcHatdgb9melnK+5PcCeEzclu+rUGsQCjSRhtE2MxkZBMKucpjmgevmSzWRj+f YTA2k6cNU9DahCorDwa3+HTGsLv8cM0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-217-xYBc7D79NgWMm_4tPHL0XA-1; Fri, 21 Aug 2020 06:23:49 -0400 X-MC-Unique: xYBc7D79NgWMm_4tPHL0XA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 80D26873084 for ; Fri, 21 Aug 2020 10:23:48 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B8255DA84 for ; Fri, 21 Aug 2020 10:23:48 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 017/152] configure: integrate Meson in the build system Date: Fri, 21 Aug 2020 06:21:14 -0400 Message-Id: <20200821102329.29777-18-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_OTHER_BAD_TLD=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The Meson build system is integrated in the existing configure/make steps by invoking Meson from the configure script and converting Meson's build.ninja rules to an included Makefile. build.ninja already provides tags/ctags/cscope rules, so they are removed. Signed-off-by: Paolo Bonzini --- Makefile | 50 ++- configure | 52 ++- meson.build | 25 ++ scripts/ninjatool.py | 1002 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1107 insertions(+), 22 deletions(-) create mode 100644 meson.build create mode 100755 scripts/ninjatool.py diff --git a/Makefile b/Makefile index ec12101a84..b726e7d8d2 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,25 @@ git-submodule-update: endif endif +export NINJA=./ninjatool + +# Running meson regenerates both build.ninja and ninjatool, and that is +# enough to prime the rest of the build. +ninjatool: build.ninja + +# Only needed in case Makefile.ninja does not exist. +.PHONY: ninja-clean ninja-distclean clean-ctlist +clean-ctlist: +ninja-clean:: +ninja-distclean:: +build.ninja: config-host.mak + +Makefile.ninja: build.ninja ninjatool + ./ninjatool -t ninja2make --omit clean dist uninstall < $< > $@ +-include Makefile.ninja + +${ninja-targets-c_COMPILER} ${ninja-targets-cpp_COMPILER}: .var.command += -MP + .git-submodule-status: git-submodule-update config-host.mak # Check that we're not trying to do an out-of-tree build from @@ -70,7 +89,11 @@ CONFIG_ALL=y config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION @echo $@ is out-of-date, running configure - @./config.status + @if test -f meson-private/coredata.dat; then \ + ./config.status --skip-meson; \ + else \ + ./config.status; \ + fi # Force configure to re-run if the API symbols are updated ifeq ($(CONFIG_PLUGIN),y) @@ -762,7 +785,8 @@ clean-coverage: "CLEAN", "coverage files") endif -clean: recurse-clean +clean: recurse-clean ninja-clean clean-ctlist + -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f qemu-options.def @@ -799,7 +823,8 @@ rm -rf $(MANUAL_BUILDDIR)/$1/_static rm -f $(MANUAL_BUILDDIR)/$1/objects.inv $(MANUAL_BUILDDIR)/$1/searchindex.js $(MANUAL_BUILDDIR)/$1/*.html endef -distclean: clean +distclean: clean ninja-distclean + -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean -g rm -f config-host.mak config-host.h* $(DOCS) rm -f tests/tcg/config-*.mak rm -f config-all-devices.mak config-all-disas.mak config.status @@ -807,6 +832,8 @@ distclean: clean rm -f po/*.mo tests/qemu-iotests/common.env rm -f roms/seabios/config.mak roms/vgabios/config.mak rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols + rm -rf meson-private meson-logs meson-info compile_commands.json + rm -f Makefile.ninja ninjatool ninjatool.stamp rm -f config.log rm -f linux-headers/asm rm -f docs/version.texi @@ -933,6 +960,8 @@ ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 install-includedir: $(INSTALL_DIR) "$(DESTDIR)$(includedir)" +# Needed by "meson install" +export DESTDIR install: all $(if $(BUILD_DOCS),install-doc) \ install-datadir install-localstatedir install-includedir \ $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \ @@ -1006,21 +1035,6 @@ endif done $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all" -.PHONY: ctags -ctags: - rm -f tags - find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} + - -.PHONY: TAGS -TAGS: - rm -f TAGS - find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} + - -cscope: - rm -f "$(SRC_PATH)"/cscope.* - find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed 's,^\./,,' > "$(SRC_PATH)/cscope.files" - cscope -b -i"$(SRC_PATH)/cscope.files" - # opengl shader programs ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert $(SRC_PATH)/scripts/shaderinclude.pl @mkdir -p $(dir $@) diff --git a/configure b/configure index cc04a560a0..ce32c568f8 100755 --- a/configure +++ b/configure @@ -548,6 +548,8 @@ fuzzing="no" rng_none="no" secret_keyring="" libdaxctl="" +meson="" +skip_meson=no supported_cpu="no" supported_os="no" @@ -1044,6 +1046,10 @@ for opt do ;; --sphinx-build=*) sphinx_build="$optarg" ;; + --skip-meson) skip_meson=yes + ;; + --meson=*) meson="$optarg" + ;; --gcov=*) gcov_tool="$optarg" ;; --smbd=*) smbd="$optarg" @@ -1809,6 +1815,7 @@ Advanced options (experts only): --install=INSTALL use specified install [$install] --python=PYTHON use specified python [$python] --sphinx-build=SPHINX use specified sphinx-build [$sphinx_build] + --meson=MESON use specified meson [$meson] --smbd=SMBD use specified smbd [$smbd] --with-git=GIT use specified git [$git] --static enable static build [$static] @@ -2016,6 +2023,16 @@ python_version=$($python -c 'import sys; print("%d.%d.%d" % (sys.version_info[0] # Suppress writing compiled files python="$python -B" +if ! has "$meson" +then + error_exit "Meson not found. Use --meson=/path/to/meson" +fi +meson=$(command -v $meson) + +if ! $python -c 'import pkg_resources' > /dev/null 2>&1; then + error_exit "Python setuptools not found" +fi + # Check that the C compiler works. Doing this here before testing # the host CPU ensures that we had a valid CC to autodetect the # $cpu var (and we should bail right here if that's not the case). @@ -6546,13 +6563,13 @@ elif test "$fortify_source" = "yes" ; then QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" debug=no fi -if test "$debug" = "no"; then - CFLAGS="-O2 $CFLAGS" -fi if test "$debug_info" = "yes"; then CFLAGS="-g $CFLAGS" LDFLAGS="-g $LDFLAGS" fi +if test "$debug" = "no"; then + CFLAGS="-O2 $CFLAGS" +fi case "$ARCH" in alpha) @@ -7997,6 +8014,7 @@ echo "PYTHON=$python" >> $config_host_mak echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak echo "GENISOIMAGE=$genisoimage" >> $config_host_mak +echo "MESON=$meson" >> $config_host_mak echo "CC=$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "IASL=$iasl" >> $config_host_mak @@ -8607,6 +8625,30 @@ echo "# Automatically generated by configure - do not modify" > "$iotests_common echo >> "$iotests_common_env" echo "export PYTHON='$python'" >> "$iotests_common_env" +if test "$skip_meson" = no; then +rm -rf meson-private meson-info meson-logs +NINJA=$PWD/ninjatool $meson setup \ + --prefix "$prefix" \ + --libdir "$libdir" \ + --libexecdir "$libexecdir" \ + --bindir "$bindir" \ + --includedir "$includedir" \ + --datadir "$datadir" \ + --mandir "$mandir" \ + --sysconfdir "$sysconfdir" \ + --localstatedir "$local_statedir" \ + -Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \ + -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \ + -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \ + -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \ + "$PWD" "$source_path" + +if test "$?" -ne 0 ; then + error_exit "meson setup failed" +fi +touch ninjatool.stamp +fi + # Save the configure command line for later reuse. cat <config.status #!/bin/sh @@ -8655,7 +8697,9 @@ preserve_env STRIP preserve_env WINDRES printf "exec" >>config.status -printf " '%s'" "$0" "$@" >>config.status +for i in "$0" "$@"; do + test "$i" = --skip-meson || printf " '%s'" "$i" >>config.status +done echo ' "$@"' >>config.status chmod +x config.status diff --git a/meson.build b/meson.build new file mode 100644 index 0000000000..613983e464 --- /dev/null +++ b/meson.build @@ -0,0 +1,25 @@ +project('qemu', ['c'], meson_version: '>=0.55.0', + default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_lundef=false'], + version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) + +not_found = dependency('', required: false) +keyval = import('unstable-keyval') +config_host = keyval.load(meson.current_build_dir() / 'config-host.mak') + +add_project_arguments(config_host['QEMU_CFLAGS'].split(), + native: false, language: ['c', 'objc']) +add_project_arguments(config_host['QEMU_CXXFLAGS'].split(), + native: false, language: 'cpp') +add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(), + native: false, language: ['c', 'cpp', 'objc']) +add_project_arguments(config_host['QEMU_INCLUDES'].split(), + language: ['c', 'cpp', 'objc']) + +add_languages('cpp', required: false, native: false) +if host_machine.system() == 'darwin' + add_languages('objc', required: false, native: false) +endif + +configure_file(input: files('scripts/ninjatool.py'), + output: 'ninjatool', + configuration: config_host) diff --git a/scripts/ninjatool.py b/scripts/ninjatool.py new file mode 100755 index 0000000000..cc77d51aa8 --- /dev/null +++ b/scripts/ninjatool.py @@ -0,0 +1,1002 @@ +#! /bin/sh + +# Python module for parsing and processing .ninja files. +# +# Author: Paolo Bonzini +# +# Copyright (C) 2019 Red Hat, Inc. + + +# We don't want to put "#! @PYTHON@" as the shebang and +# make the file executable, so instead we make this a +# Python/shell polyglot. The first line below starts a +# multiline string literal for Python, while it is just +# ":" for bash. The closing of the multiline string literal +# is never parsed by bash since it exits before. + +'''': +case "$0" in + /*) me=$0 ;; + *) me=$(command -v "$0") ;; +esac +python="@PYTHON@" +case $python in + @*) python=python3 ;; +esac +exec $python "$me" "$@" +exit 1 +''' + + +from collections import namedtuple, defaultdict +import sys +import os +import re +import json +import argparse +import shutil + + +class InvalidArgumentError(Exception): + pass + +# faster version of os.path.normpath: do nothing unless there is a double +# slash or a "." or ".." component. The filter does not have to be super +# precise, but it has to be fast. os.path.normpath is the hottest function +# for ninja2make without this optimization! +if os.path.sep == '/': + def normpath(path, _slow_re=re.compile('/[./]')): + return os.path.normpath(path) if _slow_re.search(path) or path[0] == '.' else path +else: + normpath = os.path.normpath + + +# ---- lexer and parser ---- + +PATH_RE = r"[^$\s:|]+|\$[$ :]|\$[a-zA-Z0-9_-]+|\$\{[a-zA-Z0-9_.-]+\}" + +SIMPLE_PATH_RE = re.compile(r"[^$\s:|]+") +IDENT_RE = re.compile(r"[a-zA-Z0-9_.-]+$") +STRING_RE = re.compile(r"(" + PATH_RE + r"|[\s:|])(?:\r?\n)?|.") +TOPLEVEL_RE = re.compile(r"([=:#]|\|\|?|^ +|(?:" + PATH_RE + r")+)\s*|.") +VAR_RE=re.compile(r'\$\$|\$\{([^}]*)\}') + +BUILD = 1 +POOL = 2 +RULE = 3 +DEFAULT = 4 +EQUALS = 5 +COLON = 6 +PIPE = 7 +PIPE2 = 8 +IDENT = 9 +INCLUDE = 10 +INDENT = 11 +EOL = 12 + + +class LexerError(Exception): + pass + + +class ParseError(Exception): + pass + + +class NinjaParserEvents(object): + def __init__(self, parser): + self.parser = parser + + def dollar_token(self, word, in_path=False): + return '$$' if word == '$' else word + + def variable_expansion_token(self, varname): + return '${%s}' % varname + + def variable(self, name, arg): + pass + + def begin_file(self): + pass + + def end_file(self): + pass + + def end_scope(self): + pass + + def begin_pool(self, name): + pass + + def begin_rule(self, name): + pass + + def begin_build(self, out, iout, rule, in_, iin, orderdep): + pass + + def default(self, targets): + pass + + +class NinjaParser(object): + + InputFile = namedtuple('InputFile', 'filename iter lineno') + + def __init__(self, filename, input): + self.stack = [] + self.top = None + self.iter = None + self.lineno = None + self.match_keyword = False + self.push(filename, input) + + def file_changed(self): + self.iter = self.top.iter + self.lineno = self.top.lineno + if self.top.filename is not None: + os.chdir(os.path.dirname(self.top.filename) or '.') + + def push(self, filename, input): + if self.top: + self.top.lineno = self.lineno + self.top.iter = self.iter + self.stack.append(self.top) + self.top = self.InputFile(filename=filename or 'stdin', + iter=self._tokens(input), lineno=0) + self.file_changed() + + def pop(self): + if len(self.stack): + self.top = self.stack[-1] + self.stack.pop() + self.file_changed() + else: + self.top = self.iter = None + + def next_line(self, input): + line = next(input).rstrip() + self.lineno += 1 + while len(line) and line[-1] == '$': + line = line[0:-1] + next(input).strip() + self.lineno += 1 + return line + + def print_token(self, tok): + if tok == EOL: + return "end of line" + if tok == BUILD: + return '"build"' + if tok == POOL: + return '"pool"' + if tok == RULE: + return '"rule"' + if tok == DEFAULT: + return '"default"' + if tok == EQUALS: + return '"="' + if tok == COLON: + return '":"' + if tok == PIPE: + return '"|"' + if tok == PIPE2: + return '"||"' + if tok == INCLUDE: + return '"include"' + if tok == IDENT: + return 'identifier' + return '"%s"' % tok + + def error(self, msg): + raise LexerError("%s:%d: %s" % (self.stack[-1].filename, self.lineno, msg)) + + def parse_error(self, msg): + raise ParseError("%s:%d: %s" % (self.stack[-1].filename, self.lineno, msg)) + + def expected(self, expected, tok): + msg = "found %s, expected " % (self.print_token(tok), ) + for i, exp_tok in enumerate(expected): + if i > 0: + msg = msg + (' or ' if i == len(expected) - 1 else ', ') + msg = msg + self.print_token(exp_tok) + self.parse_error(msg) + + def _variable_tokens(self, value): + for m in STRING_RE.finditer(value): + match = m.group(1) + if not match: + self.error("unexpected '%s'" % (m.group(0), )) + yield match + + def _tokens(self, input): + while True: + try: + line = self.next_line(input) + except StopIteration: + return + for m in TOPLEVEL_RE.finditer(line): + match = m.group(1) + if not match: + self.error("unexpected '%s'" % (m.group(0), )) + if match == ':': + yield COLON + continue + if match == '|': + yield PIPE + continue + if match == '||': + yield PIPE2 + continue + if match[0] == ' ': + yield INDENT + continue + if match[0] == '=': + yield EQUALS + value = line[m.start() + 1:].lstrip() + yield from self._variable_tokens(value) + break + if match[0] == '#': + break + + # identifier + if self.match_keyword: + if match == 'build': + yield BUILD + continue + if match == 'pool': + yield POOL + continue + if match == 'rule': + yield RULE + continue + if match == 'default': + yield DEFAULT + continue + if match == 'include': + filename = line[m.start() + 8:].strip() + self.push(filename, open(filename, 'r')) + break + if match == 'subninja': + self.error('subninja is not supported') + yield match + yield EOL + + def parse(self, events): + global_var = True + + def look_for(*expected): + # The last token in the token stream is always EOL. This + # is exploited to avoid catching StopIteration everywhere. + tok = next(self.iter) + if tok not in expected: + self.expected(expected, tok) + return tok + + def look_for_ident(*expected): + tok = next(self.iter) + if isinstance(tok, str): + if not IDENT_RE.match(tok): + self.parse_error('variable expansion not allowed') + elif tok not in expected: + self.expected(expected + (IDENT,), tok) + return tok + + def parse_assignment_rhs(gen, expected, in_path): + tokens = [] + for tok in gen: + if not isinstance(tok, str): + if tok in expected: + break + self.expected(expected + (IDENT,), tok) + if tok[0] != '$': + tokens.append(tok) + elif tok == '$ ' or tok == '$$' or tok == '$:': + tokens.append(events.dollar_token(tok[1], in_path)) + else: + var = tok[2:-1] if tok[1] == '{' else tok[1:] + tokens.append(events.variable_expansion_token(var)) + else: + # gen must have raised StopIteration + tok = None + + if tokens: + # Fast path avoiding str.join() + value = tokens[0] if len(tokens) == 1 else ''.join(tokens) + else: + value = None + return value, tok + + def look_for_path(*expected): + # paths in build rules are parsed one space-separated token + # at a time and expanded + token = next(self.iter) + if not isinstance(token, str): + return None, token + # Fast path if there are no dollar and variable expansion + if SIMPLE_PATH_RE.match(token): + return token, None + gen = self._variable_tokens(token) + return parse_assignment_rhs(gen, expected, True) + + def parse_assignment(tok): + name = tok + assert isinstance(name, str) + look_for(EQUALS) + value, tok = parse_assignment_rhs(self.iter, (EOL,), False) + assert tok == EOL + events.variable(name, value) + + def parse_build(): + # parse outputs + out = [] + iout = [] + while True: + value, tok = look_for_path(COLON, PIPE) + if value is None: + break + out.append(value) + if tok == PIPE: + while True: + value, tok = look_for_path(COLON) + if value is None: + break + iout.append(value) + + # parse rule + assert tok == COLON + rule = look_for_ident() + + # parse inputs and dependencies + in_ = [] + iin = [] + orderdep = [] + while True: + value, tok = look_for_path(PIPE, PIPE2, EOL) + if value is None: + break + in_.append(value) + if tok == PIPE: + while True: + value, tok = look_for_path(PIPE2, EOL) + if value is None: + break + iin.append(value) + if tok == PIPE2: + while True: + value, tok = look_for_path(EOL) + if value is None: + break + orderdep.append(value) + assert tok == EOL + events.begin_build(out, iout, rule, in_, iin, orderdep) + nonlocal global_var + global_var = False + + def parse_pool(): + # pool declarations are ignored. Just gobble all the variables + ident = look_for_ident() + look_for(EOL) + events.begin_pool(ident) + nonlocal global_var + global_var = False + + def parse_rule(): + ident = look_for_ident() + look_for(EOL) + events.begin_rule(ident) + nonlocal global_var + global_var = False + + def parse_default(): + idents = [] + while True: + ident = look_for_ident(EOL) + if ident == EOL: + break + idents.append(ident) + events.default(idents) + + def parse_declaration(tok): + if tok == EOL: + return + + nonlocal global_var + if tok == INDENT: + if global_var: + self.parse_error('indented line outside rule or edge') + tok = look_for_ident(EOL) + if tok == EOL: + return + parse_assignment(tok) + return + + if not global_var: + events.end_scope() + global_var = True + if tok == POOL: + parse_pool() + elif tok == BUILD: + parse_build() + elif tok == RULE: + parse_rule() + elif tok == DEFAULT: + parse_default() + elif isinstance(tok, str): + parse_assignment(tok) + else: + self.expected((POOL, BUILD, RULE, INCLUDE, DEFAULT, IDENT), tok) + + events.begin_file() + while self.iter: + try: + self.match_keyword = True + token = next(self.iter) + self.match_keyword = False + parse_declaration(token) + except StopIteration: + self.pop() + events.end_file() + + +# ---- variable handling ---- + +def expand(x, rule_vars=None, build_vars=None, global_vars=None): + if x is None: + return None + changed = True + have_dollar_replacement = False + while changed: + changed = False + matches = list(VAR_RE.finditer(x)) + if not matches: + break + + # Reverse the match so that expanding later matches does not + # invalidate m.start()/m.end() for earlier ones. Do not reduce $$ to $ + # until all variables are dealt with. + for m in reversed(matches): + name = m.group(1) + if not name: + have_dollar_replacement = True + continue + changed = True + if build_vars and name in build_vars: + value = build_vars[name] + elif rule_vars and name in rule_vars: + value = rule_vars[name] + elif name in global_vars: + value = global_vars[name] + else: + value = '' + x = x[:m.start()] + value + x[m.end():] + return x.replace('$$', '$') if have_dollar_replacement else x + + +class Scope(object): + def __init__(self, events): + self.events = events + + def on_left_scope(self): + pass + + def on_variable(self, key, value): + pass + + +class BuildScope(Scope): + def __init__(self, events, out, iout, rule, in_, iin, orderdep, rule_vars): + super().__init__(events) + self.rule = rule + self.out = [events.expand_and_normalize(x) for x in out] + self.in_ = [events.expand_and_normalize(x) for x in in_] + self.iin = [events.expand_and_normalize(x) for x in iin] + self.orderdep = [events.expand_and_normalize(x) for x in orderdep] + self.iout = [events.expand_and_normalize(x) for x in iout] + self.rule_vars = rule_vars + self.build_vars = dict() + self._define_variable('out', ' '.join(self.out)) + self._define_variable('in', ' '.join(self.in_)) + + def expand(self, x): + return self.events.expand(x, self.rule_vars, self.build_vars) + + def on_left_scope(self): + self.events.variable('out', self.build_vars['out']) + self.events.variable('in', self.build_vars['in']) + self.events.end_build(self, self.out, self.iout, self.rule, self.in_, + self.iin, self.orderdep) + + def _define_variable(self, key, value): + # The value has been expanded already, quote it for further + # expansion from rule variables + value = value.replace('$', '$$') + self.build_vars[key] = value + + def on_variable(self, key, value): + # in and out are at the top of the lookup order and cannot + # be overridden. Also, unlike what the manual says, build + # variables only lookup global variables. They never lookup + # rule variables, earlier build variables, or in/out. + if key not in ('in', 'in_newline', 'out'): + self._define_variable(key, self.events.expand(value)) + + +class RuleScope(Scope): + def __init__(self, events, name, vars_dict): + super().__init__(events) + self.name = name + self.vars_dict = vars_dict + self.generator = False + + def on_left_scope(self): + self.events.end_rule(self, self.name) + + def on_variable(self, key, value): + self.vars_dict[key] = value + if key == 'generator': + self.generator = True + + +class NinjaParserEventsWithVars(NinjaParserEvents): + def __init__(self, parser): + super().__init__(parser) + self.rule_vars = defaultdict(lambda: dict()) + self.global_vars = dict() + self.scope = None + + def variable(self, name, value): + if self.scope: + self.scope.on_variable(name, value) + else: + self.global_vars[name] = self.expand(value) + + def begin_build(self, out, iout, rule, in_, iin, orderdep): + if rule != 'phony' and rule not in self.rule_vars: + self.parser.parse_error("undefined rule '%s'" % rule) + + self.scope = BuildScope(self, out, iout, rule, in_, iin, orderdep, self.rule_vars[rule]) + + def begin_pool(self, name): + # pool declarations are ignored. Just gobble all the variables + self.scope = Scope(self) + + def begin_rule(self, name): + if name in self.rule_vars: + self.parser.parse_error("duplicate rule '%s'" % name) + self.scope = RuleScope(self, name, self.rule_vars[name]) + + def end_scope(self): + self.scope.on_left_scope() + self.scope = None + + # utility functions: + + def expand(self, x, rule_vars=None, build_vars=None): + return expand(x, rule_vars, build_vars, self.global_vars) + + def expand_and_normalize(self, x): + return normpath(self.expand(x)) + + # extra events not present in the superclass: + + def end_build(self, scope, out, iout, rule, in_, iin, orderdep): + pass + + def end_rule(self, scope, name): + pass + + +# ---- test client that just prints back whatever it parsed ---- + +class Writer(NinjaParserEvents): + ARGS = argparse.ArgumentParser(description='Rewrite input build.ninja to stdout.') + + def __init__(self, output, parser, args): + super().__init__(parser) + self.output = output + self.indent = '' + self.had_vars = False + + def dollar_token(self, word, in_path=False): + return '$' + word + + def print(self, *args, **kwargs): + if len(args): + self.output.write(self.indent) + print(*args, **kwargs, file=self.output) + + def variable(self, name, value): + self.print('%s = %s' % (name, value)) + self.had_vars = True + + def begin_scope(self): + self.indent = ' ' + self.had_vars = False + + def end_scope(self): + if self.had_vars: + self.print() + self.indent = '' + self.had_vars = False + + def begin_pool(self, name): + self.print('pool %s' % name) + self.begin_scope() + + def begin_rule(self, name): + self.print('rule %s' % name) + self.begin_scope() + + def begin_build(self, outputs, implicit_outputs, rule, inputs, implicit, order_only): + all_outputs = list(outputs) + all_inputs = list(inputs) + + if implicit: + all_inputs.append('|') + all_inputs.extend(implicit) + if order_only: + all_inputs.append('||') + all_inputs.extend(order_only) + if implicit_outputs: + all_outputs.append('|') + all_outputs.extend(implicit_outputs) + + self.print('build %s: %s' % (' '.join(all_outputs), + ' '.join([rule] + all_inputs))) + self.begin_scope() + + def default(self, targets): + self.print('default %s' % ' '.join(targets)) + + +# ---- emit compile_commands.json ---- + +class Compdb(NinjaParserEventsWithVars): + ARGS = argparse.ArgumentParser(description='Emit compile_commands.json.') + ARGS.add_argument('rules', nargs='*', + help='The ninja rules to emit compilation commands for.') + + def __init__(self, output, parser, args): + super().__init__(parser) + self.output = output + self.rules = args.rules + self.sep = '' + + def begin_file(self): + self.output.write('[') + self.directory = os.getcwd() + + def print_entry(self, **entry): + entry['directory'] = self.directory + self.output.write(self.sep + json.dumps(entry)) + self.sep = ',\n' + + def begin_build(self, out, iout, rule, in_, iin, orderdep): + if in_ and rule in self.rules: + super().begin_build(out, iout, rule, in_, iin, orderdep) + else: + self.scope = Scope(self) + + def end_build(self, scope, out, iout, rule, in_, iin, orderdep): + self.print_entry(command=scope.expand('${command}'), file=in_[0]) + + def end_file(self): + self.output.write(']\n') + + +# ---- clean output files ---- + +class Clean(NinjaParserEventsWithVars): + ARGS = argparse.ArgumentParser(description='Remove output build files.') + ARGS.add_argument('-g', dest='generator', action='store_true', + help='clean generated files too') + + def __init__(self, output, parser, args): + super().__init__(parser) + self.dry_run = args.dry_run + self.verbose = args.verbose or args.dry_run + self.generator = args.generator + + def begin_file(self): + print('Cleaning... ', end=(None if self.verbose else ''), flush=True) + self.cnt = 0 + + def end_file(self): + print('%d files' % self.cnt) + + def do_clean(self, *files): + for f in files: + if self.dry_run: + if os.path.exists(f): + self.cnt += 1 + print('Would remove ' + f) + continue + else: + try: + if os.path.isdir(f): + shutil.rmtree(f) + else: + os.unlink(f) + self.cnt += 1 + if self.verbose: + print('Removed ' + f) + except FileNotFoundError: + pass + + def end_build(self, scope, out, iout, rule, in_, iin, orderdep): + if rule == 'phony': + return + if self.generator: + rspfile = scope.expand('${rspfile}') + if rspfile: + self.do_clean(rspfile) + if self.generator or not scope.expand('${generator}'): + self.do_clean(*out, *iout) + depfile = scope.expand('${depfile}') + if depfile: + self.do_clean(depfile) + + +# ---- convert build.ninja to makefile ---- + +class Ninja2Make(NinjaParserEventsWithVars): + ARGS = argparse.ArgumentParser(description='Convert build.ninja to a Makefile.') + ARGS.add_argument('--clean', dest='emit_clean', action='store_true', + help='Emit clean/distclean rules.') + ARGS.add_argument('--doublecolon', action='store_true', + help='Emit double-colon rules for phony targets.') + ARGS.add_argument('--omit', metavar='TARGET', nargs='+', + help='Targets to omit.') + + def __init__(self, output, parser, args): + super().__init__(parser) + self.output = output + + self.emit_clean = args.emit_clean + self.doublecolon = args.doublecolon + self.omit = set(args.omit) + + if self.emit_clean: + self.omit.update(['clean', 'distclean']) + + # Lists of targets are kept in memory and emitted only at the + # end because appending is really inefficient in GNU make. + # We only do it when it's O(#rules) or O(#variables), but + # never when it could be O(#targets). + self.depfiles = list() + self.rspfiles = list() + self.build_vars = defaultdict(lambda: dict()) + self.rule_targets = defaultdict(lambda: list()) + self.stamp_targets = defaultdict(lambda: list()) + self.num_stamp = defaultdict(lambda: 0) + self.all_outs = set() + self.all_ins = set() + self.all_phony = set() + self.seen_default = False + + def print(self, *args, **kwargs): + print(*args, **kwargs, file=self.output) + + def dollar_token(self, word, in_path=False): + if in_path and word == ' ': + self.parser.parse_error('Make does not support spaces in filenames') + return '$$' if word == '$' else word + + def print_phony(self, outs, ins): + targets = ' '.join(outs).replace('$', '$$') + deps = ' '.join(ins).replace('$', '$$') + deps = deps.strip() + if self.doublecolon: + self.print(targets + '::' + (' ' if deps else '') + deps + ';@:') + else: + self.print(targets + ':' + (' ' if deps else '') + deps) + self.all_phony.update(outs) + + def begin_file(self): + self.print(r'# This is an automatically generated file, and it shows.') + self.print(r'ninja-default:') + self.print(r'.PHONY: ninja-default ninja-clean ninja-distclean') + if self.emit_clean: + self.print(r'ninja-clean:: ninja-clean-start; $(if $V,,@)rm -f ${ninja-depfiles}') + self.print(r'ninja-clean-start:; $(if $V,,@echo Cleaning...)') + self.print(r'ninja-distclean:: clean; $(if $V,,@)rm -f ${ninja-rspfiles}') + self.print(r'.PHONY: ninja-clean-start') + self.print_phony(['clean'], ['ninja-clean']) + self.print_phony(['distclean'], ['ninja-distclean']) + self.print(r'vpath') + self.print(r'NULL :=') + self.print(r'SPACE := ${NULL} #') + self.print(r'MAKEFLAGS += -rR') + self.print(r'define NEWLINE') + self.print(r'') + self.print(r'endef') + self.print(r'.var.in_newline = $(subst $(SPACE),$(NEWLINE),${.var.in})') + self.print(r"ninja-command = $(if $V,,$(if ${.var.description},@printf '%s\n' '$(subst ','\'',${.var.description})' && ))${.var.command}") + self.print(r"ninja-command-restat = $(if $V,,$(if ${.var.description},@printf '%s\n' '$(subst ','\'',${.var.description})' && ))${.var.command} && if test -e $(firstword ${.var.out}); then printf '%s\n' ${.var.out} > $@; fi") + + def end_file(self): + def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): + return [int(text) if text.isdigit() else text.lower() + for text in _nsre.split(s)] + + self.print() + self.print('ninja-outputdirs :=') + for rule in self.rule_vars: + if rule == 'phony': + continue + self.print('ninja-targets-%s := %s' % (rule, ' '.join(self.rule_targets[rule]))) + self.print('ninja-stamp-%s := %s' % (rule, ' '.join(self.stamp_targets[rule]))) + self.print('ninja-outputdirs += $(sort $(dir ${ninja-targets-%s}))' % rule) + self.print() + self.print('dummy := $(shell mkdir -p . $(sort $(ninja-outputdirs)))') + self.print('ninja-depfiles :=' + ' '.join(self.depfiles)) + self.print('ninja-rspfiles :=' + ' '.join(self.rspfiles)) + self.print('-include ${ninja-depfiles}') + self.print() + for targets in self.build_vars: + for name, value in self.build_vars[targets].items(): + self.print('%s: private .var.%s := %s' % (targets, name, value)) + self.print() + if not self.seen_default: + default_targets = sorted(self.all_outs - self.all_ins, key=natural_sort_key) + self.print('ninja-default: ' + ' '.join(default_targets)) + + # This is a hack... Meson declares input meson.build files as + # phony, because Ninja does not have an equivalent of Make's + # "path/to/file:" declaration that ignores "path/to/file" even + # if it is absent. However, Makefile.ninja wants to depend on + # build.ninja, which in turn depends on these phony targets which + # would cause Makefile.ninja to be rebuilt in a loop. + phony_targets = sorted(self.all_phony - self.all_ins, key=natural_sort_key) + self.print('.PHONY: ' + ' '.join(phony_targets)) + + def variable(self, name, value): + super().variable(name, value) + if self.scope is None: + self.global_vars[name] = self.expand(value) + self.print('.var.%s := %s' % (name, self.global_vars[name])) + + def begin_build(self, out, iout, rule, in_, iin, orderdep): + if any(x in self.omit for x in out): + self.scope = Scope(self) + return + + super().begin_build(out, iout, rule, in_, iin, orderdep) + self.current_targets = ' '.join(self.scope.out + self.scope.iout).replace('$', '$$') + + def end_build(self, scope, out, iout, rule, in_, iin, orderdep): + self.rule_targets[rule] += self.scope.out + self.rule_targets[rule] += self.scope.iout + + self.all_outs.update(self.scope.iout) + self.all_outs.update(self.scope.out) + self.all_ins.update(self.scope.in_) + self.all_ins.update(self.scope.iin) + + targets = self.current_targets + self.current_targets = None + if rule == 'phony': + # Phony rules treat order-only dependencies as normal deps + self.print_phony(out + iout, in_ + iin + orderdep) + return + + inputs = ' '.join(in_ + iin).replace('$', '$$') + orderonly = ' '.join(orderdep).replace('$', '$$') + + rspfile = scope.expand('${rspfile}') + if rspfile: + rspfile_content = scope.expand('${rspfile_content}') + with open(rspfile, 'w') as f: + f.write(rspfile_content) + inputs += ' ' + rspfile + self.rspfiles.append(rspfile) + + restat = 'restat' in self.scope.build_vars or 'restat' in self.rule_vars[rule] + depfile = scope.expand('${depfile}') + build_vars = { + 'command': scope.expand('${command}'), + 'description': scope.expand('${description}'), + 'out': scope.expand('${out}') + } + + if restat and not depfile: + if len(out) == 1: + stamp = out[0] + '.stamp' + else: + stamp = '%s%d.stamp' %(rule, self.num_stamp[rule]) + self.num_stamp[rule] += 1 + self.print('%s: %s; @:' % (targets, stamp)) + self.print('%s: %s | %s; ${ninja-command-restat}' % (stamp, inputs, orderonly)) + self.rule_targets[rule].append(stamp) + self.stamp_targets[rule].append(stamp) + self.build_vars[stamp] = build_vars + else: + self.print('%s: %s | %s; ${ninja-command}' % (targets, inputs, orderonly)) + self.build_vars[targets] = build_vars + if depfile: + self.depfiles.append(depfile) + + def end_rule(self, scope, name): + # Note that the generator pseudo-variable could also be attached + # to a build block rather than a rule. This is not handled here + # in order to reduce the number of "rm" invocations. However, + # "ninjatool.py -t clean" does that correctly. + target = 'distclean' if scope.generator else 'clean' + self.print('ninja-%s:: ; $(if $V,,@)rm -f ${ninja-stamp-%s}' % (target, name)) + if self.emit_clean: + self.print('ninja-%s:: ; $(if $V,,@)rm -rf ${ninja-targets-%s}' % (target, name)) + + def default(self, targets): + self.print("ninja-default: " + ' '.join(targets)) + self.seen_default = True + + +# ---- command line parsing ---- + +# we cannot use subparsers because tools are chosen through the "-t" +# option. + +class ToolAction(argparse.Action): + def __init__(self, option_strings, dest, choices, metavar='TOOL', nargs=None, **kwargs): + if nargs is not None: + raise ValueError("nargs not allowed") + super().__init__(option_strings, dest, required=True, choices=choices, + metavar=metavar, **kwargs) + + def __call__(self, parser, namespace, value, option_string): + tool = self.choices[value] + setattr(namespace, self.dest, tool) + tool.ARGS.prog = '%s %s %s' % (parser.prog, option_string, value) + + +class ToolHelpAction(argparse.Action): + def __init__(self, option_strings, dest, nargs=None, **kwargs): + if nargs is not None: + raise ValueError("nargs not allowed") + super().__init__(option_strings, dest, nargs=0, **kwargs) + + def __call__(self, parser, namespace, values, option_string=None): + if namespace.tool: + namespace.tool.ARGS.print_help() + else: + parser.print_help() + parser.exit() + + +tools = { + 'test': Writer, + 'ninja2make': Ninja2Make, + 'compdb': Compdb, + 'clean': Clean, +} + +parser = argparse.ArgumentParser(description='Process and transform build.ninja files.', + add_help=False) +parser.add_argument('-C', metavar='DIR', dest='dir', default='.', + help='change to DIR before doing anything else') +parser.add_argument('-f', metavar='FILE', dest='file', default='build.ninja', + help='specify input build file [default=build.ninja]') +parser.add_argument('-n', dest='dry_run', action='store_true', + help='do not actually do anything') +parser.add_argument('-v', dest='verbose', action='store_true', + help='be more verbose') + +parser.add_argument('-t', dest='tool', choices=tools, action=ToolAction, + help='choose the tool to run') +parser.add_argument('-h', '--help', action=ToolHelpAction, + help='show this help message and exit') + +if len(sys.argv) >= 2 and sys.argv[1] == '--version': + print('1.8') + sys.exit(0) + +args, tool_args = parser.parse_known_args() +args.tool.ARGS.parse_args(tool_args, args) + +os.chdir(args.dir) +with open(args.file, 'r') as f: + parser = NinjaParser(args.file, f) + try: + events = args.tool(sys.stdout, parser, args) + except InvalidArgumentError as e: + parser.error(str(e)) + parser.parse(events) From patchwork Fri Aug 21 10:21:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275954 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE874C433DF for ; Fri, 21 Aug 2020 10:30:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C455204EA for ; Fri, 21 Aug 2020 10:30:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GA2iRhaW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C455204EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Jg-0005zY-HD for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:30:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DD-0000s6-I4 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:55 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:29576 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DB-0001TM-Hg for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d+4/G+9RPd3uE7o5pP5BcN0FDqnOuSLBhjK1SlQhots=; b=GA2iRhaWyF2QMU/K/cFAavIlqJ9mYa/BqRljsgnUUZVJz53PDvas6EoeO1chKEX8yWl+Nz wFol1KOLOjJLRJbm65mXg8dPEC3vTB3YLvcXo7sWykQ+tejTXdnnLuRF8g/e5n9+jnWfai pahM5G7OPfJUjvrzxNO/n3+ASu0BXdA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-186-hrdFMXiNMAm2iqf6Z1nthg-1; Fri, 21 Aug 2020 06:23:49 -0400 X-MC-Unique: hrdFMXiNMAm2iqf6Z1nthg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E16B71DE0F for ; Fri, 21 Aug 2020 10:23:48 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CB2E5DA74; Fri, 21 Aug 2020 10:23:48 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 018/152] configure: generate Meson cross file Date: Fri, 21 Aug 2020 06:21:15 -0400 Message-Id: <20200821102329.29777-19-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 72 ++++++++++++++++++++++++++++++++++++++++++++++------- meson.build | 7 +++++- 2 files changed, 69 insertions(+), 10 deletions(-) diff --git a/configure b/configure index ce32c568f8..a82045352c 100755 --- a/configure +++ b/configure @@ -8626,21 +8626,75 @@ echo >> "$iotests_common_env" echo "export PYTHON='$python'" >> "$iotests_common_env" if test "$skip_meson" = no; then +cross="config-meson.cross.new" +meson_quote() { + echo "['$(echo $* | sed "s/ /','/g")']" +} + +echo "# Automatically generated by configure - do not modify" > $cross +echo "[properties]" >> $cross +test -z "$cxx" && echo "link_language = 'c'" >> $cross +echo "[binaries]" >> $cross +echo "c = $(meson_quote $cc)" >> $cross +test -n "$cxx" && echo "cpp = $(meson_quote $cxx)" >> $cross +echo "ar = $(meson_quote $ar)" >> $cross +echo "nm = $(meson_quote $nm)" >> $cross +echo "pkgconfig = $(meson_quote $pkg_config_exe)" >> $cross +echo "ranlib = $(meson_quote $ranlib)" >> $cross +echo "strip = $(meson_quote $strip)" >> $cross +echo "windres = $(meson_quote $windres)" >> $cross +if test -n "$cross_prefix"; then + cross_arg="--cross-file config-meson.cross" + # Hack: Meson expects an absolute path for the *build* machine + # for the prefix, so add a slash in front of a Windows path that + # includes a drive letter. + # + # See https://github.com/mesonbuild/meson/issues/7577. + echo "[host_machine]" >> $cross + if test "$mingw32" = "yes" ; then + echo "system = 'windows'" >> $cross + case $prefix in + ?:*) pre_prefix=/ ;; + esac + fi + case "$ARCH" in + i386|x86_64) + echo "cpu_family = 'x86'" >> $cross + ;; + ppc64le) + echo "cpu_family = 'ppc64'" >> $cross + ;; + *) + echo "cpu_family = '$ARCH'" >> $cross + ;; + esac + echo "cpu = '$cpu'" >> $cross + if test "$bigendian" = "yes" ; then + echo "endian = 'big'" >> $cross + else + echo "endian = 'little'" >> $cross + fi +else + cross_arg="--native-file config-meson.cross" +fi +mv $cross config-meson.cross + rm -rf meson-private meson-info meson-logs NINJA=$PWD/ninjatool $meson setup \ - --prefix "$prefix" \ - --libdir "$libdir" \ - --libexecdir "$libexecdir" \ - --bindir "$bindir" \ - --includedir "$includedir" \ - --datadir "$datadir" \ - --mandir "$mandir" \ - --sysconfdir "$sysconfdir" \ - --localstatedir "$local_statedir" \ + --prefix "${pre_prefix}$prefix" \ + --libdir "${pre_prefix}$libdir" \ + --libexecdir "${pre_prefix}$libexecdir" \ + --bindir "${pre_prefix}$bindir" \ + --includedir "${pre_prefix}$includedir" \ + --datadir "${pre_prefix}$datadir" \ + --mandir "${pre_prefix}$mandir" \ + --sysconfdir "${pre_prefix}$sysconfdir" \ + --localstatedir "${pre_prefix}$local_statedir" \ -Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \ -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \ -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \ -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \ + $cross_arg \ "$PWD" "$source_path" if test "$?" -ne 0 ; then diff --git a/meson.build b/meson.build index 613983e464..5ad85a7314 100644 --- a/meson.build +++ b/meson.build @@ -15,7 +15,12 @@ add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(), add_project_arguments(config_host['QEMU_INCLUDES'].split(), language: ['c', 'cpp', 'objc']) -add_languages('cpp', required: false, native: false) +python = import('python').find_installation() + +link_language = meson.get_external_property('link_language', 'cpp') +if link_language == 'cpp' + add_languages('cpp', required: true, native: false) +endif if host_machine.system() == 'darwin' add_languages('objc', required: false, native: false) endif From patchwork Fri Aug 21 10:21:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275952 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3798C433E1 for ; Fri, 21 Aug 2020 10:32:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF659204EA for ; Fri, 21 Aug 2020 10:32:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gUQN8day" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF659204EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Li-00011O-Uo for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:32:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DI-00017U-VE for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:00 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:33760 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DF-0001UB-JG for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zWejBK1qdEjq2SP4iRqwRDShLeAcevq9ZkOIRWuLssU=; b=gUQN8dayyMWbNGstHhz1BlY31XVyeeQ0/eVBojAjJTKWIhPnf3MwOR9VrDFEju2EkULFIm orzeH9keKGxdAdO2irFhttmmRJ5tusGo0ACTZGh5pwjusykFHvfBQVTgRPfD0ByyPhQwz0 hUZMg9KRBJt0MNy0T9k2tehZh0cv9qY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-442-7Po0KxotO7qlKSAT5pE0EQ-1; Fri, 21 Aug 2020 06:23:53 -0400 X-MC-Unique: 7Po0KxotO7qlKSAT5pE0EQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 187978064B2 for ; Fri, 21 Aug 2020 10:23:53 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id E91427AEC5; Fri, 21 Aug 2020 10:23:49 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 020/152] build-sys: add meson submodule Date: Fri, 21 Aug 2020 06:21:17 -0400 Message-Id: <20200821102329.29777-21-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- .gitmodules | 3 ++ configure | 71 +++++++++++++++++++++++++++++++++++---- meson | 1 + scripts/archive-source.sh | 3 +- 4 files changed, 70 insertions(+), 8 deletions(-) create mode 160000 meson diff --git a/.gitmodules b/.gitmodules index 9c0501a4d4..ce979398a8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,3 +58,6 @@ [submodule "roms/qboot"] path = roms/qboot url = https://github.com/bonzini/qboot +[submodule "meson"] + path = meson + url = https://github.com/mesonbuild/meson/ diff --git a/configure b/configure index a82045352c..3360f40a33 100755 --- a/configure +++ b/configure @@ -219,6 +219,25 @@ path_of() { return 1 } +version_ge () { + local_ver1=`echo $1 | tr . ' '` + local_ver2=`echo $2 | tr . ' '` + while true; do + set x $local_ver1 + local_first=${2-0} + # shift 2 does nothing if there are less than 2 arguments + shift; shift + local_ver1=$* + set x $local_ver2 + # the second argument finished, the first must be greater or equal + test $# = 1 && return 0 + test $local_first -lt $2 && return 1 + test $local_first -gt $2 && return 0 + shift; shift + local_ver2=$* + done +} + have_backend () { echo "$trace_backends" | grep "$1" >/dev/null } @@ -959,6 +978,7 @@ fi # python 2.x, but some distros have it as python 3.x, so # we check that too python= +explicit_python=no for binary in "${PYTHON-python3}" python do if has "$binary" @@ -1042,7 +1062,7 @@ for opt do ;; --install=*) install="$optarg" ;; - --python=*) python="$optarg" + --python=*) python="$optarg" ; explicit_python=yes ;; --sphinx-build=*) sphinx_build="$optarg" ;; @@ -2023,15 +2043,52 @@ python_version=$($python -c 'import sys; print("%d.%d.%d" % (sys.version_info[0] # Suppress writing compiled files python="$python -B" -if ! has "$meson" -then - error_exit "Meson not found. Use --meson=/path/to/meson" +if test -z "$meson"; then + if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.55.0; then + meson=meson + elif test -e "${source_path}/.git" && test $git_update = 'yes' ; then + meson=git + elif test -e "${source_path}/meson/meson.py" ; then + meson=internal + else + if test "$explicit_python" = yes; then + error_exit "--python requires using QEMU's embedded Meson distribution, but it was not found." + else + error_exit "Meson not found. Use --meson=/path/to/meson" + fi + fi +else + # Meson uses its own Python interpreter to invoke other Python scripts, + # but the user wants to use the one they specified with --python. + # + # We do not want to override the distro Python interpreter (and sometimes + # cannot: for example in Homebrew /usr/bin/meson is a bash script), so + # just require --meson=git|internal together with --python. + if test "$explicit_python" = yes; then + case "$meson" in + git | internal) ;; + *) error_exit "--python requires using QEMU's embedded Meson distribution." ;; + esac + fi fi -meson=$(command -v $meson) -if ! $python -c 'import pkg_resources' > /dev/null 2>&1; then - error_exit "Python setuptools not found" +if test "$meson" = git; then + git_submodules="${git_submodules} meson" fi +if test "$git_update" = yes; then + (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update "$git_submodules") +fi + +case "$meson" in + git | internal) + if ! $python -c 'import pkg_resources' > /dev/null 2>&1; then + error_exit "Python setuptools not found" + fi + meson="$python ${source_path}/meson/meson.py" + ;; + *) meson=$(command -v meson) ;; +esac + # Check that the C compiler works. Doing this here before testing # the host CPU ensures that we had a valid CC to autodetect the diff --git a/meson b/meson new file mode 160000 index 0000000000..d0c68dc115 --- /dev/null +++ b/meson @@ -0,0 +1 @@ +Subproject commit d0c68dc11507a47b9b85de508e023d9590d60565 diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index fb5d6b3918..c6169db69f 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -26,7 +26,8 @@ sub_file="${sub_tdir}/submodule.tar" # independent of what the developer currently has initialized # in their checkout, because the build environment is completely # different to the host OS. -submodules="dtc slirp ui/keycodemapdb tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" +submodules="dtc slirp meson ui/keycodemapdb" +submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" sub_deinit="" function cleanup() { From patchwork Fri Aug 21 10:21:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275957 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 681BBC433DF for ; Fri, 21 Aug 2020 10:28:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2465420748 for ; Fri, 21 Aug 2020 10:28:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="S3wseOj/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2465420748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Hq-0001aH-CR for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:28:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DI-00015x-Bb for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:00 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:49905 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DF-0001Ty-0p for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c2o2nfpoFTkNCeW79d1c3dvzunz+thRjaQhmKf3DxJ4=; b=S3wseOj/xLuG0mrLcZ2dKvGFJTyE4EYuIU0Ecq8xSFrGzWXplXuOU57nMpLZEXhgQZ/kGF xWvUug2CMXSQAfPf6yKdJ2PT+bSX6kt4PE5L0VBiNIgZgTCEIuI557wIvP1wfgMivP4XUA vEvqnBxSxM1sjth5Bz48dPyci3uSMrY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-287-VI-YJtBePlCPFuggAiyDYw-1; Fri, 21 Aug 2020 06:23:54 -0400 X-MC-Unique: VI-YJtBePlCPFuggAiyDYw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 745F91DE0E for ; Fri, 21 Aug 2020 10:23:53 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33F037AEC5 for ; Fri, 21 Aug 2020 10:23:53 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 021/152] meson: move summary to meson.build Date: Fri, 21 Aug 2020 06:21:18 -0400 Message-Id: <20200821102329.29777-22-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- configure | 237 -------------------------------------------------- meson.build | 245 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 245 insertions(+), 237 deletions(-) diff --git a/configure b/configure index 3360f40a33..40c8462539 100755 --- a/configure +++ b/configure @@ -570,8 +570,6 @@ libdaxctl="" meson="" skip_meson=no -supported_cpu="no" -supported_os="no" bogus_os="no" malloc_trim="" @@ -810,35 +808,27 @@ ARCH= # Note that this case should only have supported host CPUs, not guests. case "$cpu" in ppc|ppc64|s390x|sparc64|x32|riscv32|riscv64) - supported_cpu="yes" ;; ppc64le) ARCH="ppc64" - supported_cpu="yes" ;; i386|i486|i586|i686|i86pc|BePC) cpu="i386" - supported_cpu="yes" ;; x86_64|amd64) cpu="x86_64" - supported_cpu="yes" ;; armv*b|armv*l|arm) cpu="arm" - supported_cpu="yes" ;; aarch64) cpu="aarch64" - supported_cpu="yes" ;; mips*) cpu="mips" - supported_cpu="yes" ;; sparc|sun4[cdmuv]) cpu="sparc" - supported_cpu="yes" ;; *) # This will result in either an error or falling back to TCI later @@ -866,7 +856,6 @@ MINGW32*) audio_drv_list="" fi supported_os="yes" - pie="no" ;; GNU/kFreeBSD) bsd="yes" @@ -884,7 +873,6 @@ FreeBSD) libs_qga="-lutil $libs_qga" netmap="" # enable netmap autodetect HOST_VARIANT_DIR="freebsd" - supported_os="yes" ;; DragonFly) bsd="yes" @@ -901,7 +889,6 @@ NetBSD) audio_possible_drivers="oss sdl" oss_lib="-lossaudio" HOST_VARIANT_DIR="netbsd" - supported_os="yes" ;; OpenBSD) bsd="yes" @@ -909,7 +896,6 @@ OpenBSD) audio_drv_list="try-sdl" audio_possible_drivers="sdl" HOST_VARIANT_DIR="openbsd" - supported_os="yes" ;; Darwin) bsd="yes" @@ -930,7 +916,6 @@ Darwin) # won't work when we're compiling with gcc as a C compiler. QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS" HOST_VARIANT_DIR="darwin" - supported_os="yes" ;; SunOS) solaris="yes" @@ -961,7 +946,6 @@ Linux) linux_user="yes" kvm="yes" QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES" - supported_os="yes" libudev="yes" ;; esac @@ -5317,8 +5301,6 @@ EOF spice="yes" libs_softmmu="$libs_softmmu $spice_libs" QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags" - spice_protocol_version=$($pkg_config --modversion spice-protocol) - spice_server_version=$($pkg_config --modversion spice-server) else if test "$spice" = "yes" ; then feature_not_found "spice" \ @@ -6935,225 +6917,6 @@ QEMU_CFLAGS="$pixman_cflags $fdt_cflags $QEMU_CFLAGS" QEMU_LDFLAGS="$fdt_ldflags $QEMU_LDFLAGS" libs_softmmu="$pixman_libs $libs_softmmu" -echo "Install prefix $prefix" -echo "BIOS directory $(eval echo $qemu_datadir)" -echo "firmware path $(eval echo $firmwarepath)" -echo "binary directory $(eval echo $bindir)" -echo "library directory $(eval echo $libdir)" -echo "module directory $(eval echo $qemu_moddir)" -echo "libexec directory $(eval echo $libexecdir)" -echo "include directory $(eval echo $includedir)" -echo "config directory $(eval echo $sysconfdir)" -if test "$mingw32" = "no" ; then -echo "local state directory $(eval echo $local_statedir)" -echo "Manual directory $(eval echo $mandir)" -echo "ELF interp prefix $interp_prefix" -else -echo "local state directory queried at runtime" -echo "Windows SDK $win_sdk" -fi -echo "Build directory $(pwd)" -echo "Source path $source_path" -echo "GIT binary $git" -echo "GIT submodules $git_submodules" -echo "C compiler $cc" -echo "Host C compiler $host_cc" -echo "C++ compiler $cxx" -echo "Objective-C compiler $objcc" -echo "ARFLAGS $ARFLAGS" -echo "CFLAGS $CFLAGS" -echo "QEMU_CFLAGS $QEMU_CFLAGS" -echo "QEMU_LDFLAGS $QEMU_LDFLAGS" -echo "make $make" -echo "install $install" -echo "python $python ($python_version)" -if test "$docs" != "no"; then - echo "sphinx-build $sphinx_build" -fi -echo "genisoimage $genisoimage" -echo "slirp support $slirp $(echo_version $slirp $slirp_version)" -if test "$slirp" != "no" ; then - echo "smbd $smbd" -fi -echo "module support $modules" -echo "alt path mod load $module_upgrades" -echo "host CPU $cpu" -echo "host big endian $bigendian" -echo "target list $target_list" -echo "gprof enabled $gprof" -echo "sparse enabled $sparse" -echo "strip binaries $strip_opt" -echo "profiler $profiler" -echo "static build $static" -echo "safe stack $safe_stack" -if test "$darwin" = "yes" ; then - echo "Cocoa support $cocoa" -fi -echo "SDL support $sdl $(echo_version $sdl $sdlversion)" -echo "SDL image support $sdl_image" -echo "GTK support $gtk $(echo_version $gtk $gtk_version)" -echo "GTK GL support $gtk_gl" -echo "VTE support $vte $(echo_version $vte $vteversion)" -echo "TLS priority $tls_priority" -echo "GNUTLS support $gnutls" -echo "libgcrypt $gcrypt" -if test "$gcrypt" = "yes" -then - echo " hmac $gcrypt_hmac" - echo " XTS $gcrypt_xts" -fi -echo "nettle $nettle $(echo_version $nettle $nettle_version)" -if test "$nettle" = "yes" -then - echo " XTS $nettle_xts" -fi -echo "libtasn1 $tasn1" -echo "PAM $auth_pam" -echo "iconv support $iconv" -echo "curses support $curses" -echo "virgl support $virglrenderer $(echo_version $virglrenderer $virgl_version)" -echo "curl support $curl" -echo "mingw32 support $mingw32" -echo "Audio drivers $audio_drv_list" -echo "Block whitelist (rw) $block_drv_rw_whitelist" -echo "Block whitelist (ro) $block_drv_ro_whitelist" -echo "VirtFS support $virtfs" -echo "Multipath support $mpath" -echo "VNC support $vnc" -if test "$vnc" = "yes" ; then - echo "VNC SASL support $vnc_sasl" - echo "VNC JPEG support $vnc_jpeg" - echo "VNC PNG support $vnc_png" -fi -echo "xen support $xen" -if test "$xen" = "yes" ; then - echo "xen ctrl version $xen_ctrl_version" -fi -echo "brlapi support $brlapi" -echo "Documentation $docs" -echo "PIE $pie" -echo "vde support $vde" -echo "netmap support $netmap" -echo "Linux AIO support $linux_aio" -echo "Linux io_uring support $linux_io_uring" -echo "ATTR/XATTR support $attr" -echo "Install blobs $blobs" -echo "KVM support $kvm" -echo "HAX support $hax" -echo "HVF support $hvf" -echo "WHPX support $whpx" -echo "TCG support $tcg" -if test "$tcg" = "yes" ; then - echo "TCG debug enabled $debug_tcg" - echo "TCG interpreter $tcg_interpreter" -fi -echo "malloc trim support $malloc_trim" -echo "RDMA support $rdma" -echo "PVRDMA support $pvrdma" -echo "fdt support $fdt" -echo "membarrier $membarrier" -echo "preadv support $preadv" -echo "fdatasync $fdatasync" -echo "madvise $madvise" -echo "posix_madvise $posix_madvise" -echo "posix_memalign $posix_memalign" -echo "libcap-ng support $cap_ng" -echo "vhost-net support $vhost_net" -echo "vhost-crypto support $vhost_crypto" -echo "vhost-scsi support $vhost_scsi" -echo "vhost-vsock support $vhost_vsock" -echo "vhost-user support $vhost_user" -echo "vhost-user-fs support $vhost_user_fs" -echo "vhost-vdpa support $vhost_vdpa" -echo "Trace backends $trace_backends" -if have_backend "simple"; then -echo "Trace output file $trace_file-" -fi -echo "spice support $spice $(echo_version $spice $spice_protocol_version/$spice_server_version)" -echo "rbd support $rbd" -echo "xfsctl support $xfs" -echo "smartcard support $smartcard" -echo "libusb $libusb" -echo "usb net redir $usb_redir" -echo "OpenGL support $opengl" -echo "OpenGL dmabufs $opengl_dmabuf" -echo "libiscsi support $libiscsi" -echo "libnfs support $libnfs" -echo "build guest agent $guest_agent" -echo "QGA VSS support $guest_agent_with_vss" -echo "QGA w32 disk info $guest_agent_ntddscsi" -echo "QGA MSI support $guest_agent_msi" -echo "seccomp support $seccomp" -echo "coroutine backend $coroutine" -echo "coroutine pool $coroutine_pool" -echo "debug stack usage $debug_stack_usage" -echo "mutex debugging $debug_mutex" -echo "crypto afalg $crypto_afalg" -echo "GlusterFS support $glusterfs" -echo "gcov $gcov_tool" -echo "gcov enabled $gcov" -echo "TPM support $tpm" -echo "libssh support $libssh" -echo "QOM debugging $qom_cast_debug" -echo "Live block migration $live_block_migration" -echo "lzo support $lzo" -echo "snappy support $snappy" -echo "bzip2 support $bzip2" -echo "lzfse support $lzfse" -echo "zstd support $zstd" -echo "NUMA host support $numa" -echo "libxml2 $libxml2" -echo "tcmalloc support $tcmalloc" -echo "jemalloc support $jemalloc" -echo "avx2 optimization $avx2_opt" -echo "avx512f optimization $avx512f_opt" -echo "replication support $replication" -echo "bochs support $bochs" -echo "cloop support $cloop" -echo "dmg support $dmg" -echo "qcow v1 support $qcow1" -echo "vdi support $vdi" -echo "vvfat support $vvfat" -echo "qed support $qed" -echo "parallels support $parallels" -echo "sheepdog support $sheepdog" -echo "capstone $capstone" -echo "libpmem support $libpmem" -echo "libdaxctl support $libdaxctl" -echo "libudev $libudev" -echo "default devices $default_devices" -echo "plugin support $plugins" -echo "fuzzing support $fuzzing" -echo "gdb $gdb_bin" -echo "rng-none $rng_none" -echo "Linux keyring $secret_keyring" - -if test "$supported_cpu" = "no"; then - echo - echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!" - echo - echo "CPU host architecture $cpu support is not currently maintained." - echo "The QEMU project intends to remove support for this host CPU in" - echo "a future release if nobody volunteers to maintain it and to" - echo "provide a build host for our continuous integration setup." - echo "configure has succeeded and you can continue to build, but" - echo "if you care about QEMU on this platform you should contact" - echo "us upstream at qemu-devel@nongnu.org." -fi - -if test "$supported_os" = "no"; then - echo - echo "WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!" - echo - echo "Host OS $targetos support is not currently maintained." - echo "The QEMU project intends to remove support for this host OS in" - echo "a future release if nobody volunteers to maintain it and to" - echo "provide a build host for our continuous integration setup." - echo "configure has succeeded and you can continue to build, but" - echo "if you care about QEMU on this platform you should contact" - echo "us upstream at qemu-devel@nongnu.org." -fi - config_host_mak="config-host.mak" echo "# Automatically generated by configure - do not modify" >config-all-disas.mak diff --git a/meson.build b/meson.build index 5ad85a7314..c47cd74571 100644 --- a/meson.build +++ b/meson.build @@ -28,3 +28,248 @@ endif configure_file(input: files('scripts/ninjatool.py'), output: 'ninjatool', configuration: config_host) + +supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux'] +supported_cpus = ['ppc', 'ppc64', 's390x', 'sparc64', 'riscv32', 'riscv64', 'x86', 'x86_64', + 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64'] + +cpu = host_machine.cpu_family() +targetos = host_machine.system() + +summary_info = {} +summary_info += {'Install prefix': config_host['prefix']} +summary_info += {'BIOS directory': config_host['qemu_datadir']} +summary_info += {'firmware path': config_host['qemu_firmwarepath']} +summary_info += {'binary directory': config_host['bindir']} +summary_info += {'library directory': config_host['libdir']} +summary_info += {'module directory': config_host['qemu_moddir']} +summary_info += {'libexec directory': config_host['libexecdir']} +summary_info += {'include directory': config_host['includedir']} +summary_info += {'config directory': config_host['sysconfdir']} +if targetos != 'windows' + summary_info += {'local state directory': config_host['qemu_localstatedir']} + summary_info += {'Manual directory': config_host['mandir']} +else + summary_info += {'local state directory': 'queried at runtime'} +endif +summary_info += {'Build directory': meson.current_build_dir()} +summary_info += {'Source path': meson.current_source_dir()} +summary_info += {'GIT binary': config_host['GIT']} +summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']} +summary_info += {'C compiler': meson.get_compiler('c').cmd_array()[0]} +summary_info += {'Host C compiler': meson.get_compiler('c', native: true).cmd_array()[0]} +if link_language == 'cpp' + summary_info += {'C++ compiler': meson.get_compiler('cpp').cmd_array()[0]} +else + summary_info += {'C++ compiler': false} +endif +if targetos == 'darwin' + summary_info += {'Objective-C compiler': meson.get_compiler('objc').cmd_array()[0]} +endif +summary_info += {'ARFLAGS': config_host['ARFLAGS']} +summary_info += {'CFLAGS': config_host['CFLAGS']} +summary_info += {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']} +summary_info += {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']} +summary_info += {'make': config_host['MAKE']} +summary_info += {'install': config_host['INSTALL']} +summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())} +summary_info += {'sphinx-build': config_host['SPHINX_BUILD']} +summary_info += {'genisoimage': config_host['GENISOIMAGE']} +# TODO: add back version +summary_info += {'slirp support': config_host.has_key('CONFIG_SLIRP')} +if config_host.has_key('CONFIG_SLIRP') + summary_info += {'smbd': config_host['CONFIG_SMBD_COMMAND']} +endif +summary_info += {'module support': config_host.has_key('CONFIG_MODULES')} +if config_host.has_key('CONFIG_MODULES') + summary_info += {'alternative module path': config_host.has_key('CONFIG_MODULE_UPGRADES')} +endif +summary_info += {'host CPU': cpu} +summary_info += {'host endianness': build_machine.endian()} +summary_info += {'target list': config_host['TARGET_DIRS']} +summary_info += {'gprof enabled': config_host.has_key('CONFIG_GPROF')} +summary_info += {'sparse enabled': meson.get_compiler('c').cmd_array().contains('cgcc')} +summary_info += {'strip binaries': get_option('strip')} +summary_info += {'profiler': config_host.has_key('CONFIG_PROFILER')} +summary_info += {'static build': config_host.has_key('CONFIG_TOOLS')} +if targetos == 'darwin' + summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')} +endif +# TODO: add back version +summary_info += {'SDL support': config_host.has_key('CONFIG_SDL')} +summary_info += {'SDL image support': config_host.has_key('CONFIG_SDL_IMAGE')} +# TODO: add back version +summary_info += {'GTK support': config_host.has_key('CONFIG_GTK')} +summary_info += {'GTK GL support': config_host.has_key('CONFIG_GTK_GL')} +# TODO: add back version +summary_info += {'VTE support': config_host.has_key('CONFIG_VTE')} +summary_info += {'TLS priority': config_host['CONFIG_TLS_PRIORITY']} +summary_info += {'GNUTLS support': config_host.has_key('CONFIG_GNUTLS')} +# TODO: add back version +summary_info += {'libgcrypt': config_host.has_key('CONFIG_GCRYPT')} +if config_host.has_key('CONFIG_GCRYPT') + summary_info += {' hmac': config_host.has_key('CONFIG_GCRYPT_HMAC')} + summary_info += {' XTS': not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')} +endif +# TODO: add back version +summary_info += {'nettle': config_host.has_key('CONFIG_NETTLE')} +if config_host.has_key('CONFIG_NETTLE') + summary_info += {' XTS': not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')} +endif +summary_info += {'libtasn1': config_host.has_key('CONFIG_TASN1')} +summary_info += {'PAM': config_host.has_key('CONFIG_AUTH_PAM')} +summary_info += {'iconv support': config_host.has_key('CONFIG_ICONV')} +summary_info += {'curses support': config_host.has_key('CONFIG_CURSES')} +# TODO: add back version +summary_info += {'virgl support': config_host.has_key('CONFIG_VIRGL')} +summary_info += {'curl support': config_host.has_key('CONFIG_CURL')} +summary_info += {'mingw32 support': targetos == 'windows'} +summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']} +summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']} +summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']} +summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')} +summary_info += {'Multipath support': config_host.has_key('CONFIG_MPATH')} +summary_info += {'VNC support': config_host.has_key('CONFIG_VNC')} +if config_host.has_key('CONFIG_VNC') + summary_info += {'VNC SASL support': config_host.has_key('CONFIG_VNC_SASL')} + summary_info += {'VNC JPEG support': config_host.has_key('CONFIG_VNC_JPEG')} + summary_info += {'VNC PNG support': config_host.has_key('CONFIG_VNC_PNG')} +endif +summary_info += {'xen support': config_host.has_key('CONFIG_XEN_BACKEND')} +if config_host.has_key('CONFIG_XEN_BACKEND') + summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']} +endif +summary_info += {'brlapi support': config_host.has_key('CONFIG_BRLAPI')} +summary_info += {'Documentation': config_host.has_key('BUILD_DOCS')} +summary_info += {'PIE': get_option('b_pie')} +summary_info += {'vde support': config_host.has_key('CONFIG_VDE')} +summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')} +summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')} +summary_info += {'Linux io_uring support': config_host.has_key('CONFIG_LINUX_IO_URING')} +summary_info += {'ATTR/XATTR support': config_host.has_key('CONFIG_ATTR')} +summary_info += {'Install blobs': config_host.has_key('INSTALL_BLOBS')} +# TODO: add back KVM/HAX/HVF/WHPX/TCG +#summary_info += {'KVM support': have_kvm'} +#summary_info += {'HAX support': have_hax'} +#summary_info += {'HVF support': have_hvf'} +#summary_info += {'WHPX support': have_whpx'} +#summary_info += {'TCG support': have_tcg'} +#if get_option('tcg') +# summary_info += {'TCG debug enabled': config_host.has_key('CONFIG_DEBUG_TCG')} +# summary_info += {'TCG interpreter': config_host.has_key('CONFIG_TCG_INTERPRETER')} +#endif +summary_info += {'malloc trim support': config_host.has_key('CONFIG_MALLOC_TRIM')} +summary_info += {'RDMA support': config_host.has_key('CONFIG_RDMA')} +summary_info += {'PVRDMA support': config_host.has_key('CONFIG_PVRDMA')} +summary_info += {'fdt support': config_host.has_key('CONFIG_FDT')} +summary_info += {'membarrier': config_host.has_key('CONFIG_MEMBARRIER')} +summary_info += {'preadv support': config_host.has_key('CONFIG_PREADV')} +summary_info += {'fdatasync': config_host.has_key('CONFIG_FDATASYNC')} +summary_info += {'madvise': config_host.has_key('CONFIG_MADVISE')} +summary_info += {'posix_madvise': config_host.has_key('CONFIG_POSIX_MADVISE')} +summary_info += {'posix_memalign': config_host.has_key('CONFIG_POSIX_MEMALIGN')} +summary_info += {'libcap-ng support': config_host.has_key('CONFIG_LIBCAP_NG')} +summary_info += {'vhost-net support': config_host.has_key('CONFIG_VHOST_NET')} +summary_info += {'vhost-crypto support': config_host.has_key('CONFIG_VHOST_CRYPTO')} +summary_info += {'vhost-scsi support': config_host.has_key('CONFIG_VHOST_SCSI')} +summary_info += {'vhost-vsock support': config_host.has_key('CONFIG_VHOST_VSOCK')} +summary_info += {'vhost-user support': config_host.has_key('CONFIG_VHOST_KERNEL')} +summary_info += {'vhost-user-fs support': config_host.has_key('CONFIG_VHOST_USER_FS')} +summary_info += {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST_VDPA')} +summary_info += {'Trace backends': config_host['TRACE_BACKENDS']} +if config_host['TRACE_BACKENDS'].split().contains('simple') + summary_info += {'Trace output file': config_host['CONFIG_TRACE_FILE'] + '-'} +endif +# TODO: add back protocol and server version +summary_info += {'spice support': config_host.has_key('CONFIG_SPICE')} +summary_info += {'rbd support': config_host.has_key('CONFIG_RBD')} +summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')} +summary_info += {'smartcard support': config_host.has_key('CONFIG_SMARTCARD')} +summary_info += {'libusb': config_host.has_key('CONFIG_USB_LIBUSB')} +summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')} +summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')} +summary_info += {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL_DMABUF')} +summary_info += {'libiscsi support': config_host.has_key('CONFIG_LIBISCSI')} +summary_info += {'libnfs support': config_host.has_key('CONFIG_LIBNFS')} +summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')} +if targetos == 'windows' + if 'WIN_SDK' in config_host + summary_info += {'Windows SDK': config_host['WIN_SDK']} + endif + summary_info += {'QGA VSS support': config_host.has_key('CONFIG_QGA_VSS')} + summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')} + summary_info += {'QGA MSI support': config_host.has_key('CONFIG_QGA_MSI_ENABLED')} +endif +summary_info += {'seccomp support': config_host.has_key('CONFIG_SECCOMP')} +summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']} +summary_info += {'coroutine pool': config_host['CONFIG_COROUTINE_POOL'] == '1'} +summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_USAGE')} +summary_info += {'mutex debugging': config_host.has_key('CONFIG_DEBUG_MUTEX')} +summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')} +summary_info += {'GlusterFS support': config_host.has_key('CONFIG_GLUSTERFS')} +summary_info += {'gcov': config_host.has_key('CONFIG_GCOV')} +summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} +summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')} +summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} +summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} +summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')} +summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')} +summary_info += {'bzip2 support': config_host.has_key('CONFIG_BZIP2')} +summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} +summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} +summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')} +summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')} +summary_info += {'tcmalloc support': config_host.has_key('CONFIG_TCMALLOC')} +summary_info += {'jemalloc support': config_host.has_key('CONFIG_JEMALLOC')} +summary_info += {'avx2 optimization': config_host.has_key('CONFIG_AVX2_OPT')} +summary_info += {'avx512f optimization': config_host.has_key('CONFIG_AVX512F_OPT')} +summary_info += {'replication support': config_host.has_key('CONFIG_REPLICATION')} +summary_info += {'bochs support': config_host.has_key('CONFIG_BOCHS')} +summary_info += {'cloop support': config_host.has_key('CONFIG_CLOOP')} +summary_info += {'dmg support': config_host.has_key('CONFIG_DMG')} +summary_info += {'qcow v1 support': config_host.has_key('CONFIG_QCOW1')} +summary_info += {'vdi support': config_host.has_key('CONFIG_VDI')} +summary_info += {'vvfat support': config_host.has_key('CONFIG_VVFAT')} +summary_info += {'qed support': config_host.has_key('CONFIG_QED')} +summary_info += {'parallels support': config_host.has_key('CONFIG_PARALLELS')} +summary_info += {'sheepdog support': config_host.has_key('CONFIG_SHEEPDOG')} +summary_info += {'capstone': config_host.has_key('CONFIG_CAPSTONE')} +summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')} +summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')} +summary_info += {'libudev': config_host.has_key('CONFIG_LIBUDEV')} +summary_info += {'default devices': config_host['CONFIG_MINIKCONF_MODE'] == '--defconfig'} +summary_info += {'plugin support': config_host.has_key('CONFIG_PLUGIN')} +summary_info += {'fuzzing support': config_host.has_key('CONFIG_FUZZ')} +if config_host.has_key('HAVE_GDB_BIN') + summary_info += {'gdb': config_host['HAVE_GDB_BIN']} +endif +summary_info += {'thread sanitizer': config_host.has_key('CONFIG_TSAN')} +summary_info += {'rng-none': config_host.has_key('CONFIG_RNG_NONE')} +summary_info += {'Linux keyring': config_host.has_key('CONFIG_SECRET_KEYRING')} +summary(summary_info, bool_yn: true) + +if not supported_cpus.contains(cpu) + message() + warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!') + message() + message('CPU host architecture ' + cpu + ' support is not currently maintained.') + message('The QEMU project intends to remove support for this host CPU in') + message('a future release if nobody volunteers to maintain it and to') + message('provide a build host for our continuous integration setup.') + message('configure has succeeded and you can continue to build, but') + message('if you care about QEMU on this platform you should contact') + message('us upstream at qemu-devel@nongnu.org.') +endif + +if not supported_oses.contains(targetos) + message() + warning('WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!') + message() + message('Host OS ' + targetos + 'support is not currently maintained.') + message('The QEMU project intends to remove support for this host OS in') + message('a future release if nobody volunteers to maintain it and to') + message('provide a build host for our continuous integration setup.') + message('configure has succeeded and you can continue to build, but') + message('if you care about QEMU on this platform you should contact') + message('us upstream at qemu-devel@nongnu.org.') +endif From patchwork Fri Aug 21 10:21:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275959 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B72E2C433DF for ; Fri, 21 Aug 2020 10:27:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E5E120748 for ; Fri, 21 Aug 2020 10:27:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XXeXWq25" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E5E120748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94GO-0006Zk-Nw for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:27:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DH-00012U-35 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:20612 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DF-0001U6-CQ for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:23:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=puERJJsV0RSzRrLH5S7pFo8YtaRDm0wNMSwiXX85y8M=; b=XXeXWq25TP9qpUCNC5od4xoiNIJDSISU9X1nh8PJVRPp+4DZLUDI4y0LEuVse9Y4/SU/6/ HKVRTK3ZmhRF63ky3RAOkFlqRuPhN+PCMAN1T2lV1gxJICvx9rLFxRQyWsOxHT2OAJh2PR rNrdVkdqWbivf4Wpro/TjOf3RDgigl0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-97-SYylYWqLN5-MudXLiAwvbg-1; Fri, 21 Aug 2020 06:23:54 -0400 X-MC-Unique: SYylYWqLN5-MudXLiAwvbg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CFCE687311A for ; Fri, 21 Aug 2020 10:23:53 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8EB607AEC5; Fri, 21 Aug 2020 10:23:53 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 022/152] meson: enable pie Date: Fri, 21 Aug 2020 06:21:19 -0400 Message-Id: <20200821102329.29777-23-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 40c8462539..7c2a46ade0 100755 --- a/configure +++ b/configure @@ -8514,6 +8514,7 @@ NINJA=$PWD/ninjatool $meson setup \ -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \ -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \ -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \ + -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \ $cross_arg \ "$PWD" "$source_path" From patchwork Fri Aug 21 10:21:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15F92C433E4 for ; Fri, 21 Aug 2020 10:37:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9B9520748 for ; Fri, 21 Aug 2020 10:37:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TyGS5lmM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9B9520748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94QK-0002ZS-46 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:37:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DK-0001BA-98 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DF-0001UE-Oa for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kKo52PK5p1bO40zhuGmPQ5R+Z9GhxAohp/4Q73YBYHs=; b=TyGS5lmMsbLJW40JpQzpYCy/NqB5ASFgQJLQnEvjDvjNpbO6GO7t4RFEq9Xc5OKTteBYDq MMDfnoEWpcN3wCJzoZEL/sU8WjeG/k6wSsa1MCqNkHC/OhATYcTOoEatadkd0a3BuYkp9s WPL/k/Souc5BpCLCslnTnzzffAhfQNw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-323-J2oQ4BxTPne7Sx5t9Ithmg-1; Fri, 21 Aug 2020 06:23:55 -0400 X-MC-Unique: J2oQ4BxTPne7Sx5t9Ithmg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 38AF11DE1F for ; Fri, 21 Aug 2020 10:23:54 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id EAC637AEC5; Fri, 21 Aug 2020 10:23:53 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 023/152] meson: use coverage option Date: Fri, 21 Aug 2020 06:21:20 -0400 Message-Id: <20200821102329.29777-24-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 14 -------------- Makefile.target | 16 ---------------- configure | 9 ++------- docs/devel/testing.rst | 7 +++---- meson.build | 2 +- 5 files changed, 6 insertions(+), 42 deletions(-) diff --git a/Makefile b/Makefile index b726e7d8d2..ba8413d809 100644 --- a/Makefile +++ b/Makefile @@ -777,14 +777,6 @@ module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ "GEN","$@") -ifdef CONFIG_GCOV -.PHONY: clean-coverage -clean-coverage: - $(call quiet-command, \ - find . \( -name '*.gcda' -o -name '*.gcov' \) -type f -exec rm {} +, \ - "CLEAN", "coverage files") -endif - clean: recurse-clean ninja-clean clean-ctlist -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean # avoid old build problems by removing potentially incorrect old files @@ -1291,9 +1283,6 @@ endif echo '') @echo 'Cleaning targets:' $(call print-help,clean,Remove most generated files but keep the config) -ifdef CONFIG_GCOV - $(call print-help,clean-coverage,Remove coverage files) -endif $(call print-help,distclean,Remove all generated files) $(call print-help,dist,Build a distributable tarball) @echo '' @@ -1304,9 +1293,6 @@ endif @echo '' @echo 'Documentation targets:' $(call print-help,html info pdf txt,Build documentation in specified format) -ifdef CONFIG_GCOV - $(call print-help,coverage-report,Create code coverage report) -endif @echo '' ifdef CONFIG_WIN32 @echo 'Windows targets:' diff --git a/Makefile.target b/Makefile.target index ffa2657269..d61a6a978b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -269,19 +269,3 @@ 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 diff --git a/configure b/configure index 7c2a46ade0..b2c498a0bf 100755 --- a/configure +++ b/configure @@ -466,7 +466,6 @@ tcg_interpreter="no" bigendian="no" mingw32="no" gcov="no" -gcov_tool="gcov" EXESUF="" DSOSUF=".so" LDFLAGS_SHARED="-shared" @@ -1054,8 +1053,6 @@ for opt do ;; --meson=*) meson="$optarg" ;; - --gcov=*) gcov_tool="$optarg" - ;; --smbd=*) smbd="$optarg" ;; --extra-cflags=*) @@ -1862,7 +1859,6 @@ Advanced options (experts only): --with-coroutine=BACKEND coroutine backend. Supported options: ucontext, sigaltstack, windows --enable-gcov enable test coverage analysis with gcov - --gcov=GCOV use specified gcov [$gcov_tool] --disable-blobs disable installing provided firmware blobs --with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent --with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb) @@ -6596,8 +6592,7 @@ fi write_c_skeleton if test "$gcov" = "yes" ; then - QEMU_CFLAGS="-fprofile-arcs -ftest-coverage -g $QEMU_CFLAGS" - QEMU_LDFLAGS="-fprofile-arcs -ftest-coverage $QEMU_LDFLAGS" + : elif test "$fortify_source" = "yes" ; then QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" debug=no @@ -7882,7 +7877,6 @@ echo "TASN1_CFLAGS=$tasn1_cflags" >> $config_host_mak echo "POD2MAN=$POD2MAN" >> $config_host_mak if test "$gcov" = "yes" ; then echo "CONFIG_GCOV=y" >> $config_host_mak - echo "GCOV=$gcov_tool" >> $config_host_mak fi if test "$libudev" != "no"; then @@ -8515,6 +8509,7 @@ NINJA=$PWD/ninjatool $meson setup \ -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \ -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \ -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \ + -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \ $cross_arg \ "$PWD" "$source_path" diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index c1ff24370b..a4264691be 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -164,13 +164,12 @@ instrumenting the tested code. To use it, configure QEMU with ``--enable-gcov`` option and build. Then run ``make check`` as usual. If you want to gather coverage information on a single test the ``make -clean-coverage`` target can be used to delete any existing coverage +clean-gcda`` target can be used to delete any existing coverage information before running a single test. You can generate a HTML coverage report by executing ``make -coverage-report`` which will create -./reports/coverage/coverage-report.html. If you want to create it -elsewhere simply execute ``make /foo/bar/baz/coverage-report.html``. +coverage-html`` which will create +``meson-logs/coveragereport/index.html``. Further analysis can be conducted by running the ``gcov`` command directly on the various .gcda output files. Please read the ``gcov`` diff --git a/meson.build b/meson.build index c47cd74571..1a56ac8b26 100644 --- a/meson.build +++ b/meson.build @@ -207,7 +207,7 @@ summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_US summary_info += {'mutex debugging': config_host.has_key('CONFIG_DEBUG_MUTEX')} summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')} summary_info += {'GlusterFS support': config_host.has_key('CONFIG_GLUSTERFS')} -summary_info += {'gcov': config_host.has_key('CONFIG_GCOV')} +summary_info += {'gcov': get_option('b_coverage')} summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')} summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} From patchwork Fri Aug 21 10:21:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82C7CC433E1 for ; Fri, 21 Aug 2020 10:36:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 05E6920738 for ; Fri, 21 Aug 2020 10:36:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DFaf/46l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05E6920738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94P6-0007dg-5F for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DI-00017o-WF for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:01 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55925 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DG-0001UL-3n for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jnt5uKu4kBTWpAPO0AzOsG/lDWm1TEp2iP/8NdnruOw=; b=DFaf/46lFckNg3BNN/L+YekwJYYpro3h52RO/x5G3xcD2QCA8O9MYKDsqIb39l31iOeFlW AnW4bmqg09Y4iDYsAnj20S6cjcuQMptez+Od7idteceh0Gis2dZMyvZO1oBkhwQZqXDRBA odmfGUwUB9Xa9K2PNTtnWcD10h+OxGc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-57-WYS5qWY_PR--vaxsR7ACHw-1; Fri, 21 Aug 2020 06:23:55 -0400 X-MC-Unique: WYS5qWY_PR--vaxsR7ACHw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 837561DE0D for ; Fri, 21 Aug 2020 10:23:54 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 527537AED2 for ; Fri, 21 Aug 2020 10:23:54 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 024/152] meson: add sparse support Date: Fri, 21 Aug 2020 06:21:21 -0400 Message-Id: <20200821102329.29777-25-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Do not use cgcc; instead, extract compilation commands from compile_commands.json and invoke sparse directly. Signed-off-by: Paolo Bonzini --- Makefile | 1 + configure | 8 ++------ meson.build | 7 +++++++ scripts/check_sparse.py | 25 +++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 scripts/check_sparse.py diff --git a/Makefile b/Makefile index ba8413d809..81c9642a30 100644 --- a/Makefile +++ b/Makefile @@ -1261,6 +1261,7 @@ endif $(call print-help,install,Install QEMU, documentation and tools) $(call print-help,ctags/TAGS,Generate tags file for editors) $(call print-help,cscope,Generate cscope index) + $(call print-help,sparse,Run sparse on the QEMU source) @echo '' @$(if $(TARGET_DIRS), \ echo 'Architecture specific targets:'; \ diff --git a/configure b/configure index b2c498a0bf..e23b2f616f 100755 --- a/configure +++ b/configure @@ -3054,7 +3054,7 @@ fi ########################################## # Sparse probe if test "$sparse" != "no" ; then - if has cgcc; then + if has sparse; then sparse=yes else if test "$sparse" = "yes" ; then @@ -7855,11 +7855,7 @@ echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak if test "$sparse" = "yes" ; then - echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak - echo "CPP := REAL_CC=\"\$(CPP)\" cgcc" >> $config_host_mak - echo "CXX := REAL_CC=\"\$(CXX)\" cgcc" >> $config_host_mak - echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_host_mak - echo "QEMU_CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak + echo "SPARSE_CFLAGS = -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak fi echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak diff --git a/meson.build b/meson.build index 1a56ac8b26..86219e500a 100644 --- a/meson.build +++ b/meson.build @@ -25,6 +25,13 @@ if host_machine.system() == 'darwin' add_languages('objc', required: false, native: false) endif +if 'SPARSE_CFLAGS' in config_host + run_target('sparse', + command: [find_program('scripts/check_sparse.py'), + config_host['SPARSE_CFLAGS'].split(), + 'compile_commands.json']) +endif + configure_file(input: files('scripts/ninjatool.py'), output: 'ninjatool', configuration: config_host) diff --git a/scripts/check_sparse.py b/scripts/check_sparse.py new file mode 100644 index 0000000000..0de7aa55d9 --- /dev/null +++ b/scripts/check_sparse.py @@ -0,0 +1,25 @@ +#! /usr/bin/env python3 + +# Invoke sparse based on the contents of compile_commands.json + +import json +import subprocess +import sys +import shlex + +def extract_cflags(shcmd): + cflags = shlex.split(shcmd) + return [x for x in cflags + if x.startswith('-D') or x.startswith('-I') or x.startswith('-W') + or x.startswith('-std=')] + +cflags = sys.argv[1:-1] +with open(sys.argv[-1], 'r') as fd: + compile_commands = json.load(fd) + +for cmd in compile_commands: + cmd = ['sparse'] + cflags + extract_cflags(cmd['command']) + [cmd['file']] + print(' '.join((shlex.quote(x) for x in cmd))) + r = subprocess.run(cmd) + if r.returncode != 0: + sys.exit(r.returncode) From patchwork Fri Aug 21 10:21:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275953 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AD4EC433DF for ; Fri, 21 Aug 2020 10:32:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7420204EA for ; Fri, 21 Aug 2020 10:32:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BzzPLYH0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7420204EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94LP-00008h-UD for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:32:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DO-0001PI-TL for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:06 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:25271 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DG-0001Ua-Td for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=19JZSMGE+xs5C6TNYFP1uSNwCFsjNR3QGCAm6Cn92jM=; b=BzzPLYH0g4+6YxKZey0g26aZ1NirONSyiw108tQxqHO+Br3w+g9X5AV86qlLf+37LMJqRw INqcPzvbc+xlJn/xfEpDaXC1+57rYdGFKz2+WxDtqBn/9khg9cVIzZ1hBB2D9q6C4l1Nyy C2MllHJRCJ2ntJdOHutbDtC4s0KV6Kw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-80-CE-GgjeENWi4JaXw-caYDA-1; Fri, 21 Aug 2020 06:23:56 -0400 X-MC-Unique: CE-GgjeENWi4JaXw-caYDA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 379B281CAFE for ; Fri, 21 Aug 2020 10:23:55 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC1E67AED2 for ; Fri, 21 Aug 2020 10:23:54 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 026/152] libqemuutil, qapi, trace: convert to meson Date: Fri, 21 Aug 2020 06:21:23 -0400 Message-Id: <20200821102329.29777-27-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 01:00:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This shows how to do some "computations" in meson.build using its array and dictionary data structures, and also a basic usage of the sourceset module for conditional compilation. Notice the new "if have_system" part of util/meson.build, which fixes a bug in the old build system was buggy: util/dbus.c was built even for non-softmmu builds, but the dependency on -lgio was lost when the linking was done through libqemuutil.a. Because all of its users required gio otherwise, the bug was hidden. Meson instead propagates libqemuutil's dependencies down to its users, and shows the problem. Signed-off-by: Paolo Bonzini --- Makefile | 228 +++++----------------------- Makefile.objs | 95 ------------ Makefile.target | 8 +- configure | 8 + crypto/Makefile.objs | 6 - crypto/meson.build | 11 ++ docs/devel/tracing.txt | 2 +- meson.build | 194 +++++++++++++++++++++++ qapi/Makefile.objs | 23 --- qapi/meson.build | 121 +++++++++++++++ qobject/Makefile.objs | 3 - qobject/meson.build | 3 + rules.mak | 2 +- scripts/qapi-gen.py | 0 scripts/tracetool.py | 0 scripts/tracetool/backend/dtrace.py | 2 +- scripts/tracetool/backend/ust.py | 6 +- storage-daemon/Makefile.objs | 4 +- storage-daemon/meson.build | 1 + storage-daemon/qapi/Makefile.objs | 1 - storage-daemon/qapi/meson.build | 10 ++ stubs/Makefile.objs | 56 ------- stubs/meson.build | 50 ++++++ trace/Makefile.objs | 51 ------- trace/meson.build | 76 ++++++++++ util/Makefile.objs | 83 ---------- util/meson.build | 78 ++++++++++ 27 files changed, 597 insertions(+), 525 deletions(-) create mode 100644 crypto/meson.build create mode 100644 qapi/meson.build delete mode 100644 qobject/Makefile.objs create mode 100644 qobject/meson.build mode change 100755 => 100644 scripts/qapi-gen.py mode change 100755 => 100644 scripts/tracetool.py create mode 100644 storage-daemon/meson.build delete mode 100644 storage-daemon/qapi/Makefile.objs create mode 100644 storage-daemon/qapi/meson.build delete mode 100644 stubs/Makefile.objs create mode 100644 stubs/meson.build create mode 100644 trace/meson.build delete mode 100644 util/Makefile.objs create mode 100644 util/meson.build diff --git a/Makefile b/Makefile index 5f9aae6e3e..e5d217d4d2 100644 --- a/Makefile +++ b/Makefile @@ -137,184 +137,60 @@ FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSIO generated-files-y = qemu-version.h config-host.h qemu-options.def -GENERATED_QAPI_FILES = qapi/qapi-builtin-types.h qapi/qapi-builtin-types.c -GENERATED_QAPI_FILES += qapi/qapi-types.h qapi/qapi-types.c -GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-types-%.h) -GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-types-%.c) -GENERATED_QAPI_FILES += qapi/qapi-builtin-visit.h qapi/qapi-builtin-visit.c -GENERATED_QAPI_FILES += qapi/qapi-visit.h qapi/qapi-visit.c -GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-visit-%.h) -GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-visit-%.c) -GENERATED_QAPI_FILES += qapi/qapi-init-commands.h qapi/qapi-init-commands.c -GENERATED_QAPI_FILES += qapi/qapi-commands.h qapi/qapi-commands.c -GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-commands-%.h) -GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-commands-%.c) -GENERATED_QAPI_FILES += qapi/qapi-emit-events.h qapi/qapi-emit-events.c -GENERATED_QAPI_FILES += qapi/qapi-events.h qapi/qapi-events.c -GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.h) -GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.c) -GENERATED_QAPI_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h -GENERATED_QAPI_FILES += qapi/qapi-doc.texi - -# The following list considers only the storage daemon main module. All other -# modules are currently shared with the main schema, so we don't actually -# generate additional files. - -GENERATED_STORAGE_DAEMON_QAPI_FILES = storage-daemon/qapi/qapi-commands.h -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-commands.c -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-emit-events.h -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-emit-events.c -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-events.h -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-events.c -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-init-commands.h -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-init-commands.c -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-introspect.h -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-introspect.c -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-types.h -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-types.c -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-visit.h -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-visit.c -GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-doc.texi - -generated-files-y += $(GENERATED_QAPI_FILES) -generated-files-y += $(GENERATED_STORAGE_DAEMON_QAPI_FILES) - generated-files-y += trace/generated-tcg-tracers.h generated-files-y += trace/generated-helpers-wrappers.h generated-files-y += trace/generated-helpers.h generated-files-y += trace/generated-helpers.c -generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.h -generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.c - generated-files-y += module_block.h -TRACE_HEADERS = trace/trace-root.h -TRACE_SOURCES = trace/trace-root.c -TRACE_DTRACE = -ifdef CONFIG_TRACE_DTRACE -TRACE_HEADERS += trace-dtrace-root.h $(trace-events-subdirs:%=%/trace-dtrace.h) -TRACE_DTRACE += trace-dtrace-root.dtrace $(trace-events-subdirs:%=%/trace-dtrace.dtrace) -endif -ifdef CONFIG_TRACE_UST -TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h) -endif - -generated-files-y += $(BUILD_DIR)/trace-events-all generated-files-y += .git-submodule-status -trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g') -trace-group-suffix = $(shell echo $1 | sed -e 's/[^a-zA-Z0-9]/_/g') - tracetool-y = $(SRC_PATH)/scripts/tracetool.py tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py") -define __trace_rules -TRACE_HEADERS += trace/trace-$2.h -TRACE_SOURCES += trace/trace-$2.c -trace-obj-y += trace/trace-$2.o -trace/trace-$2.h: trace/trace-$2.h-timestamp - @cmp $$< $$@ >/dev/null 2>&1 || cp $$< $$@ -trace/trace-$2.h-timestamp: $(SRC_PATH)/$1/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak - $(call quiet-command,$(TRACETOOL) \ - --group=$2 \ - --format=h \ - --backends=$(TRACE_BACKENDS) \ - $$< > $$@,"GEN","$$(@:%-timestamp=%)") - -trace/trace-$2.c: trace/trace-$2.c-timestamp - @cmp $$< $$@ >/dev/null 2>&1 || cp $$< $$@ -trace/trace-$2.c-timestamp: $(SRC_PATH)/$1/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak - $(call quiet-command,$(TRACETOOL) \ - --group=$2 \ - --format=c \ - --backends=$(TRACE_BACKENDS) \ - $$< > $$@,"GEN","$$(@:%-timestamp=%)") -endef - -%/trace-ust.h: %/trace-ust.h-timestamp +trace/generated-helpers-wrappers.h: trace/generated-helpers-wrappers.h-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak - $(call quiet-command,$(TRACETOOL) \ - --group=$(call trace-group-name,$@) \ - --format=ust-events-h \ - --backends=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(@:%-timestamp=%)") - -%/trace-dtrace.dtrace: %/trace-dtrace.dtrace-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -%/trace-dtrace.dtrace-timestamp: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=$(call trace-group-name,$@) \ - --format=d \ - --backends=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(@:%-timestamp=%)") - -%/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y) - $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@") - -%/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y) - - -trace/trace-root.h: trace/trace-root.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace/trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak +trace/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) + @mkdir -p $(dir $@) $(call quiet-command,$(TRACETOOL) \ --group=root \ - --format=h \ - --backends=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(@:%-timestamp=%)") + --format=tcg-helper-wrapper-h \ + --backend=$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") -trace/trace-root.c: trace/trace-root.c-timestamp +trace/generated-helpers.h: trace/generated-helpers.h-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace/trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak +trace/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) + @mkdir -p $(dir $@) $(call quiet-command,$(TRACETOOL) \ --group=root \ - --format=c \ - --backends=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(@:%-timestamp=%)") + --format=tcg-helper-h \ + --backend=$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") -trace-ust-root.h: trace-ust-root.h-timestamp +trace/generated-helpers.c: trace/generated-helpers.c-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak +trace/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) + @mkdir -p $(dir $@) $(call quiet-command,$(TRACETOOL) \ --group=root \ - --format=ust-events-h \ - --backends=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(@:%-timestamp=%)") - -trace-ust-all.h: trace-ust-all.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y) $(BUILD_DIR)/config-host.mak - $(call quiet-command,$(TRACETOOL) \ - --group=all \ - --format=ust-events-h \ - --backends=$(TRACE_BACKENDS) \ - $(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)") + --format=tcg-helper-c \ + --backend=$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") -trace-ust-all.c: trace-ust-all.c-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y) $(BUILD_DIR)/config-host.mak - $(call quiet-command,$(TRACETOOL) \ - --group=all \ - --format=ust-events-c \ - --backends=$(TRACE_BACKENDS) \ - $(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)") +trace/generated-helpers.o: trace/generated-helpers.c -trace-dtrace-root.dtrace: trace-dtrace-root.dtrace-timestamp +trace/generated-tcg-tracers.h: trace/generated-tcg-tracers.h-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace-dtrace-root.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) +trace/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) + @mkdir -p $(dir $@) $(call quiet-command,$(TRACETOOL) \ --group=root \ - --format=d \ - --backends=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(@:%-timestamp=%)") - -trace-dtrace-root.h: trace-dtrace-root.dtrace - $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@") - -trace-dtrace-root.o: trace-dtrace-root.dtrace + --format=tcg-h \ + --backend=$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv @@ -485,10 +361,8 @@ include $(SRC_PATH)/Makefile.objs endif dummy := $(call unnest-vars,, \ - stub-obj-y \ authz-obj-y \ chardev-obj-y \ - util-obj-y \ qga-obj-y \ elf2dmp-obj-y \ ivshmem-client-obj-y \ @@ -509,14 +383,7 @@ dummy := $(call unnest-vars,, \ qom-obj-y \ io-obj-y \ common-obj-y \ - common-obj-m \ - trace-obj-y) - -dummy := $(foreach DIR,$(trace-events-subdirs),$(eval $(call __trace_rules,$(DIR),$(call trace-group-suffix,$(DIR))))) - -generated-files-y += $(TRACE_HEADERS) -generated-files-y += $(TRACE_SOURCES) - + common-obj-m) include $(SRC_PATH)/tests/Makefile.include @@ -630,8 +497,7 @@ Makefile: $(version-obj-y) ###################################################################### # Build libraries -libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y) -libvhost-user.a: $(libvhost-user-obj-y) $(util-obj-y) $(stub-obj-y) +libvhost-user.a: $(libvhost-user-obj-y) ###################################################################### @@ -694,27 +560,6 @@ qga/qapi-generated/qapi-gen-timestamp: $(SRC_PATH)/qga/qapi-schema.json $(qapi-p "GEN","$(@:%-timestamp=%)") @>$@ -qapi-modules = $(SRC_PATH)/qapi/qapi-schema.json \ - $(QAPI_MODULES:%=$(SRC_PATH)/qapi/%.json) - -$(GENERATED_QAPI_FILES): qapi-gen-timestamp ; -qapi-gen-timestamp: $(qapi-modules) $(qapi-py) - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \ - -o "qapi" -b $<, \ - "GEN","$(@:%-timestamp=%)") - @>$@ - -qapi-modules-storage-daemon = \ - $(SRC_PATH)/storage-daemon/qapi/qapi-schema.json \ - $(QAPI_MODULES_STORAGE_DAEMON:%=$(SRC_PATH)/qapi/%.json) - -$(GENERATED_STORAGE_DAEMON_QAPI_FILES): storage-daemon/qapi/qapi-gen-timestamp ; -storage-daemon/qapi/qapi-gen-timestamp: $(qapi-modules-storage-daemon) $(qapi-py) - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \ - -o "storage-daemon/qapi" $<, \ - "GEN","$(@:%-timestamp=%)") - @>$@ - QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qapi-commands.h qga-qapi-init-commands.h) $(qga-obj-y): $(QGALIB_GEN) @@ -752,9 +597,9 @@ ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS) ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS) $(call LINK, $^) endif -vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a +vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) -vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a +vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) rdmacm-mux$(EXESUF): LIBS += "-libumad" @@ -767,12 +612,12 @@ virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) endif -vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) $(libvhost-user-obj-y) libqemuutil.a +vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) ifdef CONFIG_VHOST_USER_INPUT ifdef CONFIG_LINUX -vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a libqemuutil.a +vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) # build by default, do not install @@ -801,9 +646,6 @@ clean: recurse-clean ninja-clean clean-ctlist rm -f fsdev/*.pod scsi/*.pod rm -f qemu-img-cmds.h rm -f ui/shader/*-vert.h ui/shader/*-frag.h - @# May not be present in generated-files-y - rm -f trace/generated-tracers-dtrace.dtrace* - rm -f trace/generated-tracers-dtrace.h* rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) rm -f qapi-gen-timestamp rm -f storage-daemon/qapi/qapi-gen-timestamp @@ -1033,7 +875,9 @@ endif set -e; for x in $(KEYMAPS); do \ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ done - $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all" + for d in $(TARGET_DIRS); do \ + $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ + done # opengl shader programs ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert $(SRC_PATH)/scripts/shaderinclude.pl @@ -1244,10 +1088,6 @@ Makefile: $(generated-files-y) endif endif -.SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=%-timestamp) \ - $(TRACE_SOURCES) $(TRACE_SOURCES:%=%-timestamp) \ - $(TRACE_DTRACE) $(TRACE_DTRACE:%=%-timestamp) - # Include automatically generated dependency files # Dependencies in Makefile.objs files come from our recursive subdir rules -include $(wildcard *.d tests/*.d) diff --git a/Makefile.objs b/Makefile.objs index 3823463c23..e5c9077517 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -1,7 +1,5 @@ ####################################################################### # Common libraries for tools and emulators -stub-obj-y = stubs/ -util-obj-y = crypto/ util/ qobject/ qapi/ qom-obj-y = qom/ ####################################################################### @@ -94,10 +92,6 @@ common-obj-y += disas/ # Resource file for Windows executables version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o -###################################################################### -# tracing -util-obj-y += trace/ - ###################################################################### # guest agent @@ -123,92 +117,3 @@ vhost-user-gpu-obj-y = contrib/vhost-user-gpu/ virtiofsd-obj-y = tools/virtiofsd/ ###################################################################### -trace-events-subdirs = -trace-events-subdirs += accel/kvm -trace-events-subdirs += accel/tcg -trace-events-subdirs += backends -trace-events-subdirs += backends/tpm -trace-events-subdirs += crypto -trace-events-subdirs += monitor -ifeq ($(CONFIG_USER_ONLY),y) -trace-events-subdirs += linux-user -endif -ifeq ($(CONFIG_BLOCK),y) -trace-events-subdirs += authz -trace-events-subdirs += block -trace-events-subdirs += io -trace-events-subdirs += nbd -trace-events-subdirs += scsi -endif -ifeq ($(CONFIG_SOFTMMU),y) -trace-events-subdirs += audio -trace-events-subdirs += chardev -trace-events-subdirs += hw/9pfs -trace-events-subdirs += hw/acpi -trace-events-subdirs += hw/alpha -trace-events-subdirs += hw/arm -trace-events-subdirs += hw/audio -trace-events-subdirs += hw/block -trace-events-subdirs += hw/block/dataplane -trace-events-subdirs += hw/char -trace-events-subdirs += hw/dma -trace-events-subdirs += hw/hppa -trace-events-subdirs += hw/hyperv -trace-events-subdirs += hw/i2c -trace-events-subdirs += hw/i386 -trace-events-subdirs += hw/i386/xen -trace-events-subdirs += hw/ide -trace-events-subdirs += hw/input -trace-events-subdirs += hw/intc -trace-events-subdirs += hw/isa -trace-events-subdirs += hw/mem -trace-events-subdirs += hw/mips -trace-events-subdirs += hw/misc -trace-events-subdirs += hw/misc/macio -trace-events-subdirs += hw/net -trace-events-subdirs += hw/nvram -trace-events-subdirs += hw/pci -trace-events-subdirs += hw/pci-host -trace-events-subdirs += hw/ppc -trace-events-subdirs += hw/rdma -trace-events-subdirs += hw/rdma/vmw -trace-events-subdirs += hw/rtc -trace-events-subdirs += hw/s390x -trace-events-subdirs += hw/scsi -trace-events-subdirs += hw/sd -trace-events-subdirs += hw/sparc -trace-events-subdirs += hw/sparc64 -trace-events-subdirs += hw/ssi -trace-events-subdirs += hw/timer -trace-events-subdirs += hw/tpm -trace-events-subdirs += hw/usb -trace-events-subdirs += hw/vfio -trace-events-subdirs += hw/virtio -trace-events-subdirs += hw/watchdog -trace-events-subdirs += hw/xen -trace-events-subdirs += hw/gpio -trace-events-subdirs += hw/riscv -trace-events-subdirs += migration -trace-events-subdirs += net -trace-events-subdirs += ui -endif -trace-events-subdirs += hw/core -trace-events-subdirs += hw/display -trace-events-subdirs += qapi -trace-events-subdirs += qom -trace-events-subdirs += target/arm -trace-events-subdirs += target/hppa -trace-events-subdirs += target/i386 -trace-events-subdirs += target/mips -trace-events-subdirs += target/ppc -trace-events-subdirs += target/riscv -trace-events-subdirs += target/s390x -trace-events-subdirs += target/sparc -trace-events-subdirs += util - -trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events) - -trace-obj-y = trace-root.o -trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o -trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o -trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o) diff --git a/Makefile.target b/Makefile.target index d61a6a978b..0b323641bb 100644 --- a/Makefile.target +++ b/Makefile.target @@ -57,7 +57,7 @@ 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) +$(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=all \ --format=stap \ @@ -67,7 +67,7 @@ $(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all $(tracetool-y) --target-type=$(TARGET_TYPE) \ $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp-installed") -$(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all $(tracetool-y) +$(QEMU_PROG).stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=all \ --format=stap \ @@ -77,7 +77,7 @@ $(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all $(tracetool-y) --target-type=$(TARGET_TYPE) \ $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp") -$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y) +$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=all \ --format=simpletrace-stap \ @@ -85,7 +85,7 @@ $(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y) --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) +$(QEMU_PROG)-log.stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=all \ --format=log-stap \ diff --git a/configure b/configure index e23b2f616f..05c7cd24aa 100755 --- a/configure +++ b/configure @@ -7243,6 +7243,8 @@ fi echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak if test "$gnutls" = "yes" ; then echo "CONFIG_GNUTLS=y" >> $config_host_mak + echo "GNUTLS_CFLAGS=$gnutls_cflags" >> $config_host_mak + echo "GNUTLS_LIBS=$gnutls_libs" >> $config_host_mak fi if test "$gcrypt" = "yes" ; then echo "CONFIG_GCRYPT=y" >> $config_host_mak @@ -7253,6 +7255,8 @@ fi if test "$nettle" = "yes" ; then echo "CONFIG_NETTLE=y" >> $config_host_mak echo "CONFIG_NETTLE_VERSION_MAJOR=${nettle_version%%.*}" >> $config_host_mak + echo "NETTLE_CFLAGS=$nettle_cflags" >> $config_host_mak + echo "NETTLE_LIBS=$nettle_libs" >> $config_host_mak fi if test "$qemu_private_xts" = "yes" ; then echo "CONFIG_QEMU_PRIVATE_XTS=y" >> $config_host_mak @@ -7629,6 +7633,8 @@ if have_backend "log"; then fi if have_backend "ust"; then echo "CONFIG_TRACE_UST=y" >> $config_host_mak + echo "LTTNG_UST_LIBS=$lttng_ust_libs" >> $config_host_mak + echo "URCU_BP_LIBS=$urcu_bp_libs" >> $config_host_mak fi if have_backend "dtrace"; then echo "CONFIG_TRACE_DTRACE=y" >> $config_host_mak @@ -7854,6 +7860,8 @@ echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak +echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak +echo "GLIB_LIBS=$glib_libs" >> $config_host_mak if test "$sparse" = "yes" ; then echo "SPARSE_CFLAGS = -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak fi diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs index f1965b1a68..a9885919f2 100644 --- a/crypto/Makefile.objs +++ b/crypto/Makefile.objs @@ -35,9 +35,3 @@ crypto-obj-$(CONFIG_QEMU_PRIVATE_XTS) += xts.o crypto-obj-y += block.o crypto-obj-y += block-qcow.o crypto-obj-y += block-luks.o - -util-obj-$(CONFIG_GCRYPT) += random-gcrypt.o -util-obj-$(if $(CONFIG_GCRYPT),n,$(CONFIG_GNUTLS)) += random-gnutls.o -util-obj-$(if $(CONFIG_GCRYPT),n,$(if $(CONFIG_GNUTLS),n,$(CONFIG_RNG_NONE))) += random-none.o -util-obj-$(if $(CONFIG_GCRYPT),n,$(if $(CONFIG_GNUTLS),n,$(if $(CONFIG_RNG_NONE),n,y))) += random-platform.o -util-obj-y += aes.o init.o diff --git a/crypto/meson.build b/crypto/meson.build new file mode 100644 index 0000000000..1b244315b9 --- /dev/null +++ b/crypto/meson.build @@ -0,0 +1,11 @@ +util_ss.add(files('aes.c')) +util_ss.add(files('init.c')) +if 'CONFIG_GCRYPT' in config_host + util_ss.add(files('random-gcrypt.c')) +elif 'CONFIG_GNUTLS' in config_host + util_ss.add(files('random-gnutls.c'), gnutls) +elif 'CONFIG_RNG_NONE' in config_host + util_ss.add(files('random-none.c')) +else + util_ss.add(files('random-platform.c')) +endif diff --git a/docs/devel/tracing.txt b/docs/devel/tracing.txt index cb5f685de9..6144d9921b 100644 --- a/docs/devel/tracing.txt +++ b/docs/devel/tracing.txt @@ -60,7 +60,7 @@ general. It is strongly preferred that all events be declared directly in the sub-directory that uses them. The only exception is where there are some shared trace events defined in the top level directory trace-events file. The top level directory generates trace files with a filename prefix of -"trace-root" instead of just "trace". This is to avoid ambiguity between +"trace/trace-root" instead of just "trace". This is to avoid ambiguity between a trace.h in the current directory, vs the top level directory. === Using trace events === diff --git a/meson.build b/meson.build index 86219e500a..4e9eb5da5c 100644 --- a/meson.build +++ b/meson.build @@ -4,6 +4,9 @@ project('qemu', ['c'], meson_version: '>=0.55.0', not_found = dependency('', required: false) keyval = import('unstable-keyval') +ss = import('sourceset') + +cc = meson.get_compiler('c') config_host = keyval.load(meson.current_build_dir() / 'config-host.mak') add_project_arguments(config_host['QEMU_CFLAGS'].split(), @@ -43,6 +46,197 @@ supported_cpus = ['ppc', 'ppc64', 's390x', 'sparc64', 'riscv32', 'riscv64', 'x86 cpu = host_machine.cpu_family() targetos = host_machine.system() +m = cc.find_library('m', required: false) +util = cc.find_library('util', required: false) +socket = [] +if targetos == 'windows' + socket = cc.find_library('ws2_32') +endif +glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(), + link_args: config_host['GLIB_LIBS'].split()) +gio = not_found +if 'CONFIG_GIO' in config_host + gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), + link_args: config_host['GIO_LIBS'].split()) +endif +lttng = not_found +if 'CONFIG_TRACE_UST' in config_host + lttng = declare_dependency(link_args: config_host['LTTNG_UST_LIBS'].split()) +endif +urcubp = not_found +if 'CONFIG_TRACE_UST' in config_host + urcubp = declare_dependency(link_args: config_host['URCU_BP_LIBS'].split()) +endif +nettle = not_found +if 'CONFIG_NETTLE' in config_host + nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(), + link_args: config_host['NETTLE_LIBS'].split()) +endif +gnutls = not_found +if 'CONFIG_GNUTLS' in config_host + gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(), + link_args: config_host['GNUTLS_LIBS'].split()) +endif + +target_dirs = config_host['TARGET_DIRS'].split() +have_user = false +have_system = false +foreach target : target_dirs + have_user = have_user or target.endswith('-user') + have_system = have_system or target.endswith('-softmmu') +endforeach +have_tools = 'CONFIG_TOOLS' in config_host +have_block = have_system or have_tools + +# Generators + +qapi_gen = find_program('scripts/qapi-gen.py') +qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py', + meson.source_root() / 'scripts/qapi/commands.py', + meson.source_root() / 'scripts/qapi/common.py', + meson.source_root() / 'scripts/qapi/doc.py', + meson.source_root() / 'scripts/qapi/error.py', + meson.source_root() / 'scripts/qapi/events.py', + meson.source_root() / 'scripts/qapi/expr.py', + meson.source_root() / 'scripts/qapi/gen.py', + meson.source_root() / 'scripts/qapi/introspect.py', + meson.source_root() / 'scripts/qapi/parser.py', + meson.source_root() / 'scripts/qapi/schema.py', + meson.source_root() / 'scripts/qapi/source.py', + meson.source_root() / 'scripts/qapi/types.py', + meson.source_root() / 'scripts/qapi/visit.py', + meson.source_root() / 'scripts/qapi/common.py', + meson.source_root() / 'scripts/qapi/doc.py', + meson.source_root() / 'scripts/qapi-gen.py' +] + +tracetool = [ + python, files('scripts/tracetool.py'), + '--backend=' + config_host['TRACE_BACKENDS'] +] + +# Collect sourcesets. + +util_ss = ss.source_set() +stub_ss = ss.source_set() +trace_ss = ss.source_set() + +############### +# Trace files # +############### + +trace_events_subdirs = [ + 'accel/kvm', + 'accel/tcg', + 'crypto', + 'monitor', +] +if have_user + trace_events_subdirs += [ 'linux-user' ] +endif +if have_block + trace_events_subdirs += [ + 'authz', + 'block', + 'io', + 'nbd', + 'scsi', + ] +endif +if have_system + trace_events_subdirs += [ + 'audio', + 'backends', + 'backends/tpm', + 'chardev', + 'hw/9pfs', + 'hw/acpi', + 'hw/alpha', + 'hw/arm', + 'hw/audio', + 'hw/block', + 'hw/block/dataplane', + 'hw/char', + 'hw/display', + 'hw/dma', + 'hw/hppa', + 'hw/hyperv', + 'hw/i2c', + 'hw/i386', + 'hw/i386/xen', + 'hw/ide', + 'hw/input', + 'hw/intc', + 'hw/isa', + 'hw/mem', + 'hw/mips', + 'hw/misc', + 'hw/misc/macio', + 'hw/net', + 'hw/nvram', + 'hw/pci', + 'hw/pci-host', + 'hw/ppc', + 'hw/rdma', + 'hw/rdma/vmw', + 'hw/rtc', + 'hw/s390x', + 'hw/scsi', + 'hw/sd', + 'hw/sparc', + 'hw/sparc64', + 'hw/ssi', + 'hw/timer', + 'hw/tpm', + 'hw/usb', + 'hw/vfio', + 'hw/virtio', + 'hw/watchdog', + 'hw/xen', + 'hw/gpio', + 'hw/riscv', + 'migration', + 'net', + 'ui', + ] +endif +trace_events_subdirs += [ + 'hw/core', + 'qapi', + 'qom', + 'target/arm', + 'target/hppa', + 'target/i386', + 'target/mips', + 'target/ppc', + 'target/riscv', + 'target/s390x', + 'target/sparc', + 'util', +] + +genh = [] + +subdir('qapi') +subdir('qobject') +subdir('stubs') +subdir('trace') +subdir('util') +subdir('crypto') +subdir('storage-daemon') + +# Build targets from sourcesets + +stub_ss = stub_ss.apply(config_host, strict: false) + +util_ss.add_all(trace_ss) +util_ss = util_ss.apply(config_host, strict: false) +libqemuutil = static_library('qemuutil', + sources: util_ss.sources() + stub_ss.sources() + genh, + dependencies: [util_ss.dependencies(), m, glib, socket]) +qemuutil = declare_dependency(link_with: libqemuutil, + sources: genh) + summary_info = {} summary_info += {'Install prefix': config_host['prefix']} summary_info += {'BIOS directory': config_host['qemu_datadir']} diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs index 4673ab7490..c0a31be1a1 100644 --- a/qapi/Makefile.objs +++ b/qapi/Makefile.objs @@ -1,25 +1,4 @@ -util-obj-y = qapi-visit-core.o qapi-dealloc-visitor.o qobject-input-visitor.o -util-obj-y += qobject-output-visitor.o qmp-registry.o qmp-dispatch.o -util-obj-y += string-input-visitor.o string-output-visitor.o -util-obj-y += opts-visitor.o qapi-clone-visitor.o -util-obj-y += qmp-event.o -util-obj-y += qapi-util.o - -QAPI_COMMON_MODULES = audio authz block-core block char common control crypto -QAPI_COMMON_MODULES += dump error introspect job machine migration misc -QAPI_COMMON_MODULES += net pragma qdev qom rdma rocker run-state sockets tpm -QAPI_COMMON_MODULES += trace transaction ui QAPI_TARGET_MODULES = machine-target misc-target -QAPI_MODULES = $(QAPI_COMMON_MODULES) $(QAPI_TARGET_MODULES) - -util-obj-y += qapi-builtin-types.o -util-obj-y += $(QAPI_COMMON_MODULES:%=qapi-types-%.o) -util-obj-y += qapi-builtin-visit.o -util-obj-y += $(QAPI_COMMON_MODULES:%=qapi-visit-%.o) -util-obj-y += qapi-emit-events.o -util-obj-y += $(QAPI_COMMON_MODULES:%=qapi-events-%.o) - -common-obj-y = $(QAPI_COMMON_MODULES:%=qapi-commands-%.o) obj-y = qapi-introspect.o obj-y += $(QAPI_TARGET_MODULES:%=qapi-types-%.o) @@ -34,5 +13,3 @@ obj-y += qapi-init-commands.o QAPI_MODULES_STORAGE_DAEMON = block-core char common control crypto QAPI_MODULES_STORAGE_DAEMON += introspect job qom sockets pragma transaction - -storage-daemon-obj-y += $(QAPI_MODULES_STORAGE_DAEMON:%=qapi-commands-%.o) diff --git a/qapi/meson.build b/qapi/meson.build new file mode 100644 index 0000000000..f45b80bbfa --- /dev/null +++ b/qapi/meson.build @@ -0,0 +1,121 @@ +util_ss.add(files( + 'opts-visitor.c', + 'qapi-clone-visitor.c', + 'qapi-dealloc-visitor.c', + 'qapi-util.c', + 'qapi-visit-core.c', + 'qmp-dispatch.c', + 'qmp-event.c', + 'qmp-registry.c', + 'qobject-input-visitor.c', + 'qobject-output-visitor.c', + 'string-input-visitor.c', + 'string-output-visitor.c', +)) + +qapi_all_modules = [ + 'audio', + 'authz', + 'block-core', + 'block', + 'char', + 'common', + 'control', + 'crypto', + 'dump', + 'error', + 'introspect', + 'job', + 'machine', + 'machine-target', + 'migration', + 'misc', + 'misc-target', + 'net', + 'pragma', + 'qdev', + 'qom', + 'rdma', + 'rocker', + 'run-state', + 'sockets', + 'tpm', + 'trace', + 'transaction', + 'ui', +] + +qapi_storage_daemon_modules = [ + 'block-core', + 'char', + 'common', + 'control', + 'crypto', + 'introspect', + 'job', + 'qom', + 'sockets', + 'pragma', + 'transaction', +] + +qapi_nonmodule_outputs = [ + 'qapi-introspect.c', 'qapi-introspect.h', + 'qapi-types.c', 'qapi-types.h', + 'qapi-visit.h', 'qapi-visit.c', + 'qapi-commands.h', 'qapi-commands.c', + 'qapi-init-commands.h', 'qapi-init-commands.c', + 'qapi-events.h', 'qapi-events.c', + 'qapi-emit-events.c', 'qapi-emit-events.h', +] + +# First build all sources +qapi_util_outputs = [ + 'qapi-builtin-types.c', 'qapi-builtin-visit.c', + 'qapi-builtin-types.h', 'qapi-builtin-visit.h', +] + +qapi_inputs = [] +qapi_specific_outputs = [] +foreach module : qapi_all_modules + qapi_inputs += [ files(module + '.json') ] + qapi_module_outputs = [ + 'qapi-types-@0@.c'.format(module), + 'qapi-types-@0@.h'.format(module), + 'qapi-visit-@0@.c'.format(module), + 'qapi-visit-@0@.h'.format(module), + 'qapi-events-@0@.c'.format(module), + 'qapi-events-@0@.h'.format(module), + 'qapi-commands-@0@.c'.format(module), + 'qapi-commands-@0@.h'.format(module), + ] + if module.endswith('-target') + qapi_specific_outputs += qapi_module_outputs + else + qapi_util_outputs += qapi_module_outputs + endif +endforeach + +qapi_files = custom_target('shared QAPI source files', + output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs + ['qapi-doc.texi'], + input: [ files('qapi-schema.json') ], + command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ], + depend_files: [ qapi_inputs, qapi_gen_depends ]) + +# Now go through all the outputs and add them to the right sourceset. +# These loops must be synchronized with the output of the above custom target. + +i = 0 +foreach output : qapi_util_outputs + if output.endswith('.h') + genh += qapi_files[i] + endif + util_ss.add(qapi_files[i]) + i = i + 1 +endforeach + +# These are still handled by the Makefile +i += qapi_nonmodule_outputs.length() +i += qapi_specific_outputs.length() + +qapi_doc_texi = qapi_files[i] diff --git a/qobject/Makefile.objs b/qobject/Makefile.objs deleted file mode 100644 index 7b12c9cacf..0000000000 --- a/qobject/Makefile.objs +++ /dev/null @@ -1,3 +0,0 @@ -util-obj-y = qnull.o qnum.o qstring.o qdict.o qlist.o qbool.o qlit.o -util-obj-y += qjson.o qobject.o json-lexer.o json-streamer.o json-parser.o -util-obj-y += block-qdict.o diff --git a/qobject/meson.build b/qobject/meson.build new file mode 100644 index 0000000000..bb63c06b63 --- /dev/null +++ b/qobject/meson.build @@ -0,0 +1,3 @@ +util_ss.add(files('qnull.c', 'qnum.c', 'qstring.c', 'qdict.c', 'qlist.c', 'qbool.c', + 'qlit.c', 'qjson.c', 'qobject.c', 'json-lexer.c', 'json-streamer.c', 'json-parser.c', + 'block-qdict.c')) diff --git a/rules.mak b/rules.mak index 5ab42def82..7aefd37b5d 100644 --- a/rules.mak +++ b/rules.mak @@ -32,7 +32,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d # dir, one absolute and the other relative to the compiler working # directory. These are the same for target-independent files, but # different for target-dependent ones. -QEMU_LOCAL_INCLUDES = -iquote $(BUILD_DIR)/$(@D) -iquote $(@D) +QEMU_LOCAL_INCLUDES = -iquote $(BUILD_DIR) -iquote $(BUILD_DIR)/$(@D) -iquote $(@D) WL_U := -Wl,-u, find-symbols = $(if $1, $(sort $(shell $(NM) -P -g $1 | $2))) diff --git a/scripts/qapi-gen.py b/scripts/qapi-gen.py old mode 100755 new mode 100644 diff --git a/scripts/tracetool.py b/scripts/tracetool.py old mode 100755 new mode 100644 diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py index fc0c8fc52f..e17edc9b9d 100644 --- a/scripts/tracetool/backend/dtrace.py +++ b/scripts/tracetool/backend/dtrace.py @@ -38,7 +38,7 @@ def generate_h_begin(events, group): if group == "root": header = "trace-dtrace-root.h" else: - header = "trace-dtrace.h" + header = "trace-dtrace-%s.h" % group # Workaround for ust backend, which also includes and may # require SDT_USE_VARIADIC to be defined. If dtrace includes diff --git a/scripts/tracetool/backend/ust.py b/scripts/tracetool/backend/ust.py index 6c0a5f8d68..c857516f21 100644 --- a/scripts/tracetool/backend/ust.py +++ b/scripts/tracetool/backend/ust.py @@ -19,11 +19,7 @@ PUBLIC = True def generate_h_begin(events, group): - if group == "root": - header = "trace-ust-root.h" - else: - header = "trace-ust.h" - + header = 'trace-ust-' + group + '.h' out('#include ', '#include "%s"' % header, '', diff --git a/storage-daemon/Makefile.objs b/storage-daemon/Makefile.objs index cfe6beee52..41c0d02178 100644 --- a/storage-daemon/Makefile.objs +++ b/storage-daemon/Makefile.objs @@ -1 +1,3 @@ -storage-daemon-obj-y += qapi/ +storage-daemon-obj-y = qapi/libqsd-qapi.fa + +qemu-storage-daemon.o: storage-daemon/qapi/qapi-commands.h storage-daemon/qapi/qapi-init-commands.h diff --git a/storage-daemon/meson.build b/storage-daemon/meson.build new file mode 100644 index 0000000000..35f8949924 --- /dev/null +++ b/storage-daemon/meson.build @@ -0,0 +1 @@ +subdir('qapi') diff --git a/storage-daemon/qapi/Makefile.objs b/storage-daemon/qapi/Makefile.objs deleted file mode 100644 index 8a4b220c96..0000000000 --- a/storage-daemon/qapi/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -storage-daemon-obj-y += qapi-commands.o qapi-init-commands.o qapi-introspect.o diff --git a/storage-daemon/qapi/meson.build b/storage-daemon/qapi/meson.build new file mode 100644 index 0000000000..7a2b041247 --- /dev/null +++ b/storage-daemon/qapi/meson.build @@ -0,0 +1,10 @@ +qsd_qapi_files = custom_target('QAPI files for qemu-storage-daemon', + output: qapi_nonmodule_outputs + ['qapi-doc.texi'], + input: [ files('qapi-schema.json') ], + command: [ qapi_gen, '-o', 'storage-daemon/qapi', '@INPUT@' ], + depend_files: [ qapi_inputs, qapi_gen_depends ]) + +static_library('qsd-qapi', + qsd_qapi_files.to_list(), + name_suffix: 'fa', + build_by_default: false) diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs deleted file mode 100644 index d42046afe4..0000000000 --- a/stubs/Makefile.objs +++ /dev/null @@ -1,56 +0,0 @@ -stub-obj-y += blk-commit-all.o -stub-obj-y += cmos.o -stub-obj-y += cpu-get-clock.o -stub-obj-y += cpu-get-icount.o -stub-obj-y += dump.o -stub-obj-y += error-printf.o -stub-obj-y += fdset.o -stub-obj-y += gdbstub.o -stub-obj-y += iothread-lock.o -stub-obj-y += is-daemonized.o -stub-obj-y += isa-bus.o -stub-obj-$(CONFIG_LINUX_AIO) += linux-aio.o -stub-obj-$(CONFIG_LINUX_IO_URING) += io_uring.o -stub-obj-y += monitor-core.o -stub-obj-y += notify-event.o -stub-obj-y += pci-bus.o -stub-obj-y += qmp_memory_device.o -stub-obj-y += qtest.o -stub-obj-y += ramfb.o -stub-obj-y += replay.o -stub-obj-y += runstate-check.o -stub-obj-$(CONFIG_SOFTMMU) += semihost.o -stub-obj-y += set-fd-handler.o -stub-obj-y += sysbus.o -stub-obj-y += tpm.o -stub-obj-y += trace-control.o -stub-obj-y += vmgenid.o -stub-obj-y += vmstate.o -stub-obj-$(CONFIG_SOFTMMU) += win32-kbd-hook.o - -####################################################################### -# code used by both qemu system emulation and qemu-img - -ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y) - -stub-obj-y += arch_type.o -stub-obj-y += bdrv-next-monitor-owned.o -stub-obj-y += blockdev-close-all-bdrv-states.o -stub-obj-y += change-state-handler.o -stub-obj-y += clock-warp.o -stub-obj-y += fd-register.o -stub-obj-y += fw_cfg.o -stub-obj-y += get-vm-name.o -stub-obj-y += iothread.o -stub-obj-y += machine-init-done.o -stub-obj-y += migr-blocker.o -stub-obj-y += monitor.o -stub-obj-y += pci-host-piix.o -stub-obj-y += ram-block.o -stub-obj-y += replay-user.o -stub-obj-y += target-get-monitor-def.o -stub-obj-y += target-monitor-defs.o -stub-obj-y += uuid.o -stub-obj-y += vm-stop.o - -endif # CONFIG_SOFTMMU || CONFIG_TOOLS diff --git a/stubs/meson.build b/stubs/meson.build new file mode 100644 index 0000000000..019bd79c7a --- /dev/null +++ b/stubs/meson.build @@ -0,0 +1,50 @@ +stub_ss.add(files('arch_type.c')) +stub_ss.add(files('bdrv-next-monitor-owned.c')) +stub_ss.add(files('blk-commit-all.c')) +stub_ss.add(files('blockdev-close-all-bdrv-states.c')) +stub_ss.add(files('change-state-handler.c')) +stub_ss.add(files('clock-warp.c')) +stub_ss.add(files('cmos.c')) +stub_ss.add(files('cpu-get-clock.c')) +stub_ss.add(files('cpu-get-icount.c')) +stub_ss.add(files('dump.c')) +stub_ss.add(files('error-printf.c')) +stub_ss.add(files('fd-register.c')) +stub_ss.add(files('fdset.c')) +stub_ss.add(files('fw_cfg.c')) +stub_ss.add(files('gdbstub.c')) +stub_ss.add(files('get-vm-name.c')) +stub_ss.add(when: 'CONFIG_LINUX_IO_URING', if_true: files('io_uring.c')) +stub_ss.add(files('iothread.c')) +stub_ss.add(files('iothread-lock.c')) +stub_ss.add(files('isa-bus.c')) +stub_ss.add(files('is-daemonized.c')) +stub_ss.add(when: 'CONFIG_LINUX_AIO', if_true: files('linux-aio.c')) +stub_ss.add(files('machine-init-done.c')) +stub_ss.add(files('migr-blocker.c')) +stub_ss.add(files('monitor.c')) +stub_ss.add(files('monitor-core.c')) +stub_ss.add(files('notify-event.c')) +stub_ss.add(files('pci-bus.c')) +stub_ss.add(files('pci-host-piix.c')) +stub_ss.add(files('qmp_memory_device.c')) +stub_ss.add(files('qtest.c')) +stub_ss.add(files('ram-block.c')) +stub_ss.add(files('ramfb.c')) +stub_ss.add(files('replay.c')) +stub_ss.add(files('replay-user.c')) +stub_ss.add(files('runstate-check.c')) +stub_ss.add(files('set-fd-handler.c')) +stub_ss.add(files('sysbus.c')) +stub_ss.add(files('target-get-monitor-def.c')) +stub_ss.add(files('target-monitor-defs.c')) +stub_ss.add(files('tpm.c')) +stub_ss.add(files('trace-control.c')) +stub_ss.add(files('uuid.c')) +stub_ss.add(files('vmgenid.c')) +stub_ss.add(files('vmstate.c')) +stub_ss.add(files('vm-stop.c')) +stub_ss.add(files('win32-kbd-hook.c')) +if have_system + stub_ss.add(files('semihost.c')) +endif diff --git a/trace/Makefile.objs b/trace/Makefile.objs index c544509adf..a429474618 100644 --- a/trace/Makefile.objs +++ b/trace/Makefile.objs @@ -1,59 +1,8 @@ # -*- mode: makefile -*- -$(BUILD_DIR)/trace-events-all: $(trace-events-files) - $(call quiet-command,cat $^ > $@) - ################################################## # Translation level -$(obj)/generated-helpers-wrappers.h: $(obj)/generated-helpers-wrappers.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=root \ - --format=tcg-helper-wrapper-h \ - --backend=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -$(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=root \ - --format=tcg-helper-h \ - --backend=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -$(obj)/generated-helpers.c: $(obj)/generated-helpers.c-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=root \ - --format=tcg-helper-c \ - --backend=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -$(obj)/generated-helpers.o: $(obj)/generated-helpers.c - obj-y += generated-helpers.o - - -$(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=root \ - --format=tcg-h \ - --backend=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - - -###################################################################### -# Backend code - -util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o -util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o -util-obj-y += control.o obj-y += control-target.o -util-obj-y += qmp.o diff --git a/trace/meson.build b/trace/meson.build new file mode 100644 index 0000000000..f0a8d1c2e2 --- /dev/null +++ b/trace/meson.build @@ -0,0 +1,76 @@ +trace_events_files = [] +foreach dir : [ '.' ] + trace_events_subdirs + trace_events_file = meson.source_root() / dir / 'trace-events' + trace_events_files += [ trace_events_file ] + group_name = dir == '.' ? 'root' : dir.underscorify() + group = '--group=' + group_name + fmt = '@0@-' + group_name + '.@1@' + + trace_h = custom_target(fmt.format('trace', 'h'), + output: fmt.format('trace', 'h'), + input: trace_events_file, + command: [ tracetool, group, '--format=h', '@INPUT@' ], + capture: true) + genh += trace_h + trace_c = custom_target(fmt.format('trace', 'c'), + output: fmt.format('trace', 'c'), + input: trace_events_file, + command: [ tracetool, group, '--format=c', '@INPUT@' ], + capture: true) + if 'CONFIG_TRACE_UST' in config_host + trace_ust_h = custom_target(fmt.format('trace-ust', 'h'), + output: fmt.format('trace-ust', 'h'), + input: trace_events_file, + command: [ tracetool, group, '--format=ust-events-h', '@INPUT@' ], + capture: true) + trace_ss.add(trace_ust_h, lttng, urcubp) + genh += trace_ust_h + endif + trace_ss.add(trace_h, trace_c) + if 'CONFIG_TRACE_DTRACE' in config_host + trace_dtrace = custom_target(fmt.format('trace-dtrace', 'dtrace'), + output: fmt.format('trace-dtrace', 'dtrace'), + input: trace_events_file, + command: [ tracetool, group, '--format=d', '@INPUT@' ], + capture: true) + trace_dtrace_h = custom_target(fmt.format('trace-dtrace', 'h'), + output: fmt.format('trace-dtrace', 'h'), + input: trace_dtrace, + command: [ 'dtrace', '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ]) + trace_dtrace_o = custom_target(fmt.format('trace-dtrace', 'o'), + output: fmt.format('trace-dtrace', 'o'), + input: trace_dtrace, + command: [ 'dtrace', '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ]) + + trace_ss.add(trace_dtrace_h, trace_dtrace_o) + genh += trace_dtrace_h + endif +endforeach + +custom_target('trace-events-all', + output: 'trace-events-all', + input: trace_events_files, + command: [ 'cat', '@INPUT@' ], + capture: true, + install: true, + install_dir: config_host['qemu_datadir']) + +if 'CONFIG_TRACE_UST' in config_host + trace_ust_all_h = custom_target('trace-ust-all.h', + output: 'trace-ust-all.h', + input: trace_events_files, + command: [ tracetool, '--group=all', '--format=ust-events-h', '@INPUT@' ], + capture: true) + trace_ust_all_c = custom_target('trace-ust-all.c', + output: 'trace-ust-all.c', + input: trace_events_files, + command: [ tracetool, '--group=all', '--format=ust-events-c', '@INPUT@' ], + capture: true) + trace_ss.add(trace_ust_all_h, trace_ust_all_c) + genh += trace_ust_all_h +endif + +trace_ss.add(when: 'CONFIG_TRACE_SIMPLE', if_true: files('simple.c')) +trace_ss.add(when: 'CONFIG_TRACE_FTRACE', if_true: files('ftrace.c')) +trace_ss.add(files('control.c')) +trace_ss.add(files('qmp.c')) diff --git a/util/Makefile.objs b/util/Makefile.objs deleted file mode 100644 index cc5e37177a..0000000000 --- a/util/Makefile.objs +++ /dev/null @@ -1,83 +0,0 @@ -util-obj-y = osdep.o cutils.o unicode.o qemu-timer-common.o -util-obj-$(call lnot,$(CONFIG_ATOMIC64)) += atomic64.o -util-obj-$(CONFIG_POSIX) += aio-posix.o -util-obj-$(CONFIG_POSIX) += fdmon-poll.o -util-obj-$(CONFIG_EPOLL_CREATE1) += fdmon-epoll.o -util-obj-$(CONFIG_LINUX_IO_URING) += fdmon-io_uring.o -util-obj-$(CONFIG_POSIX) += compatfd.o -util-obj-$(CONFIG_POSIX) += event_notifier-posix.o -util-obj-$(CONFIG_POSIX) += mmap-alloc.o -util-obj-$(CONFIG_POSIX) += oslib-posix.o -util-obj-$(CONFIG_POSIX) += qemu-openpty.o -util-obj-$(CONFIG_POSIX) += qemu-thread-posix.o -util-obj-$(CONFIG_POSIX) += memfd.o -util-obj-$(CONFIG_WIN32) += aio-win32.o -util-obj-$(CONFIG_WIN32) += event_notifier-win32.o -util-obj-$(CONFIG_WIN32) += oslib-win32.o -util-obj-$(CONFIG_WIN32) += qemu-thread-win32.o -util-obj-y += envlist.o path.o module.o -util-obj-y += host-utils.o -util-obj-y += bitmap.o bitops.o -util-obj-y += fifo8.o -util-obj-y += cacheinfo.o -util-obj-y += error.o qemu-error.o -util-obj-y += qemu-print.o -util-obj-y += id.o -util-obj-y += qemu-config.o notify.o -util-obj-y += qemu-option.o qemu-progress.o -util-obj-y += keyval.o -util-obj-y += crc32c.o -util-obj-y += uuid.o -util-obj-y += getauxval.o -util-obj-y += rcu.o -util-obj-$(CONFIG_MEMBARRIER) += sys_membarrier.o -util-obj-y += log.o -util-obj-y += pagesize.o -util-obj-y += qdist.o -util-obj-y += qht.o -util-obj-y += qsp.o -util-obj-y += range.o -util-obj-y += stats64.o -util-obj-y += systemd.o -util-obj-$(CONFIG_POSIX) += drm.o -util-obj-y += guest-random.o -util-obj-$(CONFIG_GIO) += dbus.o -dbus.o-cflags = $(GIO_CFLAGS) -dbus.o-libs = $(GIO_LIBS) -util-obj-$(CONFIG_USER_ONLY) += selfmap.o - -####################################################################### -# code used by both qemu system emulation and qemu-img - -ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y) - -util-obj-y += aio-wait.o -util-obj-y += aiocb.o -util-obj-y += async.o -util-obj-y += base64.o -util-obj-y += buffer.o -util-obj-y += bufferiszero.o -util-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o -util-obj-y += hexdump.o -util-obj-y += lockcnt.o -util-obj-y += iov.o -util-obj-y += iova-tree.o -util-obj-y += hbitmap.o -util-obj-y += main-loop.o -util-obj-y += nvdimm-utils.o -util-obj-y += qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o -util-obj-y += qemu-coroutine-sleep.o -util-obj-y += qemu-co-shared-resource.o -util-obj-y += qemu-sockets.o -util-obj-y += qemu-timer.o -util-obj-y += thread-pool.o -util-obj-y += throttle.o -util-obj-y += timed-average.o -util-obj-y += uri.o - -util-obj-$(CONFIG_LINUX) += vfio-helpers.o -util-obj-$(CONFIG_INOTIFY1) += filemonitor-inotify.o -util-obj-$(call lnot,$(CONFIG_INOTIFY1)) += filemonitor-stub.o -util-obj-$(CONFIG_BLOCK) += readline.o - -endif # CONFIG_SOFTMMU || CONFIG_TOOLS diff --git a/util/meson.build b/util/meson.build new file mode 100644 index 0000000000..23b8ad459b --- /dev/null +++ b/util/meson.build @@ -0,0 +1,78 @@ +util_ss.add(dependency('threads')) +util_ss.add(files('osdep.c', 'cutils.c', 'unicode.c', 'qemu-timer-common.c')) +util_ss.add(when: 'CONFIG_ATOMIC64', if_false: files('atomic64.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('aio-posix.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('fdmon-poll.c')) +util_ss.add(when: 'CONFIG_EPOLL_CREATE1', if_true: files('fdmon-epoll.c')) +util_ss.add(when: 'CONFIG_LINUX_IO_URING', if_true: files('fdmon-io_uring.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('compatfd.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('event_notifier-posix.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('mmap-alloc.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('oslib-posix.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: [files('qemu-openpty.c'), util]) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('qemu-thread-posix.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('memfd.c')) +util_ss.add(when: 'CONFIG_WIN32', if_true: files('aio-win32.c')) +util_ss.add(when: 'CONFIG_WIN32', if_true: files('event_notifier-win32.c')) +util_ss.add(when: 'CONFIG_WIN32', if_true: files('oslib-win32.c')) +util_ss.add(when: 'CONFIG_WIN32', if_true: files('qemu-thread-win32.c')) +util_ss.add(when: 'CONFIG_WIN32', if_true: winmm) +util_ss.add(files('envlist.c', 'path.c', 'module.c')) +util_ss.add(files('host-utils.c')) +util_ss.add(files('bitmap.c', 'bitops.c')) +util_ss.add(files('fifo8.c')) +util_ss.add(files('cacheinfo.c')) +util_ss.add(files('error.c', 'qemu-error.c')) +util_ss.add(files('qemu-print.c')) +util_ss.add(files('id.c')) +util_ss.add(files('qemu-config.c', 'notify.c')) +util_ss.add(files('qemu-option.c', 'qemu-progress.c')) +util_ss.add(files('keyval.c')) +util_ss.add(files('crc32c.c')) +util_ss.add(files('uuid.c')) +util_ss.add(files('getauxval.c')) +util_ss.add(files('rcu.c')) +util_ss.add(when: 'CONFIG_MEMBARRIER', if_true: files('sys_membarrier.c')) +util_ss.add(files('log.c')) +util_ss.add(files('pagesize.c')) +util_ss.add(files('qdist.c')) +util_ss.add(files('qht.c')) +util_ss.add(files('qsp.c')) +util_ss.add(files('range.c')) +util_ss.add(files('stats64.c')) +util_ss.add(files('systemd.c')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('drm.c')) +util_ss.add(files('guest-random.c')) + +if have_user + util_ss.add(files('selfmap.c')) +endif + +if have_system + util_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus.c'), gio]) +endif + +if have_block + util_ss.add(files('aiocb.c', 'async.c', 'aio-wait.c')) + util_ss.add(files('base64.c')) + util_ss.add(files('buffer.c')) + util_ss.add(files('bufferiszero.c')) + util_ss.add(files('coroutine-@0@.c'.format(config_host['CONFIG_COROUTINE_BACKEND']))) + util_ss.add(files('hbitmap.c')) + util_ss.add(files('hexdump.c')) + util_ss.add(files('iova-tree.c')) + util_ss.add(files('iov.c', 'qemu-sockets.c', 'uri.c')) + util_ss.add(files('lockcnt.c')) + util_ss.add(files('main-loop.c')) + util_ss.add(files('nvdimm-utils.c')) + util_ss.add(files('qemu-coroutine.c', 'qemu-coroutine-lock.c', 'qemu-coroutine-io.c')) + util_ss.add(files('qemu-coroutine-sleep.c')) + util_ss.add(files('qemu-co-shared-resource.c')) + util_ss.add(files('thread-pool.c', 'qemu-timer.c')) + util_ss.add(files('readline.c')) + util_ss.add(files('throttle.c')) + util_ss.add(files('timed-average.c')) + util_ss.add(when: 'CONFIG_INOTIFY1', if_true: files('filemonitor-inotify.c'), + if_false: files('filemonitor-stub.c')) + util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c')) +endif From patchwork Fri Aug 21 10:21:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275945 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F0F9C433E1 for ; Fri, 21 Aug 2020 10:39:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DED2120738 for ; Fri, 21 Aug 2020 10:39:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="i+bSlhyT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DED2120738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Rw-00060s-5M for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:39:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DM-0001Gj-3D for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:04 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:32620 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DH-0001Uc-1k for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IIeOrcVgKi5mgccvv1nlFytzSZpCJbyCDgDVUFJJetk=; b=i+bSlhyTsR95x4v+ZWibtdxlOgk7ljaT0Ko/Tnk45LSXvAw7bhNAaqFTBiDfEgdcmQjSvR rWcOdGLZ3eCbg+6aK4YCr3qWOeiueC/wORe37uS+jeVOWPJyEPaKeKbZiE+8FvzWbeoUrB qqOHZ3PKj7lbbAXklltLaknNLdO5EQ0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-n2-a9ARiN_ah2uPzSK5Jhw-1; Fri, 21 Aug 2020 06:23:56 -0400 X-MC-Unique: n2-a9ARiN_ah2uPzSK5Jhw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 978438797C3 for ; Fri, 21 Aug 2020 10:23:55 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52EF27AECF; Fri, 21 Aug 2020 10:23:55 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 027/152] meson: add remaining generated tcg trace helpers Date: Fri, 21 Aug 2020 06:21:24 -0400 Message-Id: <20200821102329.29777-28-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 51 ----------------------------------------------- trace/meson.build | 14 +++++++++++++ 2 files changed, 14 insertions(+), 51 deletions(-) diff --git a/Makefile b/Makefile index e5d217d4d2..5731d739f1 100644 --- a/Makefile +++ b/Makefile @@ -137,61 +137,10 @@ FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSIO generated-files-y = qemu-version.h config-host.h qemu-options.def -generated-files-y += trace/generated-tcg-tracers.h - -generated-files-y += trace/generated-helpers-wrappers.h -generated-files-y += trace/generated-helpers.h -generated-files-y += trace/generated-helpers.c - generated-files-y += module_block.h generated-files-y += .git-submodule-status -tracetool-y = $(SRC_PATH)/scripts/tracetool.py -tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py") - -trace/generated-helpers-wrappers.h: trace/generated-helpers-wrappers.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - @mkdir -p $(dir $@) - $(call quiet-command,$(TRACETOOL) \ - --group=root \ - --format=tcg-helper-wrapper-h \ - --backend=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -trace/generated-helpers.h: trace/generated-helpers.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - @mkdir -p $(dir $@) - $(call quiet-command,$(TRACETOOL) \ - --group=root \ - --format=tcg-helper-h \ - --backend=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -trace/generated-helpers.c: trace/generated-helpers.c-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - @mkdir -p $(dir $@) - $(call quiet-command,$(TRACETOOL) \ - --group=root \ - --format=tcg-helper-c \ - --backend=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -trace/generated-helpers.o: trace/generated-helpers.c - -trace/generated-tcg-tracers.h: trace/generated-tcg-tracers.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -trace/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) - @mkdir -p $(dir $@) - $(call quiet-command,$(TRACETOOL) \ - --group=root \ - --format=tcg-h \ - --backend=$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv diff --git a/trace/meson.build b/trace/meson.build index f0a8d1c2e2..cab36a248b 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -55,6 +55,20 @@ custom_target('trace-events-all', install: true, install_dir: config_host['qemu_datadir']) +foreach d : [ + ['generated-tcg-tracers.h', 'tcg-h'], + ['generated-helpers.c', 'tcg-helper-c'], + ['generated-helpers.h', 'tcg-helper-h'], + ['generated-helpers-wrappers.h', 'tcg-helper-wrapper-h'], +] + custom_target(d[0], + output: d[0], + input: meson.source_root() / 'trace-events', + command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@' ], + build_by_default: true, # to be removed when added to a target + capture: true) +endforeach + if 'CONFIG_TRACE_UST' in config_host trace_ust_all_h = custom_target('trace-ust-all.h', output: 'trace-ust-all.h', From patchwork Fri Aug 21 10:21:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275955 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CA3BC433DF for ; Fri, 21 Aug 2020 10:30:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2977F20748 for ; Fri, 21 Aug 2020 10:30:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dFGIMnkZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2977F20748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94J6-0004ze-BR for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:30:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DL-0001F7-Hp for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DH-0001Uq-It for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1SQ8Qd6WpWLPTjlCJOQr22XNtc4Jn8PlOeGida0Zo9Y=; b=dFGIMnkZJ3f3LFmf0Xu/VnqrhIZC4Nyw63hlTNsAqsZjZZAD+dT1TyQ7HqiVaPx7csM2gT mjEIGgrUoLzz/9WOp8yCUgtFpCOx6E1g0t/0Apui4VJ2R+07V4kFFeOXRhbMiqnCVQ3F7J UI4DxSK+Hm8hCrPAANMVEUJDS2ur9Ak= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-112-7FgOZn7vPM-Diy3Ef7by2A-1; Fri, 21 Aug 2020 06:23:56 -0400 X-MC-Unique: 7FgOZn7vPM-Diy3Ef7by2A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00A5951AE for ; Fri, 21 Aug 2020 10:23:56 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id B14FD7AECF; Fri, 21 Aug 2020 10:23:55 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 028/152] meson: add version.o Date: Fri, 21 Aug 2020 06:21:25 -0400 Message-Id: <20200821102329.29777-29-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 4e9eb5da5c..feb3c8a30c 100644 --- a/meson.build +++ b/meson.build @@ -49,8 +49,14 @@ targetos = host_machine.system() m = cc.find_library('m', required: false) util = cc.find_library('util', required: false) socket = [] +version_res = [] if targetos == 'windows' socket = cc.find_library('ws2_32') + + win = import('windows') + version_res = win.compile_resources('version.rc', + depend_files: files('pc-bios/qemu-nsis.ico'), + include_directories: include_directories('.')) endif glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(), link_args: config_host['GLIB_LIBS'].split()) @@ -235,7 +241,7 @@ libqemuutil = static_library('qemuutil', sources: util_ss.sources() + stub_ss.sources() + genh, dependencies: [util_ss.dependencies(), m, glib, socket]) qemuutil = declare_dependency(link_with: libqemuutil, - sources: genh) + sources: genh + version_res) summary_info = {} summary_info += {'Install prefix': config_host['prefix']} From patchwork Fri Aug 21 10:21:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AFA9C433E1 for ; Fri, 21 Aug 2020 10:36:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69FE720738 for ; Fri, 21 Aug 2020 10:36:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SBtvafUl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69FE720738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94P8-0007i4-Jn for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:36:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DN-0001K7-46 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:05 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:54383 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DH-0001Uu-LQ for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EkStiprP9QlyiuuzIEPYnmmLwOOWImHQ31IHIoFQU0Q=; b=SBtvafUlcexJ0aLx91FHQGO6qnR+YNX7IpIFeKfFUuBE+4WqXWz9KOp/WJ+WeVjiHQwBNN ebr6wjHzoCgDV/Zxvhcf6NJQeW9F6/tsjsULjeit+iT1+gZhSnOuBOdKMJ3q8z+cq++JoJ OWZRcIZOaPpsTYpWwVFVZHrqGc2WpnI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-122-olbTF3UROG-LIVepw4uOzg-1; Fri, 21 Aug 2020 06:23:57 -0400 X-MC-Unique: olbTF3UROG-LIVepw4uOzg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E9698797D4 for ; Fri, 21 Aug 2020 10:23:56 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B8967AECF for ; Fri, 21 Aug 2020 10:23:56 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 029/152] contrib/libvhost-user: convert to Meson Date: Fri, 21 Aug 2020 06:21:26 -0400 Message-Id: <20200821102329.29777-30-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 01:00:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Since libqemuutil.a has been converted to Meson, the conversion is straightforward. Signed-off-by: Paolo Bonzini --- Makefile | 16 +++++----------- Makefile.objs | 1 - contrib/libvhost-user/Makefile.objs | 1 - contrib/libvhost-user/meson.build | 3 +++ meson.build | 8 ++++++++ 5 files changed, 16 insertions(+), 13 deletions(-) delete mode 100644 contrib/libvhost-user/Makefile.objs create mode 100644 contrib/libvhost-user/meson.build diff --git a/Makefile b/Makefile index 5731d739f1..78d3a78e97 100644 --- a/Makefile +++ b/Makefile @@ -318,7 +318,6 @@ dummy := $(call unnest-vars,, \ ivshmem-server-obj-y \ virtiofsd-obj-y \ rdmacm-mux-obj-y \ - libvhost-user-obj-y \ vhost-user-scsi-obj-y \ vhost-user-blk-obj-y \ vhost-user-input-obj-y \ @@ -443,11 +442,6 @@ $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h Makefile: $(version-obj-y) -###################################################################### -# Build libraries - -libvhost-user.a: $(libvhost-user-obj-y) - ###################################################################### COMMON_LDADDS = libqemuutil.a @@ -546,9 +540,9 @@ ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS) ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS) $(call LINK, $^) endif -vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a $(COMMON_LDADDS) +vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) -vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a $(COMMON_LDADDS) +vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) rdmacm-mux$(EXESUF): LIBS += "-libumad" @@ -557,16 +551,16 @@ rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS) # relies on Linux-specific syscalls ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) -virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS) +virtiofsd$(EXESUF): $(virtiofsd-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) endif -vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) libvhost-user.a $(COMMON_LDADDS) +vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) ifdef CONFIG_VHOST_USER_INPUT ifdef CONFIG_LINUX -vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a $(COMMON_LDADDS) +vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) # build by default, do not install diff --git a/Makefile.objs b/Makefile.objs index e5c9077517..9489864967 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -106,7 +106,6 @@ qga-vss-dll-obj-y = qga/ elf2dmp-obj-y = contrib/elf2dmp/ ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/ ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/ -libvhost-user-obj-y = contrib/libvhost-user/ vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS) vhost-user-scsi.o-libs := $(LIBISCSI_LIBS) vhost-user-scsi-obj-y = contrib/vhost-user-scsi/ diff --git a/contrib/libvhost-user/Makefile.objs b/contrib/libvhost-user/Makefile.objs deleted file mode 100644 index ef3778edd4..0000000000 --- a/contrib/libvhost-user/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -libvhost-user-obj-y += libvhost-user.o libvhost-user-glib.o diff --git a/contrib/libvhost-user/meson.build b/contrib/libvhost-user/meson.build new file mode 100644 index 0000000000..e68dd1a581 --- /dev/null +++ b/contrib/libvhost-user/meson.build @@ -0,0 +1,3 @@ +libvhost_user = static_library('vhost-user', + files('libvhost-user.c', 'libvhost-user-glib.c'), + build_by_default: false) diff --git a/meson.build b/meson.build index feb3c8a30c..00f17ef36f 100644 --- a/meson.build +++ b/meson.build @@ -243,6 +243,14 @@ libqemuutil = static_library('qemuutil', qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) +# Other build targets + +if have_tools + if 'CONFIG_VHOST_USER' in config_host + subdir('contrib/libvhost-user') + endif +endif + summary_info = {} summary_info += {'Install prefix': config_host['prefix']} summary_info += {'BIOS directory': config_host['qemu_datadir']} From patchwork Fri Aug 21 10:21:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275946 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C37CC433E1 for ; Fri, 21 Aug 2020 10:37:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C0B220738 for ; Fri, 21 Aug 2020 10:37:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HUbgXuC9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C0B220738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94QL-0002eI-Ec for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:37:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DP-0001Rv-Qy for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:07 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:26372 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DJ-0001Vi-JD for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XR+4MLRbueK9LM4/QJy5a4WiFeH1ZT5tvmUiL69l8PA=; b=HUbgXuC91E4mFXp/IpxHGA1SC0NN/3kILGhcKpyIHMcHlJflspw5g6VptfCkUb2ShuRthD Ga9GseLA1ZjD0hlPuLBfzfetzOLSWJCl4xFQaVGIBeymrwj+VkgrlbiYX4X++0xbeQIg0C 1ybfFZyau2hgIiKIDNYvzgbHcwswcXY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-128-2SoyVZqCP3OPMWNtbrmy-g-1; Fri, 21 Aug 2020 06:23:57 -0400 X-MC-Unique: 2SoyVZqCP3OPMWNtbrmy-g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E02C01014E03 for ; Fri, 21 Aug 2020 10:23:56 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB7FE19D6C for ; Fri, 21 Aug 2020 10:23:56 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 030/152] tools/virtiofsd: convert to Meson Date: Fri, 21 Aug 2020 06:21:27 -0400 Message-Id: <20200821102329.29777-31-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- Makefile | 12 ------------ Makefile.objs | 1 - configure | 1 + meson.build | 11 +++++++++++ tools/meson.build | 10 ++++++++++ tools/virtiofsd/Makefile.objs | 12 ------------ tools/virtiofsd/meson.build | 19 +++++++++++++++++++ tools/virtiofsd/passthrough_ll.c | 2 +- .../{seccomp.c => passthrough_seccomp.c} | 2 +- .../{seccomp.h => passthrough_seccomp.h} | 0 10 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 tools/meson.build delete mode 100644 tools/virtiofsd/Makefile.objs create mode 100644 tools/virtiofsd/meson.build rename tools/virtiofsd/{seccomp.c => passthrough_seccomp.c} (99%) rename tools/virtiofsd/{seccomp.h => passthrough_seccomp.h} (100%) diff --git a/Makefile b/Makefile index 78d3a78e97..e591d1b2b4 100644 --- a/Makefile +++ b/Makefile @@ -205,11 +205,6 @@ HELPERS-y += vhost-user-gpu$(EXESUF) vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json endif -ifeq ($(CONFIG_SOFTMMU)$(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyyy) -HELPERS-y += virtiofsd$(EXESUF) -vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json -endif - # Sphinx does not allow building manuals into the same directory as # the source files, so if we're doing an in-tree QEMU build we must # build the manuals into a subdirectory (and then install them from @@ -316,7 +311,6 @@ dummy := $(call unnest-vars,, \ elf2dmp-obj-y \ ivshmem-client-obj-y \ ivshmem-server-obj-y \ - virtiofsd-obj-y \ rdmacm-mux-obj-y \ vhost-user-scsi-obj-y \ vhost-user-blk-obj-y \ @@ -549,12 +543,6 @@ rdmacm-mux$(EXESUF): LIBS += "-libumad" rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS) $(call LINK, $^) -# relies on Linux-specific syscalls -ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) -virtiofsd$(EXESUF): $(virtiofsd-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) - $(call LINK, $^) -endif - vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) diff --git a/Makefile.objs b/Makefile.objs index 9489864967..fee0f71372 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -113,6 +113,5 @@ vhost-user-blk-obj-y = contrib/vhost-user-blk/ rdmacm-mux-obj-y = contrib/rdmacm-mux/ vhost-user-input-obj-y = contrib/vhost-user-input/ vhost-user-gpu-obj-y = contrib/vhost-user-gpu/ -virtiofsd-obj-y = tools/virtiofsd/ ###################################################################### diff --git a/configure b/configure index 05c7cd24aa..40c033a48c 100755 --- a/configure +++ b/configure @@ -7043,6 +7043,7 @@ if test "$gprof" = "yes" ; then fi if test "$cap_ng" = "yes" ; then echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak + echo "LIBCAP_NG_LIBS=$cap_libs" >> $config_host_mak fi echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak for drv in $audio_drv_list; do diff --git a/meson.build b/meson.build index 00f17ef36f..00970e6e19 100644 --- a/meson.build +++ b/meson.build @@ -83,6 +83,15 @@ if 'CONFIG_GNUTLS' in config_host gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(), link_args: config_host['GNUTLS_LIBS'].split()) endif +seccomp = not_found +if 'CONFIG_SECCOMP' in config_host + seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(), + link_args: config_host['SECCOMP_LIBS'].split()) +endif +libcap_ng = not_found +if 'CONFIG_LIBCAP_NG' in config_host + libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split()) +endif target_dirs = config_host['TARGET_DIRS'].split() have_user = false @@ -251,6 +260,8 @@ if have_tools endif endif +subdir('tools') + summary_info = {} summary_info += {'Install prefix': config_host['prefix']} summary_info += {'BIOS directory': config_host['qemu_datadir']} diff --git a/tools/meson.build b/tools/meson.build new file mode 100644 index 0000000000..513bd2ff4f --- /dev/null +++ b/tools/meson.build @@ -0,0 +1,10 @@ +have_virtiofsd = (have_system and + have_tools and + 'CONFIG_LINUX' in config_host and + 'CONFIG_SECCOMP' in config_host and + 'CONFIG_LIBCAP_NG' in config_host and + 'CONFIG_VHOST_USER' in config_host) + +if have_virtiofsd + subdir('virtiofsd') +endif diff --git a/tools/virtiofsd/Makefile.objs b/tools/virtiofsd/Makefile.objs deleted file mode 100644 index 076f667e46..0000000000 --- a/tools/virtiofsd/Makefile.objs +++ /dev/null @@ -1,12 +0,0 @@ -virtiofsd-obj-y = buffer.o \ - fuse_opt.o \ - fuse_log.o \ - fuse_lowlevel.o \ - fuse_signals.o \ - fuse_virtio.o \ - helper.o \ - passthrough_ll.o \ - seccomp.o - -seccomp.o-cflags := $(SECCOMP_CFLAGS) -seccomp.o-libs := $(SECCOMP_LIBS) diff --git a/tools/virtiofsd/meson.build b/tools/virtiofsd/meson.build new file mode 100644 index 0000000000..d1e23c5760 --- /dev/null +++ b/tools/virtiofsd/meson.build @@ -0,0 +1,19 @@ +executable('virtiofsd', files( + 'buffer.c', + 'fuse_opt.c', + 'fuse_log.c', + 'fuse_lowlevel.c', + 'fuse_signals.c', + 'fuse_virtio.c', + 'helper.c', + 'passthrough_ll.c', + 'passthrough_seccomp.c'), + link_with: libvhost_user, + dependencies: [seccomp, qemuutil, libcap_ng], + install: true, + install_dir: get_option('libexecdir')) + +configure_file(input: '50-qemu-virtiofsd.json.in', + output: '50-qemu-virtiofsd.json', + configuration: config_host, + install_dir: config_host['qemu_datadir'] / 'vhost-user') diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 94e0de2d2b..63d1d00565 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b/tools/virtiofsd/passthrough_ll.c @@ -65,7 +65,7 @@ #include #include "passthrough_helpers.h" -#include "seccomp.h" +#include "passthrough_seccomp.h" /* Keep track of inode posix locks for each owner. */ struct lo_inode_plock { diff --git a/tools/virtiofsd/seccomp.c b/tools/virtiofsd/passthrough_seccomp.c similarity index 99% rename from tools/virtiofsd/seccomp.c rename to tools/virtiofsd/passthrough_seccomp.c index 3b1522acdd..19fee60011 100644 --- a/tools/virtiofsd/seccomp.c +++ b/tools/virtiofsd/passthrough_seccomp.c @@ -7,7 +7,7 @@ */ #include "qemu/osdep.h" -#include "seccomp.h" +#include "passthrough_seccomp.h" #include "fuse_i.h" #include "fuse_log.h" #include diff --git a/tools/virtiofsd/seccomp.h b/tools/virtiofsd/passthrough_seccomp.h similarity index 100% rename from tools/virtiofsd/seccomp.h rename to tools/virtiofsd/passthrough_seccomp.h From patchwork Fri Aug 21 10:21:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275940 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF3B3C433E1 for ; Fri, 21 Aug 2020 10:43:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BBA4620738 for ; Fri, 21 Aug 2020 10:43:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UJRRMH+A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBA4620738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Vr-0005wy-W6 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:43:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DN-0001LO-Fk for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:05 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52861 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DJ-0001VV-0e for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2+nW79RgqT1CXCbbkw1jsjdud5rPprvQAYMlssvZA5U=; b=UJRRMH+A1gaej/Uwcz+EuORpBcVgXQsSTDpc0TmrotxKS3v2yVS/BxgtYgOU1CHxG1Lfm0 Wd0cjy0IexElORWPd3axcT/coMHyxF3XcVO9xvNDsVxTXDMwtFjHPuwrBb3zEpiwHI0g6O SVspdz1fkj/Y3I84apsObg8sPiBJPa4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-543-0GqLl4L6MMGw_S1Fe4c4OQ-1; Fri, 21 Aug 2020 06:23:58 -0400 X-MC-Unique: 0GqLl4L6MMGw_S1Fe4c4OQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A5651014DFF for ; Fri, 21 Aug 2020 10:23:57 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06A4919D6C for ; Fri, 21 Aug 2020 10:23:56 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 031/152] contrib/vhost-user-blk: convert to Meson Date: Fri, 21 Aug 2020 06:21:28 -0400 Message-Id: <20200821102329.29777-32-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The GLib pkg-config information is extracted from config-host.mak and used to link vhost-user-blk. Signed-off-by: Paolo Bonzini --- Makefile | 3 --- Makefile.objs | 1 - contrib/vhost-user-blk/Makefile.objs | 1 - contrib/vhost-user-blk/meson.build | 6 ++++++ meson.build | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 contrib/vhost-user-blk/Makefile.objs create mode 100644 contrib/vhost-user-blk/meson.build diff --git a/Makefile b/Makefile index e591d1b2b4..e387b67a3b 100644 --- a/Makefile +++ b/Makefile @@ -313,7 +313,6 @@ dummy := $(call unnest-vars,, \ ivshmem-server-obj-y \ rdmacm-mux-obj-y \ vhost-user-scsi-obj-y \ - vhost-user-blk-obj-y \ vhost-user-input-obj-y \ vhost-user-gpu-obj-y \ qga-vss-dll-obj-y \ @@ -536,8 +535,6 @@ ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS) endif vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) -vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) - $(call LINK, $^) rdmacm-mux$(EXESUF): LIBS += "-libumad" rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS) diff --git a/Makefile.objs b/Makefile.objs index fee0f71372..f69736c10c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -109,7 +109,6 @@ ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/ vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS) vhost-user-scsi.o-libs := $(LIBISCSI_LIBS) vhost-user-scsi-obj-y = contrib/vhost-user-scsi/ -vhost-user-blk-obj-y = contrib/vhost-user-blk/ rdmacm-mux-obj-y = contrib/rdmacm-mux/ vhost-user-input-obj-y = contrib/vhost-user-input/ vhost-user-gpu-obj-y = contrib/vhost-user-gpu/ diff --git a/contrib/vhost-user-blk/Makefile.objs b/contrib/vhost-user-blk/Makefile.objs deleted file mode 100644 index 72e2cdc3ad..0000000000 --- a/contrib/vhost-user-blk/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -vhost-user-blk-obj-y = vhost-user-blk.o diff --git a/contrib/vhost-user-blk/meson.build b/contrib/vhost-user-blk/meson.build new file mode 100644 index 0000000000..5db8cc3fe2 --- /dev/null +++ b/contrib/vhost-user-blk/meson.build @@ -0,0 +1,6 @@ +# FIXME: broken on 32-bit architectures +executable('vhost-user-blk', files('vhost-user-blk.c'), + link_with: libvhost_user, + dependencies: qemuutil, + build_by_default: false, + install: false) diff --git a/meson.build b/meson.build index 00970e6e19..4343f0be6c 100644 --- a/meson.build +++ b/meson.build @@ -257,6 +257,7 @@ qemuutil = declare_dependency(link_with: libqemuutil, if have_tools if 'CONFIG_VHOST_USER' in config_host subdir('contrib/libvhost-user') + subdir('contrib/vhost-user-blk') endif endif From patchwork Fri Aug 21 10:21:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275944 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B932BC433DF for ; Fri, 21 Aug 2020 10:39:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86E5020738 for ; Fri, 21 Aug 2020 10:39:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dYWVqGRY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86E5020738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Rz-00065i-SF for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:39:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DP-0001R8-HW for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:07 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:31494 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DI-0001VT-VC for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+r6q9fJAOZFBMvVsJ4cL4RUbvyuHLisZKU9ps+vESG8=; b=dYWVqGRYPYfDI8PlZxWFVihw8XQtW9gILSFWHu6c+NBmUZdQYHgfMXYpWUXXKATvVyMLq/ jYGV5+lwo/fmBRmVoNaBqJ8Dy98Qgm6N/0g9zRZi8vEniyLB8WRA4y3LRTXGnuZ71nYCQI ylGgmeEWvll/wZ/XdDHNrygQmY9W8TU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-156-vXu5Hr71MqaIRSEpmpqOYg-1; Fri, 21 Aug 2020 06:23:58 -0400 X-MC-Unique: vXu5Hr71MqaIRSEpmpqOYg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 895CA191E2A0 for ; Fri, 21 Aug 2020 10:23:57 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55CE619D6C for ; Fri, 21 Aug 2020 10:23:57 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 032/152] vhost-user-scsi: add compatibility for libiscsi 1.9.0 Date: Fri, 21 Aug 2020 06:21:29 -0400 Message-Id: <20200821102329.29777-33-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- contrib/vhost-user-scsi/vhost-user-scsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c index 7a1db164c8..3c912384e9 100644 --- a/contrib/vhost-user-scsi/vhost-user-scsi.c +++ b/contrib/vhost-user-scsi/vhost-user-scsi.c @@ -12,7 +12,9 @@ #include "qemu/osdep.h" #include +#define inline __attribute__((gnu_inline)) /* required for libiscsi v1.9.0 */ #include +#undef inline #include "contrib/libvhost-user/libvhost-user-glib.h" #include "standard-headers/linux/virtio_scsi.h" From patchwork Fri Aug 21 10:21:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275938 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72E89C433E1 for ; Fri, 21 Aug 2020 10:44:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41BD520748 for ; Fri, 21 Aug 2020 10:44:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gXyjLwbN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41BD520748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94XY-0000up-EQ for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:44:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DO-0001Nn-BR for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:06 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:48799 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DJ-0001Vf-Dl for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dgxR74keJ56KEtQKFT+sBfs+oZ7iAwsSnVd6H7x7wlQ=; b=gXyjLwbNBGFqv3ZpuQ0dRpXPgnA0C/K0ct/MT78EPEY6WBNd96ybHmPoVTGwPEEpKNkLj3 N/1wBYfqWQ9ruBM2tscVJ3zEhN4fpchrReYuQa9O0HKW8Tjy93UBSAKTUxPjISpqRgkH0K jshk+YddaID5M8z4GtqWxo5UXmMHm7M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-275-cDov0Nu_PpijCuOq3h6cWA-1; Fri, 21 Aug 2020 06:23:58 -0400 X-MC-Unique: cDov0Nu_PpijCuOq3h6cWA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D881F801ABF for ; Fri, 21 Aug 2020 10:23:57 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id A58BD19D6C for ; Fri, 21 Aug 2020 10:23:57 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 033/152] contrib/vhost-user-scsi: convert to Meson Date: Fri, 21 Aug 2020 06:21:30 -0400 Message-Id: <20200821102329.29777-34-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The libiscsi pkg-config information is extracted from config-host.mak and used to link vhost-user-blk. Signed-off-by: Paolo Bonzini --- Makefile | 3 --- Makefile.objs | 3 --- contrib/vhost-user-scsi/Makefile.objs | 1 - contrib/vhost-user-scsi/meson.build | 7 +++++++ meson.build | 6 ++++++ 5 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 contrib/vhost-user-scsi/Makefile.objs create mode 100644 contrib/vhost-user-scsi/meson.build diff --git a/Makefile b/Makefile index e387b67a3b..1f5a710f77 100644 --- a/Makefile +++ b/Makefile @@ -312,7 +312,6 @@ dummy := $(call unnest-vars,, \ ivshmem-client-obj-y \ ivshmem-server-obj-y \ rdmacm-mux-obj-y \ - vhost-user-scsi-obj-y \ vhost-user-input-obj-y \ vhost-user-gpu-obj-y \ qga-vss-dll-obj-y \ @@ -533,8 +532,6 @@ ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS) ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS) $(call LINK, $^) endif -vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS) - $(call LINK, $^) rdmacm-mux$(EXESUF): LIBS += "-libumad" rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS) diff --git a/Makefile.objs b/Makefile.objs index f69736c10c..ab798b08a7 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -106,9 +106,6 @@ qga-vss-dll-obj-y = qga/ elf2dmp-obj-y = contrib/elf2dmp/ ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/ ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/ -vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS) -vhost-user-scsi.o-libs := $(LIBISCSI_LIBS) -vhost-user-scsi-obj-y = contrib/vhost-user-scsi/ rdmacm-mux-obj-y = contrib/rdmacm-mux/ vhost-user-input-obj-y = contrib/vhost-user-input/ vhost-user-gpu-obj-y = contrib/vhost-user-gpu/ diff --git a/contrib/vhost-user-scsi/Makefile.objs b/contrib/vhost-user-scsi/Makefile.objs deleted file mode 100644 index e83a38a85b..0000000000 --- a/contrib/vhost-user-scsi/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -vhost-user-scsi-obj-y = vhost-user-scsi.o diff --git a/contrib/vhost-user-scsi/meson.build b/contrib/vhost-user-scsi/meson.build new file mode 100644 index 0000000000..257cbffc8e --- /dev/null +++ b/contrib/vhost-user-scsi/meson.build @@ -0,0 +1,7 @@ +if 'CONFIG_LIBISCSI' in config_host + executable('vhost-user-scsi', files('vhost-user-scsi.c'), + link_with: libvhost_user, + dependencies: [qemuutil, libiscsi], + build_by_default: targetos == 'linux', + install: false) +endif diff --git a/meson.build b/meson.build index 4343f0be6c..4c067d9fe6 100644 --- a/meson.build +++ b/meson.build @@ -92,6 +92,11 @@ libcap_ng = not_found if 'CONFIG_LIBCAP_NG' in config_host libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split()) endif +libiscsi = not_found +if 'CONFIG_LIBISCSI' in config_host + libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(), + link_args: config_host['LIBISCSI_LIBS'].split()) +endif target_dirs = config_host['TARGET_DIRS'].split() have_user = false @@ -258,6 +263,7 @@ if have_tools if 'CONFIG_VHOST_USER' in config_host subdir('contrib/libvhost-user') subdir('contrib/vhost-user-blk') + subdir('contrib/vhost-user-scsi') endif endif From patchwork Fri Aug 21 10:21:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5702AC433E1 for ; Fri, 21 Aug 2020 10:34:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21CA0204EA for ; Fri, 21 Aug 2020 10:34:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DL72xK8C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21CA0204EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Mz-0003cy-BT for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:34:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DR-0001VM-6R for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:09 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:36714 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DO-0001X4-0D for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jyv/dIMndkg4xeEOvVYoSrp7IFILHEetfFnzL+IGUfw=; b=DL72xK8CrRXYsE0+IFJqn14elB5BA8LgYYdKgBQN5nqSuaKE1aMvFtb/Nig9ANgkohplsI SnzolQOBDuvLnGJH3sQOX5wCUk314l0r6YGo6xaSurfh5ePNkLpHvWMVC6eVaRmI4ay2zw OXuR1nESuE2ontB54UxB5CA6MqiGuFo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-201-02tpeWp1PfC_KwjOVDjqug-1; Fri, 21 Aug 2020 06:24:03 -0400 X-MC-Unique: 02tpeWp1PfC_KwjOVDjqug-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C4BFF10082E0 for ; Fri, 21 Aug 2020 10:24:02 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E35F19D6C; Fri, 21 Aug 2020 10:24:02 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 037/152] contrib/ivshmem: convert to meson Date: Fri, 21 Aug 2020 06:21:34 -0400 Message-Id: <20200821102329.29777-38-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 9 --------- Makefile.objs | 2 -- configure | 3 --- contrib/ivshmem-client/Makefile.objs | 1 - contrib/ivshmem-client/meson.build | 4 ++++ contrib/ivshmem-server/Makefile.objs | 1 - contrib/ivshmem-server/meson.build | 4 ++++ meson.build | 5 +++++ 8 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 contrib/ivshmem-client/Makefile.objs create mode 100644 contrib/ivshmem-client/meson.build delete mode 100644 contrib/ivshmem-server/Makefile.objs create mode 100644 contrib/ivshmem-server/meson.build diff --git a/Makefile b/Makefile index ed6494b771..e16cbe6191 100644 --- a/Makefile +++ b/Makefile @@ -303,8 +303,6 @@ dummy := $(call unnest-vars,, \ chardev-obj-y \ qga-obj-y \ elf2dmp-obj-y \ - ivshmem-client-obj-y \ - ivshmem-server-obj-y \ qga-vss-dll-obj-y \ block-obj-y \ block-obj-m \ @@ -517,13 +515,6 @@ endif elf2dmp$(EXESUF): $(elf2dmp-obj-y) $(call LINK, $^) -ifdef CONFIG_IVSHMEM -ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS) - $(call LINK, $^) -ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS) - $(call LINK, $^) -endif - module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak $(call quiet-command,$(PYTHON) $< $@ \ $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ diff --git a/Makefile.objs b/Makefile.objs index 2f2d4b2066..336a684ff3 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -104,7 +104,5 @@ qga-vss-dll-obj-y = qga/ ###################################################################### # contrib elf2dmp-obj-y = contrib/elf2dmp/ -ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/ -ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/ ###################################################################### diff --git a/configure b/configure index 40c033a48c..1d00af339c 100755 --- a/configure +++ b/configure @@ -6725,9 +6725,6 @@ if test "$want_tools" = "yes" ; then if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then tools="qemu-nbd\$(EXESUF) qemu-storage-daemon\$(EXESUF) $tools" fi - if [ "$ivshmem" = "yes" ]; then - tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools" - fi if [ "$curl" = "yes" ]; then tools="elf2dmp\$(EXESUF) $tools" fi diff --git a/contrib/ivshmem-client/Makefile.objs b/contrib/ivshmem-client/Makefile.objs deleted file mode 100644 index bfab2d20dd..0000000000 --- a/contrib/ivshmem-client/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -ivshmem-client-obj-y = ivshmem-client.o main.o diff --git a/contrib/ivshmem-client/meson.build b/contrib/ivshmem-client/meson.build new file mode 100644 index 0000000000..1b171efb4f --- /dev/null +++ b/contrib/ivshmem-client/meson.build @@ -0,0 +1,4 @@ +executable('ivshmem-client', files('ivshmem-client.c', 'main.c'), + dependencies: glib, + build_by_default: targetos == 'linux', + install: false) diff --git a/contrib/ivshmem-server/Makefile.objs b/contrib/ivshmem-server/Makefile.objs deleted file mode 100644 index c060dd3698..0000000000 --- a/contrib/ivshmem-server/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -ivshmem-server-obj-y = ivshmem-server.o main.o diff --git a/contrib/ivshmem-server/meson.build b/contrib/ivshmem-server/meson.build new file mode 100644 index 0000000000..3a53942201 --- /dev/null +++ b/contrib/ivshmem-server/meson.build @@ -0,0 +1,4 @@ +executable('ivshmem-server', files('ivshmem-server.c', 'main.c'), + dependencies: [qemuutil, rt], + build_by_default: targetos == 'linux', + install: false) diff --git a/meson.build b/meson.build index 71ef66e1d6..c1078b6759 100644 --- a/meson.build +++ b/meson.build @@ -94,6 +94,7 @@ libcap_ng = not_found if 'CONFIG_LIBCAP_NG' in config_host libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split()) endif +rt = cc.find_library('rt', required: false) libiscsi = not_found if 'CONFIG_LIBISCSI' in config_host libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(), @@ -283,6 +284,10 @@ if have_tools subdir('contrib/vhost-user-input') subdir('contrib/vhost-user-scsi') endif + if 'CONFIG_IVSHMEM' in config_host + subdir('contrib/ivshmem-client') + subdir('contrib/ivshmem-server') + endif endif subdir('tools') From patchwork Fri Aug 21 10:21:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275937 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA8A0C433DF for ; Fri, 21 Aug 2020 10:46:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7371120656 for ; Fri, 21 Aug 2020 10:46:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TJs/ce0J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7371120656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Z8-0004LD-Hf for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:46:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DT-0001Zw-0l for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:34045) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DP-0001Xu-J4 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BnPva8uhn/rh6w2DyQO8VexO3AzwzTnqAW68mZqDUyc=; b=TJs/ce0JoN1n5sraonS8G2tJXdCnFcLFY3htN/0dUf//nxaBVhAOes9PaJZNEzmyupy9cN 1ywHFSSCMRwITIjKb13TyEYM1WJBFrfUUG9FGWzddhYBJRr6viDeVWKXfheuErMkqChIKD p+iDdsN5cXdp49ME8AUse1Ae/Eobbec= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-116-AsYfbPPQPh6hVxvLJ2sDHQ-1; Fri, 21 Aug 2020 06:24:05 -0400 X-MC-Unique: AsYfbPPQPh6hVxvLJ2sDHQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 445B68030D0 for ; Fri, 21 Aug 2020 10:24:04 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 093105F707 for ; Fri, 21 Aug 2020 10:24:03 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 040/152] meson: add solaris and Haiku libraries Date: Fri, 21 Aug 2020 06:21:37 -0400 Message-Id: <20200821102329.29777-41-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" There is no probing in configure, so no need to pass them as variables to meson. Signed-off-by: Paolo Bonzini --- meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meson.build b/meson.build index d9758629cc..8d764a9431 100644 --- a/meson.build +++ b/meson.build @@ -66,6 +66,14 @@ elif targetos == 'darwin' iokit = dependency('appleframeworks', modules: 'IOKit') cocoa = dependency('appleframeworks', modules: 'Cocoa') hvf = dependency('appleframeworks', modules: 'Hypervisor') +elif targetos == 'sunos' + socket = [cc.find_library('socket'), + cc.find_library('nsl'), + cc.find_library('resolv')] +elif targetos == 'haiku' + socket = [cc.find_library('posix_error_mapper'), + cc.find_library('network'), + cc.find_library('bsd')] endif glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(), link_args: config_host['GLIB_LIBS'].split()) From patchwork Fri Aug 21 10:21:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CAE2C433E1 for ; Fri, 21 Aug 2020 10:49:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB83F20656 for ; Fri, 21 Aug 2020 10:49:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AR3hzERd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB83F20656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94cK-0003wX-1U for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:49:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Db-0001me-Lm for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DT-0001ZV-TD for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CDnZv2ZQa1bGMRDASM5qTMHQbU0SlAQPIDC6YaCwmTM=; b=AR3hzERdY6xJlsZBOm6dTpTOsONhhMfk0mMvLyaeaMLjeGfxgpsKbO+LONqwg1ndecz1ZZ NW88QaBVV1texfN43Z0ENy4yFx5Sk0X5YPkw+Us58pvgOlU1xipdo3TTD2SQ+ZSFgKdK+c BsA2zPTCR1FIuME168tC+qbirBWcRTg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-43-wcZCmx8aN7i1eLyKGJfK2w-1; Fri, 21 Aug 2020 06:24:09 -0400 X-MC-Unique: wcZCmx8aN7i1eLyKGJfK2w-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6AF7B4239E for ; Fri, 21 Aug 2020 10:24:08 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BDB55C1D0; Fri, 21 Aug 2020 10:24:08 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 042/152] meson: convert vss-win32 Date: Fri, 21 Aug 2020 06:21:39 -0400 Message-Id: <20200821102329.29777-43-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 1 - Makefile.objs | 8 -------- qga/Makefile.objs | 1 - qga/meson.build | 6 ++++++ qga/vss-win32/Makefile.objs | 23 ----------------------- qga/vss-win32/meson.build | 33 +++++++++++++++++++++++++++++++++ 6 files changed, 39 insertions(+), 33 deletions(-) delete mode 100644 qga/Makefile.objs delete mode 100644 qga/vss-win32/Makefile.objs create mode 100644 qga/vss-win32/meson.build diff --git a/Makefile b/Makefile index 83e2c86725..0fa9d63bb4 100644 --- a/Makefile +++ b/Makefile @@ -301,7 +301,6 @@ endif dummy := $(call unnest-vars,, \ authz-obj-y \ chardev-obj-y \ - qga-vss-dll-obj-y \ block-obj-y \ block-obj-m \ storage-daemon-obj-y \ diff --git a/Makefile.objs b/Makefile.objs index 259f9936ac..baf15656e8 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -91,11 +91,3 @@ common-obj-y += disas/ ###################################################################### # Resource file for Windows executables version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o - -###################################################################### -# guest agent - -# FIXME: a few definitions from qapi/qapi-types.o and -# qapi/qapi-visit.o are needed by libqemuutil.a. These should be -# extracted into a QAPI schema module, or perhaps a separate schema. -qga-vss-dll-obj-y = qga/ diff --git a/qga/Makefile.objs b/qga/Makefile.objs deleted file mode 100644 index 9ecf2496da..0000000000 --- a/qga/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -qga-vss-dll-obj-$(CONFIG_QGA_VSS) += vss-win32/ diff --git a/qga/meson.build b/qga/meson.build index 3513a90f5d..9ddb260cff 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -44,3 +44,9 @@ qga = executable('qemu-ga', qga_ss.sources(), link_args: config_host['LIBS_QGA'].split(), dependencies: [qemuutil, libudev], install: true) + +if targetos == 'windows' + if 'CONFIG_QGA_VSS' in config_host + subdir('vss-win32') + endif +endif diff --git a/qga/vss-win32/Makefile.objs b/qga/vss-win32/Makefile.objs deleted file mode 100644 index c82676aeb8..0000000000 --- a/qga/vss-win32/Makefile.objs +++ /dev/null @@ -1,23 +0,0 @@ -# rules to build qga-vss.dll - -qga-vss-dll-obj-y += requester.o provider.o install.o - -obj-qga-vss-dll-obj-y = $(addprefix $(obj)/, $(qga-vss-dll-obj-y)) -$(obj-qga-vss-dll-obj-y): QEMU_CXXFLAGS := $(filter-out -fstack-protector-all -fstack-protector-strong, $(QEMU_CXXFLAGS)) -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor - -QGA_VSS_LDFLAGS = -shared -Wl,--add-stdcall-alias,--enable-stdcall-fixup -lglib-2.0 -lole32 -loleaut32 -lshlwapi -luuid -lintl -lws2_32 -static -$(obj)/qga-vss.dll: $(obj-qga-vss-dll-obj-y) $(SRC_PATH)/$(obj)/qga-vss.def - $(call quiet-command,$(CXX) -o $@ $(qga-vss-dll-obj-y) $(SRC_PATH)/qga/vss-win32/qga-vss.def $(CXXFLAGS) $(QGA_VSS_LDFLAGS),"LINK","$(TARGET_DIR)$@") - - -# rules to build qga-provider.tlb -# Currently, only native build is supported because building .tlb -# (TypeLibrary) from .idl requires WindowsSDK and MIDL (and cl.exe in VC++). -MIDL=$(WIN_SDK)/Bin/midl - -$(obj)/qga-vss.tlb: $(SRC_PATH)/$(obj)/qga-vss.idl -ifeq ($(WIN_SDK),"") - $(call quiet-command,cp $(dir $<)qga-vss.tlb $@,"COPY","$(TARGET_DIR)$@") -else - $(call quiet-command,$(MIDL) -tlb $@ -I $(WIN_SDK)/Include $<,"MIDL","$(TARGET_DIR)$@") -endif diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build new file mode 100644 index 0000000000..42c8d31a3d --- /dev/null +++ b/qga/vss-win32/meson.build @@ -0,0 +1,33 @@ +if add_languages('cpp', required: false) + glib_static = dependency('glib-2.0', static: true) + link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong', + '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup']) + shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'], + name_prefix: '', + cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'], + link_args: link_args, + vs_module_defs: 'qga-vss.def', + dependencies: [glib_static, socket, + cc.find_library('ole32'), + cc.find_library('oleaut32'), + cc.find_library('shlwapi'), + cc.find_library('uuid'), + cc.find_library('intl')]) +endif + +# rules to build qga-vss.tlb +# Currently, only native build is supported because building .tlb +# (TypeLibrary) from .idl requires WindowsSDK and MIDL (and cl.exe in VC++). +midl = find_program('midl', required: false) +if midl.found() + gen_tlb = custom_target('gen-tlb', + input: 'qga-vss.idl', + output: 'qga-vss.tlb', + command: [midl, '-tlb', '-I' + config_host['WIN_SDK'], + '@INPUT@', '@OUTPUT@']) +else + gen_tlb = custom_target('gen-tlb', + input: 'qga-vss.tlb', + output: 'qga-vss.tlb', + command: ['cp', '@INPUT@', '@OUTPUT@']) +endif From patchwork Fri Aug 21 10:21:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275943 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BF60C433E1 for ; Fri, 21 Aug 2020 10:41:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E56CC20738 for ; Fri, 21 Aug 2020 10:41:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HUG35M/j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E56CC20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Ty-00018v-4z for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:41:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DW-0001iO-T7 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49076) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DU-0001aC-N9 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RsrceV1O1ei1CAUWAjKEh/R49nG9g5i6xASY59+OLno=; b=HUG35M/jj19x/F3Mc7TuyUMfkW5rxi8lymDjX+g0mHwS57bp5ciJXSNYLEyTdIYpOBK7NJ 7WXOVQDnQzYTHZNRAW/AF3DwlN7zMq12Krd8bCCSfJHigQa1Ue7cCJMEQ0zTrMNQTIoICA auLAJaHvpGUybwtcSErmkh8n4KF1bdQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-472-N9MmWYZHM82DxFpcbDjwOQ-1; Fri, 21 Aug 2020 06:24:09 -0400 X-MC-Unique: N9MmWYZHM82DxFpcbDjwOQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DC92B425D5 for ; Fri, 21 Aug 2020 10:24:08 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CB745F704; Fri, 21 Aug 2020 10:24:08 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 043/152] meson: add msi generation Date: Fri, 21 Aug 2020 06:21:40 -0400 Message-Id: <20200821102329.29777-44-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 18 ------------------ qga/meson.build | 25 +++++++++++++++++++++++++ qga/vss-win32/meson.build | 3 ++- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 0fa9d63bb4..e93ebf6299 100644 --- a/Makefile +++ b/Makefile @@ -450,23 +450,6 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS) qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS) -ifdef QEMU_GA_MSI_ENABLED -QEMU_GA_MSI=qemu-ga-$(ARCH).msi - -msi: $(QEMU_GA_MSI) - -$(QEMU_GA_MSI): qga/qemu-ga.exe $(QGA_VSS_PROVIDER) - -$(QEMU_GA_MSI): config-host.mak - -$(QEMU_GA_MSI): $(SRC_PATH)/qga/installer/qemu-ga.wxs - $(call quiet-command,QEMU_GA_VERSION="$(QEMU_GA_VERSION)" QEMU_GA_MANUFACTURER="$(QEMU_GA_MANUFACTURER)" QEMU_GA_DISTRO="$(QEMU_GA_DISTRO)" BUILD_DIR="$(BUILD_DIR)" \ - wixl -o $@ $(QEMU_GA_MSI_ARCH) $(QEMU_GA_MSI_WITH_VSS) $(QEMU_GA_MSI_MINGW_DLL_PATH) $<,"WIXL","$@") -else -msi: - @echo "MSI build not configured or dependency resolution failed (reconfigure with --enable-guest-agent-msi option)" -endif - ifneq ($(EXESUF),) .PHONY: qga/qemu-ga qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI) @@ -482,7 +465,6 @@ clean: recurse-clean ninja-clean clean-ctlist # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f qemu-options.def - rm -f *.msi find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ diff --git a/qga/meson.build b/qga/meson.build index 9ddb260cff..33f6db2865 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -48,5 +48,30 @@ qga = executable('qemu-ga', qga_ss.sources(), if targetos == 'windows' if 'CONFIG_QGA_VSS' in config_host subdir('vss-win32') + else + gen_tlb = [] + endif + + wixl = find_program('wixl', required: false) + if wixl.found() + deps = [gen_tlb, qga] + if 'CONFIG_QGA_VSS' in config_host and 'QEMU_GA_MSI_WITH_VSS' in config_host + deps += qga_vss + endif + qga_msi = custom_target('QGA MSI', + input: files('installer/qemu-ga.wxs'), + output: 'qemu-ga-@0@.msi'.format(config_host['ARCH']), + depends: deps, + command: [ + 'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'], + 'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'], + 'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'], + 'BUILD_DIR=' + meson.build_root(), + wixl, '-o', '@OUTPUT0@', '@INPUT0@', + config_host['QEMU_GA_MSI_ARCH'].split(), + config_host['QEMU_GA_MSI_WITH_VSS'].split(), + config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(), + ]) + alias_target('msi', qga_msi) endif endif diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 42c8d31a3d..1f39e05335 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -2,7 +2,8 @@ if add_languages('cpp', required: false) glib_static = dependency('glib-2.0', static: true) link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong', '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup']) - shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'], + + qga_vss = shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'], name_prefix: '', cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'], link_args: link_args, From patchwork Fri Aug 21 10:21:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275936 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDDE9C433E1 for ; Fri, 21 Aug 2020 10:47:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA3DD20656 for ; Fri, 21 Aug 2020 10:47:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dS4cI/0T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA3DD20656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Zs-0006Gk-14 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:47:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DY-0001ie-3M for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:16 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:47727 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DV-0001aM-6L for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S++sMXlk4ZbdRPKitxI0XFdZlmXCAv7kx45kPYA6yNU=; b=dS4cI/0TukWDtYbhGnrcKWXIqaO6T7HY7dinWR+eMa2tOAHfcE3ScCKhaagxJ+wb5qLqp/ K6LBZNcxjhLElSHqipnAtV43x7E1vcWN1kAn18fOXQxQ3jmS0qi654JR3IJFAEpQdRUO/r ybgzHV1KmjguCCsda1F+trf0gFvxvNk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-386-UM59yB9TPCijPbFnOOCKWQ-1; Fri, 21 Aug 2020 06:24:10 -0400 X-MC-Unique: UM59yB9TPCijPbFnOOCKWQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CEFA380EFBD for ; Fri, 21 Aug 2020 10:24:09 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6688B5C1D0; Fri, 21 Aug 2020 10:24:09 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 045/152] meson: add qemu-bridge-helper Date: Fri, 21 Aug 2020 06:21:42 -0400 Message-Id: <20200821102329.29777-46-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- Makefile | 4 ---- meson.build | 9 ++++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8d3c8d8fbd..3addf50636 100644 --- a/Makefile +++ b/Makefile @@ -197,8 +197,6 @@ LIBS+=-lz $(LIBS_TOOLS) HELPERS-y = $(HELPERS) -HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) += qemu-bridge-helper$(EXESUF) - # Sphinx does not allow building manuals into the same directory as # the source files, so if we're doing an in-tree QEMU build we must # build the manuals into a subdirectory (and then install them from @@ -431,8 +429,6 @@ qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-obj-y) $(COMMON_LDADDS) -qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS) - qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS) qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS) diff --git a/meson.build b/meson.build index 5cd8ee0298..3568b4816e 100644 --- a/meson.build +++ b/meson.build @@ -297,7 +297,6 @@ qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) # Other build targets - if 'CONFIG_GUEST_AGENT' in config_host subdir('qga') endif @@ -315,6 +314,14 @@ if have_tools subdir('contrib/vhost-user-input') subdir('contrib/vhost-user-scsi') endif + + if targetos == 'linux' + executable('qemu-bridge-helper', files('qemu-bridge-helper.c'), + dependencies: [qemuutil, libcap_ng], + install: true, + install_dir: get_option('libexecdir')) + endif + if 'CONFIG_IVSHMEM' in config_host subdir('contrib/ivshmem-client') subdir('contrib/ivshmem-server') From patchwork Fri Aug 21 10:21:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275935 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50525C433E1 for ; Fri, 21 Aug 2020 10:48:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F826207BB for ; Fri, 21 Aug 2020 10:48:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SG2zbsZY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F826207BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94ar-0000Zo-Bj for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:48:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DZ-0001lU-CN for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DW-0001ac-8o for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0CiGmGsqWM1Sdrw1/fjjkI3KDefPbgWPcYThw40kIek=; b=SG2zbsZY0ZE02NOWzV+9SK6tzrPpJyey99b5Mz6Vv1tTgcmHOV/cthxvbD7slYZATT1tWH SERcC+82RHaOOsgt3NHZ7c3sS/qGiPp82rB8A3ONIfKIOrR80ownrdVdcOaAWE+1Qz3gYh aruQiSMP+IcusdQaYsfYLpCCatq2JCQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416-iNEAZbHcNUid9UPIa5-uXQ-1; Fri, 21 Aug 2020 06:24:11 -0400 X-MC-Unique: iNEAZbHcNUid9UPIa5-uXQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B7D1100CF76 for ; Fri, 21 Aug 2020 10:24:10 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id F02325C1D0; Fri, 21 Aug 2020 10:24:09 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 046/152] meson: add qemu-keymap Date: Fri, 21 Aug 2020 06:21:43 -0400 Message-Id: <20200821102329.29777-47-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 5 ----- configure | 4 +--- meson.build | 10 ++++++++++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3addf50636..b0a261bdc7 100644 --- a/Makefile +++ b/Makefile @@ -429,8 +429,6 @@ qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-obj-y) $(COMMON_LDADDS) -qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS) - qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS) fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS) @@ -443,9 +441,6 @@ endif qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@") -qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS) -qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS) - module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak $(call quiet-command,$(PYTHON) $< $@ \ $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ diff --git a/configure b/configure index 86a30d0e6d..62f1bcf9ba 100755 --- a/configure +++ b/configure @@ -6748,9 +6748,6 @@ if test "$softmmu" = yes ; then fi mpath=no fi - if test "$xkbcommon" = "yes"; then - tools="qemu-keymap\$(EXESUF) $tools" - fi fi # Probe for guest agent support/options @@ -7067,6 +7064,7 @@ if test "$vnc_png" = "yes" ; then echo "CONFIG_VNC_PNG=y" >> $config_host_mak fi if test "$xkbcommon" = "yes" ; then + echo "CONFIG_XKBCOMMON=y" >> $config_host_mak echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 3568b4816e..9ec7dd9ddc 100644 --- a/meson.build +++ b/meson.build @@ -111,6 +111,11 @@ libcap_ng = not_found if 'CONFIG_LIBCAP_NG' in config_host libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split()) endif +xkbcommon = not_found +if 'CONFIG_XKBCOMMON' in config_host + xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(), + link_args: config_host['XKBCOMMON_LIBS'].split()) +endif rt = cc.find_library('rt', required: false) libiscsi = not_found if 'CONFIG_LIBISCSI' in config_host @@ -305,6 +310,11 @@ if have_tools subdir('contrib/rdmacm-mux') subdir('contrib/elf2dmp') + if 'CONFIG_XKBCOMMON' in config_host + executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c'), + dependencies: [qemuutil, xkbcommon], install: true) + endif + if 'CONFIG_VHOST_USER' in config_host subdir('contrib/libvhost-user') subdir('contrib/vhost-user-blk') From patchwork Fri Aug 21 10:21:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275941 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35043C433E1 for ; Fri, 21 Aug 2020 10:42:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 003C320738 for ; Fri, 21 Aug 2020 10:42:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q9hKz6n6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 003C320738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94VK-0004SN-4G for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:42:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94DY-0001jg-Nw for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:16 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:30744 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DW-0001az-9R for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qszirkDbjDZTg9KSE1Y6uyGCVGvWyhl0z/bmtMdnhhk=; b=Q9hKz6n6Jnik3hEKFmEBAfDsq/kvCr6sbcWGVvnFCkI8c2GHAAZTbqrlWwB4TcApi9+FB4 J+M1suFr8Xbas4IAtuF86xjAY4Euh1AF9Zs0fwb3bhkn/SlVHL97JHMPTGIhehhhMRCuxi RGLS8zEkqG2jj78IkxMd/V6f3bEU0UM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-173-l_9dxIaiNiSYJCy6rWy0WA-1; Fri, 21 Aug 2020 06:24:11 -0400 X-MC-Unique: l_9dxIaiNiSYJCy6rWy0WA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CDD961008549 for ; Fri, 21 Aug 2020 10:24:10 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C6F25C1D7; Fri, 21 Aug 2020 10:24:10 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 047/152] meson: add qemu-edid Date: Fri, 21 Aug 2020 06:21:44 -0400 Message-Id: <20200821102329.29777-48-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- Makefile | 2 -- configure | 2 +- meson.build | 4 ++++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b0a261bdc7..da1e556efe 100644 --- a/Makefile +++ b/Makefile @@ -429,8 +429,6 @@ qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-obj-y) $(COMMON_LDADDS) -qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS) - fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS) scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) diff --git a/configure b/configure index 62f1bcf9ba..518491d234 100755 --- a/configure +++ b/configure @@ -6713,7 +6713,7 @@ fi tools="" if test "$want_tools" = "yes" ; then - tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) qemu-edid\$(EXESUF) $tools" + tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then tools="qemu-nbd\$(EXESUF) qemu-storage-daemon\$(EXESUF) $tools" fi diff --git a/meson.build b/meson.build index 9ec7dd9ddc..f49f5e08d6 100644 --- a/meson.build +++ b/meson.build @@ -315,6 +315,10 @@ if have_tools dependencies: [qemuutil, xkbcommon], install: true) endif + executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'), + dependencies: qemuutil, + install: true) + if 'CONFIG_VHOST_USER' in config_host subdir('contrib/libvhost-user') subdir('contrib/vhost-user-blk') From patchwork Fri Aug 21 10:21:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275939 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9ECB8C433DF for ; Fri, 21 Aug 2020 10:44:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BC4A20738 for ; Fri, 21 Aug 2020 10:44:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D5hbKcC9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BC4A20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94Ws-0007pB-NL for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:44:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Di-0001tm-OH for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:26 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:24875 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94DX-0001bG-8V for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SxRmxU806zYvkiylG7S95xkTXlDZAsWNyonD9C2PFxg=; b=D5hbKcC9tu6rhK+6V6ozTx1BbNDDJ6bp79VoDMjAsshEQISRHEY/4fizS9zjTspsLsdfcx 9xXo97cuWzoFFncuNfBs5m/ZdmKq5blPlG7zoh1ml0T2begxQpEi3YvtBi+FTpkRuS87fZ WydBDREvLO0QlvqZnNNLSoNnPK7hcfE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-t99EBUHbNx2Iy6Bl3ze8pg-1; Fri, 21 Aug 2020 06:24:12 -0400 X-MC-Unique: t99EBUHbNx2Iy6Bl3ze8pg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BC84D425DC for ; Fri, 21 Aug 2020 10:24:11 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CB715C1D0; Fri, 21 Aug 2020 10:24:11 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 049/152] meson: keymap-gen Date: Fri, 21 Aug 2020 06:21:46 -0400 Message-Id: <20200821102329.29777-50-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 38 -------------------------------------- meson.build | 1 + ui/meson.build | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 38 deletions(-) create mode 100644 ui/meson.build diff --git a/Makefile b/Makefile index 39633ec7db..c07b6bb5b8 100644 --- a/Makefile +++ b/Makefile @@ -141,44 +141,6 @@ generated-files-y += module_block.h generated-files-y += .git-submodule-status -KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen -KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv - -KEYCODEMAP_FILES = \ - ui/input-keymap-atset1-to-qcode.c.inc \ - ui/input-keymap-linux-to-qcode.c.inc \ - ui/input-keymap-qcode-to-atset1.c.inc \ - ui/input-keymap-qcode-to-atset2.c.inc \ - ui/input-keymap-qcode-to-atset3.c.inc \ - ui/input-keymap-qcode-to-linux.c.inc \ - ui/input-keymap-qcode-to-qnum.c.inc \ - ui/input-keymap-qcode-to-sun.c.inc \ - ui/input-keymap-qnum-to-qcode.c.inc \ - ui/input-keymap-usb-to-qcode.c.inc \ - ui/input-keymap-win32-to-qcode.c.inc \ - ui/input-keymap-x11-to-qcode.c.inc \ - ui/input-keymap-xorgevdev-to-qcode.c.inc \ - ui/input-keymap-xorgkbd-to-qcode.c.inc \ - ui/input-keymap-xorgxquartz-to-qcode.c.inc \ - ui/input-keymap-xorgxwin-to-qcode.c.inc \ - ui/input-keymap-osx-to-qcode.c.inc \ - $(NULL) - -generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES) - -ui/input-keymap-%.c.inc: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs - $(call quiet-command,\ - stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \ - test -e $(KEYCODEMAP_GEN) && \ - $(PYTHON) $(KEYCODEMAP_GEN) \ - --lang glib2 \ - --varname qemu_input_map_$${src}_to_$${dst} \ - code-map $(KEYCODEMAP_CSV) $${src} $${dst} \ - > $@ || rm -f $@, "GEN", "$@") - -$(KEYCODEMAP_GEN): .git-submodule-status -$(KEYCODEMAP_CSV): .git-submodule-status - edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2)) pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2 $(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<) diff --git a/meson.build b/meson.build index 3e9e0a9b33..b4a2f9db3a 100644 --- a/meson.build +++ b/meson.build @@ -292,6 +292,7 @@ subdir('trace') subdir('util') subdir('crypto') subdir('storage-daemon') +subdir('ui') # Build targets from sourcesets diff --git a/ui/meson.build b/ui/meson.build new file mode 100644 index 0000000000..a6aa7f2b36 --- /dev/null +++ b/ui/meson.build @@ -0,0 +1,34 @@ +keymaps = [ + ['atset1', 'qcode'], + ['linux', 'qcode'], + ['qcode', 'atset1'], + ['qcode', 'atset2'], + ['qcode', 'atset3'], + ['qcode', 'linux'], + ['qcode', 'qnum'], + ['qcode', 'sun'], + ['qnum', 'qcode'], + ['usb', 'qcode'], + ['win32', 'qcode'], + ['x11', 'qcode'], + ['xorgevdev', 'qcode'], + ['xorgkbd', 'qcode'], + ['xorgxquartz', 'qcode'], + ['xorgxwin', 'qcode'], + ['osx', 'qcode'], +] + +if have_system + foreach e : keymaps + output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1]) + genh += custom_target(output, + output: output, + capture: true, + build_by_default: true, # to be removed when added to a target + input: files('keycodemapdb/data/keymaps.csv'), + command: [python.full_path(), files('keycodemapdb/tools/keymap-gen'), + '--lang', 'glib2', + '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]), + 'code-map', '@INPUT0@', e[0], e[1]]) + endforeach +endif From patchwork Fri Aug 21 10:21:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275932 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6717CC433DF for ; Fri, 21 Aug 2020 10:50:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3208320656 for ; Fri, 21 Aug 2020 10:50:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dI6AsWU1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3208320656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94ch-0004Z3-CS for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:50:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Dk-0001xh-JA for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:48838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Db-0001bh-8P for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CiWdCFgGExJxXXna1n04cytDGdN7N9PKIQ8D7GQZpA8=; b=dI6AsWU1gJfthMdJJRFi9dk9DlTT5MOAd26OpnKjzWGLjH4tCdfDbA9Mjj3HJEnXbMriGm qVM0gigagBXae91XuLTVKX6/qN1jkhbnjfBOzwqG3BxGrQXzIoxPIKieMlQ0Dtn5waSLJD 5uU3QS1pkzSuats7Qc2dKL24RmCKX60= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-230-yjG4KQALNPadrUK1w6ynMg-1; Fri, 21 Aug 2020 06:24:16 -0400 X-MC-Unique: yjG4KQALNPadrUK1w6ynMg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC86356B2C for ; Fri, 21 Aug 2020 10:24:15 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2582E60BF1; Fri, 21 Aug 2020 10:24:12 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 050/152] meson: generate qemu-version.h Date: Fri, 21 Aug 2020 06:21:47 -0400 Message-Id: <20200821102329.29777-51-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 27 +-------------------------- meson.build | 14 ++++++++++++-- scripts/qemu-version.sh | 25 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 28 deletions(-) create mode 100755 scripts/qemu-version.sh diff --git a/Makefile b/Makefile index c07b6bb5b8..0b86e3a981 100644 --- a/Makefile +++ b/Makefile @@ -121,21 +121,7 @@ include $(SRC_PATH)/rules.mak # lor is defined in rules.mak CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)) -# Create QEMU_PKGVERSION and FULL_VERSION strings -# If PKGVERSION is set, use that; otherwise get version and -dirty status from git -QEMU_PKGVERSION := $(if $(PKGVERSION),$(PKGVERSION),$(shell \ - cd $(SRC_PATH); \ - if test -e .git; then \ - git describe --match 'v*' 2>/dev/null | tr -d '\n'; \ - if ! git diff-index --quiet HEAD &>/dev/null; then \ - echo "-dirty"; \ - fi; \ - fi)) - -# Either "version (pkgversion)", or just "version" if pkgversion not set -FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSION)) - -generated-files-y = qemu-version.h config-host.h qemu-options.def +generated-files-y = config-host.h qemu-options.def generated-files-y += module_block.h @@ -275,17 +261,6 @@ include $(SRC_PATH)/tests/Makefile.include all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules -qemu-version.h: FORCE - $(call quiet-command, \ - (printf '#define QEMU_PKGVERSION "$(QEMU_PKGVERSION)"\n'; \ - printf '#define QEMU_FULL_VERSION "$(FULL_VERSION)"\n'; \ - ) > $@.tmp) - $(call quiet-command, if ! cmp -s $@ $@.tmp; then \ - mv $@.tmp $@; \ - else \ - rm $@.tmp; \ - fi) - config-host.h: config-host.h-timestamp config-host.h-timestamp: config-host.mak qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool diff --git a/meson.build b/meson.build index b4a2f9db3a..e8df2a6fb0 100644 --- a/meson.build +++ b/meson.build @@ -158,6 +158,7 @@ have_block = have_system or have_tools # Generators +genh = [] qapi_gen = find_program('scripts/qapi-gen.py') qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py', meson.source_root() / 'scripts/qapi/commands.py', @@ -183,6 +184,17 @@ tracetool = [ '--backend=' + config_host['TRACE_BACKENDS'] ] +qemu_version_cmd = [find_program('scripts/qemu-version.sh'), + meson.current_source_dir(), + config_host['PKGVERSION'], config_host['VERSION']] +qemu_version = custom_target('qemu-version.h', + output: 'qemu-version.h', + command: qemu_version_cmd, + capture: true, + build_by_default: true, + build_always_stale: true) +genh += qemu_version + # Collect sourcesets. util_ss = ss.source_set() @@ -283,8 +295,6 @@ trace_events_subdirs += [ 'util', ] -genh = [] - subdir('qapi') subdir('qobject') subdir('stubs') diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh new file mode 100755 index 0000000000..4847385e42 --- /dev/null +++ b/scripts/qemu-version.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -eu + +dir="$1" +pkgversion="$2" +version="$3" + +if [ -z "$pkgversion"]; then + cd "$dir" + if [ -e .git ]; then + pkgversion=$(git describe --match 'v*' --dirty | echo "") + fi +fi + +if [ -n "$pkgversion" ]; then + fullversion="$version ($pkgversion)" +else + fullversion="$version" +fi + +cat < X-Patchwork-Id: 275929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED375C433E3 for ; Fri, 21 Aug 2020 10:53:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD6862078D for ; Fri, 21 Aug 2020 10:53:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H7skdF+p" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD6862078D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94fj-0002O7-WC for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:53:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Dp-00027U-FX for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:33 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52535 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Di-0001cJ-F7 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VAFFa6LAWojcnWkLqgzMEvTlBzRUtkY1bdsnLGTnVpA=; b=H7skdF+pyB0rxCgPd3EmZPkjpaJBpTplyV4XkFWAybBZupOUXqj9lwfkrIfyKfdG5MgxS9 Yu4bhlCdjVBeDeXCdoui3whWqKT8+fYlClvePbaLdT6RsjSxE4lzLgzwnPR3MVeL+Ibdto IoaumLLBMSAG91vjDV1wn89f3GFwXDM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-171-5xkhiG6iMHusxZhw_9Fa4Q-1; Fri, 21 Aug 2020 06:24:18 -0400 X-MC-Unique: 5xkhiG6iMHusxZhw_9Fa4Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5873C56B2B for ; Fri, 21 Aug 2020 10:24:17 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2671F60BF1 for ; Fri, 21 Aug 2020 10:24:17 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 054/152] meson: convert check-decodetree Date: Fri, 21 Aug 2020 06:21:51 -0400 Message-Id: <20200821102329.29777-55-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- meson.build | 2 ++ tests/Makefile.include | 9 +-------- tests/meson.build | 4 ++++ 3 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 tests/meson.build diff --git a/meson.build b/meson.build index 528198b6bd..6384401e9f 100644 --- a/meson.build +++ b/meson.build @@ -6,6 +6,7 @@ not_found = dependency('', required: false) keyval = import('unstable-keyval') ss = import('sourceset') +sh = find_program('sh') cc = meson.get_compiler('c') config_host = keyval.load(meson.current_build_dir() / 'config-host.mak') @@ -384,6 +385,7 @@ endif subdir('tools') subdir('pc-bios') +subdir('tests') summary_info = {} summary_info += {'Install prefix': config_host['prefix']} diff --git a/tests/Makefile.include b/tests/Makefile.include index f277d238fb..12b0316a72 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -894,13 +894,6 @@ check-tests/qapi-schema/frontend: $(addprefix $(SRC_PATH)/, $(check-qapi-schema- check-tests/qapi-schema/doc-good.texi: tests/qapi-schema/doc-good.test.texi @diff -u $(SRC_PATH)/tests/qapi-schema/doc-good.texi $< -.PHONY: check-decodetree -check-decodetree: - $(call quiet-command, \ - cd $(SRC_PATH)/tests/decode && \ - ./check.sh "$(PYTHON)" "$(SRC_PATH)/scripts/decodetree.py", \ - TEST, decodetree.py) - # Python venv for running tests .PHONY: check-venv check-acceptance @@ -969,7 +962,7 @@ check-clean: rm -f tests/qtest/dbus-vmstate1-gen-timestamp rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR) -check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree +check: check-block check-qapi-schema check-unit check-softfloat check-qtest clean: check-clean diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000000..5c52021dc9 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,4 @@ +test('decodetree', sh, + args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ], + workdir: meson.current_source_dir() / 'decode', + suite: 'decodetree') From patchwork Fri Aug 21 10:21:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275934 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68DD1C433E1 for ; Fri, 21 Aug 2020 10:48:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37B6020656 for ; Fri, 21 Aug 2020 10:48:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Tcv9MtzD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37B6020656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94b5-0001E8-Gy for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:48:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Do-00024v-Jc for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:32 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:33661 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Di-0001cB-Du for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0MMEtfGxyUdAOr67ik8ygTP3WF2Nv5pmtqnilKbf6D4=; b=Tcv9MtzDEy4jClTwV6Pb5e5lQKaZduxjMq4KQNemUgeo2SKz5Vaq+O/1ub3gg/sa0rPsEp CVVHixkwyLrL4hxk0irES7ZK24UIQRuriWkcXKMeVPwSuMfTo0/j8V1ctrG3Msa79rpeSM egWta3xgqEwP3i/IXvQCPOrcgdo8VS4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-328-KER0mRG7OGeBk95xMzCzug-1; Fri, 21 Aug 2020 06:24:19 -0400 X-MC-Unique: KER0mRG7OGeBk95xMzCzug-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6D9CA1009457 for ; Fri, 21 Aug 2020 10:24:18 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A1BA756DE; Fri, 21 Aug 2020 10:24:18 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 057/152] meson: convert qom directory to Meson (tools part) Date: Fri, 21 Aug 2020 06:21:54 -0400 Message-Id: <20200821102329.29777-58-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 2 +- Makefile.objs | 2 +- Makefile.target | 3 ++- meson.build | 1 + qom/Makefile.objs | 3 --- qom/meson.build | 15 +++++++++++++++ 6 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 qom/meson.build diff --git a/Makefile b/Makefile index bc7647d37b..4b152e3587 100644 --- a/Makefile +++ b/Makefile @@ -248,7 +248,6 @@ dummy := $(call unnest-vars,, \ storage-daemon-obj-y \ storage-daemon-obj-m \ crypto-obj-y \ - qom-obj-y \ io-obj-y \ common-obj-y \ common-obj-m) @@ -269,6 +268,7 @@ $(SOFTMMU_ALL_RULES): $(storage-daemon-obj-y) $(SOFTMMU_ALL_RULES): $(chardev-obj-y) $(SOFTMMU_ALL_RULES): $(crypto-obj-y) $(SOFTMMU_ALL_RULES): $(io-obj-y) +$(SOFTMMU_ALL_RULES): $(qom-obj-y) $(SOFTMMU_ALL_RULES): config-all-devices.mak SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES)) diff --git a/Makefile.objs b/Makefile.objs index baf15656e8..84bfa2a61a 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -1,6 +1,6 @@ ####################################################################### # Common libraries for tools and emulators -qom-obj-y = qom/ +qom-obj-y = qom/libqom.fa ####################################################################### # code used by both qemu system emulation and qemu-img diff --git a/Makefile.target b/Makefile.target index 257afc2723..1e04551a8e 100644 --- a/Makefile.target +++ b/Makefile.target @@ -191,13 +191,14 @@ all-obj-y := $(obj-y) common-obj-m := include $(SRC_PATH)/Makefile.objs +dummy := $(call fix-paths,../,, \ + qom-obj-y) 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) diff --git a/meson.build b/meson.build index 6384401e9f..658d45c4c6 100644 --- a/meson.build +++ b/meson.build @@ -340,6 +340,7 @@ libqemuutil = static_library('qemuutil', qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) +subdir('qom') subdir('fsdev') # Other build targets diff --git a/qom/Makefile.objs b/qom/Makefile.objs index 1b45d104ba..b9629045e6 100644 --- a/qom/Makefile.objs +++ b/qom/Makefile.objs @@ -1,5 +1,2 @@ -qom-obj-y = object.o container.o qom-qobject.o -qom-obj-y += object_interfaces.o - common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o storage-daemon-obj-y += qom-qmp-cmds.o diff --git a/qom/meson.build b/qom/meson.build new file mode 100644 index 0000000000..7b2cd510f8 --- /dev/null +++ b/qom/meson.build @@ -0,0 +1,15 @@ +qom_ss = ss.source_set() +qom_ss.add(files( + 'container.c', + 'object.c', + 'object_interfaces.c', + 'qom-qobject.c', +)) + +qom_ss = qom_ss.apply(config_host, strict: false) +libqom = static_library('qom', qom_ss.sources() + genh, + dependencies: [qom_ss.dependencies()], + link_with: [libqemuutil], + name_suffix: 'fa') + +qom = declare_dependency(link_whole: libqom) From patchwork Fri Aug 21 10:21:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275931 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D91D6C433E1 for ; Fri, 21 Aug 2020 10:51:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A359E20656 for ; Fri, 21 Aug 2020 10:51:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HXXR1Gq6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A359E20656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94e5-0007Rx-Tz for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:51:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Do-00023P-45 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:32 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:49157 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dh-0001cH-W8 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nu84G8yrZvB/9Nj0Q1pJj5uEa26BWmnCWshkM1knD1o=; b=HXXR1Gq6i3oMQdUS8Gk18Mv2gRw2hcy6ILyrJM7pplv1z1fON2kFp8O6XorNO4I5/UFJda 1r4miMbDjU733U6KEwRItvI0PYWg13fIXVOPt0X84XGaJGoKzhTtXkWHW+WL9uUdRmuo0n 19M5z+hb93cISvhr/DsCD4FyyhjKh2Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-62-iG-v4xWcOe-06pMwlVMs2Q-1; Fri, 21 Aug 2020 06:24:20 -0400 X-MC-Unique: iG-v4xWcOe-06pMwlVMs2Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 345E5191E2A0 for ; Fri, 21 Aug 2020 10:24:19 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id E591660BF1; Fri, 21 Aug 2020 10:24:18 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 059/152] meson: convert crypto directory to Meson Date: Fri, 21 Aug 2020 06:21:56 -0400 Message-Id: <20200821102329.29777-60-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 01:00:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 1 - Makefile.objs | 2 +- Makefile.target | 2 +- crypto/Makefile.objs | 37 ------------------------------- crypto/meson.build | 52 ++++++++++++++++++++++++++++++++++++++++++++ meson.build | 4 ++-- qom/meson.build | 2 +- 7 files changed, 57 insertions(+), 43 deletions(-) delete mode 100644 crypto/Makefile.objs diff --git a/Makefile b/Makefile index d380271765..c3cc71cfc0 100644 --- a/Makefile +++ b/Makefile @@ -246,7 +246,6 @@ dummy := $(call unnest-vars,, \ block-obj-m \ storage-daemon-obj-y \ storage-daemon-obj-m \ - crypto-obj-y \ io-obj-y \ common-obj-y \ common-obj-m) diff --git a/Makefile.objs b/Makefile.objs index 0bc361d338..018338d2db 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -19,7 +19,7 @@ block-obj-$(CONFIG_REPLICATION) += replication.o block-obj-m = block/ -crypto-obj-y = crypto/ +crypto-obj-y = crypto/libcrypto.fa io-obj-y = io/ diff --git a/Makefile.target b/Makefile.target index 79b6e02bed..b213955a81 100644 --- a/Makefile.target +++ b/Makefile.target @@ -193,12 +193,12 @@ common-obj-m := include $(SRC_PATH)/Makefile.objs dummy := $(call fix-paths,../,, \ authz-obj-y \ + crypto-obj-y \ qom-obj-y) dummy := $(call unnest-vars,.., \ block-obj-y \ block-obj-m \ chardev-obj-y \ - crypto-obj-y \ io-obj-y \ common-obj-y \ common-obj-m) diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs deleted file mode 100644 index a9885919f2..0000000000 --- a/crypto/Makefile.objs +++ /dev/null @@ -1,37 +0,0 @@ -crypto-obj-y = init.o -crypto-obj-y += hash.o -crypto-obj-$(CONFIG_NETTLE) += hash-nettle.o -crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += hash-gcrypt.o -crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT),n,y)) += hash-glib.o -crypto-obj-y += hmac.o -crypto-obj-$(CONFIG_NETTLE) += hmac-nettle.o -crypto-obj-$(CONFIG_GCRYPT_HMAC) += hmac-gcrypt.o -crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT_HMAC),n,y)) += hmac-glib.o -crypto-obj-y += aes.o -crypto-obj-y += desrfb.o -crypto-obj-y += cipher.o -crypto-obj-$(CONFIG_AF_ALG) += afalg.o -crypto-obj-$(CONFIG_AF_ALG) += cipher-afalg.o -crypto-obj-$(CONFIG_AF_ALG) += hash-afalg.o -crypto-obj-$(CONFIG_GNUTLS) += tls-cipher-suites.o -crypto-obj-y += tlscreds.o -crypto-obj-y += tlscredsanon.o -crypto-obj-y += tlscredspsk.o -crypto-obj-y += tlscredsx509.o -crypto-obj-y += tlssession.o -crypto-obj-y += secret_common.o -crypto-obj-y += secret.o -crypto-obj-$(CONFIG_SECRET_KEYRING) += secret_keyring.o -crypto-obj-y += pbkdf.o -crypto-obj-$(CONFIG_NETTLE) += pbkdf-nettle.o -crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += pbkdf-gcrypt.o -crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT),n,y)) += pbkdf-stub.o -crypto-obj-y += ivgen.o -crypto-obj-y += ivgen-essiv.o -crypto-obj-y += ivgen-plain.o -crypto-obj-y += ivgen-plain64.o -crypto-obj-y += afsplit.o -crypto-obj-$(CONFIG_QEMU_PRIVATE_XTS) += xts.o -crypto-obj-y += block.o -crypto-obj-y += block-qcow.o -crypto-obj-y += block-luks.o diff --git a/crypto/meson.build b/crypto/meson.build index 1b244315b9..18da7c8541 100644 --- a/crypto/meson.build +++ b/crypto/meson.build @@ -1,3 +1,55 @@ +crypto_ss = ss.source_set() +crypto_ss.add(genh) +crypto_ss.add(files( + 'afsplit.c', + 'block-luks.c', + 'block-qcow.c', + 'block.c', + 'cipher.c', + 'desrfb.c', + 'hash.c', + 'hmac.c', + 'ivgen-essiv.c', + 'ivgen-plain.c', + 'ivgen-plain64.c', + 'ivgen.c', + 'pbkdf.c', + 'secret_common.c', + 'secret.c', + 'tlscreds.c', + 'tlscredsanon.c', + 'tlscredspsk.c', + 'tlscredsx509.c', + 'tlssession.c', +)) + +if 'CONFIG_GCRYPT' in config_host + wo_nettle = files('hash-gcrypt.c', 'pbkdf-gcrypt.c') +else + wo_nettle = files('hash-glib.c', 'pbkdf-stub.c') +endif +if 'CONFIG_GCRYPT_HMAC' not in config_host + wo_nettle += files('hmac-glib.c') +endif +crypto_ss.add(when: [nettle, 'CONFIG_NETTLE'], + if_true: files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'), + if_false: wo_nettle) + +crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyring.c')) +crypto_ss.add(when: 'CONFIG_QEMU_PRIVATE_XTS', if_true: files('xts.c')) +crypto_ss.add(when: 'CONFIG_GCRYPT_HMAC', if_true: files('hmac-gcrypt.c')) +crypto_ss.add(when: 'CONFIG_AF_ALG', if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c')) +crypto_ss.add(when: 'CONFIG_GNUTLS', if_true: files('tls-cipher-suites.c')) + +crypto_ss = crypto_ss.apply(config_host, strict: false) +libcrypto = static_library('crypto', crypto_ss.sources() + genh, + dependencies: [crypto_ss.dependencies()], + name_suffix: 'fa', + build_by_default: false) + +crypto = declare_dependency(link_whole: libcrypto, + dependencies: [authz, qom]) + util_ss.add(files('aes.c')) util_ss.add(files('init.c')) if 'CONFIG_GCRYPT' in config_host diff --git a/meson.build b/meson.build index 34363bff19..9d5cd00c89 100644 --- a/meson.build +++ b/meson.build @@ -328,6 +328,8 @@ subdir('qobject') subdir('stubs') subdir('trace') subdir('util') +subdir('qom') +subdir('authz') subdir('crypto') subdir('storage-daemon') subdir('ui') @@ -344,8 +346,6 @@ libqemuutil = static_library('qemuutil', qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) -subdir('qom') -subdir('authz') subdir('fsdev') # Other build targets diff --git a/qom/meson.build b/qom/meson.build index 7b2cd510f8..cbab9cdfa2 100644 --- a/qom/meson.build +++ b/qom/meson.build @@ -1,4 +1,5 @@ qom_ss = ss.source_set() +qom_ss.add(genh) qom_ss.add(files( 'container.c', 'object.c', @@ -9,7 +10,6 @@ qom_ss.add(files( qom_ss = qom_ss.apply(config_host, strict: false) libqom = static_library('qom', qom_ss.sources() + genh, dependencies: [qom_ss.dependencies()], - link_with: [libqemuutil], name_suffix: 'fa') qom = declare_dependency(link_whole: libqom) From patchwork Fri Aug 21 10:21:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54BC0C433E1 for ; Fri, 21 Aug 2020 10:53:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1186520656 for ; Fri, 21 Aug 2020 10:53:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="V2/meoEz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1186520656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94gB-00036p-Au for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:53:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Du-0002ML-Lt for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:38 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:52458 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dm-0001eI-6R for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xn26e/+LaYf5RDNq1lBdA6DKa1hXtnHq1aP5C4movc4=; b=V2/meoEzLFh859IusBHmp1tU3tstkBrECA1XdgpRx8PJeG8C77J+mrE3Kp/JrFOrmCvrlh HKEY1vvBuJFyiklky6YPfZwil3k6rl8sSldmyrZLASIBpp/eCihyex8/SYSyYEzV2HHFHx LbV7pDYMXVHrWQvH3RWKwe/4d4sqg1k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-221-gOkvO5BUNDWY9QXdmONc9Q-1; Fri, 21 Aug 2020 06:24:25 -0400 X-MC-Unique: gOkvO5BUNDWY9QXdmONc9Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 834641009441 for ; Fri, 21 Aug 2020 10:24:24 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D80110098AE; Fri, 21 Aug 2020 10:24:24 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 062/152] meson: infrastructure for building emulators Date: Fri, 21 Aug 2020 06:21:59 -0400 Message-Id: <20200821102329.29777-63-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 74 ++---------------- Makefile.target | 19 +++-- configure | 6 -- hw/i386/fw_cfg.c | 2 +- hw/i386/pc.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/i386/x86.c | 2 +- hw/vfio/pci-quirks.c | 2 +- hw/virtio/virtio-mem.c | 2 +- include/qemu/osdep.h | 2 +- meson.build | 166 ++++++++++++++++++++++++++++++++++++++++- rules.mak | 8 -- scripts/create_config | 2 + scripts/grepy.sh | 3 + scripts/minikconf.py | 0 softmmu/qtest.c | 2 +- 16 files changed, 192 insertions(+), 102 deletions(-) create mode 100755 scripts/grepy.sh mode change 100755 => 100644 scripts/minikconf.py diff --git a/Makefile b/Makefile index 698bbdfcd3..19f167ba5f 100644 --- a/Makefile +++ b/Makefile @@ -121,8 +121,6 @@ include $(SRC_PATH)/rules.mak # lor is defined in rules.mak CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)) -generated-files-y = config-host.h - generated-files-y += module_block.h generated-files-y += target/s390x/gen-features.h target/s390x/gen-features.h: Makefile.ninja @@ -178,65 +176,6 @@ DOCS= endif SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR) -SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(filter %-softmmu, $(TARGET_DIRS))) -SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %.d, $(SUBDIR_DEVICES_MAK)) - -ifeq ($(SUBDIR_DEVICES_MAK),) -config-all-devices.mak: config-host.mak - $(call quiet-command,echo '# no devices' > $@,"GEN","$@") -else -config-all-devices.mak: $(SUBDIR_DEVICES_MAK) config-host.mak - $(call quiet-command, sed -n \ - 's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \ - $(SUBDIR_DEVICES_MAK) | sort -u > $@, \ - "GEN","$@") -endif - --include $(SUBDIR_DEVICES_MAK_DEP) - -# This has to be kept in sync with Kconfig.host. -MINIKCONF_ARGS = \ - $(CONFIG_MINIKCONF_MODE) \ - $@ $*/config-devices.mak.d $< $(SRC_PATH)/Kconfig \ - CONFIG_TCG=$(CONFIG_TCG) \ - CONFIG_KVM=$(CONFIG_KVM) \ - CONFIG_SPICE=$(CONFIG_SPICE) \ - CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \ - CONFIG_TPM=$(CONFIG_TPM) \ - CONFIG_XEN=$(CONFIG_XEN) \ - CONFIG_OPENGL=$(CONFIG_OPENGL) \ - CONFIG_X11=$(CONFIG_X11) \ - CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \ - CONFIG_VHOST_KERNEL=$(CONFIG_VHOST_KERNEL) \ - CONFIG_VIRTFS=$(CONFIG_VIRTFS) \ - CONFIG_LINUX=$(CONFIG_LINUX) \ - CONFIG_PVRDMA=$(CONFIG_PVRDMA) - -MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py - -$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(SRC_PATH)/Kconfig $(BUILD_DIR)/config-host.mak - $(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) \ - > $@.tmp, "GEN", "$@.tmp") - $(call quiet-command, if test -f $@; then \ - if cmp -s $@.old $@; then \ - mv $@.tmp $@; \ - cp -p $@ $@.old; \ - else \ - if test -f $@.old; then \ - echo "WARNING: $@ (user modified) out of date.";\ - else \ - echo "WARNING: $@ out of date.";\ - fi; \ - echo "Run \"$(MAKE) defconfig\" to regenerate."; \ - rm $@.tmp; \ - fi; \ - else \ - mv $@.tmp $@; \ - cp -p $@ $@.old; \ - fi,"GEN","$@"); - -defconfig: - rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) ifneq ($(wildcard config-host.mak),) include $(SRC_PATH)/Makefile.objs @@ -279,10 +218,15 @@ $(SOFTMMU_FUZZ_RULES): $(io-obj-y) $(SOFTMMU_FUZZ_RULES): config-all-devices.mak $(SOFTMMU_FUZZ_RULES): $(edk2-decompressed) +# meson: this is sub-optimal but going away after conversion +TARGET_DEPS = $(patsubst %,%-config-target.h, $(TARGET_DIRS)) +TARGET_DEPS += $(patsubst %,%-config-devices.h, $(filter %-softmmu,$(TARGET_DIRS))) +TARGET_DEPS += $(patsubst %,libqemu-%.fa, $(TARGET_DIRS)) + .PHONY: $(TARGET_DIRS_RULES) # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that # $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal -$(TARGET_DIRS_RULES): +$(TARGET_DIRS_RULES): $(TARGET_DEPS) $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC @@ -370,7 +314,6 @@ clean: recurse-clean ninja-clean clean-ctlist -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h - rm -f qemu-options.def find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ @@ -379,8 +322,6 @@ clean: recurse-clean ninja-clean clean-ctlist rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~ rm -f fsdev/*.pod scsi/*.pod rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) - rm -f config-all-devices.mak - rm -f $(SUBDIR_DEVICES_MAK) VERSION ?= $(shell cat VERSION) @@ -398,8 +339,7 @@ distclean: clean ninja-distclean -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean -g rm -f config-host.mak config-host.h* $(DOCS) rm -f tests/tcg/config-*.mak - rm -f config-all-devices.mak config-all-disas.mak config.status - rm -f $(SUBDIR_DEVICES_MAK) + rm -f config-all-disas.mak config.status rm -f po/*.mo tests/qemu-iotests/common.env rm -f roms/seabios/config.mak roms/vgabios/config.mak rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols diff --git a/Makefile.target b/Makefile.target index f6b7a86390..43d2f9734f 100644 --- a/Makefile.target +++ b/Makefile.target @@ -6,8 +6,10 @@ include ../config-host.mak include config-target.mak include $(SRC_PATH)/rules.mak +FULL_TARGET_NAME=$(TARGET_NAME)-$(if $(CONFIG_SOFTMMU),softmmu,linux-user) + ifdef CONFIG_SOFTMMU -include config-devices.mak +include ../$(FULL_TARGET_NAME)-config-devices.mak endif $(call set-vpath, $(SRC_PATH):$(BUILD_DIR)) @@ -18,6 +20,9 @@ QEMU_CFLAGS += -iquote .. -iquote $(SRC_PATH)/target/$(TARGET_BASE_ARCH) -DNEED_ QEMU_CFLAGS+=-iquote $(SRC_PATH)/include +QEMU_CFLAGS += -DCONFIG_TARGET=\"../$(FULL_TARGET_NAME)-config-target.h\" +QEMU_CFLAGS += -DCONFIG_DEVICES=\"../$(FULL_TARGET_NAME)-config-devices.h\" + ifdef CONFIG_USER_ONLY # user emulator name QEMU_PROG=qemu-$(TARGET_NAME) @@ -36,15 +41,10 @@ QEMU_PROG_BUILD = $(QEMU_PROG) endif endif +LIBQEMU = ../libqemu-$(FULL_TARGET_NAME).fa 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 @@ -103,6 +103,7 @@ all: $(PROGS) stap # Dummy command so that make thinks it has done something @true +obj-y += $(LIBQEMU) obj-y += trace/ ######################################################### @@ -169,7 +170,6 @@ 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 @@ -210,7 +210,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y) all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y) ifdef CONFIG_SOFTMMU -$(QEMU_PROG_BUILD): config-devices.mak +$(QEMU_PROG_BUILD): ../$(FULL_TARGET_NAME)-config-devices.mak endif COMMON_LDADDS = ../libqemuutil.a @@ -262,5 +262,4 @@ ifdef CONFIG_TRACE_SYSTEMTAP $(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) diff --git a/configure b/configure index a89a433557..883986e4a7 100755 --- a/configure +++ b/configure @@ -8165,18 +8165,12 @@ fi if supported_xen_target $target; then echo "CONFIG_XEN=y" >> $config_target_mak - echo "$target/config-devices.mak: CONFIG_XEN=y" >> $config_host_mak if test "$xen_pci_passthrough" = yes; then echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak" fi -else - echo "$target/config-devices.mak: CONFIG_XEN=n" >> $config_host_mak fi if supported_kvm_target $target; then echo "CONFIG_KVM=y" >> $config_target_mak - echo "$target/config-devices.mak: CONFIG_KVM=y" >> $config_host_mak -else - echo "$target/config-devices.mak: CONFIG_KVM=n" >> $config_host_mak fi if supported_hax_target $target; then echo "CONFIG_HAX=y" >> $config_target_mak diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index c55abfb01a..33441ad484 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -22,7 +22,7 @@ #include "hw/nvram/fw_cfg.h" #include "e820_memory_layout.h" #include "kvm_i386.h" -#include "config-devices.h" +#include CONFIG_DEVICES struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX}; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 47c5ca3e34..cc616e48f3 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -92,10 +92,10 @@ #include "hw/mem/memory-device.h" #include "sysemu/replay.h" #include "qapi/qmp/qerror.h" -#include "config-devices.h" #include "e820_memory_layout.h" #include "fw_cfg.h" #include "trace.h" +#include CONFIG_DEVICES GlobalProperty pc_compat_5_0[] = { }; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index b789e83f9a..456e336934 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -23,7 +23,7 @@ */ #include "qemu/osdep.h" -#include "config-devices.h" +#include CONFIG_DEVICES #include "qemu/units.h" #include "hw/loader.h" diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 67bee1bcb8..cf384b9743 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -49,7 +49,7 @@ #include "multiboot.h" #include "elf.h" #include "standard-headers/asm-x86/bootparam.h" -#include "config-devices.h" +#include CONFIG_DEVICES #include "kvm_i386.h" #define BIOS_FILENAME "bios.bin" diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index 3a14b7c303..57150913b7 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "config-devices.h" +#include CONFIG_DEVICES #include "exec/memop.h" #include "qemu/units.h" #include "qemu/error-report.h" diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 7740fc613f..8fbec77ccc 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -29,7 +29,7 @@ #include "migration/misc.h" #include "hw/boards.h" #include "hw/qdev-properties.h" -#include "config-devices.h" +#include CONFIG_DEVICES #include "trace.h" /* diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 20872e793e..412962d91a 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -29,7 +29,7 @@ #include "config-host.h" #ifdef NEED_CPU_H -#include "config-target.h" +#include CONFIG_TARGET #else #include "exec/poison.h" #endif diff --git a/meson.build b/meson.build index c892672628..6f8024cdcf 100644 --- a/meson.build +++ b/meson.build @@ -9,6 +9,7 @@ ss = import('sourceset') sh = find_program('sh') cc = meson.get_compiler('c') config_host = keyval.load(meson.current_build_dir() / 'config-host.mak') +config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak') add_project_arguments(config_host['QEMU_CFLAGS'].split(), native: false, language: ['c', 'objc']) @@ -151,16 +152,96 @@ if 'CONFIG_LIBUDEV' in config_host libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split()) endif +create_config = find_program('scripts/create_config') +minikconf = find_program('scripts/minikconf.py') target_dirs = config_host['TARGET_DIRS'].split() have_user = false have_system = false +config_devices_mak_list = [] +config_devices_h = {} +config_target_mak = {} +kconfig_external_symbols = [ + 'CONFIG_KVM', + 'CONFIG_XEN', + 'CONFIG_TPM', + 'CONFIG_SPICE', + 'CONFIG_IVSHMEM', + 'CONFIG_OPENGL', + 'CONFIG_X11', + 'CONFIG_VHOST_USER', + 'CONFIG_VHOST_KERNEL', + 'CONFIG_VIRTFS', + 'CONFIG_LINUX', + 'CONFIG_PVRDMA', +] foreach target : target_dirs have_user = have_user or target.endswith('-user') - have_system = have_system or target.endswith('-softmmu') + config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak') + config_host + + if target.endswith('-softmmu') + have_system = true + + base_kconfig = [] + foreach sym : kconfig_external_symbols + if sym in config_target + base_kconfig += '@0@=y'.format(sym) + endif + endforeach + + config_devices_mak = target + '-config-devices.mak' + config_devices_mak = configure_file( + input: ['default-configs' / target + '.mak', 'Kconfig'], + output: config_devices_mak, + depfile: config_devices_mak + '.d', + capture: true, + command: [minikconf, config_host['CONFIG_MINIKCONF_MODE'], + config_devices_mak, '@DEPFILE@', '@INPUT@', + base_kconfig]) + config_devices_h += {target: custom_target( + target + '-config-devices.h', + input: config_devices_mak, + output: target + '-config-devices.h', + capture: true, + command: [create_config, '@INPUT@'])} + config_devices_mak_list += config_devices_mak + config_target += keyval.load(config_devices_mak) + endif + config_target_mak += {target: config_target} endforeach have_tools = 'CONFIG_TOOLS' in config_host have_block = have_system or have_tools +grepy = find_program('scripts/grepy.sh') +# This configuration is used to build files that are shared by +# multiple binaries, and then extracted out of the "common" +# static_library target. +# +# We do not use all_sources()/all_dependencies(), because it would +# build literally all source files, including devices only used by +# targets that are not built for this compilation. The CONFIG_ALL +# pseudo symbol replaces it. + +if have_system + config_all_devices_mak = configure_file( + output: 'config-all-devices.mak', + input: config_devices_mak_list, + capture: true, + command: [grepy, '@INPUT@'], + ) + config_all_devices = keyval.load(config_all_devices_mak) +else + config_all_devices = {} +endif +config_all = config_all_devices +config_all += config_host +config_all += config_all_disas +config_all += { + 'CONFIG_XEN': config_host.has_key('CONFIG_XEN_BACKEND'), + 'CONFIG_SOFTMMU': have_system, + 'CONFIG_USER_ONLY': have_user, + 'CONFIG_ALL': true, +} + # Generators genh = [] @@ -202,6 +283,13 @@ qemu_version = custom_target('qemu-version.h', build_always_stale: true) genh += qemu_version +config_host_h = custom_target('config-host.h', + input: meson.current_build_dir() / 'config-host.mak', + output: 'config-host.h', + capture: true, + command: [create_config, '@INPUT@']) +genh += config_host_h + hxdep = [] hx_headers = [ ['qemu-options.hx', 'qemu-options.def'], @@ -228,6 +316,16 @@ genh += hxdep util_ss = ss.source_set() stub_ss = ss.source_set() trace_ss = ss.source_set() +common_ss = ss.source_set() +softmmu_ss = ss.source_set() +user_ss = ss.source_set() +bsd_user_ss = ss.source_set() +linux_user_ss = ss.source_set() +specific_ss = ss.source_set() + +hw_arch = {} +target_arch = {} +target_softmmu_arch = {} ############### # Trace files # @@ -336,10 +434,10 @@ subdir('ui') # Build targets from sourcesets -stub_ss = stub_ss.apply(config_host, strict: false) +stub_ss = stub_ss.apply(config_all, strict: false) util_ss.add_all(trace_ss) -util_ss = util_ss.apply(config_host, strict: false) +util_ss = util_ss.apply(config_all, strict: false) libqemuutil = static_library('qemuutil', sources: util_ss.sources() + stub_ss.sources() + genh, dependencies: [util_ss.dependencies(), m, glib, socket]) @@ -350,6 +448,68 @@ subdir('io') subdir('fsdev') subdir('target') +common_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: softmmu_ss) +common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) + +common_all = common_ss.apply(config_all, strict: false) +common_all = static_library('common', + build_by_default: false, + sources: common_all.sources() + genh, + dependencies: common_all.dependencies(), + name_suffix: 'fa') + +foreach target : target_dirs + config_target = config_target_mak[target] + target_name = config_target['TARGET_NAME'] + arch = config_target['TARGET_BASE_ARCH'] + arch_srcs = [] + + target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])] + if targetos == 'linux' + target_inc += include_directories('linux-headers', is_system: true) + endif + if target.endswith('-softmmu') + qemu_target_name = 'qemu-system-' + target_name + target_type='system' + arch_srcs += config_devices_h[target] + else + target_type='user' + qemu_target_name = 'qemu-' + target_name + if 'CONFIG_LINUX_USER' in config_target + base_dir = 'linux-user' + target_inc += include_directories('linux-user/host/' / config_host['ARCH']) + else + base_dir = 'bsd-user' + endif + target_inc += include_directories( + base_dir, + base_dir / config_target['TARGET_ABI_DIR'], + ) + endif + + target_common = common_ss.apply(config_target, strict: false) + objects = common_all.extract_objects(target_common.sources()) + + # TODO: Change to generator once obj-y goes away + config_target_h = custom_target(target + '-config-target.h', + input: meson.current_build_dir() / target / 'config-target.mak', + output: target + '-config-target.h', + capture: true, + command: [create_config, '@INPUT@']) + + target_specific = specific_ss.apply(config_target, strict: false) + arch_srcs += target_specific.sources() + + static_library('qemu-' + target, + sources: arch_srcs + [config_target_h] + genh, + objects: objects, + include_directories: target_inc, + c_args: ['-DNEED_CPU_H', + '-DCONFIG_TARGET="@0@-config-target.h"'.format(target), + '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)], + name_suffix: 'fa') +endforeach + # Other build targets if 'CONFIG_GUEST_AGENT' in config_host subdir('qga') diff --git a/rules.mak b/rules.mak index 1aa6394079..d8d35f735a 100644 --- a/rules.mak +++ b/rules.mak @@ -203,14 +203,6 @@ notempty = $(if $1,y,n) # Generate files with tracetool TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py -# Generate timestamp files for .h include files - -config-%.h: config-%.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ - -config-%.h-timestamp: config-%.mak $(SRC_PATH)/scripts/create_config - $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@,"GEN","$(TARGET_DIR)config-$*.h") - .PHONY: clean-timestamp clean-timestamp: rm -f *.timestamp diff --git a/scripts/create_config b/scripts/create_config index 6d8f08b39d..bc82661041 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -1,5 +1,7 @@ #!/bin/sh +test $# -gt 0 && exec < $1 + echo "/* Automatically generated by create_config - do not modify */" while read line; do diff --git a/scripts/grepy.sh b/scripts/grepy.sh new file mode 100755 index 0000000000..aee46ddc8d --- /dev/null +++ b/scripts/grepy.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +grep -h '=y$' "$@" | sort -u diff --git a/scripts/minikconf.py b/scripts/minikconf.py old mode 100755 new mode 100644 diff --git a/softmmu/qtest.c b/softmmu/qtest.c index 5672b75c35..4e439caec7 100644 --- a/softmmu/qtest.c +++ b/softmmu/qtest.c @@ -27,7 +27,7 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "qemu/cutils.h" -#include "config-devices.h" +#include CONFIG_DEVICES #ifdef CONFIG_PSERIES #include "hw/ppc/spapr_rtas.h" #endif From patchwork Fri Aug 21 10:22:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275925 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25F53C433E1 for ; Fri, 21 Aug 2020 10:56:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2A592072D for ; Fri, 21 Aug 2020 10:56:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EESjMHGM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2A592072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94j8-0000er-3I for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:56:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Dy-0002Tq-BT for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:42 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:21694 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dm-0001eO-8t for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ix7ln/EVv4Md11hpE5Q9kdSPnB8twbkYWjy/nFcs4hY=; b=EESjMHGMiwelszgC6Ut2oKXwSMLvG//wLnTebIpbzKfVzf5A+D+xXBCkIZ/7JNOlld7H1w +GFxrl/rwS7Uu7pjXBT15HloxTpXb39KcYiJsvE/IPiBHYL5FUXozkn0artU6G6KgCcAjh qZh9pFRAhrry1tjT4mFWQFe222FXBFU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-547-nsvF82xEPPmSBnRtExVfvA-1; Fri, 21 Aug 2020 06:24:26 -0400 X-MC-Unique: nsvF82xEPPmSBnRtExVfvA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5CBD801AAE for ; Fri, 21 Aug 2020 10:24:25 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 803FE10098AE; Fri, 21 Aug 2020 10:24:25 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 065/152] meson: convert block Date: Fri, 21 Aug 2020 06:22:02 -0400 Message-Id: <20200821102329.29777-66-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 8 --- Makefile.objs | 32 +++++++--- Makefile.target | 3 +- block.c | 2 +- block/Makefile.objs | 75 ----------------------- block/meson.build | 115 ++++++++++++++++++++++++++++++++++++ block/monitor/Makefile.objs | 2 - block/monitor/meson.build | 2 + configure | 14 +++-- meson.build | 69 ++++++++++++++++++++++ nbd/Makefile.objs | 1 - nbd/meson.build | 5 ++ rules.mak | 3 +- scsi/Makefile.objs | 4 -- scsi/meson.build | 4 ++ 15 files changed, 232 insertions(+), 107 deletions(-) delete mode 100644 block/Makefile.objs create mode 100644 block/meson.build delete mode 100644 block/monitor/Makefile.objs create mode 100644 block/monitor/meson.build delete mode 100644 nbd/Makefile.objs create mode 100644 nbd/meson.build delete mode 100644 scsi/Makefile.objs create mode 100644 scsi/meson.build diff --git a/Makefile b/Makefile index 597d3c128b..ff05218353 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,6 @@ include $(SRC_PATH)/rules.mak # lor is defined in rules.mak CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)) -generated-files-y += module_block.h generated-files-y += target/s390x/gen-features.h target/s390x/gen-features.h: Makefile.ninja @@ -182,8 +181,6 @@ include $(SRC_PATH)/Makefile.objs endif dummy := $(call unnest-vars,, \ - block-obj-y \ - block-obj-m \ storage-daemon-obj-y \ storage-daemon-obj-m \ common-obj-y \ @@ -304,11 +301,6 @@ ifdef CONFIG_MPATH scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist endif -module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak - $(call quiet-command,$(PYTHON) $< $@ \ - $(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \ - "GEN","$@") - clean: recurse-clean ninja-clean clean-ctlist -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean # avoid old build problems by removing potentially incorrect old files diff --git a/Makefile.objs b/Makefile.objs index 297bd5beeb..eeaa0cfa82 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -10,12 +10,20 @@ ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y) authz-obj-y = authz/libauthz.fa authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam) -block-obj-y = block/ nbd/ scsi/ -block-obj-y += block.o blockjob.o job.o -block-obj-y += qemu-io-cmds.o -block-obj-$(CONFIG_REPLICATION) += replication.o - -block-obj-m = block/ +block-obj-y += libblock.fa + +libblock.fa-libs = $(ZSTD_LIBS) +libblock.fa-libs += $(LIBNFS_LIBS) +libblock.fa-libs += $(LIBISCSI_LIBS) +libblock.fa-libs += $(CURL_LIBS) +libblock.fa-libs += $(RBD_LIBS) +libblock.fa-libs += $(GLUSTERFS_LIBS) +libblock.fa-libs += $(VXHS_LIBS) +libblock.fa-libs += $(LIBSSH_LIBS) +libblock.fa-libs += $(BZIP2_LIBS) +libblock.fa-libs += $(LZFSE_LIBS) +libblock.fa-libs += $(if $(CONFIG_LINUX_AIO),-laio) +libblock.fa-libs += $(LIBXML2_LIBS) chardev-obj-y = chardev/libchardev.fa @@ -40,7 +48,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o # single QEMU executable should support all CPUs and machines. ifeq ($(CONFIG_SOFTMMU),y) -common-obj-y = blockdev.o blockdev-nbd.o block/ +common-obj-y = blockdev.o blockdev-nbd.o common-obj-y += bootdevice.o iothread.o common-obj-y += dump/ common-obj-y += job-qmp.o @@ -55,6 +63,16 @@ common-obj-$(CONFIG_LINUX) += fsdev/ common-obj-y += accel/ common-obj-y += migration/ +common-obj-$(if $(CONFIG_CURL),m) += block-curl$(DSOSUF) +common-obj-$(if $(CONFIG_GLUSTERFS),m) += block-gluster$(DSOSUF) +common-obj-$(if $(CONFIG_LIBISCSI),m) += block-iscsi$(DSOSUF) +common-obj-$(if $(CONFIG_LIBNFS),m) += block-nfs$(DSOSUF) +common-obj-$(if $(CONFIG_LIBSSH),m) += block-ssh$(DSOSUF) +common-obj-$(if $(CONFIG_RBD),m) += block-rbd$(DSOSUF) + +common-obj-$(if $(CONFIG_LZFSE),m) += block-dmg-lzfse$(DSOSUF) +common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF) + common-obj-y += audio/ common-obj-m += audio/ common-obj-y += hw/ diff --git a/Makefile.target b/Makefile.target index 6b9de09df5..c0575da132 100644 --- a/Makefile.target +++ b/Makefile.target @@ -199,13 +199,12 @@ common-obj-m := include $(SRC_PATH)/Makefile.objs dummy := $(call fix-paths,../,, \ authz-obj-y \ + block-obj-y \ chardev-obj-y \ crypto-obj-y \ io-obj-y \ qom-obj-y) dummy := $(call unnest-vars,.., \ - block-obj-y \ - block-obj-m \ common-obj-y \ common-obj-m) all-obj-y += $(common-obj-y) diff --git a/block.c b/block.c index d9ac0e07eb..67c5028dd8 100644 --- a/block.c +++ b/block.c @@ -29,7 +29,7 @@ #include "block/nbd.h" #include "block/qdict.h" #include "qemu/error-report.h" -#include "module_block.h" +#include "block/module_block.h" #include "qemu/main-loop.h" #include "qemu/module.h" #include "qapi/error.h" diff --git a/block/Makefile.objs b/block/Makefile.objs deleted file mode 100644 index 19c6f371c9..0000000000 --- a/block/Makefile.objs +++ /dev/null @@ -1,75 +0,0 @@ -block-obj-y += raw-format.o vmdk.o vpc.o -block-obj-$(CONFIG_QCOW1) += qcow.o -block-obj-$(CONFIG_VDI) += vdi.o -block-obj-$(CONFIG_CLOOP) += cloop.o -block-obj-$(CONFIG_BOCHS) += bochs.o -block-obj-$(CONFIG_VVFAT) += vvfat.o -block-obj-$(CONFIG_DMG) += dmg.o - -block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o qcow2-bitmap.o qcow2-threads.o -block-obj-$(CONFIG_QED) += qed.o qed-l2-cache.o qed-table.o qed-cluster.o -block-obj-$(CONFIG_QED) += qed-check.o -block-obj-y += vhdx.o vhdx-endian.o vhdx-log.o -block-obj-y += quorum.o -block-obj-y += blkdebug.o blkverify.o blkreplay.o -block-obj-$(CONFIG_PARALLELS) += parallels.o -block-obj-y += blklogwrites.o -block-obj-y += block-backend.o snapshot.o qapi.o -block-obj-$(CONFIG_WIN32) += file-win32.o win32-aio.o -block-obj-$(CONFIG_POSIX) += file-posix.o -block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o -block-obj-$(CONFIG_LINUX_IO_URING) += io_uring.o -block-obj-y += null.o mirror.o commit.o io.o create.o amend.o -block-obj-y += throttle-groups.o -block-obj-$(CONFIG_LINUX) += nvme.o - -block-obj-y += nbd.o -block-obj-$(CONFIG_SHEEPDOG) += sheepdog.o -block-obj-$(CONFIG_LIBISCSI) += iscsi.o -block-obj-$(if $(CONFIG_LIBISCSI),y,n) += iscsi-opts.o -block-obj-$(CONFIG_LIBNFS) += nfs.o -block-obj-$(CONFIG_CURL) += curl.o -block-obj-$(CONFIG_RBD) += rbd.o -block-obj-$(CONFIG_GLUSTERFS) += gluster.o -block-obj-$(CONFIG_LIBSSH) += ssh.o -block-obj-y += accounting.o dirty-bitmap.o -block-obj-y += write-threshold.o -block-obj-y += backup.o -block-obj-$(CONFIG_REPLICATION) += replication.o -block-obj-y += throttle.o copy-on-read.o -block-obj-y += block-copy.o - -block-obj-y += crypto.o - -block-obj-y += aio_task.o -block-obj-y += backup-top.o -block-obj-y += filter-compress.o -common-obj-y += monitor/ -block-obj-y += monitor/ - -block-obj-y += stream.o - -common-obj-y += qapi-sysemu.o - -nfs.o-libs := $(LIBNFS_LIBS) -iscsi.o-cflags := $(LIBISCSI_CFLAGS) -iscsi.o-libs := $(LIBISCSI_LIBS) -curl.o-cflags := $(CURL_CFLAGS) -curl.o-libs := $(CURL_LIBS) -rbd.o-cflags := $(RBD_CFLAGS) -rbd.o-libs := $(RBD_LIBS) -gluster.o-cflags := $(GLUSTERFS_CFLAGS) -gluster.o-libs := $(GLUSTERFS_LIBS) -ssh.o-cflags := $(LIBSSH_CFLAGS) -ssh.o-libs := $(LIBSSH_LIBS) -block-obj-dmg-bz2-$(CONFIG_BZIP2) += dmg-bz2.o -block-obj-$(if $(CONFIG_DMG),m,n) += $(block-obj-dmg-bz2-y) -dmg-bz2.o-libs := $(BZIP2_LIBS) -block-obj-$(if $(CONFIG_LZFSE),m,n) += dmg-lzfse.o -dmg-lzfse.o-libs := $(LZFSE_LIBS) -qcow.o-libs := -lz -linux-aio.o-libs := -laio -io_uring.o-cflags := $(LINUX_IO_URING_CFLAGS) -io_uring.o-libs := $(LINUX_IO_URING_LIBS) -parallels.o-cflags := $(LIBXML2_CFLAGS) -parallels.o-libs := $(LIBXML2_LIBS) diff --git a/block/meson.build b/block/meson.build new file mode 100644 index 0000000000..4dbbfe60b4 --- /dev/null +++ b/block/meson.build @@ -0,0 +1,115 @@ +block_ss.add(genh) +block_ss.add(files( + 'accounting.c', + 'aio_task.c', + 'amend.c', + 'backup.c', + 'backup-top.c', + 'blkdebug.c', + 'blklogwrites.c', + 'blkreplay.c', + 'blkverify.c', + 'block-backend.c', + 'block-copy.c', + 'commit.c', + 'copy-on-read.c', + 'create.c', + 'crypto.c', + 'dirty-bitmap.c', + 'filter-compress.c', + 'io.c', + 'mirror.c', + 'nbd.c', + 'null.c', + 'qapi.c', + 'qcow2-bitmap.c', + 'qcow2-cache.c', + 'qcow2-cluster.c', + 'qcow2-refcount.c', + 'qcow2-snapshot.c', + 'qcow2-threads.c', + 'qcow2.c', + 'quorum.c', + 'raw-format.c', + 'snapshot.c', + 'throttle-groups.c', + 'throttle.c', + 'vhdx-endian.c', + 'vhdx-log.c', + 'vhdx.c', + 'vmdk.c', + 'vpc.c', + 'write-threshold.c', +), zstd) + +block_ss.add(when: [zlib, 'CONFIG_QCOW1'], if_true: files('qcow.c')) +block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c')) +block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c')) +block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c')) +block_ss.add(when: 'CONFIG_VVFAT', if_true: files('vvfat.c')) +block_ss.add(when: 'CONFIG_DMG', if_true: files('dmg.c')) +block_ss.add(when: 'CONFIG_QED', if_true: files( + 'qed-check.c', + 'qed-cluster.c', + 'qed-l2-cache.c', + 'qed-table.c', + 'qed.c', +)) +block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'], if_true: files('parallels.c')) +block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c')) +block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit]) +block_ss.add(when: 'CONFIG_LIBISCSI', if_true: files('iscsi-opts.c')) +block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c')) +block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) +block_ss.add(when: 'CONFIG_SHEEPDOG', if_true: files('sheepdog.c')) +block_ss.add(when: ['CONFIG_LINUX_AIO', libaio], if_true: files('linux-aio.c')) +block_ss.add(when: ['CONFIG_LINUX_IO_URING', linux_io_uring], if_true: files('io_uring.c')) + +block_modules = {} + +modsrc = [] +foreach m : [ + ['CONFIG_CURL', 'curl', [curl, glib], 'curl.c'], + ['CONFIG_GLUSTERFS', 'gluster', glusterfs, 'gluster.c'], + ['CONFIG_LIBISCSI', 'iscsi', libiscsi, 'iscsi.c'], + ['CONFIG_LIBNFS', 'nfs', libnfs, 'nfs.c'], + ['CONFIG_LIBSSH', 'ssh', libssh, 'ssh.c'], + ['CONFIG_RBD', 'rbd', rbd, 'rbd.c'], +] + if config_host.has_key(m[0]) + if enable_modules + modsrc += files(m[3]) + endif + module_ss = ss.source_set() + module_ss.add(when: m[2], if_true: files(m[3])) + block_modules += {m[1] : module_ss} + endif +endforeach + +# those are not exactly regular block modules, so treat them apart +if 'CONFIG_DMG' in config_host + foreach m : [ + ['CONFIG_LZFSE', 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'], + ['CONFIG_BZIP2', 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c'] + ] + if config_host.has_key(m[0]) + module_ss = ss.source_set() + module_ss.add(when: m[2], if_true: files(m[3])) + block_modules += {m[1] : module_ss} + endif + endforeach +endif + +module_block_py = find_program('../scripts/modules/module_block.py') +module_block_h = custom_target('module_block.h', + output: 'module_block.h', + input: modsrc, + command: [module_block_py, '@OUTPUT0@', modsrc]) +block_ss.add(module_block_h) + +block_ss.add(files('stream.c')) + +softmmu_ss.add(files('qapi-sysemu.c')) +subdir('monitor') + +modules += {'block': block_modules} diff --git a/block/monitor/Makefile.objs b/block/monitor/Makefile.objs deleted file mode 100644 index 39acf85022..0000000000 --- a/block/monitor/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -common-obj-y += block-hmp-cmds.o -block-obj-y += bitmap-qmp-cmds.o diff --git a/block/monitor/meson.build b/block/monitor/meson.build new file mode 100644 index 0000000000..374aac1140 --- /dev/null +++ b/block/monitor/meson.build @@ -0,0 +1,2 @@ +softmmu_ss.add(files('block-hmp-cmds.c')) +block_ss.add(files('bitmap-qmp-cmds.c')) diff --git a/configure b/configure index 883986e4a7..fffda5aca1 100755 --- a/configure +++ b/configure @@ -2688,8 +2688,6 @@ if test "$zstd" != "no" ; then if $pkg_config --atleast-version=$libzstd_minver libzstd ; then zstd_cflags="$($pkg_config --cflags libzstd)" zstd_libs="$($pkg_config --libs libzstd)" - LIBS="$zstd_libs $LIBS" - QEMU_CFLAGS="$QEMU_CFLAGS $zstd_cflags" zstd="yes" else if test "$zstd" = "yes" ; then @@ -4107,7 +4105,8 @@ if test "$zlib" != "no" ; then int main(void) { zlibVersion(); return 0; } EOF if compile_prog "" "-lz" ; then - LIBS="$LIBS -lz" + zlib_libs=-lz + LIBS="$LIBS $zlib_libs" else error_exit "zlib check failed" \ "Make sure to have the zlib libs and headers installed." @@ -7392,7 +7391,11 @@ fi if test "$posix_memalign" = "yes" ; then echo "CONFIG_POSIX_MEMALIGN=y" >> $config_host_mak fi - +if test "$zlib" != "no" ; then + echo "CONFIG_ZLIB=y" >> $config_host_mak + echo "ZLIB_CFLAGS=$zlib_cflags" >> $config_host_mak + echo "ZLIB_LIBS=$zlib_libs" >> $config_host_mak +fi if test "$spice" = "yes" ; then echo "CONFIG_SPICE=y" >> $config_host_mak fi @@ -7462,6 +7465,8 @@ fi if test "$zstd" = "yes" ; then echo "CONFIG_ZSTD=y" >> $config_host_mak + echo "ZSTD_CFLAGS=$zstd_cflags" >> $config_host_mak + echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak fi if test "$libiscsi" = "yes" ; then @@ -7494,7 +7499,6 @@ if test "$qom_cast_debug" = "yes" ; then fi if test "$rbd" = "yes" ; then echo "CONFIG_RBD=m" >> $config_host_mak - echo "RBD_CFLAGS=$rbd_cflags" >> $config_host_mak echo "RBD_LIBS=$rbd_libs" >> $config_host_mak fi diff --git a/meson.build b/meson.build index b78829c116..1d301948b7 100644 --- a/meson.build +++ b/meson.build @@ -109,6 +109,26 @@ pam = not_found if 'CONFIG_AUTH_PAM' in config_host pam = cc.find_library('pam') endif +libaio = cc.find_library('aio', required: false) +zlib = not_found +if 'CONFIG_ZLIB' in config_host + zlib = declare_dependency(compile_args: config_host['ZLIB_CFLAGS'].split(), + link_args: config_host['ZLIB_LIBS'].split()) +endif +linux_io_uring = not_found +if 'CONFIG_LINUX_IO_URING' in config_host + linux_io_uring = declare_dependency(compile_args: config_host['LINUX_IO_URING_CFLAGS'].split(), + link_args: config_host['LINUX_IO_URING_LIBS'].split()) +endif +libxml2 = not_found +if 'CONFIG_LIBXML2' in config_host + libxml2 = declare_dependency(compile_args: config_host['LIBXML2_CFLAGS'].split(), + link_args: config_host['LIBXML2_LIBS'].split()) +endif +libnfs = not_found +if 'CONFIG_LIBNFS' in config_host + libnfs = declare_dependency(link_args: config_host['LIBNFS_LIBS'].split()) +endif libattr = not_found if 'CONFIG_ATTR' in config_host libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split()) @@ -133,6 +153,11 @@ if 'CONFIG_LIBISCSI' in config_host libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(), link_args: config_host['LIBISCSI_LIBS'].split()) endif +zstd = not_found +if 'CONFIG_ZSTD' in config_host + zstd = declare_dependency(compile_args: config_host['ZSTD_CFLAGS'].split(), + link_args: config_host['ZSTD_LIBS'].split()) +endif gbm = not_found if 'CONFIG_GBM' in config_host gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(), @@ -152,6 +177,28 @@ libudev = not_found if 'CONFIG_LIBUDEV' in config_host libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split()) endif +rbd = not_found +if 'CONFIG_RBD' in config_host + rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split()) +endif +glusterfs = not_found +if 'CONFIG_GLUSTERFS' in config_host + glusterfs = declare_dependency(compile_args: config_host['GLUSTERFS_CFLAGS'].split(), + link_args: config_host['GLUSTERFS_LIBS'].split()) +endif +libssh = not_found +if 'CONFIG_LIBSSH' in config_host + libssh = declare_dependency(compile_args: config_host['LIBSSH_CFLAGS'].split(), + link_args: config_host['LIBSSH_LIBS'].split()) +endif +libbzip2 = not_found +if 'CONFIG_BZIP2' in config_host + libbzip2 = declare_dependency(link_args: config_host['BZIP2_LIBS'].split()) +endif +liblzfse = not_found +if 'CONFIG_LZFSE' in config_host + liblzfse = declare_dependency(link_args: config_host['LZFSE_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') @@ -458,6 +505,18 @@ subdir('chardev') subdir('fsdev') subdir('target') +block_ss.add(files( + 'block.c', + 'blockjob.c', + 'job.c', + 'qemu-io-cmds.c', +)) +block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) + +subdir('nbd') +subdir('scsi') +subdir('block') + block_mods = [] softmmu_mods = [] foreach d, list : modules @@ -492,6 +551,16 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms', capture: true, command: [undefsym, nm, '@INPUT@']) +block_ss = block_ss.apply(config_host, strict: false) +libblock = static_library('block', block_ss.sources() + genh, + dependencies: block_ss.dependencies(), + link_depends: block_syms, + name_suffix: 'fa', + build_by_default: false) + +block = declare_dependency(link_whole: [libblock], + link_args: '@block.syms') + foreach m : block_mods + softmmu_mods shared_module(m.name(), name_prefix: '', diff --git a/nbd/Makefile.objs b/nbd/Makefile.objs deleted file mode 100644 index eb3dd4461d..0000000000 --- a/nbd/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -block-obj-y += server.o client.o common.o diff --git a/nbd/meson.build b/nbd/meson.build new file mode 100644 index 0000000000..0c00a776d3 --- /dev/null +++ b/nbd/meson.build @@ -0,0 +1,5 @@ +block_ss.add(files( + 'client.c', + 'common.c', + 'server.c', +)) diff --git a/rules.mak b/rules.mak index 9da9dcd4f6..8285fe529a 100644 --- a/rules.mak +++ b/rules.mak @@ -374,8 +374,7 @@ define unnest-vars # Find all the .mo objects in variables and add dependency rules # according to .mo-objs. Report error if not set $(if $($o-objs), - $(eval $(o:%.mo=%$(DSOSUF)): module-common.o $($o-objs)), - $(error $o added in $v but $o-objs is not set))) + $(eval $(o:%.mo=%$(DSOSUF)): module-common.o $($o-objs)))) $(shell mkdir -p ./ $(sort $(dir $($v)))) # Include all the .d files $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$(filter %.o,$($v))))) diff --git a/scsi/Makefile.objs b/scsi/Makefile.objs deleted file mode 100644 index bb8789cd8b..0000000000 --- a/scsi/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -block-obj-y += utils.o - -block-obj-$(CONFIG_LINUX) += pr-manager.o pr-manager-helper.o -block-obj-$(call lnot,$(CONFIG_LINUX)) += pr-manager-stub.o diff --git a/scsi/meson.build b/scsi/meson.build new file mode 100644 index 0000000000..53f3a1f716 --- /dev/null +++ b/scsi/meson.build @@ -0,0 +1,4 @@ +block_ss.add(files('utils.c')) +block_ss.add(when: 'CONFIG_LINUX', + if_true: files('pr-manager.c', 'pr-manager-helper.c'), + if_false: files('pr-manager-stub.c')) From patchwork Fri Aug 21 10:22:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD40DC433E1 for ; Fri, 21 Aug 2020 10:55:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EFA72072D for ; Fri, 21 Aug 2020 10:55:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="c+MtLGP7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EFA72072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94hf-0005ez-TW for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:55:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Dv-0002O6-CM for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:39 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:57824 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dm-0001eQ-7V for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n68dwu9a3zmbSZRlYJR+zYq+SaHA/242xTWVh2R0tMI=; b=c+MtLGP7tmkvP+swodl2Un2q8x/TEtMzLfj9z8RPfRx5txY3CqtHwSDSVgG7hHVzZYNJtT ZaNPg45lmHV8RkYZBZ55cO4/HZdOP3ugPLlr0+H68SW7L/1xFEHYitmFtJMEO2Uoc6ktn4 VHZUHHAMIUXLTp4BwZnvBV3KDiMBM6o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-498-YHziVMjTOLCDSwSacxCWDg-1; Fri, 21 Aug 2020 06:24:27 -0400 X-MC-Unique: YHziVMjTOLCDSwSacxCWDg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 33B6C191E2A0 for ; Fri, 21 Aug 2020 10:24:26 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1E4D101E247; Fri, 21 Aug 2020 10:24:25 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 066/152] meson: qemu-{img,io,nbd} Date: Fri, 21 Aug 2020 06:22:03 -0400 Message-Id: <20200821102329.29777-67-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 01:00:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 5 ----- configure | 3 +-- meson.build | 14 ++++++++++++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index ff05218353..316846f6e7 100644 --- a/Makefile +++ b/Makefile @@ -289,11 +289,6 @@ Makefile: $(version-obj-y) COMMON_LDADDS = libqemuutil.a -qemu-img.o: qemu-img-cmds.h - -qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) -qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) -qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-obj-y) $(COMMON_LDADDS) scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) diff --git a/configure b/configure index fffda5aca1..c9e8feeb7a 100755 --- a/configure +++ b/configure @@ -6715,9 +6715,8 @@ fi tools="" helpers="" if test "$want_tools" = "yes" ; then - tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then - tools="qemu-nbd\$(EXESUF) qemu-storage-daemon\$(EXESUF) $tools" + tools="qemu-storage-daemon\$(EXESUF) $tools" fi fi if test "$softmmu" = yes ; then diff --git a/meson.build b/meson.build index 1d301948b7..7f753afc6e 100644 --- a/meson.build +++ b/meson.build @@ -350,7 +350,7 @@ if have_system ] endif foreach d : hx_headers - custom_target(d[1], + hxdep += custom_target(d[1], input: files(d[0]), output: d[1], capture: true, @@ -559,7 +559,8 @@ libblock = static_library('block', block_ss.sources() + genh, build_by_default: false) block = declare_dependency(link_whole: [libblock], - link_args: '@block.syms') + link_args: '@block.syms', + dependencies: [crypto, io]) foreach m : block_mods + softmmu_mods shared_module(m.name(), @@ -637,6 +638,15 @@ if 'CONFIG_GUEST_AGENT' in config_host endif if have_tools + qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep], + dependencies: [authz, block, crypto, io, qom, qemuutil], install: true) + qemu_io = executable('qemu-io', files('qemu-io.c'), + dependencies: [block, qemuutil], install: true) + if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd') + qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'), + dependencies: [block, qemuutil], install: true) + endif + subdir('contrib/rdmacm-mux') subdir('contrib/elf2dmp') From patchwork Fri Aug 21 10:22:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275930 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8423BC433E1 for ; Fri, 21 Aug 2020 10:52:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FA7520656 for ; Fri, 21 Aug 2020 10:52:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ob/xOAob" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FA7520656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94eR-00085E-KH for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:52:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Dr-0002EG-Qs for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dm-0001eT-6Q for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GEKSMP9J7KBw9ZmwdEbnSpsTcIq9tgSk1P+/NjUyvOA=; b=Ob/xOAobPbyXg2eBLdntgpaBDkSTLlANeMXI0apTAMlNtINgVFe5nkvwdQ9Vzz5W0xuCNq MJ+dickxtg1fj1i90IAS9D6j5JQhBOrT8QDGphknUgB4rdKyaeirVQrJzEnX8eTP8lOoYk ep8qJRVtvZ5f3hPNDlXl5oDEqiv42wk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-556-7LUI4j5YPa-woHaC3LvQKQ-1; Fri, 21 Aug 2020 06:24:27 -0400 X-MC-Unique: 7LUI4j5YPa-woHaC3LvQKQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94A5B8030D0 for ; Fri, 21 Aug 2020 10:24:26 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FB08101E247; Fri, 21 Aug 2020 10:24:26 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 067/152] meson: qemu-pr-helper Date: Fri, 21 Aug 2020 06:22:04 -0400 Message-Id: <20200821102329.29777-68-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau The executable moves back from libexecdir to bindir, when it was in 5.0 and earlier. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 7 +------ configure | 3 --- meson.build | 10 ++++++++++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 316846f6e7..14ad17103c 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ $(call set-vpath, $(SRC_PATH)) LIBS+=-lz $(LIBS_TOOLS) -HELPERS-y = $(HELPERS) +HELPERS-y = # Sphinx does not allow building manuals into the same directory as # the source files, so if we're doing an in-tree QEMU build we must @@ -291,11 +291,6 @@ COMMON_LDADDS = libqemuutil.a qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-obj-y) $(COMMON_LDADDS) -scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) -ifdef CONFIG_MPATH -scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist -endif - clean: recurse-clean ninja-clean clean-ctlist -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean # avoid old build problems by removing potentially incorrect old files diff --git a/configure b/configure index c9e8feeb7a..de2751ce8c 100755 --- a/configure +++ b/configure @@ -6713,7 +6713,6 @@ if [ "$eventfd" = "yes" ]; then fi tools="" -helpers="" if test "$want_tools" = "yes" ; then if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then tools="qemu-storage-daemon\$(EXESUF) $tools" @@ -6737,7 +6736,6 @@ if test "$softmmu" = yes ; then fi mpath=no fi - helpers="$helpers scsi/qemu-pr-helper\$(EXESUF)" else if test "$virtfs" = yes; then error_exit "VirtFS is supported only on Linux" @@ -7815,7 +7813,6 @@ else QEMU_INCLUDES="-iquote ${source_path}/tcg/${ARCH} $QEMU_INCLUDES" fi -echo "HELPERS=$helpers" >> $config_host_mak echo "TOOLS=$tools" >> $config_host_mak echo "ROMS=$roms" >> $config_host_mak echo "MAKE=$make" >> $config_host_mak diff --git a/meson.build b/meson.build index 7f753afc6e..3a8cf11edc 100644 --- a/meson.build +++ b/meson.build @@ -148,6 +148,10 @@ if 'CONFIG_XKBCOMMON' in config_host link_args: config_host['XKBCOMMON_LIBS'].split()) endif rt = cc.find_library('rt', required: false) +libmpathpersist = not_found +if config_host.has_key('CONFIG_MPATH') + libmpathpersist = cc.find_library('mpathpersist') +endif libiscsi = not_found if 'CONFIG_LIBISCSI' in config_host libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(), @@ -633,6 +637,7 @@ foreach target : target_dirs endforeach # Other build targets + if 'CONFIG_GUEST_AGENT' in config_host subdir('qga') endif @@ -674,6 +679,11 @@ if have_tools dependencies: [qemuutil, libcap_ng], install: true, install_dir: get_option('libexecdir')) + + executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'), + dependencies: [authz, crypto, io, qom, qemuutil, + libcap_ng, libudev, libmpathpersist], + install: true) endif if 'CONFIG_IVSHMEM' in config_host From patchwork Fri Aug 21 10:22:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275926 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10B81C433E1 for ; Fri, 21 Aug 2020 10:55:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A47362072D for ; Fri, 21 Aug 2020 10:55:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iFjlq9rS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A47362072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94i6-0006U7-QG for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:55:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E3-0002h2-3F for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39263) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Do-0001f8-EG for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QLd1W40MZpW60TRzE6bMvyRvaQj5INJ36CmtVpASgNs=; b=iFjlq9rSnRr3f9WDs+wUpUBYGuOOhSbCrstFSWteWddw1GYhHz7n+1UO/8Tv1KqZttfApa a8KnvF9XmV5GQZtNyF8uyANsPcUOcnGeKVSK/tDP46d69Dm+GTnnBcvzJ0lvQPceFFdHaZ txFnQieWUyvb9Ss1RpNMiHFh/CDszv8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-561-e_p2yZnTOUmG1ekcjjFUCg-1; Fri, 21 Aug 2020 06:24:29 -0400 X-MC-Unique: e_p2yZnTOUmG1ekcjjFUCg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4F376100CF6F for ; Fri, 21 Aug 2020 10:24:28 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id BAFA45C1D0 for ; Fri, 21 Aug 2020 10:24:27 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 070/152] meson: convert tests/qtest to meson Date: Fri, 21 Aug 2020 06:22:07 -0400 Message-Id: <20200821102329.29777-71-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- meson.build | 3 + tests/Makefile.include | 47 +-- tests/meson.build | 1 + tests/qtest/Makefile.include | 332 ------------------ tests/qtest/ac97-test.c | 2 +- tests/qtest/acpi-utils.h | 2 +- tests/qtest/ahci-test.c | 2 +- tests/qtest/arm-cpu-features.c | 2 +- tests/qtest/boot-order-test.c | 2 +- tests/qtest/boot-sector.c | 2 +- tests/qtest/boot-sector.h | 2 +- tests/qtest/boot-serial-test.c | 2 +- tests/qtest/cdrom-test.c | 2 +- tests/qtest/dbus-vmstate-test.c | 2 +- tests/qtest/device-introspect-test.c | 2 +- tests/qtest/device-plug-test.c | 2 +- tests/qtest/drive_del-test.c | 2 +- tests/qtest/ds1338-test.c | 2 +- tests/qtest/e1000-test.c | 2 +- tests/qtest/eepro100-test.c | 2 +- tests/qtest/endianness-test.c | 2 +- tests/qtest/es1370-test.c | 2 +- tests/qtest/fuzz/fuzz.c | 2 +- tests/qtest/fuzz/fuzz.h | 2 +- tests/qtest/fuzz/i440fx_fuzz.c | 2 +- tests/qtest/fuzz/qos_fuzz.c | 2 +- tests/qtest/fuzz/virtio_net_fuzz.c | 2 +- tests/qtest/fw_cfg-test.c | 2 +- tests/qtest/hd-geo-test.c | 2 +- tests/qtest/hexloader-test.c | 2 +- tests/qtest/ide-test.c | 2 +- tests/qtest/ipoctal232-test.c | 2 +- tests/qtest/ivshmem-test.c | 2 +- .../libqos/aarch64-xlnx-zcu102-machine.c | 4 +- tests/qtest/libqos/ahci.c | 6 +- tests/qtest/libqos/ahci.h | 6 +- tests/qtest/libqos/arm-imx25-pdk-machine.c | 6 +- tests/qtest/libqos/arm-n800-machine.c | 6 +- tests/qtest/libqos/arm-raspi2-machine.c | 4 +- tests/qtest/libqos/arm-sabrelite-machine.c | 4 +- tests/qtest/libqos/arm-smdkc210-machine.c | 4 +- tests/qtest/libqos/arm-virt-machine.c | 6 +- .../qtest/libqos/arm-xilinx-zynq-a9-machine.c | 4 +- tests/qtest/libqos/e1000e.c | 6 +- tests/qtest/libqos/e1000e.h | 2 +- tests/qtest/libqos/fw_cfg.c | 2 +- tests/qtest/libqos/i2c-imx.c | 2 +- tests/qtest/libqos/i2c-omap.c | 2 +- tests/qtest/libqos/i2c.c | 2 +- tests/qtest/libqos/i2c.h | 2 +- tests/qtest/libqos/libqos-pc.c | 6 +- tests/qtest/libqos/libqos-pc.h | 2 +- tests/qtest/libqos/libqos-spapr.c | 6 +- tests/qtest/libqos/libqos-spapr.h | 2 +- tests/qtest/libqos/libqos.c | 4 +- tests/qtest/libqos/libqos.h | 4 +- tests/qtest/{ => libqos}/libqtest.h | 0 tests/qtest/libqos/malloc-pc.c | 4 +- tests/qtest/libqos/malloc-pc.h | 2 +- tests/qtest/libqos/malloc-spapr.c | 2 +- tests/qtest/libqos/malloc-spapr.h | 2 +- tests/qtest/libqos/malloc.c | 2 +- tests/qtest/libqos/meson.build | 57 +++ tests/qtest/libqos/pci-pc.c | 2 +- tests/qtest/libqos/pci-pc.h | 6 +- tests/qtest/libqos/pci-spapr.c | 6 +- tests/qtest/libqos/pci-spapr.h | 6 +- tests/qtest/libqos/pci.c | 4 +- tests/qtest/libqos/pci.h | 2 +- tests/qtest/libqos/ppc64_pseries-machine.c | 4 +- tests/qtest/libqos/qgraph.c | 4 +- tests/qtest/libqos/qgraph.h | 6 +- tests/qtest/libqos/qgraph_internal.h | 4 +- tests/qtest/libqos/qos_external.c | 8 +- tests/qtest/libqos/qos_external.h | 4 +- tests/qtest/libqos/rtas.c | 2 +- tests/qtest/libqos/rtas.h | 2 +- tests/qtest/libqos/sdhci.c | 2 +- tests/qtest/libqos/sdhci.h | 2 +- tests/qtest/libqos/tpci200.c | 4 +- tests/qtest/libqos/usb.c | 2 +- tests/qtest/libqos/usb.h | 2 +- tests/qtest/libqos/virtio-9p.c | 4 +- tests/qtest/libqos/virtio-9p.h | 6 +- tests/qtest/libqos/virtio-balloon.c | 4 +- tests/qtest/libqos/virtio-balloon.h | 6 +- tests/qtest/libqos/virtio-blk.c | 4 +- tests/qtest/libqos/virtio-blk.h | 6 +- tests/qtest/libqos/virtio-mmio.c | 8 +- tests/qtest/libqos/virtio-mmio.h | 4 +- tests/qtest/libqos/virtio-net.c | 4 +- tests/qtest/libqos/virtio-net.h | 6 +- tests/qtest/libqos/virtio-pci.c | 14 +- tests/qtest/libqos/virtio-pci.h | 6 +- tests/qtest/libqos/virtio-rng.c | 4 +- tests/qtest/libqos/virtio-rng.h | 6 +- tests/qtest/libqos/virtio-scsi.c | 4 +- tests/qtest/libqos/virtio-scsi.h | 6 +- tests/qtest/libqos/virtio-serial.c | 4 +- tests/qtest/libqos/virtio-serial.h | 6 +- tests/qtest/libqos/virtio.c | 2 +- tests/qtest/libqos/virtio.h | 2 +- tests/qtest/libqos/x86_64_pc-machine.c | 2 +- tests/qtest/libqtest-single.h | 2 +- tests/qtest/libqtest.c | 2 +- tests/qtest/m48t59-test.c | 2 +- tests/qtest/machine-none-test.c | 2 +- tests/qtest/megasas-test.c | 2 +- tests/qtest/meson.build | 257 ++++++++++++++ tests/qtest/microbit-test.c | 2 +- tests/qtest/migration-helpers.h | 2 +- tests/qtest/migration-test.c | 4 +- tests/qtest/modules-test.c | 2 +- tests/qtest/ne2000-test.c | 2 +- tests/qtest/numa-test.c | 2 +- tests/qtest/nvme-test.c | 2 +- tests/qtest/pca9552-test.c | 2 +- tests/qtest/pci-test.c | 2 +- tests/qtest/pcnet-test.c | 2 +- tests/qtest/pflash-cfi02-test.c | 2 +- tests/qtest/pnv-xscom-test.c | 2 +- tests/qtest/prom-env-test.c | 2 +- tests/qtest/pvpanic-test.c | 2 +- tests/qtest/pxe-test.c | 2 +- tests/qtest/q35-test.c | 2 +- tests/qtest/qmp-cmd-test.c | 2 +- tests/qtest/qmp-test.c | 2 +- tests/qtest/qom-test.c | 2 +- tests/qtest/rtas-test.c | 2 +- tests/qtest/sdhci-test.c | 2 +- tests/qtest/spapr-phb-test.c | 2 +- tests/qtest/tco-test.c | 2 +- tests/qtest/test-filter-mirror.c | 2 +- tests/qtest/test-filter-redirector.c | 2 +- tests/qtest/test-hmp.c | 2 +- tests/qtest/tpm-crb-swtpm-test.c | 2 +- tests/qtest/tpm-tis-device-swtpm-test.c | 2 +- tests/qtest/tpm-tis-swtpm-test.c | 2 +- tests/qtest/tpm-util.c | 2 +- tests/qtest/tulip-test.c | 2 +- tests/qtest/virtio-rng-test.c | 2 +- tests/qtest/virtio-test.c | 2 +- tests/qtest/vmgenid-test.c | 2 +- tests/qtest/vmxnet3-test.c | 2 +- tests/qtest/wdt_ib700-test.c | 2 +- tests/test-qga.c | 2 +- tests/test-qgraph.c | 5 +- 147 files changed, 541 insertions(+), 589 deletions(-) delete mode 100644 tests/qtest/Makefile.include rename tests/qtest/{ => libqos}/libqtest.h (100%) create mode 100644 tests/qtest/libqos/meson.build create mode 100644 tests/qtest/meson.build diff --git a/meson.build b/meson.build index d3b74868e2..99daa91666 100644 --- a/meson.build +++ b/meson.build @@ -535,6 +535,9 @@ subdir('nbd') subdir('scsi') subdir('block') +# needed for fuzzing binaries +subdir('tests/qtest/libqos') + block_mods = [] softmmu_mods = [] foreach d, list : modules diff --git a/tests/Makefile.include b/tests/Makefile.include index 02d31fbe0c..99fb5132f7 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -109,6 +109,7 @@ check-unit-y += tests/test-qht$(EXESUF) check-unit-y += tests/test-qht-par$(EXESUF) check-unit-y += tests/test-bitops$(EXESUF) check-unit-y += tests/test-bitcnt$(EXESUF) +check-unit-y += tests/test-qgraph$(EXESUF) check-unit-y += tests/check-qom-interface$(EXESUF) check-unit-y += tests/check-qom-proplist$(EXESUF) check-unit-y += tests/test-qemu-opts$(EXESUF) @@ -306,19 +307,6 @@ tests/test-qapi-gen-timestamp: \ @rm -f tests/test-qapi-doc.texi @>$@ -tests/qtest/dbus-vmstate1.h tests/qtest/dbus-vmstate1.c: tests/qtest/dbus-vmstate1-gen-timestamp ; -tests/qtest/dbus-vmstate1-gen-timestamp: $(SRC_PATH)/tests/qtest/dbus-vmstate1.xml - $(call quiet-command,$(GDBUS_CODEGEN) $< \ - --interface-prefix org.qemu --generate-c-code tests/qtest/dbus-vmstate1, \ - "GEN","$(@:%-timestamp=%)") - @>$@ - -tests/qtest/dbus-vmstate-test.o-cflags := -DSRCDIR="$(SRC_PATH)" -tests/qtest/dbus-vmstate1.o-cflags := $(GIO_CFLAGS) -tests/qtest/dbus-vmstate1.o-libs := $(GIO_LIBS) - -tests/qtest/dbus-vmstate-test.o: tests/qtest/dbus-vmstate1.h - tests/test-string-output-visitor$(EXESUF): tests/test-string-output-visitor.o $(test-qapi-obj-y) tests/test-string-input-visitor$(EXESUF): tests/test-string-input-visitor.o $(test-qapi-obj-y) tests/test-qmp-event$(EXESUF): tests/test-qmp-event.o $(test-qapi-obj-y) tests/test-qapi-emit-events.o tests/test-qapi-events.o @@ -333,6 +321,7 @@ tests/test-shift128$(EXESUF): tests/test-shift128.o $(test-util-obj-y) tests/test-mul64$(EXESUF): tests/test-mul64.o $(test-util-obj-y) tests/test-bitops$(EXESUF): tests/test-bitops.o $(test-util-obj-y) tests/test-bitcnt$(EXESUF): tests/test-bitcnt.o $(test-util-obj-y) +tests/test-qgraph$(EXESUF): tests/test-qgraph.o tests/qtest/libqos/qgraph.o $(test-util-obj-y) tests/test-crypto-hash$(EXESUF): tests/test-crypto-hash.o $(test-crypto-obj-y) tests/benchmark-crypto-hash$(EXESUF): tests/benchmark-crypto-hash.o $(test-crypto-obj-y) tests/test-crypto-hmac$(EXESUF): tests/test-crypto-hmac.o $(test-crypto-obj-y) @@ -396,10 +385,8 @@ tests/migration/initrd-stress.img: tests/migration/stress$(EXESUF) rm $(INITRD_WORK_DIR)/init rmdir $(INITRD_WORK_DIR) -include $(SRC_PATH)/tests/qtest/Makefile.include - tests/test-qga$(EXESUF): qga/qemu-ga$(EXESUF) -tests/test-qga$(EXESUF): tests/test-qga.o $(qtest-obj-y) +tests/test-qga$(EXESUF): tests/test-qga.o tests/qtest/libqtest.o $(test-util-obj-y) tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o $(test-util-obj-y) libvhost-user.a tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o @@ -440,14 +427,6 @@ define do_test_tap "TAP","$@") endef -.PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS)) -$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: %-softmmu/all $(check-qtest-y) - $(call do_test_human,$(check-qtest-$*-y:%=tests/qtest/%$(EXESUF)) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)), \ - QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \ - QTEST_QEMU_IMG=qemu-img$(EXESUF)) - -build-qtest: $(patsubst %, %-softmmu/all, $(QTEST_TARGETS)) $(check-qtest-y) - build-unit: $(check-unit-y) check-unit: $(check-unit-y) @@ -458,18 +437,9 @@ check-speed: $(check-speed-y) # gtester tests with TAP output -$(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qtest-%.tap: %-softmmu/all $(check-qtest-y) - $(call do_test_tap, $(check-qtest-$*-y:%=tests/qtest/%$(EXESUF)) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)), \ - QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \ - QTEST_QEMU_IMG=qemu-img$(EXESUF)) - check-report-unit.tap: $(check-unit-y) $(call do_test_tap,$^) -# Reports and overall runs - -check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) check-report-unit.tap - # Plugins ifeq ($(CONFIG_PLUGIN),y) .PHONY: plugins @@ -580,21 +550,18 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images # Consolidated targets -.PHONY: check-block check-qtest check-unit check check-clean get-vm-images -check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) +.PHONY: check-block check-unit check check-clean get-vm-images ifeq ($(CONFIG_TOOLS),y) check-block: $(patsubst %,check-%, $(check-block-y)) endif -check-build: build-unit build-qtest +check-build: build-unit check-clean: rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y) - rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y:%=tests/qtest/%$(EXESUF))) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF))) rm -f tests/test-qapi-gen-timestamp - rm -f tests/qtest/dbus-vmstate1-gen-timestamp rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR) -check: check-block check-unit check-qtest +check: check-block check-unit clean: check-clean @@ -603,7 +570,5 @@ clean: check-clean all: $(QEMU_IOTESTS_HELPERS-y) -include $(wildcard tests/*.d) --include $(wildcard tests/qtest/*.d) --include $(wildcard tests/qtest/libqos/*.d) endif diff --git a/tests/meson.build b/tests/meson.build index 8be9c2233c..d724402cf4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -8,3 +8,4 @@ if 'CONFIG_TCG' in config_host endif subdir('qapi-schema') +subdir('qtest') diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include deleted file mode 100644 index b0204e44f2..0000000000 --- a/tests/qtest/Makefile.include +++ /dev/null @@ -1,332 +0,0 @@ -# All QTests for now are POSIX-only, but the dependencies are -# really in libqtest, not in the testcases themselves. - -check-qtest-generic-y += cdrom-test -check-qtest-generic-y += device-introspect-test -check-qtest-generic-y += machine-none-test -check-qtest-generic-y += qmp-test -check-qtest-generic-y += qmp-cmd-test -check-qtest-generic-y += qom-test -check-qtest-generic-$(CONFIG_MODULES) += modules-test -check-qtest-generic-y += test-hmp - -check-qtest-pci-$(CONFIG_RTL8139_PCI) += rtl8139-test -check-qtest-pci-$(CONFIG_VGA) += display-vga-test -check-qtest-pci-$(CONFIG_HDA) += intel-hda-test -check-qtest-pci-$(CONFIG_IVSHMEM_DEVICE) += ivshmem-test - -DBUS_DAEMON := $(shell which dbus-daemon 2>/dev/null) -ifneq ($(GDBUS_CODEGEN),) -ifneq ($(DBUS_DAEMON),) -# Temporarily disabled due to Patchew failures: -#check-qtest-pci-$(CONFIG_GIO) += dbus-vmstate-test -endif -endif - -check-qtest-i386-$(CONFIG_ISA_TESTDEV) = endianness-test -check-qtest-i386-y += fdc-test -check-qtest-i386-y += ide-test -check-qtest-i386-$(CONFIG_TOOLS) += ahci-test -check-qtest-i386-y += hd-geo-test -check-qtest-i386-y += boot-order-test -check-qtest-i386-y += bios-tables-test -check-qtest-i386-$(CONFIG_SGA) += boot-serial-test -check-qtest-i386-$(CONFIG_SLIRP) += pxe-test -check-qtest-i386-y += rtc-test -check-qtest-i386-$(CONFIG_ISA_IPMI_KCS) += ipmi-kcs-test -ifdef CONFIG_LINUX -check-qtest-i386-$(CONFIG_ISA_IPMI_BT) += ipmi-bt-test -endif -check-qtest-i386-y += i440fx-test -check-qtest-i386-y += fw_cfg-test -check-qtest-i386-y += device-plug-test -check-qtest-i386-y += drive_del-test -check-qtest-i386-$(CONFIG_WDT_IB700) += wdt_ib700-test -check-qtest-i386-y += tco-test -check-qtest-i386-y += $(check-qtest-pci-y) -check-qtest-i386-$(CONFIG_PVPANIC) += pvpanic-test -check-qtest-i386-$(CONFIG_I82801B11) += i82801b11-test -check-qtest-i386-$(CONFIG_IOH3420) += ioh3420-test -check-qtest-i386-$(CONFIG_USB_UHCI) += usb-hcd-uhci-test -check-qtest-i386-$(call land,$(CONFIG_USB_EHCI),$(CONFIG_USB_UHCI)) += usb-hcd-ehci-test -check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += usb-hcd-xhci-test -check-qtest-i386-y += cpu-plug-test -check-qtest-i386-y += q35-test -check-qtest-i386-y += vmgenid-test -check-qtest-i386-$(CONFIG_TPM_CRB) += tpm-crb-swtpm-test -check-qtest-i386-$(CONFIG_TPM_CRB) += tpm-crb-test -check-qtest-i386-$(CONFIG_TPM_TIS_ISA) += tpm-tis-swtpm-test -check-qtest-i386-$(CONFIG_TPM_TIS_ISA) += tpm-tis-test -check-qtest-i386-$(CONFIG_SLIRP) += test-netfilter -check-qtest-i386-$(CONFIG_POSIX) += test-filter-mirror -check-qtest-i386-$(CONFIG_RTL8139_PCI) += test-filter-redirector -check-qtest-i386-y += migration-test -check-qtest-i386-y += test-x86-cpuid-compat -check-qtest-i386-y += numa-test - -check-qtest-x86_64-y += $(check-qtest-i386-y) - -check-qtest-avr-y += boot-serial-test - -check-qtest-alpha-y += boot-serial-test -check-qtest-alpha-$(CONFIG_VGA) += display-vga-test - -check-qtest-hppa-y += boot-serial-test -check-qtest-hppa-$(CONFIG_VGA) += display-vga-test - -check-qtest-m68k-y = boot-serial-test - -check-qtest-microblaze-y += boot-serial-test - -check-qtest-mips-$(CONFIG_ISA_TESTDEV) = endianness-test -check-qtest-mips-$(CONFIG_VGA) += display-vga-test - -check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = endianness-test -check-qtest-mips64-$(CONFIG_VGA) += display-vga-test - -check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = endianness-test -check-qtest-mips64el-$(CONFIG_VGA) += display-vga-test - -check-qtest-moxie-y += boot-serial-test - -check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = endianness-test -check-qtest-ppc-y += boot-order-test -check-qtest-ppc-y += prom-env-test -check-qtest-ppc-y += drive_del-test -check-qtest-ppc-y += boot-serial-test -check-qtest-ppc-$(CONFIG_M48T59) += m48t59-test - -check-qtest-ppc64-y += $(check-qtest-ppc-y) -check-qtest-ppc64-$(CONFIG_PSERIES) += device-plug-test -check-qtest-ppc64-$(CONFIG_POWERNV) += pnv-xscom-test -check-qtest-ppc64-y += migration-test -check-qtest-ppc64-$(CONFIG_PSERIES) += rtas-test -check-qtest-ppc64-$(CONFIG_SLIRP) += pxe-test -check-qtest-ppc64-$(CONFIG_USB_UHCI) += usb-hcd-uhci-test -check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += usb-hcd-xhci-test -check-qtest-ppc64-$(CONFIG_SLIRP) += test-netfilter -check-qtest-ppc64-$(CONFIG_POSIX) += test-filter-mirror -check-qtest-ppc64-$(CONFIG_RTL8139_PCI) += test-filter-redirector -check-qtest-ppc64-$(CONFIG_VGA) += display-vga-test -check-qtest-ppc64-y += numa-test -check-qtest-ppc64-$(CONFIG_IVSHMEM_DEVICE) += ivshmem-test -check-qtest-ppc64-y += cpu-plug-test - -check-qtest-sh4-$(CONFIG_ISA_TESTDEV) = endianness-test - -check-qtest-sh4eb-$(CONFIG_ISA_TESTDEV) = endianness-test - -check-qtest-sparc-y += prom-env-test -check-qtest-sparc-y += m48t59-test -check-qtest-sparc-y += boot-serial-test - -check-qtest-sparc64-$(CONFIG_ISA_TESTDEV) = endianness-test -check-qtest-sparc64-y += prom-env-test -check-qtest-sparc64-y += boot-serial-test - -check-qtest-arm-y += arm-cpu-features -check-qtest-arm-y += microbit-test -check-qtest-arm-y += m25p80-test -check-qtest-arm-y += test-arm-mptimer -check-qtest-arm-y += boot-serial-test -check-qtest-arm-y += hexloader-test -check-qtest-arm-$(CONFIG_PFLASH_CFI02) += pflash-cfi02-test - -check-qtest-aarch64-y += arm-cpu-features -check-qtest-aarch64-$(CONFIG_TPM_TIS_SYSBUS) += tpm-tis-device-test -check-qtest-aarch64-$(CONFIG_TPM_TIS_SYSBUS) += tpm-tis-device-swtpm-test -check-qtest-aarch64-y += numa-test -check-qtest-aarch64-y += boot-serial-test -check-qtest-aarch64-y += migration-test - -# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make test unconditional -ifneq ($(ARCH),arm) -check-qtest-aarch64-y += bios-tables-test -endif - -check-qtest-microblazeel-y += $(check-qtest-microblaze-y) - -check-qtest-xtensaeb-y += $(check-qtest-xtensa-y) - -check-qtest-s390x-y = boot-serial-test -check-qtest-s390x-$(CONFIG_SLIRP) += pxe-test -check-qtest-s390x-$(CONFIG_SLIRP) += test-netfilter -check-qtest-s390x-$(CONFIG_POSIX) += test-filter-mirror -check-qtest-s390x-$(CONFIG_POSIX) += test-filter-redirector -check-qtest-s390x-y += drive_del-test -check-qtest-s390x-y += device-plug-test -check-qtest-s390x-y += virtio-ccw-test -check-qtest-s390x-y += cpu-plug-test -check-qtest-s390x-y += migration-test - -# libqos / qgraph : -libqgraph-obj-y = tests/qtest/libqos/qgraph.o - -libqos-core-obj-y = $(libqgraph-obj-y) tests/qtest/libqos/pci.o tests/qtest/libqos/fw_cfg.o -libqos-core-obj-y += tests/qtest/libqos/malloc.o -libqos-core-obj-y += tests/qtest/libqos/libqos.o -libqos-spapr-obj-y = $(libqos-core-obj-y) tests/qtest/libqos/malloc-spapr.o -libqos-spapr-obj-y += tests/qtest/libqos/libqos-spapr.o -libqos-spapr-obj-y += tests/qtest/libqos/rtas.o -libqos-spapr-obj-y += tests/qtest/libqos/pci-spapr.o -libqos-pc-obj-y = $(libqos-core-obj-y) tests/qtest/libqos/pci-pc.o -libqos-pc-obj-y += tests/qtest/libqos/malloc-pc.o tests/qtest/libqos/libqos-pc.o -libqos-pc-obj-y += tests/qtest/libqos/ahci.o -libqos-usb-obj-y = $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/qtest/libqos/usb.o - -# qos devices: -libqos-obj-y = $(libqgraph-obj-y) -libqos-obj-y += $(libqos-pc-obj-y) $(libqos-spapr-obj-y) -libqos-obj-y += tests/qtest/libqos/qos_external.o -libqos-obj-y += tests/qtest/libqos/e1000e.o -libqos-obj-y += tests/qtest/libqos/i2c.o -libqos-obj-y += tests/qtest/libqos/i2c-imx.o -libqos-obj-y += tests/qtest/libqos/i2c-omap.o -libqos-obj-y += tests/qtest/libqos/sdhci.o -libqos-obj-y += tests/qtest/libqos/tpci200.o -libqos-obj-y += tests/qtest/libqos/virtio.o -libqos-obj-$(CONFIG_VIRTFS) += tests/qtest/libqos/virtio-9p.o -libqos-obj-y += tests/qtest/libqos/virtio-balloon.o -libqos-obj-y += tests/qtest/libqos/virtio-blk.o -libqos-obj-y += tests/qtest/libqos/virtio-mmio.o -libqos-obj-y += tests/qtest/libqos/virtio-net.o -libqos-obj-y += tests/qtest/libqos/virtio-pci.o -libqos-obj-y += tests/qtest/libqos/virtio-pci-modern.o -libqos-obj-y += tests/qtest/libqos/virtio-rng.o -libqos-obj-y += tests/qtest/libqos/virtio-scsi.o -libqos-obj-y += tests/qtest/libqos/virtio-serial.o - -# qos machines: -libqos-obj-y += tests/qtest/libqos/aarch64-xlnx-zcu102-machine.o -libqos-obj-y += tests/qtest/libqos/arm-imx25-pdk-machine.o -libqos-obj-y += tests/qtest/libqos/arm-n800-machine.o -libqos-obj-y += tests/qtest/libqos/arm-raspi2-machine.o -libqos-obj-y += tests/qtest/libqos/arm-sabrelite-machine.o -libqos-obj-y += tests/qtest/libqos/arm-smdkc210-machine.o -libqos-obj-y += tests/qtest/libqos/arm-virt-machine.o -libqos-obj-y += tests/qtest/libqos/arm-xilinx-zynq-a9-machine.o -libqos-obj-y += tests/qtest/libqos/ppc64_pseries-machine.o -libqos-obj-y += tests/qtest/libqos/x86_64_pc-machine.o - -# qos tests: -qos-test-obj-y += tests/qtest/qos-test.o -qos-test-obj-y += tests/qtest/ac97-test.o -qos-test-obj-y += tests/qtest/ds1338-test.o -qos-test-obj-y += tests/qtest/e1000-test.o -qos-test-obj-y += tests/qtest/e1000e-test.o -qos-test-obj-y += tests/qtest/eepro100-test.o -qos-test-obj-y += tests/qtest/es1370-test.o -qos-test-obj-y += tests/qtest/ipoctal232-test.o -qos-test-obj-y += tests/qtest/megasas-test.o -qos-test-obj-y += tests/qtest/ne2000-test.o -qos-test-obj-y += tests/qtest/tulip-test.o -qos-test-obj-y += tests/qtest/nvme-test.o -qos-test-obj-y += tests/qtest/pca9552-test.o -qos-test-obj-y += tests/qtest/pci-test.o -qos-test-obj-y += tests/qtest/pcnet-test.o -qos-test-obj-y += tests/qtest/sdhci-test.o -qos-test-obj-y += tests/qtest/spapr-phb-test.o -qos-test-obj-y += tests/qtest/tmp105-test.o -qos-test-obj-y += tests/qtest/usb-hcd-ohci-test.o $(libqos-usb-obj-y) -qos-test-obj-$(CONFIG_VHOST_NET_USER) += tests/qtest/vhost-user-test.o $(chardev-obj-y) $(test-io-obj-y) -qos-test-obj-y += tests/qtest/virtio-test.o -qos-test-obj-$(CONFIG_VIRTFS) += tests/qtest/virtio-9p-test.o -qos-test-obj-y += tests/qtest/virtio-blk-test.o -qos-test-obj-y += tests/qtest/virtio-net-test.o -qos-test-obj-y += tests/qtest/virtio-rng-test.o -qos-test-obj-y += tests/qtest/virtio-scsi-test.o -qos-test-obj-y += tests/qtest/virtio-serial-test.o -qos-test-obj-y += tests/qtest/vmxnet3-test.o - -check-unit-y += tests/test-qgraph$(EXESUF) -tests/test-qgraph$(EXESUF): tests/test-qgraph.o $(libqgraph-obj-y) - -check-qtest-generic-y += qos-test -tests/qtest/qos-test$(EXESUF): $(qos-test-obj-y) $(libqos-obj-y) - -# QTest dependencies: -tests/qtest/qmp-test$(EXESUF): tests/qtest/qmp-test.o -tests/qtest/qmp-cmd-test$(EXESUF): tests/qtest/qmp-cmd-test.o -tests/qtest/device-introspect-test$(EXESUF): tests/qtest/device-introspect-test.o -tests/qtest/rtc-test$(EXESUF): tests/qtest/rtc-test.o -tests/qtest/m48t59-test$(EXESUF): tests/qtest/m48t59-test.o -tests/qtest/hexloader-test$(EXESUF): tests/qtest/hexloader-test.o -tests/qtest/pflash-cfi02$(EXESUF): tests/qtest/pflash-cfi02-test.o -tests/qtest/endianness-test$(EXESUF): tests/qtest/endianness-test.o -tests/qtest/prom-env-test$(EXESUF): tests/qtest/prom-env-test.o $(libqos-obj-y) -tests/qtest/rtas-test$(EXESUF): tests/qtest/rtas-test.o $(libqos-spapr-obj-y) -tests/qtest/fdc-test$(EXESUF): tests/qtest/fdc-test.o -tests/qtest/ide-test$(EXESUF): tests/qtest/ide-test.o $(libqos-pc-obj-y) -tests/qtest/ahci-test$(EXESUF): tests/qtest/ahci-test.o $(libqos-pc-obj-y) qemu-img$(EXESUF) -tests/qtest/ipmi-kcs-test$(EXESUF): tests/qtest/ipmi-kcs-test.o -tests/qtest/ipmi-bt-test$(EXESUF): tests/qtest/ipmi-bt-test.o -tests/qtest/hd-geo-test$(EXESUF): tests/qtest/hd-geo-test.o $(libqos-obj-y) -tests/qtest/boot-order-test$(EXESUF): tests/qtest/boot-order-test.o $(libqos-obj-y) -tests/qtest/boot-serial-test$(EXESUF): tests/qtest/boot-serial-test.o $(libqos-obj-y) -tests/qtest/bios-tables-test$(EXESUF): tests/qtest/bios-tables-test.o \ - tests/qtest/tpm-emu.o $(test-io-obj-y) \ - tests/qtest/boot-sector.o tests/qtest/acpi-utils.o $(libqos-obj-y) -tests/qtest/pxe-test$(EXESUF): tests/qtest/pxe-test.o tests/qtest/boot-sector.o $(libqos-obj-y) -tests/qtest/microbit-test$(EXESUF): tests/qtest/microbit-test.o -tests/qtest/m25p80-test$(EXESUF): tests/qtest/m25p80-test.o -tests/qtest/i440fx-test$(EXESUF): tests/qtest/i440fx-test.o $(libqos-pc-obj-y) -tests/qtest/q35-test$(EXESUF): tests/qtest/q35-test.o $(libqos-pc-obj-y) -tests/qtest/fw_cfg-test$(EXESUF): tests/qtest/fw_cfg-test.o $(libqos-pc-obj-y) -tests/qtest/rtl8139-test$(EXESUF): tests/qtest/rtl8139-test.o $(libqos-pc-obj-y) -tests/qtest/pnv-xscom-test$(EXESUF): tests/qtest/pnv-xscom-test.o -tests/qtest/wdt_ib700-test$(EXESUF): tests/qtest/wdt_ib700-test.o -tests/qtest/tco-test$(EXESUF): tests/qtest/tco-test.o $(libqos-pc-obj-y) -tests/qtest/virtio-ccw-test$(EXESUF): tests/qtest/virtio-ccw-test.o -tests/qtest/display-vga-test$(EXESUF): tests/qtest/display-vga-test.o -tests/qtest/qom-test$(EXESUF): tests/qtest/qom-test.o -tests/qtest/modules-test$(EXESUF): tests/qtest/modules-test.o -tests/qtest/test-hmp$(EXESUF): tests/qtest/test-hmp.o -tests/qtest/machine-none-test$(EXESUF): tests/qtest/machine-none-test.o -tests/qtest/device-plug-test$(EXESUF): tests/qtest/device-plug-test.o -tests/qtest/drive_del-test$(EXESUF): tests/qtest/drive_del-test.o -tests/qtest/pvpanic-test$(EXESUF): tests/qtest/pvpanic-test.o -tests/qtest/i82801b11-test$(EXESUF): tests/qtest/i82801b11-test.o -tests/qtest/intel-hda-test$(EXESUF): tests/qtest/intel-hda-test.o -tests/qtest/ioh3420-test$(EXESUF): tests/qtest/ioh3420-test.o -tests/qtest/usb-hcd-uhci-test$(EXESUF): tests/qtest/usb-hcd-uhci-test.o $(libqos-usb-obj-y) -tests/qtest/usb-hcd-ehci-test$(EXESUF): tests/qtest/usb-hcd-ehci-test.o $(libqos-usb-obj-y) -tests/qtest/usb-hcd-xhci-test$(EXESUF): tests/qtest/usb-hcd-xhci-test.o $(libqos-usb-obj-y) -tests/qtest/cpu-plug-test$(EXESUF): tests/qtest/cpu-plug-test.o -tests/qtest/migration-test$(EXESUF): tests/qtest/migration-test.o tests/qtest/migration-helpers.o -tests/qtest/test-netfilter$(EXESUF): tests/qtest/test-netfilter.o $(qtest-obj-y) -tests/qtest/test-filter-mirror$(EXESUF): tests/qtest/test-filter-mirror.o $(qtest-obj-y) -tests/qtest/test-filter-redirector$(EXESUF): tests/qtest/test-filter-redirector.o $(qtest-obj-y) -tests/qtest/test-x86-cpuid-compat$(EXESUF): tests/qtest/test-x86-cpuid-compat.o $(qtest-obj-y) -tests/qtest/ivshmem-test$(EXESUF): tests/qtest/ivshmem-test.o contrib/ivshmem-server/ivshmem-server.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y) -tests/qtest/dbus-vmstate-test$(EXESUF): tests/qtest/dbus-vmstate-test.o tests/qtest/migration-helpers.o tests/qtest/dbus-vmstate1.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y) -tests/qtest/test-arm-mptimer$(EXESUF): tests/qtest/test-arm-mptimer.o -tests/qtest/numa-test$(EXESUF): tests/qtest/numa-test.o -tests/qtest/vmgenid-test$(EXESUF): tests/qtest/vmgenid-test.o tests/qtest/boot-sector.o tests/qtest/acpi-utils.o -tests/qtest/cdrom-test$(EXESUF): tests/qtest/cdrom-test.o tests/qtest/boot-sector.o $(libqos-obj-y) -tests/qtest/arm-cpu-features$(EXESUF): tests/qtest/arm-cpu-features.o -tests/qtest/tpm-crb-swtpm-test$(EXESUF): tests/qtest/tpm-crb-swtpm-test.o tests/qtest/tpm-emu.o \ - tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y) -tests/qtest/tpm-crb-test$(EXESUF): tests/qtest/tpm-crb-test.o tests/qtest/tpm-emu.o $(test-io-obj-y) -tests/qtest/tpm-tis-swtpm-test$(EXESUF): tests/qtest/tpm-tis-swtpm-test.o tests/qtest/tpm-emu.o \ - tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y) -tests/qtest/tpm-tis-device-swtpm-test$(EXESUF): tests/qtest/tpm-tis-device-swtpm-test.o tests/qtest/tpm-emu.o \ - tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y) -tests/qtest/tpm-tis-test$(EXESUF): tests/qtest/tpm-tis-test.o tests/qtest/tpm-tis-util.o tests/qtest/tpm-emu.o $(test-io-obj-y) -tests/qtest/tpm-tis-device-test$(EXESUF): tests/qtest/tpm-tis-device-test.o tests/qtest/tpm-tis-util.o tests/qtest/tpm-emu.o $(test-io-obj-y) - -# QTest rules - -TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) -QTEST_TARGETS = -# The qtests are not runnable (yet) under TSan due to a known issue. -# https://github.com/google/sanitizers/issues/1116 -ifndef CONFIG_TSAN -ifeq ($(CONFIG_POSIX),y) -QTEST_TARGETS = $(TARGETS) -check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y:%=tests/qtest/%$(EXESUF))) -check-qtest-y += $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)) -endif -endif - -qtest-obj-y = tests/qtest/libqtest.o $(test-util-obj-y) -$(check-qtest-y): $(qtest-obj-y) diff --git a/tests/qtest/ac97-test.c b/tests/qtest/ac97-test.c index b084e31bff..e09f2495d2 100644 --- a/tests/qtest/ac97-test.c +++ b/tests/qtest/ac97-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/acpi-utils.h b/tests/qtest/acpi-utils.h index 0c86780689..261784d251 100644 --- a/tests/qtest/acpi-utils.h +++ b/tests/qtest/acpi-utils.h @@ -13,7 +13,7 @@ #ifndef TEST_ACPI_UTILS_H #define TEST_ACPI_UTILS_H -#include "libqtest.h" +#include "libqos/libqtest.h" /* DSDT and SSDTs format */ typedef struct { diff --git a/tests/qtest/ahci-test.c b/tests/qtest/ahci-test.c index c8d42ceea0..ca4294f44f 100644 --- a/tests/qtest/ahci-test.c +++ b/tests/qtest/ahci-test.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/libqos-pc.h" #include "libqos/ahci.h" #include "libqos/pci-pc.h" diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index f7e062c189..77b5e30a9c 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -10,7 +10,7 @@ */ #include "qemu/osdep.h" #include "qemu/bitops.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qjson.h" diff --git a/tests/qtest/boot-order-test.c b/tests/qtest/boot-order-test.c index 2f1c07221c..fac580d6c4 100644 --- a/tests/qtest/boot-order-test.c +++ b/tests/qtest/boot-order-test.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "libqos/fw_cfg.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #include "standard-headers/linux/qemu_fw_cfg.h" diff --git a/tests/qtest/boot-sector.c b/tests/qtest/boot-sector.c index 9e66c6d013..24df5c4734 100644 --- a/tests/qtest/boot-sector.c +++ b/tests/qtest/boot-sector.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "boot-sector.h" #include "qemu-common.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #define LOW(x) ((x) & 0xff) #define HIGH(x) ((x) >> 8) diff --git a/tests/qtest/boot-sector.h b/tests/qtest/boot-sector.h index 6ee6bb4d97..b339fdee4c 100644 --- a/tests/qtest/boot-sector.h +++ b/tests/qtest/boot-sector.h @@ -14,7 +14,7 @@ #ifndef TEST_BOOT_SECTOR_H #define TEST_BOOT_SECTOR_H -#include "libqtest.h" +#include "libqos/libqtest.h" /* Create boot disk file. fname must be a suitable string for mkstemp() */ int boot_sector_init(char *fname); diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index bfe7624dc6..b6b1c23cd0 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -14,7 +14,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/libqos-spapr.h" static const uint8_t bios_avr[] = { diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c index 833a0508a1..e9afab693c 100644 --- a/tests/qtest/cdrom-test.c +++ b/tests/qtest/cdrom-test.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "boot-sector.h" #include "qapi/qmp/qdict.h" diff --git a/tests/qtest/dbus-vmstate-test.c b/tests/qtest/dbus-vmstate-test.c index 2e5e47dec2..aca9b98b7a 100644 --- a/tests/qtest/dbus-vmstate-test.c +++ b/tests/qtest/dbus-vmstate-test.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" #include #include -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu-common.h" #include "dbus-vmstate1.h" #include "migration-helpers.h" diff --git a/tests/qtest/device-introspect-test.c b/tests/qtest/device-introspect-test.c index d68b7856a7..9f22340ee5 100644 --- a/tests/qtest/device-introspect-test.c +++ b/tests/qtest/device-introspect-test.c @@ -22,7 +22,7 @@ #include "qapi/qmp/qstring.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qlist.h" -#include "libqtest.h" +#include "libqos/libqtest.h" const char common_args[] = "-nodefaults -machine none"; diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index 318e422d51..9214892741 100644 --- a/tests/qtest/device-plug-test.c +++ b/tests/qtest/device-plug-test.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qstring.h" diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 5f8839b232..2ab11ad225 100644 --- a/tests/qtest/drive_del-test.c +++ b/tests/qtest/drive_del-test.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/virtio.h" #include "qapi/qmp/qdict.h" diff --git a/tests/qtest/ds1338-test.c b/tests/qtest/ds1338-test.c index f6ade9a050..c5d46bcc64 100644 --- a/tests/qtest/ds1338-test.c +++ b/tests/qtest/ds1338-test.c @@ -18,7 +18,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/i2c.h" #define DS1338_ADDR 0x68 diff --git a/tests/qtest/e1000-test.c b/tests/qtest/e1000-test.c index c387984ef6..ea286d1793 100644 --- a/tests/qtest/e1000-test.c +++ b/tests/qtest/e1000-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/eepro100-test.c b/tests/qtest/eepro100-test.c index 8dbffff0b8..d72ad099f1 100644 --- a/tests/qtest/eepro100-test.c +++ b/tests/qtest/eepro100-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/endianness-test.c b/tests/qtest/endianness-test.c index cc088ac01a..4e79e22c28 100644 --- a/tests/qtest/endianness-test.c +++ b/tests/qtest/endianness-test.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/bswap.h" typedef struct TestCase TestCase; diff --git a/tests/qtest/es1370-test.c b/tests/qtest/es1370-test.c index adccdac1be..2fd7fd2d3d 100644 --- a/tests/qtest/es1370-test.c +++ b/tests/qtest/es1370-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c index 031594a686..1ceea84702 100644 --- a/tests/qtest/fuzz/fuzz.c +++ b/tests/qtest/fuzz/fuzz.c @@ -20,7 +20,7 @@ #include "sysemu/sysemu.h" #include "qemu/main-loop.h" #include "qemu/rcu.h" -#include "tests/qtest/libqtest.h" +#include "tests/qtest/libqos/libqtest.h" #include "tests/qtest/libqos/qgraph.h" #include "fuzz.h" diff --git a/tests/qtest/fuzz/fuzz.h b/tests/qtest/fuzz/fuzz.h index 9ca3d107c5..8eb765edc8 100644 --- a/tests/qtest/fuzz/fuzz.h +++ b/tests/qtest/fuzz/fuzz.h @@ -18,7 +18,7 @@ #include "qemu/units.h" #include "qapi/error.h" -#include "tests/qtest/libqtest.h" +#include "tests/qtest/libqos/libqtest.h" /** * A libfuzzer fuzzing target diff --git a/tests/qtest/fuzz/i440fx_fuzz.c b/tests/qtest/fuzz/i440fx_fuzz.c index bf966d478b..f45373f5d3 100644 --- a/tests/qtest/fuzz/i440fx_fuzz.c +++ b/tests/qtest/fuzz/i440fx_fuzz.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "tests/qtest/libqtest.h" +#include "tests/qtest/libqos/libqtest.h" #include "tests/qtest/libqos/pci.h" #include "tests/qtest/libqos/pci-pc.h" #include "fuzz.h" diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c index d52f3ebd83..b943577b8c 100644 --- a/tests/qtest/fuzz/qos_fuzz.c +++ b/tests/qtest/fuzz/qos_fuzz.c @@ -25,7 +25,7 @@ #include "sysemu/sysemu.h" #include "qemu/main-loop.h" -#include "tests/qtest/libqtest.h" +#include "tests/qtest/libqos/libqtest.h" #include "tests/qtest/libqos/malloc.h" #include "tests/qtest/libqos/qgraph.h" #include "tests/qtest/libqos/qgraph_internal.h" diff --git a/tests/qtest/fuzz/virtio_net_fuzz.c b/tests/qtest/fuzz/virtio_net_fuzz.c index a33bd73067..277a9e2b64 100644 --- a/tests/qtest/fuzz/virtio_net_fuzz.c +++ b/tests/qtest/fuzz/virtio_net_fuzz.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "standard-headers/linux/virtio_config.h" -#include "tests/qtest/libqtest.h" +#include "tests/qtest/libqos/libqtest.h" #include "tests/qtest/libqos/virtio-net.h" #include "fuzz.h" #include "fork_fuzz.h" diff --git a/tests/qtest/fw_cfg-test.c b/tests/qtest/fw_cfg-test.c index 5dc807ba23..95b3907c18 100644 --- a/tests/qtest/fw_cfg-test.c +++ b/tests/qtest/fw_cfg-test.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "standard-headers/linux/qemu_fw_cfg.h" #include "libqos/fw_cfg.h" #include "qemu/bswap.h" diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 48e8e02d6e..f7b7cfbc2d 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -19,7 +19,7 @@ #include "qemu-common.h" #include "qemu/bswap.h" #include "qapi/qmp/qlist.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/fw_cfg.h" #include "libqos/libqos.h" #include "standard-headers/linux/qemu_fw_cfg.h" diff --git a/tests/qtest/hexloader-test.c b/tests/qtest/hexloader-test.c index 8b7aa2d72d..561502052a 100644 --- a/tests/qtest/hexloader-test.c +++ b/tests/qtest/hexloader-test.c @@ -10,7 +10,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" /* Load 'test.hex' and verify that the in-memory contents are as expected. * 'test.hex' is a memory test pattern stored in Hexadecimal Object diff --git a/tests/qtest/ide-test.c b/tests/qtest/ide-test.c index 5cfd97f915..3f8081e77d 100644 --- a/tests/qtest/ide-test.c +++ b/tests/qtest/ide-test.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/libqos.h" #include "libqos/pci-pc.h" #include "libqos/malloc-pc.h" diff --git a/tests/qtest/ipoctal232-test.c b/tests/qtest/ipoctal232-test.c index 53a8c9b13c..65ce10b81b 100644 --- a/tests/qtest/ipoctal232-test.c +++ b/tests/qtest/ipoctal232-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index ecda256472..d5c8b9f128 100644 --- a/tests/qtest/ivshmem-test.c +++ b/tests/qtest/ivshmem-test.c @@ -13,7 +13,7 @@ #include "contrib/ivshmem-server/ivshmem-server.h" #include "libqos/libqos-pc.h" #include "libqos/libqos-spapr.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu-common.h" #define TMPSHMSIZE (1 << 20) diff --git a/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c b/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c index 8f827aeb52..79631cc7a9 100644 --- a/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c +++ b/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" +#include "malloc.h" +#include "qgraph.h" #include "sdhci.h" typedef struct QXlnxZCU102Machine QXlnxZCU102Machine; diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c index cc1b08eabe..2946abc15a 100644 --- a/tests/qtest/libqos/ahci.c +++ b/tests/qtest/libqos/ahci.c @@ -25,8 +25,8 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/ahci.h" -#include "libqos/pci-pc.h" +#include "ahci.h" +#include "pci-pc.h" #include "qemu-common.h" #include "qemu/host-utils.h" @@ -579,7 +579,7 @@ void ahci_write_fis(AHCIQState *ahci, AHCICommand *cmd) /* NCQ commands use exclusively 8 bit fields and needs no adjustment. * Only the count field needs to be adjusted for non-NCQ commands. * The auxiliary FIS fields are defined per-command and are not currently - * implemented in libqos/ahci.o, but may or may not need to be flipped. */ + * implemented in ahci.o, but may or may not need to be flipped. */ if (!cmd->props->ncq) { tmp.count = cpu_to_le16(tmp.count); } diff --git a/tests/qtest/libqos/ahci.h b/tests/qtest/libqos/ahci.h index 44ab1104b5..88835b6228 100644 --- a/tests/qtest/libqos/ahci.h +++ b/tests/qtest/libqos/ahci.h @@ -25,9 +25,9 @@ * THE SOFTWARE. */ -#include "libqos/libqos.h" -#include "libqos/pci.h" -#include "libqos/malloc-pc.h" +#include "libqos.h" +#include "pci.h" +#include "malloc-pc.h" /*** Supplementary PCI Config Space IDs & Masks ***/ #define PCI_DEVICE_ID_INTEL_Q35_AHCI (0x2922) diff --git a/tests/qtest/libqos/arm-imx25-pdk-machine.c b/tests/qtest/libqos/arm-imx25-pdk-machine.c index 0da3f19c0e..6692adfa4f 100644 --- a/tests/qtest/libqos/arm-imx25-pdk-machine.c +++ b/tests/qtest/libqos/arm-imx25-pdk-machine.c @@ -20,9 +20,9 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" -#include "libqos/i2c.h" +#include "malloc.h" +#include "qgraph.h" +#include "i2c.h" #define ARM_PAGE_SIZE 4096 #define IMX25_PDK_RAM_START 0x80000000 diff --git a/tests/qtest/libqos/arm-n800-machine.c b/tests/qtest/libqos/arm-n800-machine.c index 35f82070fa..ff2049c3a7 100644 --- a/tests/qtest/libqos/arm-n800-machine.c +++ b/tests/qtest/libqos/arm-n800-machine.c @@ -20,9 +20,9 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" -#include "libqos/i2c.h" +#include "malloc.h" +#include "qgraph.h" +#include "i2c.h" #define ARM_PAGE_SIZE 4096 #define N800_RAM_START 0x80000000 diff --git a/tests/qtest/libqos/arm-raspi2-machine.c b/tests/qtest/libqos/arm-raspi2-machine.c index 8480d80669..35bb4709a4 100644 --- a/tests/qtest/libqos/arm-raspi2-machine.c +++ b/tests/qtest/libqos/arm-raspi2-machine.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" +#include "malloc.h" +#include "qgraph.h" #include "sdhci.h" #define ARM_PAGE_SIZE 4096 diff --git a/tests/qtest/libqos/arm-sabrelite-machine.c b/tests/qtest/libqos/arm-sabrelite-machine.c index f6e403b538..72425f0ad4 100644 --- a/tests/qtest/libqos/arm-sabrelite-machine.c +++ b/tests/qtest/libqos/arm-sabrelite-machine.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" +#include "malloc.h" +#include "qgraph.h" #include "sdhci.h" #define ARM_PAGE_SIZE 4096 diff --git a/tests/qtest/libqos/arm-smdkc210-machine.c b/tests/qtest/libqos/arm-smdkc210-machine.c index eebac7feeb..321b8826d4 100644 --- a/tests/qtest/libqos/arm-smdkc210-machine.c +++ b/tests/qtest/libqos/arm-smdkc210-machine.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" +#include "malloc.h" +#include "qgraph.h" #include "sdhci.h" #define ARM_PAGE_SIZE 4096 diff --git a/tests/qtest/libqos/arm-virt-machine.c b/tests/qtest/libqos/arm-virt-machine.c index 9316598f9e..e0f5932284 100644 --- a/tests/qtest/libqos/arm-virt-machine.c +++ b/tests/qtest/libqos/arm-virt-machine.c @@ -19,9 +19,9 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" -#include "libqos/virtio-mmio.h" +#include "malloc.h" +#include "qgraph.h" +#include "virtio-mmio.h" #define ARM_PAGE_SIZE 4096 #define VIRTIO_MMIO_BASE_ADDR 0x0A003E00 diff --git a/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c b/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c index 473acce993..56e53c745b 100644 --- a/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c +++ b/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" +#include "malloc.h" +#include "qgraph.h" #include "sdhci.h" typedef struct QXilinxZynqA9Machine QXilinxZynqA9Machine; diff --git a/tests/qtest/libqos/e1000e.c b/tests/qtest/libqos/e1000e.c index e2927ed2da..a451f6168f 100644 --- a/tests/qtest/libqos/e1000e.c +++ b/tests/qtest/libqos/e1000e.c @@ -18,13 +18,13 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/pci-pc.h" +#include "pci-pc.h" #include "qemu/sockets.h" #include "qemu/iov.h" #include "qemu/module.h" #include "qemu/bitops.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" +#include "malloc.h" +#include "qgraph.h" #include "e1000e.h" #define E1000E_IMS (0x00d0) diff --git a/tests/qtest/libqos/e1000e.h b/tests/qtest/libqos/e1000e.h index 35183b2875..a22f5fdbad 100644 --- a/tests/qtest/libqos/e1000e.h +++ b/tests/qtest/libqos/e1000e.h @@ -19,7 +19,7 @@ #ifndef QGRAPH_E1000E_H #define QGRAPH_E1000E_H -#include "libqos/qgraph.h" +#include "qgraph.h" #include "pci.h" #define E1000E_RX0_MSG_ID (0) diff --git a/tests/qtest/libqos/fw_cfg.c b/tests/qtest/libqos/fw_cfg.c index 1f46258f96..6b8e1babe5 100644 --- a/tests/qtest/libqos/fw_cfg.c +++ b/tests/qtest/libqos/fw_cfg.c @@ -13,7 +13,7 @@ */ #include "qemu/osdep.h" -#include "libqos/fw_cfg.h" +#include "fw_cfg.h" #include "libqtest.h" #include "qemu/bswap.h" #include "hw/nvram/fw_cfg.h" diff --git a/tests/qtest/libqos/i2c-imx.c b/tests/qtest/libqos/i2c-imx.c index f33ece55a3..8f9a7e3831 100644 --- a/tests/qtest/libqos/i2c-imx.c +++ b/tests/qtest/libqos/i2c-imx.c @@ -18,7 +18,7 @@ */ #include "qemu/osdep.h" -#include "libqos/i2c.h" +#include "i2c.h" #include "libqtest.h" diff --git a/tests/qtest/libqos/i2c-omap.c b/tests/qtest/libqos/i2c-omap.c index 9ae8214fa8..eb4e453485 100644 --- a/tests/qtest/libqos/i2c-omap.c +++ b/tests/qtest/libqos/i2c-omap.c @@ -7,7 +7,7 @@ * See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" -#include "libqos/i2c.h" +#include "i2c.h" #include "qemu/bswap.h" diff --git a/tests/qtest/libqos/i2c.c b/tests/qtest/libqos/i2c.c index 38f800dbab..ade1bdb40e 100644 --- a/tests/qtest/libqos/i2c.c +++ b/tests/qtest/libqos/i2c.c @@ -7,7 +7,7 @@ * See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" -#include "libqos/i2c.h" +#include "i2c.h" #include "libqtest.h" void qi2c_send(QI2CDevice *i2cdev, const uint8_t *buf, uint16_t len) diff --git a/tests/qtest/libqos/i2c.h b/tests/qtest/libqos/i2c.h index c65f087834..1341bac1c5 100644 --- a/tests/qtest/libqos/i2c.h +++ b/tests/qtest/libqos/i2c.h @@ -10,7 +10,7 @@ #define LIBQOS_I2C_H #include "libqtest.h" -#include "libqos/qgraph.h" +#include "qgraph.h" typedef struct I2CAdapter I2CAdapter; struct I2CAdapter { diff --git a/tests/qtest/libqos/libqos-pc.c b/tests/qtest/libqos/libqos-pc.c index d04abc548b..db420a596e 100644 --- a/tests/qtest/libqos/libqos-pc.c +++ b/tests/qtest/libqos/libqos-pc.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" -#include "libqos/libqos-pc.h" -#include "libqos/malloc-pc.h" -#include "libqos/pci-pc.h" +#include "libqos-pc.h" +#include "malloc-pc.h" +#include "pci-pc.h" static QOSOps qos_ops = { .alloc_init = pc_alloc_init, diff --git a/tests/qtest/libqos/libqos-pc.h b/tests/qtest/libqos/libqos-pc.h index a0e4c45516..1a9923ead4 100644 --- a/tests/qtest/libqos/libqos-pc.h +++ b/tests/qtest/libqos/libqos-pc.h @@ -1,7 +1,7 @@ #ifndef LIBQOS_PC_H #define LIBQOS_PC_H -#include "libqos/libqos.h" +#include "libqos.h" QOSState *qtest_pc_vboot(const char *cmdline_fmt, va_list ap); QOSState *qtest_pc_boot(const char *cmdline_fmt, ...); diff --git a/tests/qtest/libqos/libqos-spapr.c b/tests/qtest/libqos/libqos-spapr.c index 8766d543ce..db0e87ba5c 100644 --- a/tests/qtest/libqos/libqos-spapr.c +++ b/tests/qtest/libqos/libqos-spapr.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" -#include "libqos/libqos-spapr.h" -#include "libqos/malloc-spapr.h" -#include "libqos/pci-spapr.h" +#include "libqos-spapr.h" +#include "malloc-spapr.h" +#include "pci-spapr.h" static QOSOps qos_ops = { .alloc_init = spapr_alloc_init, diff --git a/tests/qtest/libqos/libqos-spapr.h b/tests/qtest/libqos/libqos-spapr.h index 49bd72d20b..c61338917a 100644 --- a/tests/qtest/libqos/libqos-spapr.h +++ b/tests/qtest/libqos/libqos-spapr.h @@ -1,7 +1,7 @@ #ifndef LIBQOS_SPAPR_H #define LIBQOS_SPAPR_H -#include "libqos/libqos.h" +#include "libqos.h" QOSState *qtest_spapr_vboot(const char *cmdline_fmt, va_list ap); QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...); diff --git a/tests/qtest/libqos/libqos.c b/tests/qtest/libqos/libqos.c index f229eb2cb8..2251e864ef 100644 --- a/tests/qtest/libqos/libqos.c +++ b/tests/qtest/libqos/libqos.c @@ -2,8 +2,8 @@ #include #include "libqtest.h" -#include "libqos/libqos.h" -#include "libqos/pci.h" +#include "libqos.h" +#include "pci.h" #include "qapi/qmp/qdict.h" /*** Test Setup & Teardown ***/ diff --git a/tests/qtest/libqos/libqos.h b/tests/qtest/libqos/libqos.h index 8e971c25a3..e0b2bfe7ca 100644 --- a/tests/qtest/libqos/libqos.h +++ b/tests/qtest/libqos/libqos.h @@ -2,8 +2,8 @@ #define LIBQOS_H #include "libqtest.h" -#include "libqos/pci.h" -#include "libqos/malloc.h" +#include "pci.h" +#include "malloc.h" typedef struct QOSState QOSState; diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqos/libqtest.h similarity index 100% rename from tests/qtest/libqtest.h rename to tests/qtest/libqos/libqtest.h diff --git a/tests/qtest/libqos/malloc-pc.c b/tests/qtest/libqos/malloc-pc.c index 6f92ce4135..16ff9609cc 100644 --- a/tests/qtest/libqos/malloc-pc.c +++ b/tests/qtest/libqos/malloc-pc.c @@ -11,8 +11,8 @@ */ #include "qemu/osdep.h" -#include "libqos/malloc-pc.h" -#include "libqos/fw_cfg.h" +#include "malloc-pc.h" +#include "fw_cfg.h" #include "standard-headers/linux/qemu_fw_cfg.h" diff --git a/tests/qtest/libqos/malloc-pc.h b/tests/qtest/libqos/malloc-pc.h index 21e75ae004..d8d79853c8 100644 --- a/tests/qtest/libqos/malloc-pc.h +++ b/tests/qtest/libqos/malloc-pc.h @@ -13,7 +13,7 @@ #ifndef LIBQOS_MALLOC_PC_H #define LIBQOS_MALLOC_PC_H -#include "libqos/malloc.h" +#include "malloc.h" void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags); diff --git a/tests/qtest/libqos/malloc-spapr.c b/tests/qtest/libqos/malloc-spapr.c index 2a6b7e3776..84862e4876 100644 --- a/tests/qtest/libqos/malloc-spapr.c +++ b/tests/qtest/libqos/malloc-spapr.c @@ -6,7 +6,7 @@ */ #include "qemu/osdep.h" -#include "libqos/malloc-spapr.h" +#include "malloc-spapr.h" #include "qemu-common.h" diff --git a/tests/qtest/libqos/malloc-spapr.h b/tests/qtest/libqos/malloc-spapr.h index e5fe9bfc4b..f99572fd71 100644 --- a/tests/qtest/libqos/malloc-spapr.h +++ b/tests/qtest/libqos/malloc-spapr.h @@ -8,7 +8,7 @@ #ifndef LIBQOS_MALLOC_SPAPR_H #define LIBQOS_MALLOC_SPAPR_H -#include "libqos/malloc.h" +#include "malloc.h" void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags); diff --git a/tests/qtest/libqos/malloc.c b/tests/qtest/libqos/malloc.c index 615422a5c4..f708b01432 100644 --- a/tests/qtest/libqos/malloc.c +++ b/tests/qtest/libqos/malloc.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "libqos/malloc.h" +#include "malloc.h" #include "qemu-common.h" #include "qemu/host-utils.h" diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build new file mode 100644 index 0000000000..19931b9248 --- /dev/null +++ b/tests/qtest/libqos/meson.build @@ -0,0 +1,57 @@ +libqos = static_library('qos', + files('../libqtest.c', + 'qgraph.c', + 'qos_external.c', + 'pci.c', + 'fw_cfg.c', + 'malloc.c', + 'libqos.c', + + # spapr + 'malloc-spapr.c', + 'libqos-spapr.c', + 'rtas.c', + 'pci-spapr.c', + + # pc + 'pci-pc.c', + 'malloc-pc.c', + 'libqos-pc.c', + 'ahci.c', + + # usb + 'usb.c', + + # qgraph devices: + 'e1000e.c', + 'i2c.c', + 'i2c-imx.c', + 'i2c-omap.c', + 'sdhci.c', + 'tpci200.c', + 'virtio.c', + 'virtio-9p.c', + 'virtio-balloon.c', + 'virtio-blk.c', + 'virtio-mmio.c', + 'virtio-net.c', + 'virtio-pci.c', + 'virtio-pci-modern.c', + 'virtio-rng.c', + 'virtio-scsi.c', + 'virtio-serial.c', + + # qgraph machines: + 'aarch64-xlnx-zcu102-machine.c', + 'arm-imx25-pdk-machine.c', + 'arm-n800-machine.c', + 'arm-raspi2-machine.c', + 'arm-sabrelite-machine.c', + 'arm-smdkc210-machine.c', + 'arm-virt-machine.c', + 'arm-xilinx-zynq-a9-machine.c', + 'ppc64_pseries-machine.c', + 'x86_64_pc-machine.c', +), build_by_default: false) + +qos = declare_dependency(link_whole: libqos) diff --git a/tests/qtest/libqos/pci-pc.c b/tests/qtest/libqos/pci-pc.c index 3bb2eb3ba8..f97844289f 100644 --- a/tests/qtest/libqos/pci-pc.c +++ b/tests/qtest/libqos/pci-pc.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/pci-pc.h" +#include "pci-pc.h" #include "qapi/qmp/qdict.h" #include "hw/pci/pci_regs.h" diff --git a/tests/qtest/libqos/pci-pc.h b/tests/qtest/libqos/pci-pc.h index 4690005232..49ec9507f2 100644 --- a/tests/qtest/libqos/pci-pc.h +++ b/tests/qtest/libqos/pci-pc.h @@ -13,9 +13,9 @@ #ifndef LIBQOS_PCI_PC_H #define LIBQOS_PCI_PC_H -#include "libqos/pci.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" +#include "pci.h" +#include "malloc.h" +#include "qgraph.h" typedef struct QPCIBusPC { QOSGraphObject obj; diff --git a/tests/qtest/libqos/pci-spapr.c b/tests/qtest/libqos/pci-spapr.c index d6f8c01cb7..262226985f 100644 --- a/tests/qtest/libqos/pci-spapr.c +++ b/tests/qtest/libqos/pci-spapr.c @@ -7,9 +7,9 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/pci-spapr.h" -#include "libqos/rtas.h" -#include "libqos/qgraph.h" +#include "pci-spapr.h" +#include "rtas.h" +#include "qgraph.h" #include "hw/pci/pci_regs.h" diff --git a/tests/qtest/libqos/pci-spapr.h b/tests/qtest/libqos/pci-spapr.h index d9e25631c6..20a43718b7 100644 --- a/tests/qtest/libqos/pci-spapr.h +++ b/tests/qtest/libqos/pci-spapr.h @@ -8,9 +8,9 @@ #ifndef LIBQOS_PCI_SPAPR_H #define LIBQOS_PCI_SPAPR_H -#include "libqos/malloc.h" -#include "libqos/pci.h" -#include "libqos/qgraph.h" +#include "malloc.h" +#include "pci.h" +#include "qgraph.h" /* From include/hw/pci-host/spapr.h */ diff --git a/tests/qtest/libqos/pci.c b/tests/qtest/libqos/pci.c index 2309a724e4..e1e96189c8 100644 --- a/tests/qtest/libqos/pci.c +++ b/tests/qtest/libqos/pci.c @@ -11,11 +11,11 @@ */ #include "qemu/osdep.h" -#include "libqos/pci.h" +#include "pci.h" #include "hw/pci/pci_regs.h" #include "qemu/host-utils.h" -#include "libqos/qgraph.h" +#include "qgraph.h" void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id, void (*func)(QPCIDevice *dev, int devfn, void *data), diff --git a/tests/qtest/libqos/pci.h b/tests/qtest/libqos/pci.h index 590c175190..ee64fdecbd 100644 --- a/tests/qtest/libqos/pci.h +++ b/tests/qtest/libqos/pci.h @@ -14,7 +14,7 @@ #define LIBQOS_PCI_H #include "libqtest.h" -#include "libqos/qgraph.h" +#include "qgraph.h" #define QPCI_PIO_LIMIT 0x10000 diff --git a/tests/qtest/libqos/ppc64_pseries-machine.c b/tests/qtest/libqos/ppc64_pseries-machine.c index 5d7bd88f2f..24ca179976 100644 --- a/tests/qtest/libqos/ppc64_pseries-machine.c +++ b/tests/qtest/libqos/ppc64_pseries-machine.c @@ -18,10 +18,10 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/qgraph.h" +#include "qgraph.h" #include "pci-spapr.h" #include "qemu/module.h" -#include "libqos/malloc-spapr.h" +#include "malloc-spapr.h" typedef struct QSPAPR_pci_host QSPAPR_pci_host; typedef struct Qppc64_pseriesMachine Qppc64_pseriesMachine; diff --git a/tests/qtest/libqos/qgraph.c b/tests/qtest/libqos/qgraph.c index eb0af8ab4a..fc49cfa879 100644 --- a/tests/qtest/libqos/qgraph.c +++ b/tests/qtest/libqos/qgraph.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/queue.h" -#include "libqos/qgraph_internal.h" -#include "libqos/qgraph.h" +#include "qgraph_internal.h" +#include "qgraph.h" #define QGRAPH_PRINT_DEBUG 0 #define QOS_ROOT "" diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h index db1244eb59..10543269ce 100644 --- a/tests/qtest/libqos/qgraph.h +++ b/tests/qtest/libqos/qgraph.h @@ -106,7 +106,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg); * * Creating new driver an its interface * - #include "libqos/qgraph.h" + #include "qgraph.h" struct My_driver { QOSGraphObject obj; @@ -190,7 +190,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg); * * Creating new test * - * #include "libqos/qgraph.h" + * #include "qgraph.h" * * static void my_test_function(void *obj, void *data) * { @@ -230,7 +230,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg); * a valid test path will be: * "/x86_64/pc/other_node/my_driver/my_interface/my_test". * - * Additional examples are also in libqos/test-qgraph.c + * Additional examples are also in test-qgraph.c * * Command line: * Command line is built by using node names and optional arguments diff --git a/tests/qtest/libqos/qgraph_internal.h b/tests/qtest/libqos/qgraph_internal.h index aa3123f0f2..968fa69450 100644 --- a/tests/qtest/libqos/qgraph_internal.h +++ b/tests/qtest/libqos/qgraph_internal.h @@ -20,11 +20,11 @@ #define QGRAPH_INTERNAL_H /* This header is declaring additional helper functions defined in - * libqos/qgraph.c + * qgraph.c * It should not be included in tests */ -#include "libqos/qgraph.h" +#include "qgraph.h" typedef struct QOSGraphMachine QOSGraphMachine; typedef enum QOSEdgeType QOSEdgeType; diff --git a/tests/qtest/libqos/qos_external.c b/tests/qtest/libqos/qos_external.c index 0dfc05cfb6..10ee0f75b2 100644 --- a/tests/qtest/libqos/qos_external.c +++ b/tests/qtest/libqos/qos_external.c @@ -24,10 +24,10 @@ #include "qapi/qmp/qstring.h" #include "qemu/module.h" #include "qapi/qmp/qlist.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" -#include "libqos/qgraph_internal.h" -#include "libqos/qos_external.h" +#include "malloc.h" +#include "qgraph.h" +#include "qgraph_internal.h" +#include "qos_external.h" static void machine_apply_to_node(const char *name) { diff --git a/tests/qtest/libqos/qos_external.h b/tests/qtest/libqos/qos_external.h index 56a2f37fde..8446e3df0b 100644 --- a/tests/qtest/libqos/qos_external.h +++ b/tests/qtest/libqos/qos_external.h @@ -19,7 +19,9 @@ #ifndef QOS_EXTERNAL_H #define QOS_EXTERNAL_H -#include "libqos/malloc.h" +#include "qgraph.h" + +#include "malloc.h" #include "qapi/qapi-types-machine.h" #include "qapi/qapi-types-qom.h" diff --git a/tests/qtest/libqos/rtas.c b/tests/qtest/libqos/rtas.c index d81ff4274d..db29d5554d 100644 --- a/tests/qtest/libqos/rtas.c +++ b/tests/qtest/libqos/rtas.c @@ -5,7 +5,7 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/rtas.h" +#include "rtas.h" static void qrtas_copy_args(QTestState *qts, uint64_t target_args, uint32_t nargs, uint32_t *args) diff --git a/tests/qtest/libqos/rtas.h b/tests/qtest/libqos/rtas.h index 459e23aaf4..f38f99dfab 100644 --- a/tests/qtest/libqos/rtas.h +++ b/tests/qtest/libqos/rtas.h @@ -5,7 +5,7 @@ #ifndef LIBQOS_RTAS_H #define LIBQOS_RTAS_H -#include "libqos/malloc.h" +#include "malloc.h" int qrtas_get_time_of_day(QTestState *qts, QGuestAllocator *alloc, struct tm *tm, uint32_t *ns); diff --git a/tests/qtest/libqos/sdhci.c b/tests/qtest/libqos/sdhci.c index fbf2e36aec..65f0d07fc5 100644 --- a/tests/qtest/libqos/sdhci.c +++ b/tests/qtest/libqos/sdhci.c @@ -18,7 +18,7 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/qgraph.h" +#include "qgraph.h" #include "pci.h" #include "qemu/module.h" #include "sdhci.h" diff --git a/tests/qtest/libqos/sdhci.h b/tests/qtest/libqos/sdhci.h index 1acd3096e2..22d647b1fd 100644 --- a/tests/qtest/libqos/sdhci.h +++ b/tests/qtest/libqos/sdhci.h @@ -19,7 +19,7 @@ #ifndef QGRAPH_QSDHCI_H #define QGRAPH_QSDHCI_H -#include "libqos/qgraph.h" +#include "qgraph.h" #include "pci.h" typedef struct QSDHCI QSDHCI; diff --git a/tests/qtest/libqos/tpci200.c b/tests/qtest/libqos/tpci200.c index ae590a456e..1787b1f188 100644 --- a/tests/qtest/libqos/tpci200.c +++ b/tests/qtest/libqos/tpci200.c @@ -10,8 +10,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/qgraph.h" -#include "libqos/pci.h" +#include "qgraph.h" +#include "pci.h" typedef struct QTpci200 QTpci200; typedef struct QIpack QIpack; diff --git a/tests/qtest/libqos/usb.c b/tests/qtest/libqos/usb.c index d7a9cb3c72..8b45b02984 100644 --- a/tests/qtest/libqos/usb.c +++ b/tests/qtest/libqos/usb.c @@ -14,7 +14,7 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "hw/usb/uhci-regs.h" -#include "libqos/usb.h" +#include "usb.h" void qusb_pci_init_one(QPCIBus *pcibus, struct qhc *hc, uint32_t devfn, int bar) { diff --git a/tests/qtest/libqos/usb.h b/tests/qtest/libqos/usb.h index eeced39a2f..50030d7fb1 100644 --- a/tests/qtest/libqos/usb.h +++ b/tests/qtest/libqos/usb.h @@ -1,7 +1,7 @@ #ifndef LIBQOS_USB_H #define LIBQOS_USB_H -#include "libqos/pci-pc.h" +#include "pci-pc.h" struct qhc { QPCIDevice *dev; diff --git a/tests/qtest/libqos/virtio-9p.c b/tests/qtest/libqos/virtio-9p.c index c87b56132a..2e300063e3 100644 --- a/tests/qtest/libqos/virtio-9p.c +++ b/tests/qtest/libqos/virtio-9p.c @@ -20,8 +20,8 @@ #include "libqtest.h" #include "qemu/module.h" #include "standard-headers/linux/virtio_ids.h" -#include "libqos/virtio-9p.h" -#include "libqos/qgraph.h" +#include "virtio-9p.h" +#include "qgraph.h" static QGuestAllocator *alloc; diff --git a/tests/qtest/libqos/virtio-9p.h b/tests/qtest/libqos/virtio-9p.h index be9621a5e3..b1e6badc4a 100644 --- a/tests/qtest/libqos/virtio-9p.h +++ b/tests/qtest/libqos/virtio-9p.h @@ -19,9 +19,9 @@ #ifndef TESTS_LIBQOS_VIRTIO_9P_H #define TESTS_LIBQOS_VIRTIO_9P_H -#include "libqos/qgraph.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" +#include "qgraph.h" +#include "virtio.h" +#include "virtio-pci.h" typedef struct QVirtio9P QVirtio9P; typedef struct QVirtio9PPCI QVirtio9PPCI; diff --git a/tests/qtest/libqos/virtio-balloon.c b/tests/qtest/libqos/virtio-balloon.c index 9745f4a83c..a3da5c234d 100644 --- a/tests/qtest/libqos/virtio-balloon.c +++ b/tests/qtest/libqos/virtio-balloon.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/qgraph.h" -#include "libqos/virtio-balloon.h" +#include "qgraph.h" +#include "virtio-balloon.h" /* virtio-balloon-device */ static void *qvirtio_balloon_get_driver(QVirtioBalloon *v_balloon, diff --git a/tests/qtest/libqos/virtio-balloon.h b/tests/qtest/libqos/virtio-balloon.h index 5b919303a6..309894c338 100644 --- a/tests/qtest/libqos/virtio-balloon.h +++ b/tests/qtest/libqos/virtio-balloon.h @@ -19,9 +19,9 @@ #ifndef TESTS_LIBQOS_VIRTIO_BALLOON_H #define TESTS_LIBQOS_VIRTIO_BALLOON_H -#include "libqos/qgraph.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" +#include "qgraph.h" +#include "virtio.h" +#include "virtio-pci.h" typedef struct QVirtioBalloon QVirtioBalloon; typedef struct QVirtioBalloonPCI QVirtioBalloonPCI; diff --git a/tests/qtest/libqos/virtio-blk.c b/tests/qtest/libqos/virtio-blk.c index 5fc69401be..5da02591bc 100644 --- a/tests/qtest/libqos/virtio-blk.c +++ b/tests/qtest/libqos/virtio-blk.c @@ -20,8 +20,8 @@ #include "libqtest.h" #include "qemu/module.h" #include "standard-headers/linux/virtio_blk.h" -#include "libqos/qgraph.h" -#include "libqos/virtio-blk.h" +#include "qgraph.h" +#include "virtio-blk.h" #define PCI_SLOT 0x04 #define PCI_FN 0x00 diff --git a/tests/qtest/libqos/virtio-blk.h b/tests/qtest/libqos/virtio-blk.h index 5170f13cfe..dcef38851e 100644 --- a/tests/qtest/libqos/virtio-blk.h +++ b/tests/qtest/libqos/virtio-blk.h @@ -19,9 +19,9 @@ #ifndef TESTS_LIBQOS_VIRTIO_BLK_H #define TESTS_LIBQOS_VIRTIO_BLK_H -#include "libqos/qgraph.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" +#include "qgraph.h" +#include "virtio.h" +#include "virtio-pci.h" typedef struct QVirtioBlk QVirtioBlk; typedef struct QVirtioBlkPCI QVirtioBlkPCI; diff --git a/tests/qtest/libqos/virtio-mmio.c b/tests/qtest/libqos/virtio-mmio.c index e0a2bd7bc6..75efda3029 100644 --- a/tests/qtest/libqos/virtio-mmio.c +++ b/tests/qtest/libqos/virtio-mmio.c @@ -10,10 +10,10 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/virtio.h" -#include "libqos/virtio-mmio.h" -#include "libqos/malloc.h" -#include "libqos/qgraph.h" +#include "virtio.h" +#include "virtio-mmio.h" +#include "malloc.h" +#include "qgraph.h" #include "standard-headers/linux/virtio_ring.h" static uint8_t qvirtio_mmio_config_readb(QVirtioDevice *d, uint64_t off) diff --git a/tests/qtest/libqos/virtio-mmio.h b/tests/qtest/libqos/virtio-mmio.h index 0e45778b07..30803bc91c 100644 --- a/tests/qtest/libqos/virtio-mmio.h +++ b/tests/qtest/libqos/virtio-mmio.h @@ -10,8 +10,8 @@ #ifndef LIBQOS_VIRTIO_MMIO_H #define LIBQOS_VIRTIO_MMIO_H -#include "libqos/virtio.h" -#include "libqos/qgraph.h" +#include "virtio.h" +#include "qgraph.h" #define QVIRTIO_MMIO_MAGIC_VALUE 0x000 #define QVIRTIO_MMIO_VERSION 0x004 diff --git a/tests/qtest/libqos/virtio-net.c b/tests/qtest/libqos/virtio-net.c index a9e253afe4..1cae07f60d 100644 --- a/tests/qtest/libqos/virtio-net.c +++ b/tests/qtest/libqos/virtio-net.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/qgraph.h" -#include "libqos/virtio-net.h" +#include "qgraph.h" +#include "virtio-net.h" #include "hw/virtio/virtio-net.h" diff --git a/tests/qtest/libqos/virtio-net.h b/tests/qtest/libqos/virtio-net.h index b8cbec04af..5ba2161de2 100644 --- a/tests/qtest/libqos/virtio-net.h +++ b/tests/qtest/libqos/virtio-net.h @@ -19,9 +19,9 @@ #ifndef TESTS_LIBQOS_VIRTIO_NET_H #define TESTS_LIBQOS_VIRTIO_NET_H -#include "libqos/qgraph.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" +#include "qgraph.h" +#include "virtio.h" +#include "virtio-pci.h" typedef struct QVirtioNet QVirtioNet; typedef struct QVirtioNetPCI QVirtioNetPCI; diff --git a/tests/qtest/libqos/virtio-pci.c b/tests/qtest/libqos/virtio-pci.c index 62851c29bb..cd3c0f5bf3 100644 --- a/tests/qtest/libqos/virtio-pci.c +++ b/tests/qtest/libqos/virtio-pci.c @@ -9,13 +9,13 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" -#include "libqos/pci.h" -#include "libqos/pci-pc.h" -#include "libqos/malloc.h" -#include "libqos/malloc-pc.h" -#include "libqos/qgraph.h" +#include "virtio.h" +#include "virtio-pci.h" +#include "pci.h" +#include "pci-pc.h" +#include "malloc.h" +#include "malloc-pc.h" +#include "qgraph.h" #include "standard-headers/linux/virtio_ring.h" #include "standard-headers/linux/virtio_pci.h" diff --git a/tests/qtest/libqos/virtio-pci.h b/tests/qtest/libqos/virtio-pci.h index 294d5567ee..f5115cacba 100644 --- a/tests/qtest/libqos/virtio-pci.h +++ b/tests/qtest/libqos/virtio-pci.h @@ -10,9 +10,9 @@ #ifndef LIBQOS_VIRTIO_PCI_H #define LIBQOS_VIRTIO_PCI_H -#include "libqos/virtio.h" -#include "libqos/pci.h" -#include "libqos/qgraph.h" +#include "virtio.h" +#include "pci.h" +#include "qgraph.h" typedef struct QVirtioPCIMSIXOps QVirtioPCIMSIXOps; diff --git a/tests/qtest/libqos/virtio-rng.c b/tests/qtest/libqos/virtio-rng.c index 46f8d95b1f..2e09dd7c48 100644 --- a/tests/qtest/libqos/virtio-rng.c +++ b/tests/qtest/libqos/virtio-rng.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/qgraph.h" -#include "libqos/virtio-rng.h" +#include "qgraph.h" +#include "virtio-rng.h" /* virtio-rng-device */ static void *qvirtio_rng_get_driver(QVirtioRng *v_rng, diff --git a/tests/qtest/libqos/virtio-rng.h b/tests/qtest/libqos/virtio-rng.h index 9342372efa..9ca102b599 100644 --- a/tests/qtest/libqos/virtio-rng.h +++ b/tests/qtest/libqos/virtio-rng.h @@ -19,9 +19,9 @@ #ifndef TESTS_LIBQOS_VIRTIO_RNG_H #define TESTS_LIBQOS_VIRTIO_RNG_H -#include "libqos/qgraph.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" +#include "qgraph.h" +#include "virtio.h" +#include "virtio-pci.h" typedef struct QVirtioRng QVirtioRng; typedef struct QVirtioRngPCI QVirtioRngPCI; diff --git a/tests/qtest/libqos/virtio-scsi.c b/tests/qtest/libqos/virtio-scsi.c index c8c3598428..5644e32fc3 100644 --- a/tests/qtest/libqos/virtio-scsi.c +++ b/tests/qtest/libqos/virtio-scsi.c @@ -20,8 +20,8 @@ #include "libqtest.h" #include "qemu/module.h" #include "standard-headers/linux/virtio_ids.h" -#include "libqos/qgraph.h" -#include "libqos/virtio-scsi.h" +#include "qgraph.h" +#include "virtio-scsi.h" /* virtio-scsi-device */ static void *qvirtio_scsi_get_driver(QVirtioSCSI *v_scsi, diff --git a/tests/qtest/libqos/virtio-scsi.h b/tests/qtest/libqos/virtio-scsi.h index 9e3774d99a..531315e6ad 100644 --- a/tests/qtest/libqos/virtio-scsi.h +++ b/tests/qtest/libqos/virtio-scsi.h @@ -19,9 +19,9 @@ #ifndef TESTS_LIBQOS_VIRTIO_SCSI_H #define TESTS_LIBQOS_VIRTIO_SCSI_H -#include "libqos/qgraph.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" +#include "qgraph.h" +#include "virtio.h" +#include "virtio-pci.h" typedef struct QVirtioSCSI QVirtioSCSI; typedef struct QVirtioSCSIPCI QVirtioSCSIPCI; diff --git a/tests/qtest/libqos/virtio-serial.c b/tests/qtest/libqos/virtio-serial.c index b95654085d..ee34afd95a 100644 --- a/tests/qtest/libqos/virtio-serial.c +++ b/tests/qtest/libqos/virtio-serial.c @@ -19,8 +19,8 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qemu/module.h" -#include "libqos/qgraph.h" -#include "libqos/virtio-serial.h" +#include "qgraph.h" +#include "virtio-serial.h" static void *qvirtio_serial_get_driver(QVirtioSerial *v_serial, const char *interface) diff --git a/tests/qtest/libqos/virtio-serial.h b/tests/qtest/libqos/virtio-serial.h index 3328c6cf19..3db43b2bb8 100644 --- a/tests/qtest/libqos/virtio-serial.h +++ b/tests/qtest/libqos/virtio-serial.h @@ -19,9 +19,9 @@ #ifndef TESTS_LIBQOS_VIRTIO_SERIAL_H #define TESTS_LIBQOS_VIRTIO_SERIAL_H -#include "libqos/qgraph.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" +#include "qgraph.h" +#include "virtio.h" +#include "virtio-pci.h" typedef struct QVirtioSerial QVirtioSerial; typedef struct QVirtioSerialPCI QVirtioSerialPCI; diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c index 9aa360620c..6fe7bf9555 100644 --- a/tests/qtest/libqos/virtio.c +++ b/tests/qtest/libqos/virtio.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "qemu/bswap.h" #include "libqtest.h" -#include "libqos/virtio.h" +#include "virtio.h" #include "standard-headers/linux/virtio_config.h" #include "standard-headers/linux/virtio_ring.h" diff --git a/tests/qtest/libqos/virtio.h b/tests/qtest/libqos/virtio.h index 529ef7555a..b8bd06e1b8 100644 --- a/tests/qtest/libqos/virtio.h +++ b/tests/qtest/libqos/virtio.h @@ -10,7 +10,7 @@ #ifndef LIBQOS_VIRTIO_H #define LIBQOS_VIRTIO_H -#include "libqos/malloc.h" +#include "malloc.h" #include "standard-headers/linux/virtio_ring.h" #define QVIRTIO_F_BAD_FEATURE 0x40000000ull diff --git a/tests/qtest/libqos/x86_64_pc-machine.c b/tests/qtest/libqos/x86_64_pc-machine.c index 0edb1c9144..ad96742a92 100644 --- a/tests/qtest/libqos/x86_64_pc-machine.c +++ b/tests/qtest/libqos/x86_64_pc-machine.c @@ -18,7 +18,7 @@ #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/qgraph.h" +#include "qgraph.h" #include "pci-pc.h" #include "qemu/module.h" #include "malloc-pc.h" diff --git a/tests/qtest/libqtest-single.h b/tests/qtest/libqtest-single.h index 6f1bb1331c..176979a2ce 100644 --- a/tests/qtest/libqtest-single.h +++ b/tests/qtest/libqtest-single.h @@ -11,7 +11,7 @@ #ifndef LIBQTEST_SINGLE_H #define LIBQTEST_SINGLE_H -#include "libqtest.h" +#include "libqos/libqtest.h" QTestState *global_qtest __attribute__((common, weak)); diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index fd4680590d..26f1223642 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -20,7 +20,7 @@ #include #include -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu-common.h" #include "qemu/ctype.h" #include "qemu/cutils.h" diff --git a/tests/qtest/m48t59-test.c b/tests/qtest/m48t59-test.c index b94a1230f7..6db3234100 100644 --- a/tests/qtest/m48t59-test.c +++ b/tests/qtest/m48t59-test.c @@ -14,7 +14,7 @@ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #define RTC_SECONDS 0x9 #define RTC_MINUTES 0xa diff --git a/tests/qtest/machine-none-test.c b/tests/qtest/machine-none-test.c index 57107f1aec..aab06b9fc2 100644 --- a/tests/qtest/machine-none-test.c +++ b/tests/qtest/machine-none-test.c @@ -14,7 +14,7 @@ #include "qemu-common.h" #include "qemu/cutils.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" diff --git a/tests/qtest/megasas-test.c b/tests/qtest/megasas-test.c index d6796b9bd7..eae70ff95f 100644 --- a/tests/qtest/megasas-test.c +++ b/tests/qtest/megasas-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/bswap.h" #include "qemu/module.h" #include "libqos/qgraph.h" diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build new file mode 100644 index 0000000000..30cb88d919 --- /dev/null +++ b/tests/qtest/meson.build @@ -0,0 +1,257 @@ +# All QTests for now are POSIX-only, but the dependencies are +# really in libqtest, not in the testcases themselves. +if not config_host.has_key('CONFIG_POSIX') + subdir_done() +endif + +qtests_generic = [ + 'cdrom-test', + 'device-introspect-test', + 'machine-none-test', + 'qmp-test', + 'qmp-cmd-test', + 'qom-test', + 'test-hmp', + 'qos-test', +] +if config_host.has_key('CONFIG_MODULES') + qtests_generic += [ 'modules-test' ] +endif + +qtests_pci = \ + (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + \ + (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) + +qtests_i386 = \ + (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) + \ + (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \ + (have_tools ? ['ahci-test'] : []) + \ + (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ + (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) + \ + (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['test-filter-redirector'] : []) + \ + (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] : []) + \ + (config_host.has_key('CONFIG_LINUX') and \ + config_all_devices.has_key('CONFIG_ISA_IPMI_BT') ? ['ipmi-bt-test'] : []) + \ + (config_all_devices.has_key('CONFIG_WDT_IB700') ? ['wdt_ib700-test'] : []) + \ + (config_all_devices.has_key('CONFIG_PVPANIC') ? ['pvpanic-test'] : []) + \ + (config_all_devices.has_key('CONFIG_HDA') ? ['intel-hda-test'] : []) + \ + (config_all_devices.has_key('CONFIG_I82801B11') ? ['i82801b11-test'] : []) + \ + (config_all_devices.has_key('CONFIG_IOH3420') ? ['ioh3420-test'] : []) + \ + (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ + (config_all_devices.has_key('CONFIG_USB_UHCI') and \ + config_all_devices.has_key('CONFIG_USB_EHCI') ? ['usb-hcd-ehci-test'] : []) + \ + (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ + (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-test'] : []) + \ + (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-swtpm-test'] : []) + \ + (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test'] : []) + \ + (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test'] : []) + \ + (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \ + qtests_pci + \ + ['fdc-test', + 'ide-test', + 'ahci-test', + 'hd-geo-test', + 'boot-order-test', + 'bios-tables-test', + 'rtc-test', + 'i440fx-test', + 'fw_cfg-test', + 'device-plug-test', + 'drive_del-test', + 'tco-test', + 'cpu-plug-test', + 'q35-test', + 'vmgenid-test', + 'migration-test', + 'test-x86-cpuid-compat', + 'numa-test'] + +dbus_daemon = find_program('dbus-daemon', required: false) +if dbus_daemon.found() and config_host.has_key('GDBUS_CODEGEN') + # Temporarily disabled due to Patchew failures: + #qtests_i386 += ['dbus-vmstate-test'] + dbus_vmstate1 = custom_target('dbus-vmstate description', + output: ['dbus-vmstate1.h', 'dbus-vmstate1.c'], + input: files('dbus-vmstate1.xml'), + command: [config_host['GDBUS_CODEGEN'], + '@INPUT@', + '--interface-prefix', 'org.qemu', + '--generate-c-code', '@BASENAME@']).to_list() +else + dbus_vmstate1 = [] +endif + +qtests_x86_64 = qtests_i386 + +qtests_alpha = [ 'boot-serial-test' ] + \ + (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + +qtests_avr = [ 'boot-serial-test' ] + +qtests_hppa = [ 'boot-serial-test' ] + \ + (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + +qtests_m68k = [ 'boot-serial-test' ] +qtests_microblaze = [ 'boot-serial-test' ] +qtests_microblazeel = qtests_microblaze + +qtests_mips = \ + (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ + (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + +qtests_mips64 = \ + (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ + (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + +qtests_mips64el = \ + (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ + (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + +qtests_moxie = [ 'boot-serial-test' ] + +qtests_ppc = \ + (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ + (config_all_devices.has_key('CONFIG_M48T59') ? ['m48t59-test'] : []) + \ + ['boot-order-test', 'prom-env-test', 'drive_del-test', 'boot-serial-test'] \ + +qtests_ppc64 = \ + (config_all_devices.has_key('CONFIG_PSERIES') ? ['device-plug-test'] : []) + \ + (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-xscom-test'] : []) + \ + (config_all_devices.has_key('CONFIG_PSERIES') ? ['rtas-test'] : []) + \ + (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) + \ + (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ + (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ + (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \ + qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test'] + +qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + +qtests_sparc = ['prom-env-test', 'm48t59-test', 'boot-serial-test'] + +qtests_sparc64 = \ + (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ + ['prom-env-test', 'boot-serial-test'] + +qtests_arm = \ + (config_all_devices.has_key('CONFIG_PFLASH_CFI02') ? ['pflash-cfi02-test'] : []) + \ + ['arm-cpu-features', + 'microbit-test', + 'm25p80-test', + 'test-arm-mptimer', + 'boot-serial-test', + 'hexloader-test'] + +# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional +qtests_aarch64 = \ + (cpu != 'arm' ? ['bios-tables-test'] : []) + \ + (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) + \ + (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) + \ + ['numa-test', + 'boot-serial-test', + 'migration-test'] + +qtests_s390x = \ + (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) + \ + (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \ + (config_host.has_key('CONFIG_POSIX') ? ['test-filter-redirector'] : []) + \ + ['boot-serial-test', + 'drive_del-test', + 'device-plug-test', + 'virtio-ccw-test', + 'cpu-plug-test', + 'migration-test'] + +qos_test_ss = ss.source_set() +qos_test_ss.add( + 'ac97-test.c', + 'ds1338-test.c', + 'e1000-test.c', + 'e1000e-test.c', + 'eepro100-test.c', + 'es1370-test.c', + 'ipoctal232-test.c', + 'megasas-test.c', + 'ne2000-test.c', + 'tulip-test.c', + 'nvme-test.c', + 'pca9552-test.c', + 'pci-test.c', + 'pcnet-test.c', + 'sdhci-test.c', + 'spapr-phb-test.c', + 'tmp105-test.c', + 'usb-hcd-ohci-test.c', + 'virtio-test.c', + 'virtio-blk-test.c', + 'virtio-net-test.c', + 'virtio-rng-test.c', + 'virtio-scsi-test.c', + 'virtio-serial-test.c', + 'vmxnet3-test.c', +) +qos_test_ss.add(when: 'CONFIG_VIRTFS', if_true: files('virtio-9p-test.c')) +qos_test_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user-test.c')) + +extra_qtest_deps = { + 'bios-tables-test': [io], + 'ivshmem-test': [rt], + 'qos-test': [chardev, io], + 'tpm-crb-swtpm-test': [io], + 'tpm-crb-test': [io], + 'tpm-tis-swtpm-test': [io], + 'tpm-tis-test': [io], + 'tpm-tis-device-swtpm-test': [io], + 'tpm-tis-device-test': [io], +} +extra_qtest_srcs = { + 'bios-tables-test': files('boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'), + 'pxe-test': files('boot-sector.c'), + 'cdrom-test': files('boot-sector.c'), + 'migration-test': files('migration-helpers.c'), + 'ivshmem-test': files('../../contrib/ivshmem-server/ivshmem-server.c'), + 'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1, + 'vmgenid-test': files('boot-sector.c', 'acpi-utils.c'), + 'tpm-crb-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'), + 'tpm-crb-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'), + 'tpm-tis-device-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'), + 'tpm-tis-device-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'), + 'tpm-tis-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'), + 'tpm-tis-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'), + 'qos-test': qos_test_ss.apply(config_host, strict: false).sources() +} + + +qtest_executables = {} +foreach dir : target_dirs + if not dir.endswith('-softmmu') + continue + endif + + target_base = dir.split('-')[0] + qtests = get_variable('qtests_' + target_base, []) + qtests_generic + + qtest_env = environment() + qtest_env.set('QTEST_QEMU_IMG', './qemu-img') + qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh') + qtest_env.set('QTEST_QEMU_BINARY', '@0@-softmmu/qemu-system-@0@'.format(target_base)) + + foreach test : qtests + # Executables are shared across targets, declare them only the first time we + # encounter them + if not qtest_executables.has_key(test) + qtest_executables += { + test: executable(test, + files(test + '.c') + extra_qtest_srcs.get(test, []), + dependencies: [qemuutil, qos] + extra_qtest_deps.get(test, [])) + } + endif + # FIXME: missing dependency on the emulator binary and qemu-img + test('qtest-@0@: @1@'.format(target_base, test), + qtest_executables[test], + env: qtest_env, + args: ['--tap', '-k'], + protocol: 'tap', + suite: ['qtest', 'qtest-' + target_base]) + endforeach +endforeach diff --git a/tests/qtest/microbit-test.c b/tests/qtest/microbit-test.c index 04e199ec33..2b255579df 100644 --- a/tests/qtest/microbit-test.c +++ b/tests/qtest/microbit-test.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include "exec/hwaddr.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "hw/arm/nrf51.h" #include "hw/char/nrf51_uart.h" diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helpers.h index a11808b3b7..d63bba9630 100644 --- a/tests/qtest/migration-helpers.h +++ b/tests/qtest/migration-helpers.h @@ -12,7 +12,7 @@ #ifndef MIGRATION_HELPERS_H_ #define MIGRATION_HELPERS_H_ -#include "libqtest.h" +#include "libqos/libqtest.h" extern bool got_stop; diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 21ea5ba1d2..00a233cd8c 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qemu/module.h" @@ -25,7 +25,7 @@ #include "qapi/qobject-output-visitor.h" #include "migration-helpers.h" -#include "migration/migration-test.h" +#include "tests/migration/migration-test.h" /* TODO actually test the results and get rid of this */ #define qtest_qmp_discard_response(...) qobject_unref(qtest_qmp(__VA_ARGS__)) diff --git a/tests/qtest/modules-test.c b/tests/qtest/modules-test.c index 88217686e1..c238b3f422 100644 --- a/tests/qtest/modules-test.c +++ b/tests/qtest/modules-test.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" const char common_args[] = "-nodefaults -machine none"; diff --git a/tests/qtest/ne2000-test.c b/tests/qtest/ne2000-test.c index 3fc0e555d5..43cfc4535a 100644 --- a/tests/qtest/ne2000-test.c +++ b/tests/qtest/ne2000-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c index e1ed6d4322..b25ebf97d8 100644 --- a/tests/qtest/numa-test.c +++ b/tests/qtest/numa-test.c @@ -10,7 +10,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qlist.h" diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-test.c index ff0442150c..d32c953a38 100644 --- a/tests/qtest/nvme-test.c +++ b/tests/qtest/nvme-test.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "qemu/units.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/pca9552-test.c b/tests/qtest/pca9552-test.c index d80ed93cd3..42a1312665 100644 --- a/tests/qtest/pca9552-test.c +++ b/tests/qtest/pca9552-test.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/qgraph.h" #include "libqos/i2c.h" #include "hw/misc/pca9552_regs.h" diff --git a/tests/qtest/pci-test.c b/tests/qtest/pci-test.c index 4b2092b949..e15d4d94d1 100644 --- a/tests/qtest/pci-test.c +++ b/tests/qtest/pci-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/pcnet-test.c b/tests/qtest/pcnet-test.c index 900944fa7e..7583aeb3c3 100644 --- a/tests/qtest/pcnet-test.c +++ b/tests/qtest/pcnet-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/pflash-cfi02-test.c b/tests/qtest/pflash-cfi02-test.c index 17aa669b2e..afb702b565 100644 --- a/tests/qtest/pflash-cfi02-test.c +++ b/tests/qtest/pflash-cfi02-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" /* * To test the pflash_cfi02 device, we run QEMU with the musicpal machine with diff --git a/tests/qtest/pnv-xscom-test.c b/tests/qtest/pnv-xscom-test.c index 2c46d5cf6d..c8d4043362 100644 --- a/tests/qtest/pnv-xscom-test.c +++ b/tests/qtest/pnv-xscom-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" typedef enum PnvChipType { PNV_CHIP_POWER8E, /* AKA Murano (default) */ diff --git a/tests/qtest/prom-env-test.c b/tests/qtest/prom-env-test.c index 60e6ec3153..f41d80154a 100644 --- a/tests/qtest/prom-env-test.c +++ b/tests/qtest/prom-env-test.c @@ -20,7 +20,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/libqos-spapr.h" #define MAGIC 0xcafec0de diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c index ff9176adf3..e57639481e 100644 --- a/tests/qtest/pvpanic-test.c +++ b/tests/qtest/pvpanic-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" static void test_panic(void) diff --git a/tests/qtest/pxe-test.c b/tests/qtest/pxe-test.c index 1161a773a4..32bbae33c5 100644 --- a/tests/qtest/pxe-test.c +++ b/tests/qtest/pxe-test.c @@ -15,7 +15,7 @@ #include "qemu/osdep.h" #include #include "qemu-common.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "boot-sector.h" #include "libqos/libqos-spapr.h" diff --git a/tests/qtest/q35-test.c b/tests/qtest/q35-test.c index c922d81bc0..b7cf144990 100644 --- a/tests/qtest/q35-test.c +++ b/tests/qtest/q35-test.c @@ -10,7 +10,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/pci.h" #include "libqos/pci-pc.h" #include "hw/pci-host/q35.h" diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c index f7b1aa7fdc..f34e68858a 100644 --- a/tests/qtest/qmp-cmd-test.c +++ b/tests/qtest/qmp-cmd-test.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/error.h" #include "qapi/qapi-visit-introspect.h" #include "qapi/qmp/qdict.h" diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c index 1a8876b6ca..5950c3ebbb 100644 --- a/tests/qtest/qmp-test.c +++ b/tests/qtest/qmp-test.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/error.h" #include "qapi/qapi-visit-control.h" #include "qapi/qmp/qdict.h" diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c index 1acf0d7369..eb34af843b 100644 --- a/tests/qtest/qom-test.c +++ b/tests/qtest/qom-test.c @@ -13,7 +13,7 @@ #include "qapi/qmp/qdict.h" #include "qapi/qmp/qlist.h" #include "qemu/cutils.h" -#include "libqtest.h" +#include "libqos/libqtest.h" static void test_properties(QTestState *qts, const char *path, bool recurse) { diff --git a/tests/qtest/rtas-test.c b/tests/qtest/rtas-test.c index 167b42db38..a7e83e7d40 100644 --- a/tests/qtest/rtas-test.c +++ b/tests/qtest/rtas-test.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" #include "qemu/cutils.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/libqos-spapr.h" #include "libqos/rtas.h" diff --git a/tests/qtest/sdhci-test.c b/tests/qtest/sdhci-test.c index 6275e7626c..a110cfe321 100644 --- a/tests/qtest/sdhci-test.c +++ b/tests/qtest/sdhci-test.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "hw/registerfields.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/pci-pc.h" #include "hw/pci/pci.h" diff --git a/tests/qtest/spapr-phb-test.c b/tests/qtest/spapr-phb-test.c index 093dc22f2f..ea8d596507 100644 --- a/tests/qtest/spapr-phb-test.c +++ b/tests/qtest/spapr-phb-test.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" diff --git a/tests/qtest/tco-test.c b/tests/qtest/tco-test.c index 254f735370..47bc7ad301 100644 --- a/tests/qtest/tco-test.c +++ b/tests/qtest/tco-test.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "libqos/pci.h" #include "libqos/pci-pc.h" #include "qapi/qmp/qdict.h" diff --git a/tests/qtest/test-filter-mirror.c b/tests/qtest/test-filter-mirror.c index 1e3ced84a9..bc0dee64dd 100644 --- a/tests/qtest/test-filter-mirror.c +++ b/tests/qtest/test-filter-mirror.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #include "qemu/iov.h" #include "qemu/sockets.h" diff --git a/tests/qtest/test-filter-redirector.c b/tests/qtest/test-filter-redirector.c index e4d53220fd..829db8c2ea 100644 --- a/tests/qtest/test-filter-redirector.c +++ b/tests/qtest/test-filter-redirector.c @@ -52,7 +52,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #include "qemu/iov.h" #include "qemu/sockets.h" diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c index d5e7ebd176..aea1384bac 100644 --- a/tests/qtest/test-hmp.c +++ b/tests/qtest/test-hmp.c @@ -15,7 +15,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" static int verbose; diff --git a/tests/qtest/tpm-crb-swtpm-test.c b/tests/qtest/tpm-crb-swtpm-test.c index 55fdb5657d..1d82a48c04 100644 --- a/tests/qtest/tpm-crb-swtpm-test.c +++ b/tests/qtest/tpm-crb-swtpm-test.c @@ -15,7 +15,7 @@ #include "qemu/osdep.h" #include -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "tpm-tests.h" #include "hw/acpi/tpm.h" diff --git a/tests/qtest/tpm-tis-device-swtpm-test.c b/tests/qtest/tpm-tis-device-swtpm-test.c index 7b20035142..f7126eff9e 100644 --- a/tests/qtest/tpm-tis-device-swtpm-test.c +++ b/tests/qtest/tpm-tis-device-swtpm-test.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "tpm-tests.h" #include "hw/acpi/tpm.h" diff --git a/tests/qtest/tpm-tis-swtpm-test.c b/tests/qtest/tpm-tis-swtpm-test.c index 90131cb3c4..fa590e68f1 100644 --- a/tests/qtest/tpm-tis-swtpm-test.c +++ b/tests/qtest/tpm-tis-swtpm-test.c @@ -15,7 +15,7 @@ #include "qemu/osdep.h" #include -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "tpm-tests.h" #include "hw/acpi/tpm.h" diff --git a/tests/qtest/tpm-util.c b/tests/qtest/tpm-util.c index 58a9593745..e2b29ef0f8 100644 --- a/tests/qtest/tpm-util.c +++ b/tests/qtest/tpm-util.c @@ -15,7 +15,7 @@ #include "qemu/osdep.h" #include "hw/acpi/tpm.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "tpm-util.h" #include "qapi/qmp/qdict.h" diff --git a/tests/qtest/tulip-test.c b/tests/qtest/tulip-test.c index 2fb6c4d5a7..da16cbfafc 100644 --- a/tests/qtest/tulip-test.c +++ b/tests/qtest/tulip-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/virtio-rng-test.c b/tests/qtest/virtio-rng-test.c index 092ba13068..e6b8cd8e0c 100644 --- a/tests/qtest/virtio-rng-test.c +++ b/tests/qtest/virtio-rng-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/virtio-rng.h" diff --git a/tests/qtest/virtio-test.c b/tests/qtest/virtio-test.c index f7c6afdcf1..6313417630 100644 --- a/tests/qtest/virtio-test.c +++ b/tests/qtest/virtio-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/vmgenid-test.c b/tests/qtest/vmgenid-test.c index efba76e716..6781a51447 100644 --- a/tests/qtest/vmgenid-test.c +++ b/tests/qtest/vmgenid-test.c @@ -14,7 +14,7 @@ #include "hw/acpi/acpi-defs.h" #include "boot-sector.h" #include "acpi-utils.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #define VGID_GUID "324e6eaf-d1d1-4bf6-bf41-b9bb6c91fb87" diff --git a/tests/qtest/vmxnet3-test.c b/tests/qtest/vmxnet3-test.c index a81025252c..97c23fd3a8 100644 --- a/tests/qtest/vmxnet3-test.c +++ b/tests/qtest/vmxnet3-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qemu/module.h" #include "libqos/qgraph.h" #include "libqos/pci.h" diff --git a/tests/qtest/wdt_ib700-test.c b/tests/qtest/wdt_ib700-test.c index 797288d939..6c36e43fb8 100644 --- a/tests/qtest/wdt_ib700-test.c +++ b/tests/qtest/wdt_ib700-test.c @@ -8,7 +8,7 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #include "qemu/timer.h" diff --git a/tests/test-qga.c b/tests/test-qga.c index d1b4c3e8ce..4ac4c22109 100644 --- a/tests/test-qga.c +++ b/tests/test-qga.c @@ -4,7 +4,7 @@ #include #include -#include "libqtest.h" +#include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qlist.h" diff --git a/tests/test-qgraph.c b/tests/test-qgraph.c index 5c7e457075..267291c6ed 100644 --- a/tests/test-qgraph.c +++ b/tests/test-qgraph.c @@ -17,9 +17,8 @@ */ #include "qemu/osdep.h" -#include "libqtest.h" -#include "libqos/qgraph.h" -#include "libqos/qgraph_internal.h" +#include "qtest/libqos/qgraph.h" +#include "qtest/libqos/qgraph_internal.h" #define MACHINE_PC "x86_64/pc" #define MACHINE_RASPI2 "arm/raspi2" From patchwork Fri Aug 21 10:22:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275919 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DD18C433E3 for ; Fri, 21 Aug 2020 11:02:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18A2820738 for ; Fri, 21 Aug 2020 11:02:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AkNNqQeb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18A2820738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94o4-0002cJ-7e for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:02:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E7-0002q0-2l for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dz-0001hY-IG for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E9r6uDVTHDKLZnA3Jn5FBJKsuDtcZX7C2n/FCTxLRXM=; b=AkNNqQeb7AqtuMU45QN4Ztp4eO+FenuCmJ7Qo8LAERl2hp5uEcEs8DQTTzMfI/vpNdbngn 950/1EnCyeDUm5hmesALfnOz7kw+4GiCXSlO8pleXrShu3L8RKtel3S/wnukP11CFxMPBc djqFIhtYVRjgAOamvyqzgZ6c5hl0kUs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-105-gN4c52UYNEq8dU3itEBQjA-1; Fri, 21 Aug 2020 06:24:32 -0400 X-MC-Unique: gN4c52UYNEq8dU3itEBQjA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0743456B2D for ; Fri, 21 Aug 2020 10:24:32 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA2375C1D0; Fri, 21 Aug 2020 10:24:31 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 072/152] meson: convert ui directory to Meson Date: Fri, 21 Aug 2020 06:22:09 -0400 Message-Id: <20200821102329.29777-73-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.objs | 8 +++-- Makefile.target | 8 ++--- configure | 6 ++++ meson.build | 50 +++++++++++++++++++++++++++++ ui/Makefile.objs | 73 ------------------------------------------ ui/meson.build | 82 +++++++++++++++++++++++++++++++++++++++++++++++- ui/shader.c | 6 ++-- 7 files changed, 149 insertions(+), 84 deletions(-) delete mode 100644 ui/Makefile.objs diff --git a/Makefile.objs b/Makefile.objs index ec7627a4c6..72e935023d 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -68,6 +68,11 @@ common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF) common-obj-$(CONFIG_AUDIO_PA) += audio-pa$(DSOSUF) common-obj-$(CONFIG_AUDIO_SDL) += audio-sdl$(DSOSUF) +common-obj-$(if $(CONFIG_CURSES),m) += ui-curses$(DSOSUF) +common-obj-$(if $(CONFIG_GTK),m) += ui-gtk$(DSOSUF) +common-obj-$(if $(CONFIG_SDL),m) += ui-sdl$(DSOSUF) +common-obj-$(if $(CONFIG_SPICE),m) += ui-spice-app$(DSOSUF) + common-obj-$(if $(CONFIG_CURL),m) += block-curl$(DSOSUF) common-obj-$(if $(CONFIG_GLUSTERFS),m) += block-gluster$(DSOSUF) common-obj-$(if $(CONFIG_LIBISCSI),m) += block-iscsi$(DSOSUF) @@ -83,9 +88,6 @@ common-obj-m += hw/ common-obj-y += replay/ -common-obj-y += ui/ -common-obj-m += ui/ - common-obj-y += dma-helpers.o common-obj-$(CONFIG_TPM) += tpm.o diff --git a/Makefile.target b/Makefile.target index ff0e1b2d10..16f1e781e9 100644 --- a/Makefile.target +++ b/Makefile.target @@ -167,8 +167,9 @@ LIBS := $(libs_softmmu) $(LIBS) LIBS := $(LIBS) @../block.syms @../qemu.syms ifneq ($(CONFIG_MODULES),y) LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS) +LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS) $(GIO_LIBS) endif -LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) +LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS) # Hardware support @@ -207,9 +208,8 @@ dummy := $(call fix-paths,../,, \ crypto-obj-y \ io-obj-y \ qom-obj-y) -dummy := $(call unnest-vars,.., \ - common-obj-y \ - common-obj-m) +dummy := $(call unnest-vars,..,common-obj-y) + all-obj-y += $(common-obj-y) all-obj-y += $(qom-obj-y) all-obj-$(CONFIG_SOFTMMU) += $(authz-obj-y) diff --git a/configure b/configure index 396472b332..98252ca38a 100755 --- a/configure +++ b/configure @@ -7065,12 +7065,18 @@ fi if test "$vnc_sasl" = "yes" ; then echo "CONFIG_VNC_SASL=y" >> $config_host_mak fi +echo "SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak +echo "SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak if test "$vnc_jpeg" = "yes" ; then echo "CONFIG_VNC_JPEG=y" >> $config_host_mak fi +echo "JPEG_CFLAGS=$vnc_jpeg_cflags" >> $config_host_mak +echo "JPEG_LIBS=$vnc_jpeg_libs" >> $config_host_mak if test "$vnc_png" = "yes" ; then echo "CONFIG_VNC_PNG=y" >> $config_host_mak fi +echo "PNG_CFLAGS=$vnc_png_cflags" >> $config_host_mak +echo "PNG_LIBS=$vnc_png_libs" >> $config_host_mak if test "$xkbcommon" = "yes" ; then echo "CONFIG_XKBCOMMON=y" >> $config_host_mak echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak diff --git a/meson.build b/meson.build index e1e70d4b48..ca1e6906b7 100644 --- a/meson.build +++ b/meson.build @@ -243,6 +243,56 @@ coreaudio = not_found if 'CONFIG_AUDIO_COREAUDIO' in config_host coreaudio = declare_dependency(link_args: config_host['COREAUDIO_LIBS'].split()) endif +opengl = not_found +if 'CONFIG_OPENGL' in config_host + opengl = declare_dependency(link_args: config_host['OPENGL_LIBS'].split()) +else +endif +gtk = not_found +if 'CONFIG_GTK' in config_host + gtk = declare_dependency(compile_args: config_host['GTK_CFLAGS'].split(), + link_args: config_host['GTK_LIBS'].split()) +endif +vte = not_found +if 'CONFIG_VTE' in config_host + vte = declare_dependency(compile_args: config_host['VTE_CFLAGS'].split(), + link_args: config_host['VTE_LIBS'].split()) +endif +x11 = not_found +if 'CONFIG_X11' in config_host + x11 = declare_dependency(compile_args: config_host['X11_CFLAGS'].split(), + link_args: config_host['X11_LIBS'].split()) +endif +curses = not_found +if 'CONFIG_CURSES' in config_host + curses = declare_dependency(compile_args: config_host['CURSES_CFLAGS'].split(), + link_args: config_host['CURSES_LIBS'].split()) +endif +iconv = not_found +if 'CONFIG_ICONV' in config_host + iconv = declare_dependency(compile_args: config_host['ICONV_CFLAGS'].split(), + link_args: config_host['ICONV_LIBS'].split()) +endif +gio = not_found +if 'CONFIG_GIO' in config_host + gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), + link_args: config_host['GIO_LIBS'].split()) +endif +png = not_found +if 'CONFIG_VNC_PNG' in config_host + png = declare_dependency(compile_args: config_host['PNG_CFLAGS'].split(), + link_args: config_host['PNG_LIBS'].split()) +endif +jpeg = not_found +if 'CONFIG_VNC_JPEG' in config_host + jpeg = declare_dependency(compile_args: config_host['JPEG_CFLAGS'].split(), + link_args: config_host['JPEG_LIBS'].split()) +endif +sasl = not_found +if 'CONFIG_VNC_SASL' in config_host + sasl = declare_dependency(compile_args: config_host['SASL_CFLAGS'].split(), + link_args: config_host['SASL_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') diff --git a/ui/Makefile.objs b/ui/Makefile.objs deleted file mode 100644 index 504b196479..0000000000 --- a/ui/Makefile.objs +++ /dev/null @@ -1,73 +0,0 @@ -vnc-obj-y += vnc.o -vnc-obj-y += vnc-enc-zlib.o vnc-enc-hextile.o -vnc-obj-y += vnc-enc-tight.o vnc-palette.o -vnc-obj-y += vnc-enc-zrle.o -vnc-obj-y += vnc-auth-vencrypt.o -vnc-obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o -vnc-obj-y += vnc-ws.o -vnc-obj-y += vnc-jobs.o - -common-obj-y += keymaps.o console.o cursor.o qemu-pixman.o -common-obj-y += input.o input-keymap.o input-legacy.o kbd-state.o -common-obj-y += input-barrier.o -common-obj-$(CONFIG_LINUX) += input-linux.o -common-obj-$(CONFIG_SPICE) += spice-core.o spice-input.o spice-display.o -common-obj-$(CONFIG_COCOA) += cocoa.o -common-obj-$(CONFIG_VNC) += $(vnc-obj-y) -common-obj-$(call lnot,$(CONFIG_VNC)) += vnc-stubs.o -ifneq (,$(findstring m,$(CONFIG_SDL)$(CONFIG_GTK))) -common-obj-$(CONFIG_WIN32) += win32-kbd-hook.o -endif - -# ui-sdl module -common-obj-$(CONFIG_SDL) += sdl.mo -sdl.mo-objs := sdl2.o sdl2-input.o sdl2-2d.o -ifeq ($(CONFIG_OPENGL),y) -sdl.mo-objs += sdl2-gl.o -endif -sdl.mo-cflags := $(SDL_CFLAGS) -sdl.mo-libs := $(SDL_LIBS) - -# ui-gtk module -common-obj-$(CONFIG_GTK) += gtk.mo -gtk.mo-objs := gtk.o -gtk.mo-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS) -gtk.mo-libs := $(GTK_LIBS) $(VTE_LIBS) -ifeq ($(CONFIG_OPENGL),y) -gtk.mo-objs += gtk-egl.o -gtk.mo-libs += $(OPENGL_LIBS) -ifeq ($(CONFIG_GTK_GL),y) -gtk.mo-objs += gtk-gl-area.o -endif -endif - -ifeq ($(CONFIG_X11),y) -sdl.mo-objs += x_keymap.o -gtk.mo-objs += x_keymap.o -x_keymap.o-cflags := $(X11_CFLAGS) -x_keymap.o-libs := $(X11_LIBS) -endif - -common-obj-$(CONFIG_CURSES) += curses.mo -curses.mo-objs := curses.o -curses.mo-cflags := $(CURSES_CFLAGS) $(ICONV_CFLAGS) -curses.mo-libs := $(CURSES_LIBS) $(ICONV_LIBS) - -ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy) -common-obj-$(if $(CONFIG_MODULES),m,y) += spice-app.mo -endif -spice-app.mo-objs := spice-app.o -spice-app.mo-cflags := $(GIO_CFLAGS) -spice-app.mo-libs := $(GIO_LIBS) - -common-obj-$(CONFIG_OPENGL) += shader.o -common-obj-$(CONFIG_OPENGL) += console-gl.o -common-obj-$(CONFIG_OPENGL) += egl-helpers.o -common-obj-$(CONFIG_OPENGL) += egl-context.o -common-obj-$(CONFIG_OPENGL_DMABUF) += egl-headless.o - -shader.o-libs += $(OPENGL_LIBS) -console-gl.o-libs += $(OPENGL_LIBS) -egl-helpers.o-libs += $(OPENGL_LIBS) -egl-context.o-libs += $(OPENGL_LIBS) -egl-headless.o-libs += $(OPENGL_LIBS) diff --git a/ui/meson.build b/ui/meson.build index 35da0d8d26..66282c398d 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -1,3 +1,82 @@ +softmmu_ss.add(files( + 'console.c', + 'cursor.c', + 'input-keymap.c', + 'input-legacy.c', + 'input-barrier.c', + 'input.c', + 'kbd-state.c', + 'keymaps.c', + 'qemu-pixman.c', +)) +softmmu_ss.add(pixman) + +softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c')) +softmmu_ss.add(when: 'CONFIG_SPICE', if_true: files('spice-core.c', 'spice-input.c', 'spice-display.c')) +softmmu_ss.add(when: [cocoa, 'CONFIG_COCOA'], if_true: files('cocoa.m')) + +vnc_ss = ss.source_set() +vnc_ss.add(files( + 'vnc.c', + 'vnc-enc-zlib.c', + 'vnc-enc-hextile.c', + 'vnc-enc-tight.c', + 'vnc-palette.c', + 'vnc-enc-zrle.c', + 'vnc-auth-vencrypt.c', + 'vnc-ws.c', + 'vnc-jobs.c', +)) +vnc_ss.add(zlib) +vnc_ss.add(when: 'CONFIG_VNC_SASL', if_true: [files('vnc-auth-sasl.c'), sasl]) +softmmu_ss.add_all(when: 'CONFIG_VNC', if_true: vnc_ss) +softmmu_ss.add(when: 'CONFIG_VNC', if_false: files('vnc-stubs.c')) +softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c')) +softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL_DMABUF'], if_true: files('egl-headless.c')) +softmmu_ss.add(when: 'CONFIG_VNC_PNG', if_true: png) +softmmu_ss.add(when: 'CONFIG_VNC_JPEG', if_true: jpeg) + +ui_modules = {} + +if config_host.has_key('CONFIG_CURSES') + curses_ss = ss.source_set() + curses_ss.add(when: [curses, iconv], if_true: files('curses.c')) + ui_modules += {'curses' : curses_ss} +endif + +if config_host.has_key('CONFIG_GTK') and config_host.has_key('CONFIG_VTE') + softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) + + gtk_ss = ss.source_set() + gtk_ss.add(gtk, vte, files('gtk.c')) + gtk_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c')) + gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c')) + gtk_ss.add(when: [opengl, 'CONFIG_GTK_GL'], if_true: files('gtk-gl-area.c')) + ui_modules += {'gtk' : gtk_ss} +endif + +if config_host.has_key('CONFIG_SDL') + softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) + + sdl_ss = ss.source_set() + sdl_ss.add(pixman, glib, files( + 'sdl2-2d.c', + 'sdl2-input.c', + 'sdl2.c', + )) + sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c')) + sdl_ss.add(when: [x11, 'CONFIG_X11'], if_true: files('x_keymap.c')) + ui_modules += {'sdl' : sdl_ss} +endif + +if config_host.has_key('CONFIG_SPICE') and config_host.has_key('CONFIG_GIO') + spice_ss = ss.source_set() + spice_ss.add(spice, gio, files('spice-app.c')) + ui_modules += {'spice-app': spice_ss} +endif + +keymap_gen = find_program('keycodemapdb/tools/keymap-gen') + keymaps = [ ['atset1', 'qcode'], ['linux', 'qcode'], @@ -24,7 +103,6 @@ if have_system genh += custom_target(output, output: output, capture: true, - build_by_default: true, # to be removed when added to a target input: files('keycodemapdb/data/keymaps.csv'), command: [python.full_path(), files('keycodemapdb/tools/keymap-gen'), '--lang', 'glib2', @@ -34,3 +112,5 @@ if have_system endif subdir('shader') + +modules += {'ui': ui_modules} diff --git a/ui/shader.c b/ui/shader.c index d78829f43b..e8b8d321b7 100644 --- a/ui/shader.c +++ b/ui/shader.c @@ -27,9 +27,9 @@ #include "qemu/osdep.h" #include "ui/shader.h" -#include "shader/texture-blit-vert.h" -#include "shader/texture-blit-flip-vert.h" -#include "shader/texture-blit-frag.h" +#include "ui/shader/texture-blit-vert.h" +#include "ui/shader/texture-blit-flip-vert.h" +#include "ui/shader/texture-blit-frag.h" struct QemuGLShader { GLint texture_blit_prog; From patchwork Fri Aug 21 10:22:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275923 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A30CC433DF for ; Fri, 21 Aug 2020 10:58:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65B3A20656 for ; Fri, 21 Aug 2020 10:58:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NFtWW5fU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65B3A20656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94kb-00044w-L3 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:58:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Dz-0002VJ-8g for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dt-0001g3-5W for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QbjgUHxDhESnyZVM93MyRZhf9Wi5VLrZrYcvgXsIMXQ=; b=NFtWW5fUqk0Mx1Axw9XHyZ2NwH19fWl1iGcKOOb8CpduRIu3PM9lboLtvMw3onipbdR8PV lIFb7rFoAf5j1GXVYN/XbhhQCE+OEI8cRzFg59i1o4InIZPJTRTYoYZJ8hu0Q3aRYpoTv6 2WjeQvbPnyY+BMu2By2sHtodpM8yXsM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-473-v3xBmNDuPhWIqKfHh-IOXw-1; Fri, 21 Aug 2020 06:24:34 -0400 X-MC-Unique: v3xBmNDuPhWIqKfHh-IOXw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C21CD191E2A0 for ; Fri, 21 Aug 2020 10:24:33 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 736BC5C1D7; Fri, 21 Aug 2020 10:24:33 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 076/152] meson: convert dump/ Date: Fri, 21 Aug 2020 06:22:13 -0400 Message-Id: <20200821102329.29777-77-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.objs | 3 +-- Makefile.target | 1 - configure | 4 ++++ dump/Makefile.objs | 3 --- dump/meson.build | 4 ++++ meson.build | 9 +++++++++ 6 files changed, 18 insertions(+), 6 deletions(-) delete mode 100644 dump/Makefile.objs create mode 100644 dump/meson.build diff --git a/Makefile.objs b/Makefile.objs index ec15ebc4b4..6657a6cce3 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -48,8 +48,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o # single QEMU executable should support all CPUs and machines. ifeq ($(CONFIG_SOFTMMU),y) -common-obj-y = dump/ -common-obj-y += monitor/ +common-obj-y = monitor/ common-obj-y += net/ common-obj-$(CONFIG_LINUX) += fsdev/ diff --git a/Makefile.target b/Makefile.target index 5f926e5bfa..c8f7a6c04b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -156,7 +156,6 @@ endif #CONFIG_BSD_USER ifdef CONFIG_SOFTMMU obj-y += softmmu/ obj-y += gdbstub.o -obj-y += dump/ obj-y += hw/ obj-y += monitor/ obj-y += qapi/ diff --git a/configure b/configure index a90dfc964b..ed8c212279 100755 --- a/configure +++ b/configure @@ -2616,6 +2616,7 @@ int main(void) { lzo_version(); return 0; } EOF if compile_prog "" "-llzo2" ; then libs_softmmu="$libs_softmmu -llzo2" + lzo_libs="-llzo2" lzo="yes" else if test "$lzo" = "yes"; then @@ -2635,6 +2636,7 @@ int main(void) { snappy_max_compressed_length(4096); return 0; } EOF if compile_prog "" "-lsnappy" ; then libs_softmmu="$libs_softmmu -lsnappy" + snappy_libs='-lsnappy' snappy="yes" else if test "$snappy" = "yes"; then @@ -7464,10 +7466,12 @@ fi if test "$lzo" = "yes" ; then echo "CONFIG_LZO=y" >> $config_host_mak + echo "LZO_LIBS=$lzo_libs" >> $config_host_mak fi if test "$snappy" = "yes" ; then echo "CONFIG_SNAPPY=y" >> $config_host_mak + echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak fi if test "$bzip2" = "yes" ; then diff --git a/dump/Makefile.objs b/dump/Makefile.objs deleted file mode 100644 index d2a5db3b81..0000000000 --- a/dump/Makefile.objs +++ /dev/null @@ -1,3 +0,0 @@ -obj-y += dump.o -common-obj-y += dump-hmp-cmds.o -obj-$(TARGET_X86_64) += win_dump.o diff --git a/dump/meson.build b/dump/meson.build new file mode 100644 index 0000000000..2eff29c3ea --- /dev/null +++ b/dump/meson.build @@ -0,0 +1,4 @@ +softmmu_ss.add(files('dump-hmp-cmds.c')) + +specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo]) +specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], if_true: files('win_dump.c')) diff --git a/meson.build b/meson.build index 442855daef..6d5eb31dcf 100644 --- a/meson.build +++ b/meson.build @@ -300,6 +300,14 @@ if 'CONFIG_FDT' in config_host fdt = declare_dependency(compile_args: config_host['FDT_CFLAGS'].split(), link_args: config_host['FDT_LIBS'].split()) endif +snappy = not_found +if 'CONFIG_SNAPPY' in config_host + snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split()) +endif +lzo = not_found +if 'CONFIG_LZO' in config_host + lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') @@ -607,6 +615,7 @@ subdir('io') subdir('chardev') subdir('fsdev') subdir('target') +subdir('dump') block_ss.add(files( 'block.c', From patchwork Fri Aug 21 10:22:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275921 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10314C433DF for ; Fri, 21 Aug 2020 10:59:46 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D324420656 for ; Fri, 21 Aug 2020 10:59:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q0KMYDBO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D324420656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94ls-0007U0-VN for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:59:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E4-0002lQ-Kf for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dt-0001gA-IS for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2YCZLHWQDS6mDC7G8SiZDNyMr0dvplRJMWmaqrLgMpI=; b=Q0KMYDBOrdTqCQUdfqlAgvzudkNbOr+s65aneCpZjX5QTXz2GVbTqOIqryqy3C7pITOgv6 H4yQlUXVNw8BYuR/o9qILLgQj76xTBQZKlVjEmXHeDEVj3RBUJ2wHor+ERx5f0EkWiVk1f FXfdRVVmbRMwbJAfJpfVZGwjxOuNcaM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-475-zKttSmvBNCuky6JxhLNNVg-1; Fri, 21 Aug 2020 06:24:35 -0400 X-MC-Unique: zKttSmvBNCuky6JxhLNNVg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D9A4100CF71 for ; Fri, 21 Aug 2020 10:24:34 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id E38155C1D0; Fri, 21 Aug 2020 10:24:33 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 077/152] meson: convert common QMP bits for qemu and qemu-storage-daemon Date: Fri, 21 Aug 2020 06:22:14 -0400 Message-Id: <20200821102329.29777-78-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.objs | 8 +++++--- Makefile.target | 1 - meson.build | 10 ++++++++++ monitor/Makefile.objs | 6 ------ monitor/meson.build | 9 +++++++++ qom/Makefile.objs | 2 -- qom/meson.build | 3 +++ 7 files changed, 27 insertions(+), 12 deletions(-) delete mode 100644 monitor/Makefile.objs create mode 100644 monitor/meson.build delete mode 100644 qom/Makefile.objs diff --git a/Makefile.objs b/Makefile.objs index 6657a6cce3..d7826c1e5c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -37,10 +37,11 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS # storage-daemon-obj-y is code used by qemu-storage-daemon (these objects are # used for system emulation, too, but specified separately there) -storage-daemon-obj-y = block/ monitor/ qapi/ qom/ storage-daemon/ +storage-daemon-obj-y = block/ qapi/ qom/ storage-daemon/ storage-daemon-obj-y += blockdev.o blockdev-nbd.o iothread.o job-qmp.o storage-daemon-obj-$(CONFIG_WIN32) += os-win32.o storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o +storage-daemon-obj-y += libqmp.fa ###################################################################### # Target independent part of system emulation. The long term path is to @@ -48,8 +49,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o # single QEMU executable should support all CPUs and machines. ifeq ($(CONFIG_SOFTMMU),y) -common-obj-y = monitor/ -common-obj-y += net/ +common-obj-y = net/ common-obj-$(CONFIG_LINUX) += fsdev/ common-obj-y += accel/ @@ -83,6 +83,8 @@ common-obj-y += backends/ common-obj-y += qapi/ +common-obj-y += libqmp.fa + endif # CONFIG_SOFTMMU ####################################################################### diff --git a/Makefile.target b/Makefile.target index c8f7a6c04b..54a9ef1330 100644 --- a/Makefile.target +++ b/Makefile.target @@ -157,7 +157,6 @@ ifdef CONFIG_SOFTMMU obj-y += softmmu/ obj-y += gdbstub.o obj-y += hw/ -obj-y += monitor/ obj-y += qapi/ obj-y += migration/ram.o LIBS := $(libs_softmmu) $(LIBS) diff --git a/meson.build b/meson.build index 6d5eb31dcf..9d1a530271 100644 --- a/meson.build +++ b/meson.build @@ -475,6 +475,7 @@ stub_ss = ss.source_set() trace_ss = ss.source_set() block_ss = ss.source_set() blockdev_ss = ss.source_set() +qmp_ss = ss.source_set() common_ss = ss.source_set() softmmu_ss = ss.source_set() user_ss = ss.source_set() @@ -655,6 +656,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true: [files('device_tree.c')]) common_ss.add(files('cpus-common.c')) subdir('softmmu') +subdir('monitor') # needed for fuzzing binaries subdir('tests/qtest/libqos') @@ -704,6 +706,14 @@ block = declare_dependency(link_whole: [libblock], link_args: '@block.syms', dependencies: [crypto, io]) +qmp_ss = qmp_ss.apply(config_host, strict: false) +libqmp = static_library('qmp', qmp_ss.sources() + genh, + dependencies: qmp_ss.dependencies(), + name_suffix: 'fa', + build_by_default: false) + +qmp = declare_dependency(link_whole: [libqmp]) + foreach m : block_mods + softmmu_mods shared_module(m.name(), name_prefix: '', diff --git a/monitor/Makefile.objs b/monitor/Makefile.objs deleted file mode 100644 index a8533c9dd7..0000000000 --- a/monitor/Makefile.objs +++ /dev/null @@ -1,6 +0,0 @@ -obj-y += misc.o -common-obj-y += monitor.o qmp.o hmp.o -common-obj-y += qmp-cmds.o qmp-cmds-control.o -common-obj-y += hmp-cmds.o - -storage-daemon-obj-y += monitor.o qmp.o qmp-cmds-control.o diff --git a/monitor/meson.build b/monitor/meson.build new file mode 100644 index 0000000000..0484a64341 --- /dev/null +++ b/monitor/meson.build @@ -0,0 +1,9 @@ +qmp_ss.add(files('monitor.c', 'qmp.c', 'qmp-cmds-control.c')) + +softmmu_ss.add(files( + 'hmp-cmds.c', + 'hmp.c', + 'qmp-cmds.c', +)) + +specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('misc.c')) diff --git a/qom/Makefile.objs b/qom/Makefile.objs deleted file mode 100644 index b9629045e6..0000000000 --- a/qom/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o -storage-daemon-obj-y += qom-qmp-cmds.o diff --git a/qom/meson.build b/qom/meson.build index cbab9cdfa2..a1cd03c82c 100644 --- a/qom/meson.build +++ b/qom/meson.build @@ -7,6 +7,9 @@ qom_ss.add(files( 'qom-qobject.c', )) +qmp_ss.add(files('qom-qmp-cmds.c')) +softmmu_ss.add(files('qom-hmp-cmds.c')) + qom_ss = qom_ss.apply(config_host, strict: false) libqom = static_library('qom', qom_ss.sources() + genh, dependencies: [qom_ss.dependencies()], From patchwork Fri Aug 21 10:22:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275924 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81035C433DF for ; Fri, 21 Aug 2020 10:57:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C20320656 for ; Fri, 21 Aug 2020 10:57:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dwKa9cmL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C20320656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94jW-0001lK-FY for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:57:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E4-0002jW-0Q for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dy-0001hM-IO for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ogfwVk2DT6wlBFVxIUMXqlYByw1+kj7zWDTQqVADZiE=; b=dwKa9cmLC+GmFTL/Gahe/uFtGVgubglSTFTCzxYPaCXZ84IOE2iLtaeCz7J91sKmB3+qQ2 xYRKVagYKAaMuDeANfrEk3qbUeam/Bv91Yp2p21j8WZ5epYYPzHa+ypKFxmchcHh1h3jN8 i5M2HWAnhG0PWZgHoK1laGpB0adk2v8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-407-lg4ioA-7O-CDnIt1mHgg7Q-1; Fri, 21 Aug 2020 06:24:39 -0400 X-MC-Unique: lg4ioA-7O-CDnIt1mHgg7Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2A431100CF73 for ; Fri, 21 Aug 2020 10:24:39 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFC647E31F; Fri, 21 Aug 2020 10:24:38 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 081/152] meson: convert net directory to Meson Date: Fri, 21 Aug 2020 06:22:18 -0400 Message-Id: <20200821102329.29777-82-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.objs | 3 +-- Makefile.target | 1 + meson.build | 10 ++++++++++ net/Makefile.objs | 32 -------------------------------- net/can/Makefile.objs | 2 -- net/can/meson.build | 5 +++++ net/meson.build | 40 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 57 insertions(+), 36 deletions(-) delete mode 100644 net/Makefile.objs delete mode 100644 net/can/Makefile.objs create mode 100644 net/can/meson.build create mode 100644 net/meson.build diff --git a/Makefile.objs b/Makefile.objs index 9d0a82d82a..f2700442a4 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -39,8 +39,7 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS # single QEMU executable should support all CPUs and machines. ifeq ($(CONFIG_SOFTMMU),y) -common-obj-y = net/ -common-obj-$(CONFIG_LINUX) += fsdev/ +common-obj-$(CONFIG_LINUX) = fsdev/ common-obj-y += accel/ diff --git a/Makefile.target b/Makefile.target index 4d912df3a3..bf3fda92c1 100644 --- a/Makefile.target +++ b/Makefile.target @@ -168,6 +168,7 @@ LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS) endif LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS) LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS) +LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS) # Hardware support ifeq ($(TARGET_NAME), sparc64) diff --git a/meson.build b/meson.build index 9bc1a2ac0d..ead9420844 100644 --- a/meson.build +++ b/meson.build @@ -149,6 +149,15 @@ if 'CONFIG_XKBCOMMON' in config_host xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(), link_args: config_host['XKBCOMMON_LIBS'].split()) endif +slirp = not_found +if config_host.has_key('CONFIG_SLIRP') + slirp = declare_dependency(compile_args: config_host['SLIRP_CFLAGS'].split(), + link_args: config_host['SLIRP_LIBS'].split()) +endif +vde = not_found +if config_host.has_key('CONFIG_VDE') + vde = declare_dependency(link_args: config_host['VDE_LIBS'].split()) +endif pulse = not_found if 'CONFIG_LIBPULSE' in config_host pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(), @@ -661,6 +670,7 @@ common_ss.add(files('cpus-common.c')) subdir('softmmu') subdir('migration') subdir('monitor') +subdir('net') subdir('replay') # needed for fuzzing binaries diff --git a/net/Makefile.objs b/net/Makefile.objs deleted file mode 100644 index 5ab45545db..0000000000 --- a/net/Makefile.objs +++ /dev/null @@ -1,32 +0,0 @@ -common-obj-y = net.o queue.o checksum.o util.o hub.o -common-obj-y += socket.o -common-obj-y += dump.o -common-obj-y += eth.o -common-obj-y += announce.o -common-obj-$(CONFIG_L2TPV3) += l2tpv3.o -common-obj-$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET_USER)) += vhost-user.o -common-obj-$(call land,$(call lnot,$(CONFIG_VIRTIO_NET)),$(CONFIG_VHOST_NET_USER)) += vhost-user-stub.o -common-obj-$(CONFIG_ALL) += vhost-user-stub.o -common-obj-$(CONFIG_SLIRP) += slirp.o -slirp.o-cflags := $(SLIRP_CFLAGS) -slirp.o-libs := $(SLIRP_LIBS) -common-obj-$(CONFIG_VDE) += vde.o -common-obj-$(CONFIG_NETMAP) += netmap.o -common-obj-y += filter.o -common-obj-y += filter-buffer.o -common-obj-y += filter-mirror.o -common-obj-y += colo-compare.o -common-obj-y += colo.o -common-obj-y += filter-rewriter.o -common-obj-y += filter-replay.o - -tap-obj-$(CONFIG_LINUX) = tap-linux.o -tap-obj-$(CONFIG_BSD) = tap-bsd.o -tap-obj-$(CONFIG_SOLARIS) = tap-solaris.o -tap-obj-y ?= tap-stub.o -common-obj-$(CONFIG_POSIX) += tap.o $(tap-obj-y) -common-obj-$(CONFIG_WIN32) += tap-win32.o -common-obj-$(CONFIG_VHOST_NET_VDPA) += vhost-vdpa.o -vde.o-libs = $(VDE_LIBS) - -common-obj-$(CONFIG_CAN_BUS) += can/ diff --git a/net/can/Makefile.objs b/net/can/Makefile.objs deleted file mode 100644 index 9f35dc5c87..0000000000 --- a/net/can/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -common-obj-y += can_core.o can_host.o -common-obj-$(CONFIG_LINUX) += can_socketcan.o diff --git a/net/can/meson.build b/net/can/meson.build new file mode 100644 index 0000000000..f53d9ec54f --- /dev/null +++ b/net/can/meson.build @@ -0,0 +1,5 @@ +can_ss = ss.source_set() +can_ss.add(files('can_core.c', 'can_host.c')) +can_ss.add(when: 'CONFIG_LINUX', if_true: files('can_socketcan.c')) + +softmmu_ss.add_all(when: 'CONFIG_CAN_BUS', if_true: can_ss) diff --git a/net/meson.build b/net/meson.build new file mode 100644 index 0000000000..6c2ec47dd5 --- /dev/null +++ b/net/meson.build @@ -0,0 +1,40 @@ +softmmu_ss.add(files( + 'announce.c', + 'checksum.c', + 'colo-compare.c', + 'colo.c', + 'dump.c', + 'eth.c', + 'filter-buffer.c', + 'filter-mirror.c', + 'filter-replay.c', + 'filter-rewriter.c', + 'filter.c', + 'hub.c', + 'net.c', + 'queue.c', + 'socket.c', + 'util.c', +)) + +softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c')) +softmmu_ss.add(when: ['CONFIG_SLIRP', slirp], if_true: files('slirp.c')) +softmmu_ss.add(when: ['CONFIG_VDE', vde], if_true: files('vde.c')) +softmmu_ss.add(when: 'CONFIG_NETMAP', if_true: files('netmap.c')) +vhost_user_ss = ss.source_set() +vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c')) +softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c')) + +softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c')) +softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c')) +softmmu_ss.add(when: 'CONFIG_SOLARIS', if_true: files('tap-solaris.c')) +tap_posix = ['tap.c'] +if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_BSD') and not config_host.has_key('CONFIG_SOLARIS') + tap_posix += 'tap-stub.c' +endif +softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix)) +softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c')) +softmmu_ss.add(when: 'CONFIG_VHOST_NET_VDPA', if_true: files('vhost-vdpa.c')) + +subdir('can') From patchwork Fri Aug 21 10:22:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275916 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B686AC433DF for ; Fri, 21 Aug 2020 11:05:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81FA220738 for ; Fri, 21 Aug 2020 11:05:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VLLOiFOI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81FA220738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94rG-0008D4-NP for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:05:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E7-0002rA-C0 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:51 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:56214 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Dz-0001hV-C3 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=grfXaRwVirWcrdrhRxW0qH8JhI7GcFToN7M5lFZbGx4=; b=VLLOiFOIwtejVDTh6L0ZyJXc6ZM4MJnWXsoMegkujiLgKS8eY1LSSN+WCapCy/By5NrLjn tB5zUeynsB1ncV6N3W48IVbyb2hjCh7wrRI34pI07AiEYSWK0tW2DivNMexqHrs6vzaj7Z ncW6/KYhw+/c9jOpKCftbTimWRWP5x0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-447--iVBoqLpPyWNNmafQmD7PA-1; Fri, 21 Aug 2020 06:24:41 -0400 X-MC-Unique: -iVBoqLpPyWNNmafQmD7PA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 16F9656B2C for ; Fri, 21 Aug 2020 10:24:40 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC6B77E31F; Fri, 21 Aug 2020 10:24:39 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 083/152] meson: convert fsdev/ Date: Fri, 21 Aug 2020 06:22:20 -0400 Message-Id: <20200821102329.29777-84-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.objs | 4 +--- configure | 1 - fsdev/Makefile.objs | 12 ------------ fsdev/meson.build | 10 ++++++++++ 4 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 fsdev/Makefile.objs diff --git a/Makefile.objs b/Makefile.objs index c00851a0cd..7158031c0c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -39,9 +39,7 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS # single QEMU executable should support all CPUs and machines. ifeq ($(CONFIG_SOFTMMU),y) -common-obj-$(CONFIG_LINUX) = fsdev/ - -common-obj-y += accel/ +common-obj-y = accel/ common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF) common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF) diff --git a/configure b/configure index 66677d61a0..3018da6336 100755 --- a/configure +++ b/configure @@ -3747,7 +3747,6 @@ int main(void) EOF if compile_prog "" "$cap_libs" ; then cap_ng=yes - libs_tools="$cap_libs $libs_tools" else if test "$cap_ng" = "yes" ; then feature_not_found "cap_ng" "Install libcap-ng devel" diff --git a/fsdev/Makefile.objs b/fsdev/Makefile.objs deleted file mode 100644 index 42cd70c367..0000000000 --- a/fsdev/Makefile.objs +++ /dev/null @@ -1,12 +0,0 @@ -# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. -# only pull in the actual 9p backend if we also enabled virtio or xen. -ifeq ($(CONFIG_FSDEV_9P),y) -common-obj-y = qemu-fsdev.o 9p-marshal.o 9p-iov-marshal.o -else -common-obj-y = qemu-fsdev-dummy.o -endif -common-obj-y += qemu-fsdev-opts.o qemu-fsdev-throttle.o - -# Toplevel always builds this; targets without virtio will put it in -# common-obj-y -common-obj-$(CONFIG_ALL) += qemu-fsdev-dummy.o diff --git a/fsdev/meson.build b/fsdev/meson.build index 30e2319960..7dd1cc9bfb 100644 --- a/fsdev/meson.build +++ b/fsdev/meson.build @@ -1,3 +1,13 @@ +fsdev_ss = ss.source_set() +fsdev_ss.add(files('qemu-fsdev-opts.c', 'qemu-fsdev-throttle.c')) +fsdev_ss.add(when: 'CONFIG_ALL', if_true: files('qemu-fsdev-dummy.c')) +fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files( + '9p-iov-marshal.c', + '9p-marshal.c', + 'qemu-fsdev.c', +), if_false: files('qemu-fsdev-dummy.c')) +softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss) + have_virtfs_proxy_helper = have_tools and libattr.found() and libcap_ng.found() and 'CONFIG_VIRTFS' in config_host if have_virtfs_proxy_helper executable('virtfs-proxy-helper', From patchwork Fri Aug 21 10:22:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275918 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9673C433DF for ; Fri, 21 Aug 2020 11:03:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8051820738 for ; Fri, 21 Aug 2020 11:03:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AUhQrLHP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8051820738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94p4-0004n3-NY for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:03:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E5-0002o1-EF for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94E0-0001hl-Ar for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vJYRzFczP3G71nLXPxT7FoelYpxmkicx4WZGHD1y9RM=; b=AUhQrLHP2vsjGdF1PUfORkYsUrlq9CV8EPSWotNSuDLXbHJzIZ5oa3xX2Am97WExBEwTpi oEoDTCOcfjgaNHPQpMmbm4DxkNzqb6xQSeAEMFy2PVlOOZtyX9dcLxoR88ZjEhbnZsY2UW ruQz7B/5hGAl9wpDNkDZxuPfiN2f0sI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-K1CWrxGwMZeeM_JAERyM8w-1; Fri, 21 Aug 2020 06:24:41 -0400 X-MC-Unique: K1CWrxGwMZeeM_JAERyM8w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0569D56B2B for ; Fri, 21 Aug 2020 10:24:41 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA3307E31F; Fri, 21 Aug 2020 10:24:40 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 085/152] meson: convert qapi-specific to meson Date: Fri, 21 Aug 2020 06:22:22 -0400 Message-Id: <20200821102329.29777-86-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.objs | 2 -- Makefile.target | 1 - qapi/Makefile.objs | 15 --------------- qapi/meson.build | 10 +++++++--- 4 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 qapi/Makefile.objs diff --git a/Makefile.objs b/Makefile.objs index 3b32a4c9bb..c332323b81 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -64,8 +64,6 @@ common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF common-obj-y += hw/ common-obj-m += hw/ -common-obj-y += qapi/ - common-obj-y += libqmp.fa endif # CONFIG_SOFTMMU diff --git a/Makefile.target b/Makefile.target index bf3fda92c1..386378b9c8 100644 --- a/Makefile.target +++ b/Makefile.target @@ -157,7 +157,6 @@ ifdef CONFIG_SOFTMMU obj-y += softmmu/ obj-y += gdbstub.o obj-y += hw/ -obj-y += qapi/ LIBS := $(libs_softmmu) $(LIBS) # Temporary until emulators are linked by Meson diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs deleted file mode 100644 index c0a31be1a1..0000000000 --- a/qapi/Makefile.objs +++ /dev/null @@ -1,15 +0,0 @@ -QAPI_TARGET_MODULES = machine-target misc-target - -obj-y = qapi-introspect.o -obj-y += $(QAPI_TARGET_MODULES:%=qapi-types-%.o) -obj-y += qapi-types.o -obj-y += $(QAPI_TARGET_MODULES:%=qapi-visit-%.o) -obj-y += qapi-visit.o -obj-y += $(QAPI_TARGET_MODULES:%=qapi-events-%.o) -obj-y += qapi-events.o -obj-y += $(QAPI_TARGET_MODULES:%=qapi-commands-%.o) -obj-y += qapi-commands.o -obj-y += qapi-init-commands.o - -QAPI_MODULES_STORAGE_DAEMON = block-core char common control crypto -QAPI_MODULES_STORAGE_DAEMON += introspect job qom sockets pragma transaction diff --git a/qapi/meson.build b/qapi/meson.build index f45b80bbfa..2b2872a41d 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -114,8 +114,12 @@ foreach output : qapi_util_outputs i = i + 1 endforeach -# These are still handled by the Makefile -i += qapi_nonmodule_outputs.length() -i += qapi_specific_outputs.length() +foreach output : qapi_specific_outputs + qapi_nonmodule_outputs + if output.endswith('.h') + genh += qapi_files[i] + endif + specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i]) + i = i + 1 +endforeach qapi_doc_texi = qapi_files[i] From patchwork Fri Aug 21 10:22:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275922 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E6E8C433DF for ; Fri, 21 Aug 2020 10:58:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2786E20656 for ; Fri, 21 Aug 2020 10:58:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KxW5qLfC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2786E20656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94l0-0005Af-98 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 06:58:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E6-0002pf-Ct for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:50 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:32485 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94E1-0001hy-2A for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vjZj0bDom7PpYauXnuxUduUJ8DfIPmXLnJUDYXk86fI=; b=KxW5qLfCSdCsF/S0AWhToTOz3iJ77AZI4AR5UL+SsdaNa6kKAwKI4LQ4VH0KlXmS6vN1mk U9OIOCIoEbJGS4vgZSHBvVbewxgaqHk5+hPdXPIPFzPTdQFrPjqz7b9564Y8PDbPiBONmO bzp6rQjaxK7B/lt4Qyb0utq1RJsGFtg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-N8k1bgLzNa6aIyGqlNBC5A-1; Fri, 21 Aug 2020 06:24:42 -0400 X-MC-Unique: N8k1bgLzNa6aIyGqlNBC5A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E5E7756B2C for ; Fri, 21 Aug 2020 10:24:41 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 969BE7E31F; Fri, 21 Aug 2020 10:24:41 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 087/152] meson: convert hw/core Date: Fri, 21 Aug 2020 06:22:24 -0400 Message-Id: <20200821102329.29777-88-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 01:00:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/core/Makefile.objs | 34 ----------------------------- hw/core/meson.build | 49 ++++++++++++++++++++++++++++++++++++++++++ hw/meson.build | 1 + tests/Makefile.include | 10 +-------- 5 files changed, 51 insertions(+), 44 deletions(-) delete mode 100644 hw/core/Makefile.objs create mode 100644 hw/core/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index d204a906af..bdf8bdf256 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -1,4 +1,3 @@ -devices-dirs-y = core/ ifeq ($(CONFIG_SOFTMMU), y) devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/ devices-dirs-y += acpi/ diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs deleted file mode 100644 index d8fee8effe..0000000000 --- a/hw/core/Makefile.objs +++ /dev/null @@ -1,34 +0,0 @@ -# core qdev-related obj files, also used by *-user: -common-obj-y += qdev.o qdev-properties.o -common-obj-y += bus.o -common-obj-y += cpu.o -common-obj-y += resettable.o -common-obj-y += hotplug.o -common-obj-y += vmstate-if.o -# irq.o needed for qdev GPIO handling: -common-obj-y += irq.o -common-obj-y += clock.o qdev-clock.o - -common-obj-$(CONFIG_SOFTMMU) += reset.o -common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o -common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o -common-obj-$(CONFIG_SOFTMMU) += nmi.o -common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o -common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o -common-obj-$(CONFIG_SOFTMMU) += sysbus.o -common-obj-$(CONFIG_SOFTMMU) += machine.o -common-obj-$(CONFIG_SOFTMMU) += null-machine.o -common-obj-$(CONFIG_SOFTMMU) += loader.o -common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o -common-obj-$(CONFIG_SOFTMMU) += numa.o -common-obj-$(CONFIG_SOFTMMU) += clock-vmstate.o -obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o - -common-obj-$(CONFIG_XILINX_AXI) += stream.o -common-obj-$(CONFIG_PTIMER) += ptimer.o -common-obj-$(CONFIG_FITLOADER) += loader-fit.o -common-obj-$(CONFIG_REGISTER) += register.o -common-obj-$(CONFIG_OR_IRQ) += or-irq.o -common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o -common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o -common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o diff --git a/hw/core/meson.build b/hw/core/meson.build new file mode 100644 index 0000000000..fc91f98075 --- /dev/null +++ b/hw/core/meson.build @@ -0,0 +1,49 @@ +# core qdev-related obj files, also used by *-user and unit tests +hwcore_files = files( + 'bus.c', + 'fw-path-provider.c', + 'hotplug.c', + 'qdev-properties.c', + 'qdev.c', + 'reset.c', + 'resettable.c', + 'vmstate-if.c', + # irq.c needed for qdev GPIO handling: + 'irq.c', + 'clock.c', + 'qdev-clock.c', +) + +libhwcore = static_library('hwcore', sources: hwcore_files + genh, + name_suffix: 'fa', + build_by_default: false) +hwcore = declare_dependency(link_whole: libhwcore) +common_ss.add(hwcore) + +common_ss.add(files('cpu.c')) +common_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c')) +common_ss.add(when: 'CONFIG_GENERIC_LOADER', if_true: files('generic-loader.c')) +common_ss.add(when: 'CONFIG_OR_IRQ', if_true: files('or-irq.c')) +common_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('platform-bus.c')) +common_ss.add(when: 'CONFIG_PTIMER', if_true: files('ptimer.c')) +common_ss.add(when: 'CONFIG_REGISTER', if_true: files('register.c')) +common_ss.add(when: 'CONFIG_SPLIT_IRQ', if_true: files('split-irq.c')) +common_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c')) + +softmmu_ss.add(files( + 'loader.c', + 'machine-hmp-cmds.c', + 'machine.c', + 'nmi.c', + 'null-machine.c', + 'qdev-fw.c', + 'qdev-properties-system.c', + 'sysbus.c', + 'vm-change-state-handler.c', + 'clock-vmstate.c', +)) + +specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files( + 'machine-qmp-cmds.c', + 'numa.c', +)) diff --git a/hw/meson.build b/hw/meson.build index 08112a5e4b..fe7c466460 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1 +1,2 @@ +subdir('core') subdir('xen') diff --git a/tests/Makefile.include b/tests/Makefile.include index 8ac9c68f04..609a40c6e5 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -244,15 +244,7 @@ tests/test-bufferiszero$(EXESUF): tests/test-bufferiszero.o $(test-util-obj-y) tests/atomic_add-bench$(EXESUF): tests/atomic_add-bench.o $(test-util-obj-y) tests/atomic64-bench$(EXESUF): tests/atomic64-bench.o $(test-util-obj-y) -tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \ - hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\ - hw/core/bus.o \ - hw/core/resettable.o \ - hw/core/irq.o \ - hw/core/fw-path-provider.o \ - hw/core/reset.o \ - hw/core/vmstate-if.o \ - hw/core/clock.o hw/core/qdev-clock.o \ +tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o hw/core/libhwcore.fa \ $(test-qapi-obj-y) tests/test-vmstate$(EXESUF): tests/test-vmstate.o migration/libmigration.fa \ $(test-io-obj-y) From patchwork Fri Aug 21 10:22:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51B70C433E1 for ; Fri, 21 Aug 2020 11:05:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2247820738 for ; Fri, 21 Aug 2020 11:05:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DF9uME2R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2247820738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94rl-00016Y-C8 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:05:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E9-0002y4-Ss for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:53 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:49488 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94E1-0001iG-Tb for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uUYOV5R30awcdYvzBWUKo8CTuqBwQnIx6LfJ7URbYgQ=; b=DF9uME2RRpoRhW8kJ171scuk225oYZ4qCjMP7sC/LhmdRNaKwsORJhn8T3fFLJImBojz5x g0tqbI+kbJS0iU5KwowJ30OTrnbb3eHcRDjCLlRw4Cs4cF/I6jO3IRamreOLzQ6yig5Xu1 LMrfMuoCLt5CXqIQO1oS41MF31ETTNA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-440-Vsv3PLhSOW-1_fHznDXr7g-1; Fri, 21 Aug 2020 06:24:43 -0400 X-MC-Unique: Vsv3PLhSOW-1_fHznDXr7g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 745D0191E2A0 for ; Fri, 21 Aug 2020 10:24:42 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12B727E31F; Fri, 21 Aug 2020 10:24:42 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 088/152] meson: convert hw/semihosting Date: Fri, 21 Aug 2020 06:22:25 -0400 Message-Id: <20200821102329.29777-89-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/semihosting/Makefile.objs | 2 -- hw/semihosting/meson.build | 4 ++++ 4 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 hw/semihosting/Makefile.objs create mode 100644 hw/semihosting/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index bdf8bdf256..6a7ca0fcfe 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -36,7 +36,6 @@ devices-dirs-y += virtio/ devices-dirs-y += watchdog/ devices-dirs-$(CONFIG_MEM_DEVICE) += mem/ devices-dirs-$(CONFIG_NUBUS) += nubus/ -devices-dirs-y += semihosting/ devices-dirs-y += smbios/ endif diff --git a/hw/meson.build b/hw/meson.build index fe7c466460..66a2f6cddd 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,2 +1,3 @@ subdir('core') +subdir('semihosting') subdir('xen') diff --git a/hw/semihosting/Makefile.objs b/hw/semihosting/Makefile.objs deleted file mode 100644 index 4ad47c05c0..0000000000 --- a/hw/semihosting/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -obj-$(CONFIG_SEMIHOSTING) += config.o -obj-$(CONFIG_SEMIHOSTING) += console.o diff --git a/hw/semihosting/meson.build b/hw/semihosting/meson.build new file mode 100644 index 0000000000..f40ac574c4 --- /dev/null +++ b/hw/semihosting/meson.build @@ -0,0 +1,4 @@ +specific_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files( + 'config.c', + 'console.c', +)) From patchwork Fri Aug 21 10:22:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E22B3C433E1 for ; Fri, 21 Aug 2020 11:03:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2C2A20738 for ; Fri, 21 Aug 2020 11:03:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Z/P6NQQg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2C2A20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94pt-00062s-Ve for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:03:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94E8-0002vm-Vn for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94E2-0001iN-4D for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NHYQLCRCnN6yVHrWNrBtsGvSH+AR79Wdgf0NvoHLBfM=; b=Z/P6NQQgYHUYSwHVYTzsHxo5sHmIlTGT+IPF9F+rddQhdAKF0TmA9TZUdplq/peVwkX7oh sS5MHzUNsTX5oF7duF1APZ6cJFjHiylHdFPIoE/HAvaO6+fD/wOfp5cQlySCTgNPb56EaT oLaEk+dTep7BD1FU/S2B+x7zYPilB2Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-LhHYAhQlOM2SoedWQDipGw-1; Fri, 21 Aug 2020 06:24:43 -0400 X-MC-Unique: LhHYAhQlOM2SoedWQDipGw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E2FE4801AF3 for ; Fri, 21 Aug 2020 10:24:42 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94FC77E322; Fri, 21 Aug 2020 10:24:42 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 089/152] meson: convert hw/nubus Date: Fri, 21 Aug 2020 06:22:26 -0400 Message-Id: <20200821102329.29777-90-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/nubus/Makefile.objs | 4 ---- hw/nubus/meson.build | 7 +++++++ 4 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 hw/nubus/Makefile.objs create mode 100644 hw/nubus/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 6a7ca0fcfe..86bc201a55 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -35,7 +35,6 @@ devices-dirs-$(CONFIG_VFIO) += vfio/ devices-dirs-y += virtio/ devices-dirs-y += watchdog/ devices-dirs-$(CONFIG_MEM_DEVICE) += mem/ -devices-dirs-$(CONFIG_NUBUS) += nubus/ devices-dirs-y += smbios/ endif diff --git a/hw/meson.build b/hw/meson.build index 66a2f6cddd..03ef30212e 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,3 +1,4 @@ subdir('core') +subdir('nubus') subdir('semihosting') subdir('xen') diff --git a/hw/nubus/Makefile.objs b/hw/nubus/Makefile.objs deleted file mode 100644 index 135ba7878d..0000000000 --- a/hw/nubus/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -common-obj-y += nubus-device.o -common-obj-y += nubus-bus.o -common-obj-y += nubus-bridge.o -common-obj-$(CONFIG_Q800) += mac-nubus-bridge.o diff --git a/hw/nubus/meson.build b/hw/nubus/meson.build new file mode 100644 index 0000000000..9287c633aa --- /dev/null +++ b/hw/nubus/meson.build @@ -0,0 +1,7 @@ +nubus_ss = ss.source_set() +nubus_ss.add(files('nubus-device.c')) +nubus_ss.add(files('nubus-bus.c')) +nubus_ss.add(files('nubus-bridge.c')) +nubus_ss.add(when: 'CONFIG_Q800', if_true: files('mac-nubus-bridge.c')) + +softmmu_ss.add_all(when: 'CONFIG_NUBUS', if_true: nubus_ss) From patchwork Fri Aug 21 10:22:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275920 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29481C433E1 for ; Fri, 21 Aug 2020 11:00:28 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCE6220702 for ; Fri, 21 Aug 2020 11:00:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NqTPVwbO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCE6220702 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94mZ-00009D-2z for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:00:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94EA-00030F-L2 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:54 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:42361 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94E7-0001j7-EA for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EqxqYSBV7uEMenTXBSHXyP24ul4XVhFr0o+0x9l/sqA=; b=NqTPVwbOR/W11+j8g3Cr/oQdVYFJFB1FaVsxrk+z8TI8ezuQnAVlpNhQ05hBdtRGpT0dL2 JBbHtQzdD8yAFvnzJ3YToazSiGaZT/977pwyn/oABc/R+KHz+KV5HEw8u6THHhOf5a8TRz qxOjeLhKX9PcPGJafUaZp4UaIDuEsVk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-350-s5S1fR9WMgKlOVBQ21Omgw-1; Fri, 21 Aug 2020 06:24:49 -0400 X-MC-Unique: s5S1fR9WMgKlOVBQ21Omgw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 405CA100CF71 for ; Fri, 21 Aug 2020 10:24:47 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3B0A795AE; Fri, 21 Aug 2020 10:24:46 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 091/152] meson: convert hw/mem Date: Fri, 21 Aug 2020 06:22:28 -0400 Message-Id: <20200821102329.29777-92-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/mem/Kconfig | 1 + hw/mem/Makefile.objs | 3 --- hw/mem/meson.build | 6 ++++++ hw/meson.build | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 hw/mem/Makefile.objs create mode 100644 hw/mem/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 73c49ddd3b..df72b25a64 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -34,7 +34,6 @@ devices-dirs-y += usb/ devices-dirs-$(CONFIG_VFIO) += vfio/ devices-dirs-y += virtio/ devices-dirs-y += watchdog/ -devices-dirs-$(CONFIG_MEM_DEVICE) += mem/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig index c27844900d..a0ef2cf648 100644 --- a/hw/mem/Kconfig +++ b/hw/mem/Kconfig @@ -9,3 +9,4 @@ config NVDIMM bool default y depends on (PC || PSERIES || ARM_VIRT) + select MEM_DEVICE diff --git a/hw/mem/Makefile.objs b/hw/mem/Makefile.objs deleted file mode 100644 index 56345befd0..0000000000 --- a/hw/mem/Makefile.objs +++ /dev/null @@ -1,3 +0,0 @@ -common-obj-$(CONFIG_DIMM) += pc-dimm.o -common-obj-y += memory-device.o -common-obj-$(CONFIG_NVDIMM) += nvdimm.o diff --git a/hw/mem/meson.build b/hw/mem/meson.build new file mode 100644 index 0000000000..ba424622bb --- /dev/null +++ b/hw/mem/meson.build @@ -0,0 +1,6 @@ +mem_ss = ss.source_set() +mem_ss.add(files('memory-device.c')) +mem_ss.add(when: 'CONFIG_DIMM', if_true: files('pc-dimm.c')) +mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c')) + +softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss) diff --git a/hw/meson.build b/hw/meson.build index dccc2d19a6..542d675618 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('mem') subdir('nubus') subdir('semihosting') subdir('smbios') From patchwork Fri Aug 21 10:22:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275914 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E636C433E1 for ; Fri, 21 Aug 2020 11:06:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CC46F20738 for ; Fri, 21 Aug 2020 11:06:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cLMbHr6v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC46F20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94sZ-0003IN-S7 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:06:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94EC-00036Q-Mw for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:24456 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94E7-0001jK-VF for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3C/7hgOHspBfIxBONsfiAWNW93qZIpPhApRZy9KVThY=; b=cLMbHr6vYIW0yHeljIyWYdok9qfhxO+9Y7f523i4+FkueEVUQQouO/YxaVNik03lGfgVtG EL15L0WOC5KCWY6iIyLWgeOX40EIvl0/8UUuoe0FKwSZzD2Wydm3KaZJMiuAN+LEQZYpjc P0p5yzzZagXezGb59+f8WxR3SGPvWsw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-209-vV2z6SF5M0aGBpYLkadCEQ-1; Fri, 21 Aug 2020 06:24:49 -0400 X-MC-Unique: vV2z6SF5M0aGBpYLkadCEQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 73D531009442 for ; Fri, 21 Aug 2020 10:24:48 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3199A795AE; Fri, 21 Aug 2020 10:24:48 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 094/152] meson: convert hw/vfio Date: Fri, 21 Aug 2020 06:22:31 -0400 Message-Id: <20200821102329.29777-95-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/vfio/Makefile.objs | 8 -------- hw/vfio/meson.build | 18 ++++++++++++++++++ 4 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 hw/vfio/Makefile.objs create mode 100644 hw/vfio/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index a1cfb99334..f6e08f6660 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -31,7 +31,6 @@ devices-dirs-y += ssi/ devices-dirs-y += timer/ devices-dirs-$(CONFIG_TPM) += tpm/ devices-dirs-y += usb/ -devices-dirs-$(CONFIG_VFIO) += vfio/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 8338fc4408..4dafc8a08e 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -3,6 +3,7 @@ subdir('mem') subdir('nubus') subdir('semihosting') subdir('smbios') +subdir('vfio') subdir('virtio') subdir('watchdog') subdir('xen') diff --git a/hw/vfio/Makefile.objs b/hw/vfio/Makefile.objs deleted file mode 100644 index 9bb1c09e84..0000000000 --- a/hw/vfio/Makefile.objs +++ /dev/null @@ -1,8 +0,0 @@ -obj-y += common.o spapr.o -obj-$(CONFIG_VFIO_PCI) += pci.o pci-quirks.o display.o -obj-$(CONFIG_VFIO_CCW) += ccw.o -obj-$(CONFIG_VFIO_PLATFORM) += platform.o -obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o -obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o -obj-$(CONFIG_VFIO_AP) += ap.o -obj-$(CONFIG_VFIO_IGD) += igd.o diff --git a/hw/vfio/meson.build b/hw/vfio/meson.build new file mode 100644 index 0000000000..37efa74018 --- /dev/null +++ b/hw/vfio/meson.build @@ -0,0 +1,18 @@ +vfio_ss = ss.source_set() +vfio_ss.add(files( + 'common.c', + 'spapr.c', +)) +vfio_ss.add(when: 'CONFIG_VFIO_PCI', if_true: files( + 'display.c', + 'pci-quirks.c', + 'pci.c', +)) +vfio_ss.add(when: 'CONFIG_VFIO_CCW', if_true: files('ccw.c')) +vfio_ss.add(when: 'CONFIG_VFIO_PLATFORM', if_true: files('platform.c')) +vfio_ss.add(when: 'CONFIG_VFIO_XGMAC', if_true: files('calxeda-xgmac.c')) +vfio_ss.add(when: 'CONFIG_VFIO_AMD_XGBE', if_true: files('amd-xgbe.c')) +vfio_ss.add(when: 'CONFIG_VFIO_AP', if_true: files('ap.c')) +vfio_ss.add(when: 'CONFIG_VFIO_IGD', if_true: files('igd.c')) + +specific_ss.add_all(when: 'CONFIG_VFIO', if_true: vfio_ss) From patchwork Fri Aug 21 10:22:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275911 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20AE4C433E1 for ; Fri, 21 Aug 2020 11:09:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E173220738 for ; Fri, 21 Aug 2020 11:09:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BKNoE5Ez" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E173220738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94vm-00084v-6y for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:09:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94EC-00035R-Bx for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:56 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:21322 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94E8-0001jT-MW for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n8upm3BapCkLlRkXboJxxZ9NvS70YwkGjkzhPIn1foE=; b=BKNoE5EzWM43mHibsNYI8HGQvUsgKSTbUt0S9YTeoMM21HAtAdQsimQm6KS6gZTVz/BOqa 9hIoycmy8G10bl/L0QUSEzvpK5anWRVM5s73PklALcUBCRFflSp42aib6EB3rkmnYPVmvG kupog21vrIqvbIoBfTjJY0fB0yNaX/0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-rWBFYuTmMWi1MWHuMdKOPg-1; Fri, 21 Aug 2020 06:24:50 -0400 X-MC-Unique: rWBFYuTmMWi1MWHuMdKOPg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 387EF56B2D for ; Fri, 21 Aug 2020 10:24:49 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB795795AE; Fri, 21 Aug 2020 10:24:48 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 096/152] meson: convert hw/tpm Date: Fri, 21 Aug 2020 06:22:33 -0400 Message-Id: <20200821102329.29777-97-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/tpm/Makefile.objs | 6 ------ hw/tpm/meson.build | 8 ++++++++ 4 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 hw/tpm/Makefile.objs create mode 100644 hw/tpm/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index c2619bbb50..f0e5728d13 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -29,7 +29,6 @@ devices-dirs-$(CONFIG_SCSI) += scsi/ devices-dirs-y += sd/ devices-dirs-y += ssi/ devices-dirs-y += timer/ -devices-dirs-$(CONFIG_TPM) += tpm/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 89bd6adb70..2ddf6bad33 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -3,6 +3,7 @@ subdir('mem') subdir('nubus') subdir('semihosting') subdir('smbios') +subdir('tpm') subdir('usb') subdir('vfio') subdir('virtio') diff --git a/hw/tpm/Makefile.objs b/hw/tpm/Makefile.objs deleted file mode 100644 index 6fc05be67c..0000000000 --- a/hw/tpm/Makefile.objs +++ /dev/null @@ -1,6 +0,0 @@ -obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) += tpm_ppi.o -common-obj-$(CONFIG_TPM_TIS_ISA) += tpm_tis_isa.o -common-obj-$(CONFIG_TPM_TIS_SYSBUS) += tpm_tis_sysbus.o -common-obj-$(CONFIG_TPM_TIS) += tpm_tis_common.o -common-obj-$(CONFIG_TPM_CRB) += tpm_crb.o -obj-$(CONFIG_TPM_SPAPR) += tpm_spapr.o diff --git a/hw/tpm/meson.build b/hw/tpm/meson.build new file mode 100644 index 0000000000..1c68d81d6a --- /dev/null +++ b/hw/tpm/meson.build @@ -0,0 +1,8 @@ +softmmu_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_tis_common.c')) +softmmu_ss.add(when: 'CONFIG_TPM_TIS_ISA', if_true: files('tpm_tis_isa.c')) +softmmu_ss.add(when: 'CONFIG_TPM_TIS_SYSBUS', if_true: files('tpm_tis_sysbus.c')) +softmmu_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_crb.c')) + +specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPM_TIS'], if_true: files('tpm_ppi.c')) +specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPM_CRB'], if_true: files('tpm_ppi.c')) +specific_ss.add(when: 'CONFIG_TPM_SPAPR', if_true: files('tpm_spapr.c')) From patchwork Fri Aug 21 10:22:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EC73C433E1 for ; Fri, 21 Aug 2020 11:07:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A72E20738 for ; Fri, 21 Aug 2020 11:07:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="geGnre26" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A72E20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94t1-0004Wl-Cp for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:07:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94EB-00034H-Uf for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:39064) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94E8-0001jX-SB for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:24:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zCtt3wfDk2U6pD6XbYja2DKFOXpiv+tulHE30GporkU=; b=geGnre26cb5+E1jkrLcj/Bi900CDzS9aorYzedfsSBBdc8bW8e9vfm0S5nniXHRfsQv8TL lg1ciyoOAKTXsFjvael3hjQoAmE26uHs0F3CzRaIJ6ZBpC5Dt6+Kt7MjYsx64+ULO8xjoz JubnF3w8UkvOCOM8ZLrpsBYeWeUFzBc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-368-iJuFpgN2MiKFfefLQeHUkA-1; Fri, 21 Aug 2020 06:24:50 -0400 X-MC-Unique: iJuFpgN2MiKFfefLQeHUkA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94516191E2A3 for ; Fri, 21 Aug 2020 10:24:49 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53500795AE; Fri, 21 Aug 2020 10:24:49 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 097/152] meson: convert hw/timer Date: Fri, 21 Aug 2020 06:22:34 -0400 Message-Id: <20200821102329.29777-98-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/timer/Makefile.objs | 41 ----------------------------------------- hw/timer/meson.build | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 42 deletions(-) delete mode 100644 hw/timer/Makefile.objs create mode 100644 hw/timer/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index f0e5728d13..70ecaa8135 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -28,7 +28,6 @@ devices-dirs-y += rtc/ devices-dirs-$(CONFIG_SCSI) += scsi/ devices-dirs-y += sd/ devices-dirs-y += ssi/ -devices-dirs-y += timer/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 2ddf6bad33..50b26db852 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -3,6 +3,7 @@ subdir('mem') subdir('nubus') subdir('semihosting') subdir('smbios') +subdir('timer') subdir('tpm') subdir('usb') subdir('vfio') diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs deleted file mode 100644 index 1303b13e0d..0000000000 --- a/hw/timer/Makefile.objs +++ /dev/null @@ -1,41 +0,0 @@ -common-obj-$(CONFIG_ARM_TIMER) += arm_timer.o -common-obj-$(CONFIG_ARM_MPTIMER) += arm_mptimer.o -common-obj-$(CONFIG_ARM_V7M) += armv7m_systick.o -common-obj-$(CONFIG_A9_GTIMER) += a9gtimer.o -common-obj-$(CONFIG_CADENCE) += cadence_ttc.o -common-obj-$(CONFIG_HPET) += hpet.o -common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o -common-obj-$(CONFIG_PUV3) += puv3_ost.o -common-obj-$(CONFIG_XILINX) += xilinx_timer.o -common-obj-$(CONFIG_SLAVIO) += slavio_timer.o -common-obj-$(CONFIG_ETRAXFS) += etraxfs_timer.o -common-obj-$(CONFIG_GRLIB) += grlib_gptimer.o -common-obj-$(CONFIG_IMX) += imx_epit.o -common-obj-$(CONFIG_IMX) += imx_gpt.o -common-obj-$(CONFIG_LM32) += lm32_timer.o -common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o -common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o - -common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o -common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o -common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o -common-obj-$(CONFIG_OMAP) += omap_gptimer.o -common-obj-$(CONFIG_OMAP) += omap_synctimer.o -common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o -common-obj-$(CONFIG_SH4) += sh_timer.o -common-obj-$(CONFIG_RENESAS_TMR) += renesas_tmr.o -common-obj-$(CONFIG_RENESAS_CMT) += renesas_cmt.o -common-obj-$(CONFIG_DIGIC) += digic-timer.o -common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o - -common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o - -common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o - -common-obj-$(CONFIG_CMSDK_APB_TIMER) += cmsdk-apb-timer.o -common-obj-$(CONFIG_CMSDK_APB_DUALTIMER) += cmsdk-apb-dualtimer.o -common-obj-$(CONFIG_MSF2) += mss-timer.o -common-obj-$(CONFIG_RASPI) += bcm2835_systmr.o - -obj-$(CONFIG_AVR_TIMER16) += avr_timer16.o diff --git a/hw/timer/meson.build b/hw/timer/meson.build new file mode 100644 index 0000000000..9f0a267c83 --- /dev/null +++ b/hw/timer/meson.build @@ -0,0 +1,37 @@ +softmmu_ss.add(when: 'CONFIG_A9_GTIMER', if_true: files('a9gtimer.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10_PIT', if_true: files('allwinner-a10-pit.c')) +softmmu_ss.add(when: 'CONFIG_ALTERA_TIMER', if_true: files('altera_timer.c')) +softmmu_ss.add(when: 'CONFIG_ARM_MPTIMER', if_true: files('arm_mptimer.c')) +softmmu_ss.add(when: 'CONFIG_ARM_TIMER', if_true: files('arm_timer.c')) +softmmu_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_systick.c')) +softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_timer.c')) +softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_ttc.c')) +softmmu_ss.add(when: 'CONFIG_CMSDK_APB_DUALTIMER', if_true: files('cmsdk-apb-dualtimer.c')) +softmmu_ss.add(when: 'CONFIG_CMSDK_APB_TIMER', if_true: files('cmsdk-apb-timer.c')) +softmmu_ss.add(when: 'CONFIG_RENESAS_TMR', if_true: files('renesas_tmr.c')) +softmmu_ss.add(when: 'CONFIG_RENESAS_CMT', if_true: files('renesas_cmt.c')) +softmmu_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-timer.c')) +softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_timer.c')) +softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_mct.c')) +softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pwm.c')) +softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_gptimer.c')) +softmmu_ss.add(when: 'CONFIG_HPET', if_true: files('hpet.c')) +softmmu_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c')) +softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c')) +softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpt.c')) +softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_timer.c')) +softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-sysctl.c')) +softmmu_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c')) +softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c')) +softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_timer.c')) +softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gptimer.c')) +softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_synctimer.c')) +softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_ost.c')) +softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_timer.c')) +softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_systmr.c')) +softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_timer.c')) +softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_timer.c')) +softmmu_ss.add(when: 'CONFIG_STM32F2XX_TIMER', if_true: files('stm32f2xx_timer.c')) +softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_timer.c')) + +specific_ss.add(when: 'CONFIG_AVR_TIMER16', if_true: files('avr_timer16.c')) From patchwork Fri Aug 21 10:22:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275912 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99167C433E1 for ; Fri, 21 Aug 2020 11:08:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63AC520738 for ; Fri, 21 Aug 2020 11:08:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gboypxTe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63AC520738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94uD-0006gf-Jk for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:08:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94EG-00039g-Dh for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:59174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EE-0001kd-4E for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R9q1KgmDfLOVgzy6SPL2YsMS59wd78HyOGj+ayBblnc=; b=gboypxTec/hORffULso5JwZ4GWf6Ywxe5VLNk7/qTylNyQ2kGJzmFxC2w6rnRuNPNu1Edp oVBukJT/iB7GHrwEU4vLbY5lGqVzfKZcYKUNV8E3u+z3O0kYP6avqSFlDbvXJ3vM+712va tIc/PF3sPEMOIAsJOW8BqkAoQDBnUXE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-6-Y8vpbMpVOrGWKyG8mLndIA-1; Fri, 21 Aug 2020 06:24:55 -0400 X-MC-Unique: Y8vpbMpVOrGWKyG8mLndIA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 39EBD100CF6F for ; Fri, 21 Aug 2020 10:24:54 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id B119C60BF1; Fri, 21 Aug 2020 10:24:50 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 100/152] meson: convert hw/sd Date: Fri, 21 Aug 2020 06:22:37 -0400 Message-Id: <20200821102329.29777-101-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/sd/Makefile.objs | 12 ------------ hw/sd/meson.build | 12 ++++++++++++ 4 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 hw/sd/Makefile.objs create mode 100644 hw/sd/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index e50eb04635..6f9c0b7983 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -25,7 +25,6 @@ devices-dirs-y += pci/ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ devices-dirs-y += pcmcia/ devices-dirs-$(CONFIG_SCSI) += scsi/ -devices-dirs-y += sd/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 75644266f2..a73f4aebde 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -2,6 +2,7 @@ subdir('core') subdir('mem') subdir('nubus') subdir('rtc') +subdir('sd') subdir('semihosting') subdir('smbios') subdir('ssi') diff --git a/hw/sd/Makefile.objs b/hw/sd/Makefile.objs deleted file mode 100644 index 0d1df1721c..0000000000 --- a/hw/sd/Makefile.objs +++ /dev/null @@ -1,12 +0,0 @@ -common-obj-$(CONFIG_PL181) += pl181.o -common-obj-$(CONFIG_SSI_SD) += ssi-sd.o -common-obj-$(CONFIG_SD) += sd.o core.o sdmmc-internal.o -common-obj-$(CONFIG_SDHCI) += sdhci.o -common-obj-$(CONFIG_SDHCI_PCI) += sdhci-pci.o - -common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-sdhost.o -common-obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o -common-obj-$(CONFIG_OMAP) += omap_mmc.o -common-obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o -common-obj-$(CONFIG_RASPI) += bcm2835_sdhost.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_sdhci.o diff --git a/hw/sd/meson.build b/hw/sd/meson.build new file mode 100644 index 0000000000..b43e59bd00 --- /dev/null +++ b/hw/sd/meson.build @@ -0,0 +1,12 @@ +softmmu_ss.add(when: 'CONFIG_PL181', if_true: files('pl181.c')) +softmmu_ss.add(when: 'CONFIG_SD', if_true: files('sd.c', 'core.c', 'sdmmc-internal.c')) +softmmu_ss.add(when: 'CONFIG_SDHCI', if_true: files('sdhci.c')) +softmmu_ss.add(when: 'CONFIG_SDHCI_PCI', if_true: files('sdhci-pci.c')) +softmmu_ss.add(when: 'CONFIG_SSI_SD', if_true: files('ssi-sd.c')) + +softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-memcard.c')) +softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_mmc.c')) +softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_mmci.c')) +softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_sdhost.c')) +softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_sdhci.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-sdhost.c')) From patchwork Fri Aug 21 10:22:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275908 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59EF9C433DF for ; Fri, 21 Aug 2020 11:13:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21D2820738 for ; Fri, 21 Aug 2020 11:13:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DEDC31nP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21D2820738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94zE-0006QQ-Cj for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:13:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94ES-0003Li-IE for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:48583) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EF-0001ks-C4 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RdmpmrMElCNaVrxMEyBFO3Mxt6qDIJ7MNPRDYW7tDkI=; b=DEDC31nPPI5+qTJgl5VH6KFF/GpE5TYifEeNaFKTZXl/35hy1R+/JYUrBQAyLX5rHSEN+x lPjn35YoGct7fm+Y37KNKuYuc4Gu9vPLyHeA7Evuk23xw+sUHTxJpJacEpBxOPyv46ufm4 O+Wpuc9gMeicycbEVmhWPs0D91vWsxM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-132-ihON2R8fPayguzsJgDxVaA-1; Fri, 21 Aug 2020 06:24:56 -0400 X-MC-Unique: ihON2R8fPayguzsJgDxVaA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A9CE4801AF3 for ; Fri, 21 Aug 2020 10:24:55 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AA6F60BF1; Fri, 21 Aug 2020 10:24:55 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 103/152] meson: convert hw/pci-host Date: Fri, 21 Aug 2020 06:22:40 -0400 Message-Id: <20200821102329.29777-104-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 2 +- hw/meson.build | 1 + hw/pci-host/Makefile.objs | 24 ------------------------ hw/pci-host/meson.build | 31 +++++++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 25 deletions(-) delete mode 100644 hw/pci-host/Makefile.objs create mode 100644 hw/pci-host/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index f28da5869d..0038cf89d9 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -22,7 +22,7 @@ devices-dirs-y += net/ devices-dirs-y += rdma/ devices-dirs-y += nvram/ devices-dirs-y += pci/ -devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ +devices-dirs-$(CONFIG_PCI) += pci-bridge/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index ed25644237..ca36e486e7 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,6 +1,7 @@ subdir('core') subdir('mem') subdir('nubus') +subdir('pci-host') subdir('pcmcia') subdir('rtc') subdir('scsi') diff --git a/hw/pci-host/Makefile.objs b/hw/pci-host/Makefile.objs deleted file mode 100644 index e422e0aca0..0000000000 --- a/hw/pci-host/Makefile.objs +++ /dev/null @@ -1,24 +0,0 @@ -common-obj-$(CONFIG_PAM) += pam.o - -# PPC devices -common-obj-$(CONFIG_PREP_PCI) += prep.o -common-obj-$(CONFIG_GRACKLE_PCI) += grackle.o -# NewWorld PowerMac -common-obj-$(CONFIG_UNIN_PCI) += uninorth.o -# PowerPC E500 boards -common-obj-$(CONFIG_PPCE500_PCI) += ppce500.o - -# ARM devices -common-obj-$(CONFIG_VERSATILE_PCI) += versatile.o - -common-obj-$(CONFIG_PCI_SABRE) += sabre.o -common-obj-$(CONFIG_PCI_BONITO) += bonito.o -common-obj-$(CONFIG_PCI_I440FX) += i440fx.o -common-obj-$(CONFIG_XEN_IGD_PASSTHROUGH) += xen_igd_pt.o -common-obj-$(CONFIG_PCI_EXPRESS_Q35) += q35.o -common-obj-$(CONFIG_PCI_EXPRESS_GENERIC_BRIDGE) += gpex.o -common-obj-$(CONFIG_PCI_EXPRESS_XILINX) += xilinx-pcie.o - -common-obj-$(CONFIG_PCI_EXPRESS_DESIGNWARE) += designware.o -obj-$(CONFIG_POWERNV) += pnv_phb4.o pnv_phb4_pec.o -obj-$(CONFIG_POWERNV) += pnv_phb3.o pnv_phb3_msi.o pnv_phb3_pbcq.o diff --git a/hw/pci-host/meson.build b/hw/pci-host/meson.build new file mode 100644 index 0000000000..cd52f6ff1c --- /dev/null +++ b/hw/pci-host/meson.build @@ -0,0 +1,31 @@ +pci_ss = ss.source_set() +pci_ss.add(when: 'CONFIG_PAM', if_true: files('pam.c')) +pci_ss.add(when: 'CONFIG_PCI_BONITO', if_true: files('bonito.c')) +pci_ss.add(when: 'CONFIG_PCI_EXPRESS_DESIGNWARE', if_true: files('designware.c')) +pci_ss.add(when: 'CONFIG_PCI_EXPRESS_GENERIC_BRIDGE', if_true: files('gpex.c')) +pci_ss.add(when: 'CONFIG_PCI_EXPRESS_Q35', if_true: files('q35.c')) +pci_ss.add(when: 'CONFIG_PCI_EXPRESS_XILINX', if_true: files('xilinx-pcie.c')) +pci_ss.add(when: 'CONFIG_PCI_I440FX', if_true: files('i440fx.c')) +pci_ss.add(when: 'CONFIG_PCI_SABRE', if_true: files('sabre.c')) +pci_ss.add(when: 'CONFIG_XEN_IGD_PASSTHROUGH', if_true: files('xen_igd_pt.c')) + +# PPC devices +pci_ss.add(when: 'CONFIG_PREP_PCI', if_true: files('prep.c')) +pci_ss.add(when: 'CONFIG_GRACKLE_PCI', if_true: files('grackle.c')) +# NewWorld PowerMac +pci_ss.add(when: 'CONFIG_UNIN_PCI', if_true: files('uninorth.c')) +# PowerPC E500 boards +pci_ss.add(when: 'CONFIG_PPCE500_PCI', if_true: files('ppce500.c')) + +# ARM devices +pci_ss.add(when: 'CONFIG_VERSATILE_PCI', if_true: files('versatile.c')) + +softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss) + +specific_ss.add(when: 'CONFIG_POWERNV', if_true: files( + 'pnv_phb3.c', + 'pnv_phb3_msi.c', + 'pnv_phb3_pbcq.c', + 'pnv_phb4.c', + 'pnv_phb4_pec.c' +)) From patchwork Fri Aug 21 10:22:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275910 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F33F3C433E1 for ; Fri, 21 Aug 2020 11:12:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB1CF20738 for ; Fri, 21 Aug 2020 11:12:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="US74HFr6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB1CF20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94xk-000364-15 for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:12:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94EQ-0003IU-C0 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:10 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:53465 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EG-0001l7-1d for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mf22p9EQUHIVw4IkTxQz24eDEi0w+8+chJ9OL676sQQ=; b=US74HFr6yPpkiYnJwHUQXTisTDc8VrXnZBImhKHPMWngDOXsDEpE7qN8mvq2Q6tFijvz+v OWfaYvXnqRAjCUHOItNSHDUu2mdttY5qLozFi2AhxhqGVg7ydlB3HY4dFm8GEwyi0ccK6E DQcLmvPadlFwVmpLZlX3k774eY6S8iw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-Bwthvc4CMcOx8P2lI6O2rA-1; Fri, 21 Aug 2020 06:24:57 -0400 X-MC-Unique: Bwthvc4CMcOx8P2lI6O2rA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A9965100CF71 for ; Fri, 21 Aug 2020 10:24:56 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 475EA60BF1; Fri, 21 Aug 2020 10:24:56 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 105/152] meson: convert hw/pci Date: Fri, 21 Aug 2020 06:22:42 -0400 Message-Id: <20200821102329.29777-106-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/pci/Makefile.objs | 14 -------------- hw/pci/meson.build | 19 +++++++++++++++++++ 4 files changed, 20 insertions(+), 15 deletions(-) delete mode 100644 hw/pci/Makefile.objs create mode 100644 hw/pci/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 3513040d4a..20832841d2 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -21,7 +21,6 @@ devices-dirs-y += misc/ devices-dirs-y += net/ devices-dirs-y += rdma/ devices-dirs-y += nvram/ -devices-dirs-y += pci/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index a7301f21e8..53c347c395 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,6 +1,7 @@ subdir('core') subdir('mem') subdir('nubus') +subdir('pci') subdir('pci-bridge') subdir('pci-host') subdir('pcmcia') diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs deleted file mode 100644 index c78f2fb24b..0000000000 --- a/hw/pci/Makefile.objs +++ /dev/null @@ -1,14 +0,0 @@ -common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o -common-obj-$(CONFIG_PCI) += msix.o msi.o -common-obj-$(CONFIG_PCI) += shpc.o -common-obj-$(CONFIG_PCI) += slotid_cap.o -common-obj-$(CONFIG_PCI) += pci_host.o - -# The functions in these modules can be used by devices too. Since we -# allow plugging PCIe devices into PCI buses, include them even if -# CONFIG_PCI_EXPRESS=n. -common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o -common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o - -common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o -common-obj-$(CONFIG_ALL) += pci-stub.o diff --git a/hw/pci/meson.build b/hw/pci/meson.build new file mode 100644 index 0000000000..5c4bbac817 --- /dev/null +++ b/hw/pci/meson.build @@ -0,0 +1,19 @@ +pci_ss = ss.source_set() +pci_ss.add(files( + 'msi.c', + 'msix.c', + 'pci.c', + 'pci_bridge.c', + 'pci_host.c', + 'shpc.c', + 'slotid_cap.c' +)) +# The functions in these modules can be used by devices too. Since we +# allow plugging PCIe devices into PCI buses, include them even if +# CONFIG_PCI_EXPRESS=n. +pci_ss.add(files('pcie.c', 'pcie_aer.c')) +softmmu_ss.add(when: 'CONFIG_PCI_EXPRESS', if_true: files('pcie_port.c', 'pcie_host.c')) +softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss) + +softmmu_ss.add(when: 'CONFIG_PCI', if_false: files('pci-stub.c')) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('pci-stub.c')) From patchwork Fri Aug 21 10:22:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1601C433DF for ; Fri, 21 Aug 2020 11:12:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E1F420738 for ; Fri, 21 Aug 2020 11:12:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JXPPs//y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E1F420738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94xn-0003Dh-Kk for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:12:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94ES-0003Kq-18 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:12 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:27952 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EI-0001lT-1z for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eiaFAJXIrf6BAIh0OylDB2lLg2Tw9yqbjMjHdWAqMeA=; b=JXPPs//yfZdd0V9UeI/kk2V93ibDpRs7mFqnv/pIWlvGMYQakvT28VZ8fXHcjq4++6Ilfc VCMNZEQL0P0NSFo9Jrlx4oHV3K0O4RmQ3zueyIO/6bPNlnXF+QWYl1l9TGvIMgD5MZdruK CGic5GJwTrAsQeKkJMrqQlu9cZihPUU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-489-C51D5EnkOkuBn2XTy5n0-Q-1; Fri, 21 Aug 2020 06:24:59 -0400 X-MC-Unique: C51D5EnkOkuBn2XTy5n0-Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 37F2781CBE7 for ; Fri, 21 Aug 2020 10:24:58 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD28160BF1; Fri, 21 Aug 2020 10:24:57 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 108/152] meson: convert hw/net Date: Fri, 21 Aug 2020 06:22:45 -0400 Message-Id: <20200821102329.29777-109-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/net/Makefile.objs | 59 ----------------------------------- hw/net/can/Makefile.objs | 4 --- hw/net/can/meson.build | 4 +++ hw/net/meson.build | 67 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 72 insertions(+), 64 deletions(-) delete mode 100644 hw/net/Makefile.objs delete mode 100644 hw/net/can/Makefile.objs create mode 100644 hw/net/can/meson.build create mode 100644 hw/net/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 748a718b0f..d0d7816118 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -18,7 +18,6 @@ devices-dirs-$(CONFIG_IPACK) += ipack/ devices-dirs-$(CONFIG_IPMI) += ipmi/ devices-dirs-y += isa/ devices-dirs-y += misc/ -devices-dirs-y += net/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index f704e51361..1f7b2c4fb9 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,5 +1,6 @@ subdir('core') subdir('mem') +subdir('net') subdir('nubus') subdir('nvram') subdir('pci') diff --git a/hw/net/Makefile.objs b/hw/net/Makefile.objs deleted file mode 100644 index 7ccbf72ea7..0000000000 --- a/hw/net/Makefile.objs +++ /dev/null @@ -1,59 +0,0 @@ -common-obj-$(CONFIG_DP8393X) += dp8393x.o -common-obj-$(CONFIG_XEN) += xen_nic.o -common-obj-$(CONFIG_NE2000_COMMON) += ne2000.o - -# PCI network cards -common-obj-$(CONFIG_NE2000_PCI) += ne2000-pci.o -common-obj-$(CONFIG_EEPRO100_PCI) += eepro100.o -common-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o -common-obj-$(CONFIG_PCNET_COMMON) += pcnet.o -common-obj-$(CONFIG_E1000_PCI) += e1000.o e1000x_common.o -common-obj-$(CONFIG_E1000E_PCI_EXPRESS) += net_tx_pkt.o net_rx_pkt.o -common-obj-$(CONFIG_E1000E_PCI_EXPRESS) += e1000e.o e1000e_core.o e1000x_common.o -common-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o -common-obj-$(CONFIG_VMXNET3_PCI) += net_tx_pkt.o net_rx_pkt.o -common-obj-$(CONFIG_VMXNET3_PCI) += vmxnet3.o -common-obj-$(CONFIG_TULIP) += tulip.o - -common-obj-$(CONFIG_SMC91C111) += smc91c111.o -common-obj-$(CONFIG_LAN9118) += lan9118.o -common-obj-$(CONFIG_NE2000_ISA) += ne2000-isa.o -common-obj-$(CONFIG_OPENCORES_ETH) += opencores_eth.o -common-obj-$(CONFIG_XGMAC) += xgmac.o -common-obj-$(CONFIG_MIPSNET) += mipsnet.o -common-obj-$(CONFIG_XILINX_AXI) += xilinx_axienet.o -common-obj-$(CONFIG_ALLWINNER_EMAC) += allwinner_emac.o -common-obj-$(CONFIG_ALLWINNER_SUN8I_EMAC) += allwinner-sun8i-emac.o -common-obj-$(CONFIG_IMX_FEC) += imx_fec.o - -common-obj-$(CONFIG_CADENCE) += cadence_gem.o -common-obj-$(CONFIG_STELLARIS_ENET) += stellaris_enet.o -common-obj-$(CONFIG_LANCE) += lance.o -common-obj-$(CONFIG_LASI_82596) += lasi_i82596.o -common-obj-$(CONFIG_I82596_COMMON) += i82596.o -common-obj-$(CONFIG_SUNHME) += sunhme.o -common-obj-$(CONFIG_FTGMAC100) += ftgmac100.o -common-obj-$(CONFIG_SUNGEM) += sungem.o - -common-obj-$(CONFIG_ETRAXFS) += etraxfs_eth.o -common-obj-$(CONFIG_COLDFIRE) += mcf_fec.o -obj-$(CONFIG_MILKYMIST) += milkymist-minimac2.o -obj-$(CONFIG_PSERIES) += spapr_llan.o -obj-$(CONFIG_XILINX_ETHLITE) += xilinx_ethlite.o - -common-obj-$(CONFIG_VIRTIO_NET) += net_rx_pkt.o -obj-$(CONFIG_VIRTIO_NET) += virtio-net.o -common-obj-$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET)) += vhost_net.o -common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET))) += vhost_net-stub.o -common-obj-$(CONFIG_ALL) += vhost_net-stub.o - -common-obj-$(CONFIG_ETSEC) += fsl_etsec/etsec.o fsl_etsec/registers.o \ - fsl_etsec/rings.o fsl_etsec/miim.o - -common-obj-$(CONFIG_ROCKER) += rocker/rocker.o rocker/rocker_fp.o \ - rocker/rocker_desc.o rocker/rocker_world.o \ - rocker/rocker_of_dpa.o -obj-$(call lnot,$(CONFIG_ROCKER)) += rocker/qmp-norocker.o - -common-obj-$(CONFIG_CAN_BUS) += can/ -common-obj-$(CONFIG_MSF2) += msf2-emac.o diff --git a/hw/net/can/Makefile.objs b/hw/net/can/Makefile.objs deleted file mode 100644 index 9f0c4ee332..0000000000 --- a/hw/net/can/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -common-obj-$(CONFIG_CAN_SJA1000) += can_sja1000.o -common-obj-$(CONFIG_CAN_PCI) += can_kvaser_pci.o -common-obj-$(CONFIG_CAN_PCI) += can_pcm3680_pci.o -common-obj-$(CONFIG_CAN_PCI) += can_mioe3680_pci.o diff --git a/hw/net/can/meson.build b/hw/net/can/meson.build new file mode 100644 index 0000000000..c9cfeb7954 --- /dev/null +++ b/hw/net/can/meson.build @@ -0,0 +1,4 @@ +softmmu_ss.add(when: 'CONFIG_CAN_SJA1000', if_true: files('can_sja1000.c')) +softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_kvaser_pci.c')) +softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_pcm3680_pci.c')) +softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_mioe3680_pci.c')) diff --git a/hw/net/meson.build b/hw/net/meson.build new file mode 100644 index 0000000000..4a7051b54a --- /dev/null +++ b/hw/net/meson.build @@ -0,0 +1,67 @@ +softmmu_ss.add(when: 'CONFIG_DP8393X', if_true: files('dp8393x.c')) +softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen_nic.c')) +softmmu_ss.add(when: 'CONFIG_NE2000_COMMON', if_true: files('ne2000.c')) + +# PCI network cards +softmmu_ss.add(when: 'CONFIG_NE2000_PCI', if_true: files('ne2000-pci.c')) +softmmu_ss.add(when: 'CONFIG_EEPRO100_PCI', if_true: files('eepro100.c')) +softmmu_ss.add(when: 'CONFIG_PCNET_PCI', if_true: files('pcnet-pci.c')) +softmmu_ss.add(when: 'CONFIG_PCNET_COMMON', if_true: files('pcnet.c')) +softmmu_ss.add(when: 'CONFIG_E1000_PCI', if_true: files('e1000.c', 'e1000x_common.c')) +softmmu_ss.add(when: 'CONFIG_E1000E_PCI_EXPRESS', if_true: files('net_tx_pkt.c', 'net_rx_pkt.c')) +softmmu_ss.add(when: 'CONFIG_E1000E_PCI_EXPRESS', if_true: files('e1000e.c', 'e1000e_core.c', 'e1000x_common.c')) +softmmu_ss.add(when: 'CONFIG_RTL8139_PCI', if_true: files('rtl8139.c')) +softmmu_ss.add(when: 'CONFIG_TULIP', if_true: files('tulip.c')) +softmmu_ss.add(when: 'CONFIG_VMXNET3_PCI', if_true: files('net_tx_pkt.c', 'net_rx_pkt.c')) +softmmu_ss.add(when: 'CONFIG_VMXNET3_PCI', if_true: files('vmxnet3.c')) + +softmmu_ss.add(when: 'CONFIG_SMC91C111', if_true: files('smc91c111.c')) +softmmu_ss.add(when: 'CONFIG_LAN9118', if_true: files('lan9118.c')) +softmmu_ss.add(when: 'CONFIG_NE2000_ISA', if_true: files('ne2000-isa.c')) +softmmu_ss.add(when: 'CONFIG_OPENCORES_ETH', if_true: files('opencores_eth.c')) +softmmu_ss.add(when: 'CONFIG_XGMAC', if_true: files('xgmac.c')) +softmmu_ss.add(when: 'CONFIG_MIPSNET', if_true: files('mipsnet.c')) +softmmu_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('xilinx_axienet.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_EMAC', if_true: files('allwinner_emac.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_SUN8I_EMAC', if_true: files('allwinner-sun8i-emac.c')) +softmmu_ss.add(when: 'CONFIG_IMX_FEC', if_true: files('imx_fec.c')) +softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-emac.c')) + +softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_gem.c')) +softmmu_ss.add(when: 'CONFIG_STELLARIS_ENET', if_true: files('stellaris_enet.c')) +softmmu_ss.add(when: 'CONFIG_LANCE', if_true: files('lance.c')) +softmmu_ss.add(when: 'CONFIG_LASI_I82596', if_true: files('lasi_i82596.c')) +softmmu_ss.add(when: 'CONFIG_I82596_COMMON', if_true: files('i82596.c')) +softmmu_ss.add(when: 'CONFIG_SUNHME', if_true: files('sunhme.c')) +softmmu_ss.add(when: 'CONFIG_FTGMAC100', if_true: files('ftgmac100.c')) +softmmu_ss.add(when: 'CONFIG_SUNGEM', if_true: files('sungem.c')) + +softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_eth.c')) +softmmu_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_fec.c')) +specific_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-minimac2.c')) +specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_llan.c')) +specific_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: files('xilinx_ethlite.c')) + +softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c')) +specific_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c')) + +softmmu_ss.add(when: ['CONFIG_VIRTIO_NET', 'CONFIG_VHOST_NET'], if_true: files('vhost_net.c'), if_false: files('vhost_net-stub.c')) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c')) + +softmmu_ss.add(when: 'CONFIG_ETSEC', if_true: files( + 'fsl_etsec/etsec.c', + 'fsl_etsec/miim.c', + 'fsl_etsec/registers.c', + 'fsl_etsec/rings.c', +)) + +softmmu_ss.add(when: 'CONFIG_ROCKER', if_true: files( + 'rocker/rocker.c', + 'rocker/rocker_desc.c', + 'rocker/rocker_fp.c', + 'rocker/rocker_of_dpa.c', + 'rocker/rocker_world.c', +), if_false: files('rocker/qmp-norocker.c')) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('rocker/qmp-norocker.c')) + +subdir('can') From patchwork Fri Aug 21 10:22:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275907 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C2BBC433DF for ; Fri, 21 Aug 2020 11:13:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2CC0420738 for ; Fri, 21 Aug 2020 11:13:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bywuV9zk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CC0420738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k94zI-0006f2-AG for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:13:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94ET-0003NN-KK for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28332) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EI-0001la-W4 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yVsDX30RTD9z+oD9dhmNp34h9p3joMXuW8pOt1DLvWk=; b=bywuV9zk/bLgXFo7kZDApkBFe4kq0V3P/4dPjPD8ZL91yCwFueFygrHepnvVwdzGTbolk1 QkjY2ukyC1iJK97oNVcAabZ5TADJGtJ9HCkpcceuudUkINJ2m2guTNlxttZyk0cQUhXQM6 xqHHAy9p7uRrseuPrfjLu5onG/gYd9Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-161-5i76UOGHOY-JMG6wUmNF4Q-1; Fri, 21 Aug 2020 06:24:59 -0400 X-MC-Unique: 5i76UOGHOY-JMG6wUmNF4Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A9044100CF6F for ; Fri, 21 Aug 2020 10:24:58 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A32360BF1; Fri, 21 Aug 2020 10:24:58 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 109/152] meson: convert hw/misc Date: Fri, 21 Aug 2020 06:22:46 -0400 Message-Id: <20200821102329.29777-110-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/misc/Makefile.objs | 95 ----------------------------------- hw/misc/macio/Makefile.objs | 5 -- hw/misc/macio/meson.build | 8 +++ hw/misc/meson.build | 99 +++++++++++++++++++++++++++++++++++++ 6 files changed, 108 insertions(+), 101 deletions(-) delete mode 100644 hw/misc/Makefile.objs delete mode 100644 hw/misc/macio/Makefile.objs create mode 100644 hw/misc/macio/meson.build create mode 100644 hw/misc/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index d0d7816118..ac8278edf7 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -17,7 +17,6 @@ devices-dirs-y += intc/ devices-dirs-$(CONFIG_IPACK) += ipack/ devices-dirs-$(CONFIG_IPMI) += ipmi/ devices-dirs-y += isa/ -devices-dirs-y += misc/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 1f7b2c4fb9..6ca82b0375 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,5 +1,6 @@ subdir('core') subdir('mem') +subdir('misc') subdir('net') subdir('nubus') subdir('nvram') diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs deleted file mode 100644 index 6be3d255ab..0000000000 --- a/hw/misc/Makefile.objs +++ /dev/null @@ -1,95 +0,0 @@ -common-obj-$(CONFIG_APPLESMC) += applesmc.o -common-obj-$(CONFIG_MAX111X) += max111x.o -common-obj-$(CONFIG_TMP105) += tmp105.o -common-obj-$(CONFIG_TMP421) += tmp421.o -common-obj-$(CONFIG_ISA_DEBUG) += debugexit.o -common-obj-$(CONFIG_SGA) += sga.o -common-obj-$(CONFIG_ISA_TESTDEV) += pc-testdev.o -common-obj-$(CONFIG_PCI_TESTDEV) += pci-testdev.o -common-obj-$(CONFIG_EDU) += edu.o -common-obj-$(CONFIG_PCA9552) += pca9552.o - -common-obj-$(CONFIG_UNIMP) += unimp.o -common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o -common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o - -# ARM devices -common-obj-$(CONFIG_PL310) += arm_l2x0.o -common-obj-$(CONFIG_INTEGRATOR_DEBUG) += arm_integrator_debug.o -common-obj-$(CONFIG_A9SCU) += a9scu.o -common-obj-$(CONFIG_ARM11SCU) += arm11scu.o - -# Mac devices -common-obj-$(CONFIG_MOS6522) += mos6522.o - -# PKUnity SoC devices -common-obj-$(CONFIG_PUV3) += puv3_pm.o - -common-obj-$(CONFIG_MACIO) += macio/ - -common-obj-$(CONFIG_IVSHMEM_DEVICE) += ivshmem.o - -common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-h3-ccu.o -obj-$(CONFIG_ALLWINNER_H3) += allwinner-cpucfg.o -common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-h3-dramc.o -common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-h3-sysctrl.o -common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-sid.o -common-obj-$(CONFIG_REALVIEW) += arm_sysctl.o -common-obj-$(CONFIG_NSERIES) += cbus.o -common-obj-$(CONFIG_ECCMEMCTL) += eccmemctl.o -common-obj-$(CONFIG_EXYNOS4) += exynos4210_pmu.o exynos4210_clk.o exynos4210_rng.o -common-obj-$(CONFIG_IMX) += imx_ccm.o -common-obj-$(CONFIG_IMX) += imx31_ccm.o -common-obj-$(CONFIG_IMX) += imx25_ccm.o -common-obj-$(CONFIG_IMX) += imx6_ccm.o -common-obj-$(CONFIG_IMX) += imx6ul_ccm.o -obj-$(CONFIG_IMX) += imx6_src.o -common-obj-$(CONFIG_IMX) += imx7_ccm.o -common-obj-$(CONFIG_IMX) += imx7_snvs.o -common-obj-$(CONFIG_IMX) += imx7_gpr.o -common-obj-$(CONFIG_IMX) += imx_rngc.o -common-obj-$(CONFIG_MILKYMIST) += milkymist-hpdmc.o -common-obj-$(CONFIG_MILKYMIST) += milkymist-pfpu.o -common-obj-$(CONFIG_MAINSTONE) += mst_fpga.o -common-obj-$(CONFIG_OMAP) += omap_clk.o -common-obj-$(CONFIG_OMAP) += omap_gpmc.o -common-obj-$(CONFIG_OMAP) += omap_l4.o -common-obj-$(CONFIG_OMAP) += omap_sdrc.o -common-obj-$(CONFIG_OMAP) += omap_tap.o -common-obj-$(CONFIG_RASPI) += bcm2835_mbox.o -common-obj-$(CONFIG_RASPI) += bcm2835_mphi.o -common-obj-$(CONFIG_RASPI) += bcm2835_property.o -common-obj-$(CONFIG_RASPI) += bcm2835_rng.o -common-obj-$(CONFIG_RASPI) += bcm2835_thermal.o -common-obj-$(CONFIG_SLAVIO) += slavio_misc.o -common-obj-$(CONFIG_ZYNQ) += zynq_slcr.o -common-obj-$(CONFIG_ZYNQ) += zynq-xadc.o -common-obj-$(CONFIG_STM32F2XX_SYSCFG) += stm32f2xx_syscfg.o -common-obj-$(CONFIG_STM32F4XX_SYSCFG) += stm32f4xx_syscfg.o -common-obj-$(CONFIG_STM32F4XX_EXTI) += stm32f4xx_exti.o -obj-$(CONFIG_MIPS_CPS) += mips_cmgcr.o -obj-$(CONFIG_MIPS_CPS) += mips_cpc.o -obj-$(CONFIG_MIPS_ITU) += mips_itu.o -common-obj-$(CONFIG_MPS2_FPGAIO) += mps2-fpgaio.o -common-obj-$(CONFIG_MPS2_SCC) += mps2-scc.o - -common-obj-$(CONFIG_TZ_MPC) += tz-mpc.o -common-obj-$(CONFIG_TZ_MSC) += tz-msc.o -common-obj-$(CONFIG_TZ_PPC) += tz-ppc.o -common-obj-$(CONFIG_IOTKIT_SECCTL) += iotkit-secctl.o -obj-$(CONFIG_IOTKIT_SYSCTL) += iotkit-sysctl.o -common-obj-$(CONFIG_IOTKIT_SYSINFO) += iotkit-sysinfo.o -common-obj-$(CONFIG_ARMSSE_CPUID) += armsse-cpuid.o -common-obj-$(CONFIG_ARMSSE_MHU) += armsse-mhu.o - -common-obj-$(CONFIG_PVPANIC) += pvpanic.o -common-obj-$(CONFIG_AUX) += auxbus.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_xdma.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o aspeed_sdmc.o -common-obj-$(CONFIG_MSF2) += msf2-sysreg.o -common-obj-$(CONFIG_NRF51_SOC) += nrf51_rng.o -obj-$(CONFIG_MAC_VIA) += mac_via.o - -common-obj-$(CONFIG_GRLIB) += grlib_ahb_apb_pnp.o - -obj-$(CONFIG_AVR_POWER) += avr_power.o diff --git a/hw/misc/macio/Makefile.objs b/hw/misc/macio/Makefile.objs deleted file mode 100644 index 07fdb320d4..0000000000 --- a/hw/misc/macio/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -common-obj-y += macio.o -common-obj-$(CONFIG_CUDA) += cuda.o -common-obj-$(CONFIG_MAC_PMU) += pmu.o -common-obj-$(CONFIG_MAC_DBDMA) += mac_dbdma.o -common-obj-$(CONFIG_MACIO_GPIO) += gpio.o diff --git a/hw/misc/macio/meson.build b/hw/misc/macio/meson.build new file mode 100644 index 0000000000..17282da20a --- /dev/null +++ b/hw/misc/macio/meson.build @@ -0,0 +1,8 @@ +macio_ss = ss.source_set() +macio_ss.add(files('macio.c')) +macio_ss.add(when: 'CONFIG_CUDA', if_true: files('cuda.c')) +macio_ss.add(when: 'CONFIG_MACIO_GPIO', if_true: files('gpio.c')) +macio_ss.add(when: 'CONFIG_MAC_DBDMA', if_true: files('mac_dbdma.c')) +macio_ss.add(when: 'CONFIG_MAC_PMU', if_true: files('pmu.c')) + +softmmu_ss.add_all(when: 'CONFIG_MACIO', if_true: macio_ss) diff --git a/hw/misc/meson.build b/hw/misc/meson.build new file mode 100644 index 0000000000..84fed0494d --- /dev/null +++ b/hw/misc/meson.build @@ -0,0 +1,99 @@ +softmmu_ss.add(when: 'CONFIG_APPLESMC', if_true: files('applesmc.c')) +softmmu_ss.add(when: 'CONFIG_EDU', if_true: files('edu.c')) +softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('vmcoreinfo.c')) +softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugexit.c')) +softmmu_ss.add(when: 'CONFIG_ISA_TESTDEV', if_true: files('pc-testdev.c')) +softmmu_ss.add(when: 'CONFIG_MAX111X', if_true: files('max111x.c')) +softmmu_ss.add(when: 'CONFIG_PCA9552', if_true: files('pca9552.c')) +softmmu_ss.add(when: 'CONFIG_PCI_TESTDEV', if_true: files('pci-testdev.c')) +softmmu_ss.add(when: 'CONFIG_SGA', if_true: files('sga.c')) +softmmu_ss.add(when: 'CONFIG_TMP105', if_true: files('tmp105.c')) +softmmu_ss.add(when: 'CONFIG_TMP421', if_true: files('tmp421.c')) +softmmu_ss.add(when: 'CONFIG_UNIMP', if_true: files('unimp.c')) +softmmu_ss.add(when: 'CONFIG_EMPTY_SLOT', if_true: files('empty_slot.c')) + +# ARM devices +softmmu_ss.add(when: 'CONFIG_PL310', if_true: files('arm_l2x0.c')) +softmmu_ss.add(when: 'CONFIG_INTEGRATOR_DEBUG', if_true: files('arm_integrator_debug.c')) +softmmu_ss.add(when: 'CONFIG_A9SCU', if_true: files('a9scu.c')) +softmmu_ss.add(when: 'CONFIG_ARM11SCU', if_true: files('arm11scu.c')) + +# Mac devices +softmmu_ss.add(when: 'CONFIG_MOS6522', if_true: files('mos6522.c')) + +# PKUnity SoC devices +softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_pm.c')) + +subdir('macio') + +softmmu_ss.add(when: 'CONFIG_IVSHMEM_DEVICE', if_true: files('ivshmem.c')) + +softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-ccu.c')) +specific_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-cpucfg.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-dramc.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3-sysctrl.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-sid.c')) +softmmu_ss.add(when: 'CONFIG_REALVIEW', if_true: files('arm_sysctl.c')) +softmmu_ss.add(when: 'CONFIG_NSERIES', if_true: files('cbus.c')) +softmmu_ss.add(when: 'CONFIG_ECCMEMCTL', if_true: files('eccmemctl.c')) +softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pmu.c', 'exynos4210_clk.c', 'exynos4210_rng.c')) +softmmu_ss.add(when: 'CONFIG_IMX', if_true: files( + 'imx25_ccm.c', + 'imx31_ccm.c', + 'imx6_ccm.c', + 'imx6ul_ccm.c', + 'imx7_ccm.c', + 'imx7_gpr.c', + 'imx7_snvs.c', + 'imx_ccm.c', + 'imx_rngc.c', +)) +softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-hpdmc.c', 'milkymist-pfpu.c')) +softmmu_ss.add(when: 'CONFIG_MAINSTONE', if_true: files('mst_fpga.c')) +softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files( + 'omap_clk.c', + 'omap_gpmc.c', + 'omap_l4.c', + 'omap_sdrc.c', + 'omap_tap.c', +)) +softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files( + 'bcm2835_mbox.c', + 'bcm2835_mphi.c', + 'bcm2835_property.c', + 'bcm2835_rng.c', + 'bcm2835_thermal.c', +)) +softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_misc.c')) +softmmu_ss.add(when: 'CONFIG_ZYNQ', if_true: files('zynq_slcr.c', 'zynq-xadc.c')) +softmmu_ss.add(when: 'CONFIG_STM32F2XX_SYSCFG', if_true: files('stm32f2xx_syscfg.c')) +softmmu_ss.add(when: 'CONFIG_STM32F4XX_SYSCFG', if_true: files('stm32f4xx_syscfg.c')) +softmmu_ss.add(when: 'CONFIG_STM32F4XX_EXTI', if_true: files('stm32f4xx_exti.c')) +softmmu_ss.add(when: 'CONFIG_MPS2_FPGAIO', if_true: files('mps2-fpgaio.c')) +softmmu_ss.add(when: 'CONFIG_MPS2_SCC', if_true: files('mps2-scc.c')) + +softmmu_ss.add(when: 'CONFIG_TZ_MPC', if_true: files('tz-mpc.c')) +softmmu_ss.add(when: 'CONFIG_TZ_MSC', if_true: files('tz-msc.c')) +softmmu_ss.add(when: 'CONFIG_TZ_PPC', if_true: files('tz-ppc.c')) +softmmu_ss.add(when: 'CONFIG_IOTKIT_SECCTL', if_true: files('iotkit-secctl.c')) +softmmu_ss.add(when: 'CONFIG_IOTKIT_SYSINFO', if_true: files('iotkit-sysinfo.c')) +softmmu_ss.add(when: 'CONFIG_ARMSSE_CPUID', if_true: files('armsse-cpuid.c')) +softmmu_ss.add(when: 'CONFIG_ARMSSE_MHU', if_true: files('armsse-mhu.c')) + +softmmu_ss.add(when: 'CONFIG_PVPANIC', if_true: files('pvpanic.c')) +softmmu_ss.add(when: 'CONFIG_AUX', if_true: files('auxbus.c')) +softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_scu.c', 'aspeed_sdmc.c', 'aspeed_xdma.c')) +softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-sysreg.c')) +softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_rng.c')) + +softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_ahb_apb_pnp.c')) + +specific_ss.add(when: 'CONFIG_AVR_POWER', if_true: files('avr_power.c')) + +specific_ss.add(when: 'CONFIG_IMX', if_true: files('imx6_src.c')) +specific_ss.add(when: 'CONFIG_IOTKIT_SYSCTL', if_true: files('iotkit-sysctl.c')) + +specific_ss.add(when: 'CONFIG_MAC_VIA', if_true: files('mac_via.c')) + +specific_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_cmgcr.c', 'mips_cpc.c')) +specific_ss.add(when: 'CONFIG_MIPS_ITU', if_true: files('mips_itu.c')) From patchwork Fri Aug 21 10:22:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275905 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4758C433E3 for ; Fri, 21 Aug 2020 11:15:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83C7220738 for ; Fri, 21 Aug 2020 11:15:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eXVQR1qt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83C7220738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k950l-0001eC-La for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:15:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94EV-0003P0-6E for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:15 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48710 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EM-0001mC-Dr for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YaGCnkLq1J3mjmOFXpJRr8e/B9IOOrs8jkBkMapreho=; b=eXVQR1qtrXJioZgcY30EDPGw/Zw4hDWm6eQgyxa27h4EAdAGgIVJ/DTwBXRO5ISO8JOtDq +rRXiqpoiWQ2IaX0EAjvViokOCGbLwYTswtOeOFB0qG4Qr83P6Z58gio2iMBlsRD5qOMxD 5oO6WqQN0IKrnfL52Ryzum32Km0i2Bk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-8-tJAvn54XOK2NdaQB0JxwPA-1; Fri, 21 Aug 2020 06:25:00 -0400 X-MC-Unique: tJAvn54XOK2NdaQB0JxwPA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 71750100CF71 for ; Fri, 21 Aug 2020 10:24:59 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BCC3756D7; Fri, 21 Aug 2020 10:24:59 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 110/152] meson: convert hw/isa Date: Fri, 21 Aug 2020 06:22:47 -0400 Message-Id: <20200821102329.29777-111-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/isa/Makefile.objs | 11 ----------- hw/isa/meson.build | 11 +++++++++++ hw/meson.build | 1 + 4 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 hw/isa/Makefile.objs create mode 100644 hw/isa/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index ac8278edf7..a28e211e78 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -16,7 +16,6 @@ devices-dirs-y += input/ devices-dirs-y += intc/ devices-dirs-$(CONFIG_IPACK) += ipack/ devices-dirs-$(CONFIG_IPMI) += ipmi/ -devices-dirs-y += isa/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/isa/Makefile.objs b/hw/isa/Makefile.objs deleted file mode 100644 index 8e73960a75..0000000000 --- a/hw/isa/Makefile.objs +++ /dev/null @@ -1,11 +0,0 @@ -common-obj-$(CONFIG_ISA_BUS) += isa-bus.o -common-obj-$(CONFIG_ISA_SUPERIO) += isa-superio.o -common-obj-$(CONFIG_APM) += apm.o -common-obj-$(CONFIG_I82378) += i82378.o -common-obj-$(CONFIG_PC87312) += pc87312.o -common-obj-$(CONFIG_PIIX3) += piix3.o -common-obj-$(CONFIG_PIIX4) += piix4.o -common-obj-$(CONFIG_VT82C686) += vt82c686.o -common-obj-$(CONFIG_SMC37C669) += smc37c669-superio.o - -obj-$(CONFIG_LPC_ICH9) += lpc_ich9.o diff --git a/hw/isa/meson.build b/hw/isa/meson.build new file mode 100644 index 0000000000..8bf678ca0a --- /dev/null +++ b/hw/isa/meson.build @@ -0,0 +1,11 @@ +softmmu_ss.add(when: 'CONFIG_APM', if_true: files('apm.c')) +softmmu_ss.add(when: 'CONFIG_I82378', if_true: files('i82378.c')) +softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('isa-bus.c')) +softmmu_ss.add(when: 'CONFIG_ISA_SUPERIO', if_true: files('isa-superio.c')) +softmmu_ss.add(when: 'CONFIG_PC87312', if_true: files('pc87312.c')) +softmmu_ss.add(when: 'CONFIG_PIIX3', if_true: files('piix3.c')) +softmmu_ss.add(when: 'CONFIG_PIIX4', if_true: files('piix4.c')) +softmmu_ss.add(when: 'CONFIG_SMC37C669', if_true: files('smc37c669-superio.c')) +softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686.c')) + +specific_ss.add(when: 'CONFIG_LPC_ICH9', if_true: files('lpc_ich9.c')) diff --git a/hw/meson.build b/hw/meson.build index 6ca82b0375..86598544e6 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('isa') subdir('mem') subdir('misc') subdir('net') From patchwork Fri Aug 21 10:22:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275900 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63F7AC433DF for ; Fri, 21 Aug 2020 11:19:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2EA392072D for ; Fri, 21 Aug 2020 11:19:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BBP6BCCY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EA392072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k954u-0003LG-Bh for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:19:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Ee-0003Zz-Hr for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:24 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:40963 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EO-0001nZ-Uj for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jOIdmTH1CYl8LnZvB8zBwKIw7Tiq/rsBYfxJzBvBBYc=; b=BBP6BCCYmpQjP/VdmWAEZNjLc09wAPwJpTT/pdHh24P0WHX3aDeBwuEdqDD1fxsPIc3ndz +NHTE8uZ7cAfK0bKh80trvb1yKkV2HVO7/Uep5Hxzxa6CwAMxGfKb5gO2ln2z7vL5PjJnn MCQ7GGqQeLNmpXTpasgI9NYQUfF1qWM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-187-XJd3qz7YNUmBqMn5wqBrDQ-1; Fri, 21 Aug 2020 06:25:00 -0400 X-MC-Unique: XJd3qz7YNUmBqMn5wqBrDQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F3801191E2A2; Fri, 21 Aug 2020 10:24:59 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8DF1B60BF1; Fri, 21 Aug 2020 10:24:59 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 111/152] meson: convert hw/ipmi Date: Fri, 21 Aug 2020 06:22:48 -0400 Message-Id: <20200821102329.29777-112-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Corey Minyard Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Corey Minyard Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/ipmi/Makefile.objs | 8 -------- hw/ipmi/meson.build | 11 +++++++++++ hw/meson.build | 1 + 4 files changed, 12 insertions(+), 9 deletions(-) delete mode 100644 hw/ipmi/Makefile.objs create mode 100644 hw/ipmi/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index a28e211e78..f136377866 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -15,7 +15,6 @@ devices-dirs-y += ide/ devices-dirs-y += input/ devices-dirs-y += intc/ devices-dirs-$(CONFIG_IPACK) += ipack/ -devices-dirs-$(CONFIG_IPMI) += ipmi/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/ipmi/Makefile.objs b/hw/ipmi/Makefile.objs deleted file mode 100644 index 3cca10bc50..0000000000 --- a/hw/ipmi/Makefile.objs +++ /dev/null @@ -1,8 +0,0 @@ -common-obj-$(CONFIG_IPMI) += ipmi.o ipmi_kcs.o ipmi_bt.o -common-obj-$(CONFIG_IPMI_LOCAL) += ipmi_bmc_sim.o -common-obj-$(CONFIG_IPMI_EXTERN) += ipmi_bmc_extern.o -common-obj-$(CONFIG_ISA_IPMI_KCS) += isa_ipmi_kcs.o -common-obj-$(CONFIG_PCI_IPMI_KCS) += pci_ipmi_kcs.o -common-obj-$(CONFIG_ISA_IPMI_BT) += isa_ipmi_bt.o -common-obj-$(CONFIG_PCI_IPMI_BT) += pci_ipmi_bt.o -common-obj-$(CONFIG_IPMI_SSIF) += smbus_ipmi.o diff --git a/hw/ipmi/meson.build b/hw/ipmi/meson.build new file mode 100644 index 0000000000..9622ea2a2c --- /dev/null +++ b/hw/ipmi/meson.build @@ -0,0 +1,11 @@ +ipmi_ss = ss.source_set() +ipmi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c', 'ipmi_kcs.c', 'ipmi_bt.c')) +ipmi_ss.add(when: 'CONFIG_IPMI_LOCAL', if_true: files('ipmi_bmc_sim.c')) +ipmi_ss.add(when: 'CONFIG_IPMI_EXTERN', if_true: files('ipmi_bmc_extern.c')) +ipmi_ss.add(when: 'CONFIG_ISA_IPMI_KCS', if_true: files('isa_ipmi_kcs.c')) +ipmi_ss.add(when: 'CONFIG_PCI_IPMI_KCS', if_true: files('pci_ipmi_kcs.c')) +ipmi_ss.add(when: 'CONFIG_ISA_IPMI_BT', if_true: files('isa_ipmi_bt.c')) +ipmi_ss.add(when: 'CONFIG_PCI_IPMI_BT', if_true: files('pci_ipmi_bt.c')) +ipmi_ss.add(when: 'CONFIG_IPMI_SSIF', if_true: files('smbus_ipmi.c')) + +softmmu_ss.add_all(when: 'CONFIG_IPMI', if_true: ipmi_ss) diff --git a/hw/meson.build b/hw/meson.build index 86598544e6..9796f95e5c 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('ipmi') subdir('isa') subdir('mem') subdir('misc') From patchwork Fri Aug 21 10:22:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275903 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3767FC433E1 for ; Fri, 21 Aug 2020 11:16:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 06DB52072D for ; Fri, 21 Aug 2020 11:16:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PKAsgZpz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06DB52072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k952O-00058p-8y for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:16:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94EY-0003RT-2g for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EO-0001mw-AE for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NfyB9OFP3NC+XP2rys2fAFHGh1rpKodm28QmEjGLxY8=; b=PKAsgZpzbzOOKi6TrLqXB76Kdw0tdoZrOC7UncnIj5iaPStSGcDkmf8O4C9ONKp4sx7vUe 5q2R0Uy0yvhUwLtPlSFyQQg1YGnN9O1/ia5huVN4yVT7PWwLK89GB+07cCRB+OBeg2/RT0 6PKi17hnysuDFsEQ7n/uMyQ2iRuEcLU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-389-a2MtuIigPAekIUCj-b4foQ-1; Fri, 21 Aug 2020 06:25:01 -0400 X-MC-Unique: a2MtuIigPAekIUCj-b4foQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 61C12191E2A1 for ; Fri, 21 Aug 2020 10:25:00 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B90960BF1; Fri, 21 Aug 2020 10:25:00 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 112/152] meson: convert hw/ipack Date: Fri, 21 Aug 2020 06:22:49 -0400 Message-Id: <20200821102329.29777-113-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/ipack/Makefile.objs | 2 -- hw/ipack/meson.build | 1 + hw/meson.build | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 hw/ipack/Makefile.objs create mode 100644 hw/ipack/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index f136377866..76d9305959 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -14,7 +14,6 @@ devices-dirs-$(CONFIG_I2C) += i2c/ devices-dirs-y += ide/ devices-dirs-y += input/ devices-dirs-y += intc/ -devices-dirs-$(CONFIG_IPACK) += ipack/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/ipack/Makefile.objs b/hw/ipack/Makefile.objs deleted file mode 100644 index 8b9bdcb549..0000000000 --- a/hw/ipack/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -common-obj-$(CONFIG_IPACK) += ipack.o -common-obj-$(CONFIG_IPACK) += tpci200.o diff --git a/hw/ipack/meson.build b/hw/ipack/meson.build new file mode 100644 index 0000000000..3f8138b6f2 --- /dev/null +++ b/hw/ipack/meson.build @@ -0,0 +1 @@ +softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipack.c', 'tpci200.c')) diff --git a/hw/meson.build b/hw/meson.build index 9796f95e5c..ec4bb48a0f 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('ipack') subdir('ipmi') subdir('isa') subdir('mem') From patchwork Fri Aug 21 10:22:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275906 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8F1CC433DF for ; Fri, 21 Aug 2020 11:15:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4A7620855 for ; Fri, 21 Aug 2020 11:15:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iQx1GzGK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4A7620855 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k950h-0001UH-RO for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:15:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Ec-0003Sn-5R for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:22 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:35945 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EO-0001nw-BL for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uaUF+HI5OBgPlVZE1fhg1N02BtoL1RcmK+wFLwcqqGk=; b=iQx1GzGK7Z1eXQGiEXogdwVa5TzD6IEQ/MQCu0eOLg4lOIl0epSFTerNby7rl4sc64/KXX xjR9BgbAJjAG3nntp8HOVfPo7+WTCoY3+/U7q/sdGF05vwx91zlqiR2xtHpUimfaT86+e4 80BTx29l2ZW9plm2/r4xXWwmmHbrK0w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-296-lJVAa2gSOFmgBbZlg25zGA-1; Fri, 21 Aug 2020 06:25:01 -0400 X-MC-Unique: lJVAa2gSOFmgBbZlg25zGA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C3AA8191E2A6 for ; Fri, 21 Aug 2020 10:25:00 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E9F7756D7; Fri, 21 Aug 2020 10:25:00 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 113/152] meson: convert hw/intc Date: Fri, 21 Aug 2020 06:22:50 -0400 Message-Id: <20200821102329.29777-114-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/intc/Makefile.objs | 54 ------------------------------------------ hw/intc/meson.build | 55 +++++++++++++++++++++++++++++++++++++++++++ hw/meson.build | 1 + 4 files changed, 56 insertions(+), 55 deletions(-) delete mode 100644 hw/intc/Makefile.objs create mode 100644 hw/intc/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 76d9305959..80b104168a 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -13,7 +13,6 @@ devices-dirs-$(CONFIG_HYPERV) += hyperv/ devices-dirs-$(CONFIG_I2C) += i2c/ devices-dirs-y += ide/ devices-dirs-y += input/ -devices-dirs-y += intc/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/intc/Makefile.objs b/hw/intc/Makefile.objs deleted file mode 100644 index 3ac2b40fbb..0000000000 --- a/hw/intc/Makefile.objs +++ /dev/null @@ -1,54 +0,0 @@ -common-obj-$(CONFIG_HEATHROW_PIC) += heathrow_pic.o -common-obj-$(CONFIG_I8259) += i8259_common.o i8259.o -common-obj-$(CONFIG_PL190) += pl190.o -common-obj-$(CONFIG_PUV3) += puv3_intc.o -common-obj-$(CONFIG_XILINX) += xilinx_intc.o -common-obj-$(CONFIG_XLNX_ZYNQMP_PMU) += xlnx-pmu-iomod-intc.o -common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-ipi.o -common-obj-$(CONFIG_ETRAXFS) += etraxfs_pic.o -common-obj-$(CONFIG_IMX) += imx_avic.o imx_gpcv2.o -common-obj-$(CONFIG_LM32) += lm32_pic.o -common-obj-$(CONFIG_REALVIEW) += realview_gic.o -common-obj-$(CONFIG_SLAVIO) += slavio_intctl.o -common-obj-$(CONFIG_IOAPIC) += ioapic_common.o -common-obj-$(CONFIG_ARM_GIC) += arm_gic_common.o -common-obj-$(CONFIG_ARM_GIC) += arm_gic.o -common-obj-$(CONFIG_ARM_GIC) += arm_gicv2m.o -common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_common.o -common-obj-$(CONFIG_ARM_GIC) += arm_gicv3.o -common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_dist.o -common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_redist.o -common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_its_common.o -common-obj-$(CONFIG_OPENPIC) += openpic.o -common-obj-$(CONFIG_RX_ICU) += rx_icu.o -common-obj-y += intc.o - -obj-$(CONFIG_APIC) += apic.o apic_common.o -obj-$(CONFIG_ARM_GIC_KVM) += arm_gic_kvm.o -obj-$(call land,$(CONFIG_ARM_GIC_KVM),$(TARGET_AARCH64)) += arm_gicv3_kvm.o -obj-$(call land,$(CONFIG_ARM_GIC_KVM),$(TARGET_AARCH64)) += arm_gicv3_its_kvm.o -obj-$(CONFIG_ARM_V7M) += armv7m_nvic.o -obj-$(CONFIG_EXYNOS4) += exynos4210_gic.o exynos4210_combiner.o -obj-$(CONFIG_GRLIB) += grlib_irqmp.o -obj-$(CONFIG_IOAPIC) += ioapic.o -obj-$(CONFIG_OMAP) += omap_intc.o -obj-$(CONFIG_OPENPIC_KVM) += openpic_kvm.o -obj-$(CONFIG_RASPI) += bcm2835_ic.o bcm2836_control.o -obj-$(CONFIG_SH4) += sh_intc.o -obj-$(CONFIG_XICS) += xics.o -obj-$(CONFIG_XICS_SPAPR) += xics_spapr.o -obj-$(CONFIG_XICS_KVM) += xics_kvm.o -obj-$(CONFIG_XIVE) += xive.o -obj-$(CONFIG_XIVE_SPAPR) += spapr_xive.o -obj-$(CONFIG_XIVE_KVM) += spapr_xive_kvm.o -obj-$(CONFIG_POWERNV) += xics_pnv.o pnv_xive.o -obj-$(CONFIG_ALLWINNER_A10_PIC) += allwinner-a10-pic.o -obj-$(CONFIG_S390_FLIC) += s390_flic.o -obj-$(CONFIG_S390_FLIC_KVM) += s390_flic_kvm.o -obj-$(CONFIG_ASPEED_SOC) += aspeed_vic.o -obj-$(CONFIG_ARM_GIC) += arm_gicv3_cpuif.o -obj-$(CONFIG_MIPS_CPS) += mips_gic.o -obj-$(CONFIG_NIOS2) += nios2_iic.o -obj-$(CONFIG_OMPIC) += ompic.o -obj-$(CONFIG_IBEX) += ibex_plic.o -obj-$(CONFIG_LOONGSON_LIOINTC) += loongson_liointc.o diff --git a/hw/intc/meson.build b/hw/intc/meson.build new file mode 100644 index 0000000000..c16f7f036e --- /dev/null +++ b/hw/intc/meson.build @@ -0,0 +1,55 @@ +softmmu_ss.add(files('intc.c')) +softmmu_ss.add(when: 'CONFIG_ARM_GIC', if_true: files( + 'arm_gic.c', + 'arm_gic_common.c', + 'arm_gicv2m.c', + 'arm_gicv3.c', + 'arm_gicv3_common.c', + 'arm_gicv3_dist.c', + 'arm_gicv3_its_common.c', + 'arm_gicv3_redist.c', +)) +softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_pic.c')) +softmmu_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c')) +softmmu_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c')) +softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c')) +softmmu_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c')) +softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_pic.c')) +softmmu_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c')) +softmmu_ss.add(when: 'CONFIG_PL190', if_true: files('pl190.c')) +softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_intc.c')) +softmmu_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_gic.c')) +softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_intctl.c')) +softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_intc.c')) +softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-ipi.c')) +softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_PMU', if_true: files('xlnx-pmu-iomod-intc.c')) + +specific_ss.add(when: 'CONFIG_ALLWINNER_A10_PIC', if_true: files('allwinner-a10-pic.c')) +specific_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c', 'apic_common.c')) +specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif.c')) +specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c')) +specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c')) +specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c')) +specific_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_vic.c')) +specific_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', 'exynos4210_combiner.c')) +specific_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_irqmp.c')) +specific_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_plic.c')) +specific_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic.c')) +specific_ss.add(when: 'CONFIG_LOONGSON_LIOINTC', if_true: files('loongson_liointc.c')) +specific_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gic.c')) +specific_ss.add(when: 'CONFIG_NIOS2', if_true: files('nios2_iic.c')) +specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_intc.c')) +specific_ss.add(when: 'CONFIG_OMPIC', if_true: files('ompic.c')) +specific_ss.add(when: 'CONFIG_OPENPIC_KVM', if_true: files('openpic_kvm.c')) +specific_ss.add(when: 'CONFIG_POWERNV', if_true: files('xics_pnv.c', 'pnv_xive.c')) +specific_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_ic.c', 'bcm2836_control.c')) +specific_ss.add(when: 'CONFIG_RX_ICU', if_true: files('rx_icu.c')) +specific_ss.add(when: 'CONFIG_S390_FLIC', if_true: files('s390_flic.c')) +specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c')) +specific_ss.add(when: 'CONFIG_SH4', if_true: files('sh_intc.c')) +specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c')) +specific_ss.add(when: 'CONFIG_XICS_KVM', if_true: files('xics_kvm.c')) +specific_ss.add(when: 'CONFIG_XICS_SPAPR', if_true: files('xics_spapr.c')) +specific_ss.add(when: 'CONFIG_XIVE', if_true: files('xive.c')) +specific_ss.add(when: 'CONFIG_XIVE_KVM', if_true: files('spapr_xive_kvm.c')) +specific_ss.add(when: 'CONFIG_XIVE_SPAPR', if_true: files('spapr_xive.c')) diff --git a/hw/meson.build b/hw/meson.build index ec4bb48a0f..986e710287 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('intc') subdir('ipack') subdir('ipmi') subdir('isa') From patchwork Fri Aug 21 10:22:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275896 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71D00C433DF for ; Fri, 21 Aug 2020 11:22:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3B1212054F for ; Fri, 21 Aug 2020 11:22:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XzenRHz9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B1212054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k957R-0001bV-CX for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:22:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Ei-0003hg-Ux for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:29 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:57688 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EV-0001v3-Jc for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TSsMqdmMCMfkXupUFs34oZSkfx6BbapuB0jvch6famI=; b=XzenRHz9Gm59ROf3B8NOv7tkD12zLjIJfxRQrbP0N+q6lwq69ODb0Vr703nR7Px8hiskfa rFRFYnm2mWJjOa1pBBjOpyAI/hUkJ2UIKWffdy3VZ6rXQaKU45SmoeGUNa+WYz6ZW/lWBu HfBGg9MVD1ffQ1DQ/+6yBOcLbM4y/JQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-564-BLh9WL3nPoSjqNuYnb_zEA-1; Fri, 21 Aug 2020 06:25:10 -0400 X-MC-Unique: BLh9WL3nPoSjqNuYnb_zEA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0897E56B2D for ; Fri, 21 Aug 2020 10:25:10 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id D371110098AE; Fri, 21 Aug 2020 10:25:06 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 120/152] meson: convert hw/display Date: Fri, 21 Aug 2020 06:22:57 -0400 Message-Id: <20200821102329.29777-121-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.target | 1 + hw/Makefile.objs | 1 - hw/display/Makefile.objs | 65 ------------------------------- hw/display/meson.build | 84 ++++++++++++++++++++++++++++++++++++++++ hw/meson.build | 1 + 5 files changed, 86 insertions(+), 66 deletions(-) delete mode 100644 hw/display/Makefile.objs create mode 100644 hw/display/meson.build diff --git a/Makefile.target b/Makefile.target index 3d5a2af4af..3534ece38a 100644 --- a/Makefile.target +++ b/Makefile.target @@ -169,6 +169,7 @@ LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOM LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS) LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS) LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS) +LIBS := $(LIBS) $(VIRGL_LIBS) # Hardware support ifeq ($(TARGET_NAME), sparc64) diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 26917a4e1b..6fce6a1473 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -6,7 +6,6 @@ devices-dirs-y += audio/ devices-dirs-y += block/ devices-dirs-y += char/ devices-dirs-y += cpu/ -devices-dirs-y += display/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs deleted file mode 100644 index d619594ad4..0000000000 --- a/hw/display/Makefile.objs +++ /dev/null @@ -1,65 +0,0 @@ -common-obj-$(CONFIG_DDC) += i2c-ddc.o -common-obj-$(CONFIG_EDID) += edid-generate.o edid-region.o - -common-obj-$(CONFIG_FW_CFG_DMA) += ramfb.o -common-obj-$(CONFIG_FW_CFG_DMA) += ramfb-standalone.o - -common-obj-$(CONFIG_ADS7846) += ads7846.o -common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o -common-obj-$(call land,$(CONFIG_VGA_CIRRUS),$(CONFIG_VGA_ISA))+=cirrus_vga_isa.o -common-obj-$(CONFIG_G364FB) += g364fb.o -common-obj-$(CONFIG_JAZZ_LED) += jazz_led.o -common-obj-$(CONFIG_PL110) += pl110.o -common-obj-$(CONFIG_SII9022) += sii9022.o -common-obj-$(CONFIG_SSD0303) += ssd0303.o -common-obj-$(CONFIG_SSD0323) += ssd0323.o -common-obj-$(CONFIG_XEN) += xenfb.o - -common-obj-$(CONFIG_VGA_PCI) += vga-pci.o -common-obj-$(CONFIG_VGA_ISA) += vga-isa.o -common-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o -common-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o -common-obj-$(CONFIG_BOCHS_DISPLAY) += bochs-display.o - -common-obj-$(CONFIG_BLIZZARD) += blizzard.o -common-obj-$(CONFIG_EXYNOS4) += exynos4210_fimd.o -common-obj-$(CONFIG_FRAMEBUFFER) += framebuffer.o -common-obj-$(CONFIG_MILKYMIST) += milkymist-vgafb.o -common-obj-$(CONFIG_ZAURUS) += tc6393xb.o -common-obj-$(CONFIG_MACFB) += macfb.o - -obj-$(CONFIG_MILKYMIST_TMU2) += milkymist-tmu2.o -milkymist-tmu2.o-cflags := $(X11_CFLAGS) $(OPENGL_CFLAGS) -milkymist-tmu2.o-libs := $(X11_LIBS) $(OPENGL_LIBS) - -common-obj-$(CONFIG_OMAP) += omap_dss.o -obj-$(CONFIG_OMAP) += omap_lcdc.o -common-obj-$(CONFIG_PXA2XX) += pxa2xx_lcd.o -common-obj-$(CONFIG_RASPI) += bcm2835_fb.o -common-obj-$(CONFIG_SM501) += sm501.o -common-obj-$(CONFIG_TCX) += tcx.o -common-obj-$(CONFIG_CG3) += cg3.o -common-obj-$(CONFIG_NEXTCUBE) += next-fb.o -common-obj-$(CONFIG_ARTIST) += artist.o - -obj-$(CONFIG_VGA) += vga.o - -ifeq ($(CONFIG_QXL),y) -common-obj-m += qxl.mo -qxl.mo-objs = qxl.o qxl-logger.o qxl-render.o -endif - -common-obj-$(CONFIG_VIRTIO_GPU) += virtio-gpu-base.o virtio-gpu.o virtio-gpu-3d.o -common-obj-$(CONFIG_VHOST_USER_GPU) += vhost-user-gpu.o -common-obj-$(call land,$(CONFIG_VIRTIO_GPU),$(CONFIG_VIRTIO_PCI)) += virtio-gpu-pci.o -common-obj-$(call land,$(CONFIG_VHOST_USER_GPU),$(CONFIG_VIRTIO_PCI)) += vhost-user-gpu-pci.o -common-obj-$(CONFIG_VIRTIO_VGA) += virtio-vga.o -common-obj-$(CONFIG_VHOST_USER_VGA) += vhost-user-vga.o -virtio-gpu.o-cflags := $(VIRGL_CFLAGS) -virtio-gpu.o-libs += $(VIRGL_LIBS) -virtio-gpu-3d.o-cflags := $(VIRGL_CFLAGS) -virtio-gpu-3d.o-libs += $(VIRGL_LIBS) -common-obj-$(CONFIG_DPCD) += dpcd.o -common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dp.o - -common-obj-$(CONFIG_ATI_VGA) += ati.o ati_2d.o ati_dbg.o diff --git a/hw/display/meson.build b/hw/display/meson.build new file mode 100644 index 0000000000..78adaf9db4 --- /dev/null +++ b/hw/display/meson.build @@ -0,0 +1,84 @@ +hw_display_modules = {} + +softmmu_ss.add(when: 'CONFIG_DDC', if_true: files('i2c-ddc.c')) +softmmu_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-region.c')) + +softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c')) +softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c')) + +softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c')) +softmmu_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c')) +softmmu_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c')) +softmmu_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c')) +softmmu_ss.add(when: 'CONFIG_JAZZ_LED', if_true: files('jazz_led.c')) +softmmu_ss.add(when: 'CONFIG_PL110', if_true: files('pl110.c')) +softmmu_ss.add(when: 'CONFIG_SII9022', if_true: files('sii9022.c')) +softmmu_ss.add(when: 'CONFIG_SSD0303', if_true: files('ssd0303.c')) +softmmu_ss.add(when: 'CONFIG_SSD0323', if_true: files('ssd0323.c')) +softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xenfb.c')) + +softmmu_ss.add(when: 'CONFIG_VGA_PCI', if_true: files('vga-pci.c')) +softmmu_ss.add(when: 'CONFIG_VGA_ISA', if_true: files('vga-isa.c')) +softmmu_ss.add(when: 'CONFIG_VGA_ISA_MM', if_true: files('vga-isa-mm.c')) +softmmu_ss.add(when: 'CONFIG_VMWARE_VGA', if_true: files('vmware_vga.c')) +softmmu_ss.add(when: 'CONFIG_BOCHS_DISPLAY', if_true: files('bochs-display.c')) + +softmmu_ss.add(when: 'CONFIG_BLIZZARD', if_true: files('blizzard.c')) +softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_fimd.c')) +softmmu_ss.add(when: 'CONFIG_FRAMEBUFFER', if_true: files('framebuffer.c')) +softmmu_ss.add(when: 'CONFIG_ZAURUS', if_true: files('tc6393xb.c')) + +softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dss.c')) +softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_lcd.c')) +softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_fb.c')) +softmmu_ss.add(when: 'CONFIG_SM501', if_true: files('sm501.c')) +softmmu_ss.add(when: 'CONFIG_TCX', if_true: files('tcx.c')) +softmmu_ss.add(when: 'CONFIG_CG3', if_true: files('cg3.c')) +softmmu_ss.add(when: 'CONFIG_MACFB', if_true: files('macfb.c')) +softmmu_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-fb.c')) + +specific_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c')) + +if config_all_devices.has_key('CONFIG_QXL') + qxl_ss = ss.source_set() + qxl_ss.add(when: 'CONFIG_QXL', if_true: files('qxl.c', 'qxl-logger.c', 'qxl-render.c')) + hw_display_modules += {'qxl': qxl_ss} +endif + +softmmu_ss.add(when: 'CONFIG_QXL', if_true: files('qxl.c', 'qxl-logger.c', 'qxl-render.c')) + +softmmu_ss.add(when: 'CONFIG_DPCD', if_true: files('dpcd.c')) +softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dp.c')) + +softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-vgafb.c')) +softmmu_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c')) + +softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d.c', 'ati_dbg.c')) + +if config_all_devices.has_key('CONFIG_VIRTIO_GPU') + virtio_gpu_ss = ss.source_set() + virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU', + if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), pixman, virgl]) + virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c')) + virtio_gpu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-gpu-pci.c')) + virtio_gpu_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-gpu-pci.c')) + virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_VGA', if_true: files('virtio-vga.c')) + virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_VGA', if_true: files('vhost-user-vga.c')) + + # FIXME: this was attempted in the Makefile build system; it was then reverted + # as it would try to load all devices when the module is loaded, even if + # config_devices for this target only has some of them. Since virtio-gpu-pci + # and virtio-vga both instantiate a virtio-gpu-device, fixing it probably does + # not even require a dependency system, just splitting the module in three + # for CONFIG_VIRTIO_GPU/CONFIG_VHOST_USER_GPU, CONFIG_VIRTIO_PCI and + # CONFIG_VIRTIO_VGA/CONFIG_VHOST_USER_VGA. + # Sourcesets are a dime a dozen, so keep it and just disable module builds. + + #hw_display_modules += {'virtio-gpu': virtio_gpu_ss} + softmmu_ss.add_all(virtio_gpu_ss) +endif + +specific_ss.add(when: [x11, opengl, 'CONFIG_MILKYMIST_TMU2'], if_true: files('milkymist-tmu2.c')) +specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c')) + +modules += { 'hw-display': hw_display_modules } diff --git a/hw/meson.build b/hw/meson.build index 96da0bba7e..dacd26c561 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('display') subdir('dma') subdir('gpio') subdir('hyperv') From patchwork Fri Aug 21 10:23:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275898 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E69B9C433DF for ; Fri, 21 Aug 2020 11:20:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4AA62054F for ; Fri, 21 Aug 2020 11:20:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KgoV8Mys" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4AA62054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9568-0006gP-Tv for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:20:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Eg-0003dk-Pr for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EU-0001ui-RU for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zeqJ/1Sm+Fvm29kxgyAv/NFi2pw/pN96WZxTtdD3hbU=; b=KgoV8MysF+NlK07lHy5fijHgYV6XZGtEKZTXowz4TLsIb0TnN1FurXPMUsIzusUHyEYnKd QNs+NF/oZ1n9iZT0K2L5m1oSUs1SB6mzmQlYcypTl12McDja2wPILZH5p7Sjy0Zmd2Tu/E 9ORlkO3ABxi2foSaVn1E6g1ZWGcUfSw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-14-Ibfqo78MPTqN_rEKXRHpIw-1; Fri, 21 Aug 2020 06:25:12 -0400 X-MC-Unique: Ibfqo78MPTqN_rEKXRHpIw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4DA3D801AF6 for ; Fri, 21 Aug 2020 10:25:11 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0633110098AE; Fri, 21 Aug 2020 10:25:10 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 123/152] meson: convert hw/block Date: Fri, 21 Aug 2020 06:23:00 -0400 Message-Id: <20200821102329.29777-124-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/block/Makefile.objs | 18 ------------------ hw/block/dataplane/Makefile.objs | 2 -- hw/block/dataplane/meson.build | 2 ++ hw/block/meson.build | 21 +++++++++++++++++++++ hw/meson.build | 1 + 6 files changed, 24 insertions(+), 21 deletions(-) delete mode 100644 hw/block/Makefile.objs delete mode 100644 hw/block/dataplane/Makefile.objs create mode 100644 hw/block/dataplane/meson.build create mode 100644 hw/block/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 04cfb6ca6d..9068859ef0 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -3,7 +3,6 @@ devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFI devices-dirs-y += acpi/ devices-dirs-y += adc/ devices-dirs-y += audio/ -devices-dirs-y += block/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/block/Makefile.objs b/hw/block/Makefile.objs deleted file mode 100644 index 8855c22656..0000000000 --- a/hw/block/Makefile.objs +++ /dev/null @@ -1,18 +0,0 @@ -common-obj-y += block.o cdrom.o hd-geometry.o -common-obj-$(CONFIG_FDC) += fdc.o -common-obj-$(CONFIG_SSI_M25P80) += m25p80.o -common-obj-$(CONFIG_NAND) += nand.o -common-obj-$(CONFIG_PFLASH_CFI01) += pflash_cfi01.o -common-obj-$(CONFIG_PFLASH_CFI02) += pflash_cfi02.o -common-obj-$(CONFIG_XEN) += xen-block.o -common-obj-$(CONFIG_ECC) += ecc.o -common-obj-$(CONFIG_ONENAND) += onenand.o -common-obj-$(CONFIG_SWIM) += swim.o - -common-obj-$(CONFIG_SH4) += tc58128.o - -obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o -obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk.o -common-obj-$(CONFIG_NVME_PCI) += nvme.o - -obj-y += dataplane/ diff --git a/hw/block/dataplane/Makefile.objs b/hw/block/dataplane/Makefile.objs deleted file mode 100644 index 0c5270268e..0000000000 --- a/hw/block/dataplane/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o -obj-$(CONFIG_XEN) += xen-block.o diff --git a/hw/block/dataplane/meson.build b/hw/block/dataplane/meson.build new file mode 100644 index 0000000000..12c6a264f1 --- /dev/null +++ b/hw/block/dataplane/meson.build @@ -0,0 +1,2 @@ +specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) +specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c')) diff --git a/hw/block/meson.build b/hw/block/meson.build new file mode 100644 index 0000000000..78cad8f7cb --- /dev/null +++ b/hw/block/meson.build @@ -0,0 +1,21 @@ +softmmu_ss.add(files( + 'block.c', + 'cdrom.c', + 'hd-geometry.c' +)) +softmmu_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c')) +softmmu_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c')) +softmmu_ss.add(when: 'CONFIG_NAND', if_true: files('nand.c')) +softmmu_ss.add(when: 'CONFIG_ONENAND', if_true: files('onenand.c')) +softmmu_ss.add(when: 'CONFIG_PFLASH_CFI01', if_true: files('pflash_cfi01.c')) +softmmu_ss.add(when: 'CONFIG_PFLASH_CFI02', if_true: files('pflash_cfi02.c')) +softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c')) +softmmu_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c')) +softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c')) +softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('tc58128.c')) +softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('nvme.c')) + +specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) +specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c')) + +subdir('dataplane') diff --git a/hw/meson.build b/hw/meson.build index dd0c77ec2b..f968aa8374 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,3 +1,4 @@ +subdir('block') subdir('char') subdir('core') subdir('cpu') From patchwork Fri Aug 21 10:23:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275904 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E7D4C433E1 for ; Fri, 21 Aug 2020 11:16:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2AAD82072D for ; Fri, 21 Aug 2020 11:16:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dN+TLcWj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AAD82072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k952M-000538-Cp for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:16:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Eh-0003ek-3k for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58320) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EU-0001uw-Vv for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GR2JAOoihvMbG8M0xyCavn1TY8P5bNTcVFUjDnvW2RU=; b=dN+TLcWja93pvtD1BjSt/JgJFkQzpL1dcaaWZJFf6aJsOXuJOh5CE5NTY+2LCUFQk9rO1C jIUxsuHATttPR6YNZmhUEKfXu/caMiqXlIFzvmLkYfOF4dTk5U33w99nTjCwj8QQWobk4s xD/XRCEJpwkkJ/kITs6rALkkkzkbgFc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-449-jjTGXYhHN0mlZpPKW8c0oA-1; Fri, 21 Aug 2020 06:25:12 -0400 X-MC-Unique: jjTGXYhHN0mlZpPKW8c0oA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B12171009456 for ; Fri, 21 Aug 2020 10:25:11 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BE2F10098AE; Fri, 21 Aug 2020 10:25:11 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 124/152] meson: convert hw/audio Date: Fri, 21 Aug 2020 06:23:01 -0400 Message-Id: <20200821102329.29777-125-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/audio/Makefile.objs | 18 ------------------ hw/audio/meson.build | 14 ++++++++++++++ hw/meson.build | 1 + 4 files changed, 15 insertions(+), 19 deletions(-) delete mode 100644 hw/audio/Makefile.objs create mode 100644 hw/audio/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 9068859ef0..c0cbc0f132 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -2,7 +2,6 @@ ifeq ($(CONFIG_SOFTMMU), y) devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/ devices-dirs-y += acpi/ devices-dirs-y += adc/ -devices-dirs-y += audio/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/audio/Makefile.objs b/hw/audio/Makefile.objs deleted file mode 100644 index 63db383709..0000000000 --- a/hw/audio/Makefile.objs +++ /dev/null @@ -1,18 +0,0 @@ -# Sound -common-obj-$(CONFIG_SB16) += sb16.o -common-obj-$(CONFIG_ES1370) += es1370.o -common-obj-$(CONFIG_AC97) += ac97.o -common-obj-$(CONFIG_ADLIB) += fmopl.o adlib.o -common-obj-$(CONFIG_GUS) += gus.o gusemu_hal.o gusemu_mixer.o -common-obj-$(CONFIG_CS4231A) += cs4231a.o -common-obj-$(CONFIG_HDA) += intel-hda.o hda-codec.o - -common-obj-$(CONFIG_PCSPK) += pcspk.o -common-obj-$(CONFIG_WM8750) += wm8750.o -common-obj-$(CONFIG_PL041) += pl041.o lm4549.o - -common-obj-$(CONFIG_CS4231) += cs4231.o -common-obj-$(CONFIG_MARVELL_88W8618) += marvell_88w8618.o -common-obj-$(CONFIG_MILKYMIST) += milkymist-ac97.o - -common-obj-y += soundhw.o diff --git a/hw/audio/meson.build b/hw/audio/meson.build new file mode 100644 index 0000000000..549e9a0396 --- /dev/null +++ b/hw/audio/meson.build @@ -0,0 +1,14 @@ +softmmu_ss.add(files('soundhw.c')) +softmmu_ss.add(when: 'CONFIG_AC97', if_true: files('ac97.c')) +softmmu_ss.add(when: 'CONFIG_ADLIB', if_true: files('fmopl.c', 'adlib.c')) +softmmu_ss.add(when: 'CONFIG_CS4231', if_true: files('cs4231.c')) +softmmu_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c')) +softmmu_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c')) +softmmu_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c')) +softmmu_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c')) +softmmu_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c')) +softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-ac97.c')) +softmmu_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c')) +softmmu_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c')) +softmmu_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c')) +softmmu_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c')) diff --git a/hw/meson.build b/hw/meson.build index f968aa8374..624335be90 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,3 +1,4 @@ +subdir('audio') subdir('block') subdir('char') subdir('core') From patchwork Fri Aug 21 10:23:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275902 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C8A4C433E1 for ; Fri, 21 Aug 2020 11:18:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67B812072D for ; Fri, 21 Aug 2020 11:18:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MnVDKkdZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67B812072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k953e-0008RT-NS for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:18:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Eh-0003f7-HR for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:27 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:44275 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EV-0001v0-7o for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pl0jAkenLkFo4zL19mkOAUPmJs0SzL6RKuibTucn6yE=; b=MnVDKkdZofUlIj/8AcaV5pfDbidTsht6lhqBmIkbfwMgGZxM1RDCG+sSJrwfDTrAEBF+v5 u3AdHFBXx0f0rCE1V72L2/IZ5pg7Fpn6g9UOvF7ruhAzoXpqkB4yQjgLhaVq8X6WGiaxmR f+XbqNlv2AgVmwny/NiGwhto91FJsjo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-SZDaiHfCN0GqfCQNMJ9I_Q-1; Fri, 21 Aug 2020 06:25:13 -0400 X-MC-Unique: SZDaiHfCN0GqfCQNMJ9I_Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D886801AEE for ; Fri, 21 Aug 2020 10:25:12 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id CCC9010098AE; Fri, 21 Aug 2020 10:25:11 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 125/152] meson: convert hw/adc Date: Fri, 21 Aug 2020 06:23:02 -0400 Message-Id: <20200821102329.29777-126-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 01:00:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/adc/Makefile.objs | 1 - hw/adc/meson.build | 1 + hw/meson.build | 1 + 4 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 hw/adc/Makefile.objs create mode 100644 hw/adc/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index c0cbc0f132..4bdb674ef0 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -1,7 +1,6 @@ ifeq ($(CONFIG_SOFTMMU), y) devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/ devices-dirs-y += acpi/ -devices-dirs-y += adc/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/adc/Makefile.objs b/hw/adc/Makefile.objs deleted file mode 100644 index 2b9dc36c7f..0000000000 --- a/hw/adc/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -common-obj-$(CONFIG_STM32F2XX_ADC) += stm32f2xx_adc.o diff --git a/hw/adc/meson.build b/hw/adc/meson.build new file mode 100644 index 0000000000..0d62ae96ae --- /dev/null +++ b/hw/adc/meson.build @@ -0,0 +1 @@ +softmmu_ss.add(when: 'CONFIG_STM32F2XX_ADC', if_true: files('stm32f2xx_adc.c')) diff --git a/hw/meson.build b/hw/meson.build index 624335be90..ffa3f06dc0 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,3 +1,4 @@ +subdir('adc') subdir('audio') subdir('block') subdir('char') From patchwork Fri Aug 21 10:23:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275894 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 506FDC433E1 for ; Fri, 21 Aug 2020 11:23:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A5582054F for ; Fri, 21 Aug 2020 11:23:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UxVSebnu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A5582054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k958v-0004ux-8C for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:23:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Ek-0003lQ-8U for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:30 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:55198 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94EX-0001vI-SZ for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rU4n9sn0xbo37T4jGj6ROAEzLR5VNUSmn/MPgqW3AxU=; b=UxVSebnunfFBoJm7iNvI7B7ieXSEVAiIAM8PXV/hiqi19YrsXREbV9D3wz5PBjmVV8OZdJ Rm8xBiy17m40ASWH2RYcYndxNIu0AY3Unoh1zGNJHBfF4jqbrgqjHmY8JTdTaKtyv08zwL HtOxbbieF9O50GWWHy3h0lvokdhZiS4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-htPwbnAmOKy5VbVLbvVUrQ-1; Fri, 21 Aug 2020 06:25:13 -0400 X-MC-Unique: htPwbnAmOKy5VbVLbvVUrQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8ED81191E2A1 for ; Fri, 21 Aug 2020 10:25:12 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 49234103BAB6; Fri, 21 Aug 2020 10:25:12 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 126/152] meson: convert hw/acpi Date: Fri, 21 Aug 2020 06:23:03 -0400 Message-Id: <20200821102329.29777-127-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- hw/Makefile.objs | 1 - hw/acpi/Makefile.objs | 26 -------------------------- hw/acpi/meson.build | 25 +++++++++++++++++++++++++ hw/meson.build | 1 + 4 files changed, 26 insertions(+), 27 deletions(-) delete mode 100644 hw/acpi/Makefile.objs create mode 100644 hw/acpi/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 4bdb674ef0..ebae00af6e 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -1,6 +1,5 @@ ifeq ($(CONFIG_SOFTMMU), y) devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/ -devices-dirs-y += acpi/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs deleted file mode 100644 index 72886c7965..0000000000 --- a/hw/acpi/Makefile.objs +++ /dev/null @@ -1,26 +0,0 @@ -ifeq ($(CONFIG_ACPI),y) -common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o -common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o -common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o -common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o -common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o -common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o -common-obj-$(CONFIG_ACPI_VMGENID) += vmgenid.o -common-obj-$(CONFIG_ACPI_HW_REDUCED) += generic_event_device.o -common-obj-$(CONFIG_ACPI_HMAT) += hmat.o -common-obj-$(CONFIG_ACPI_APEI) += ghes.o -common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o -common-obj-$(call lnot,$(CONFIG_PC)) += acpi-x86-stub.o - -common-obj-y += acpi_interface.o -common-obj-y += bios-linker-loader.o -common-obj-y += aml-build.o utils.o -common-obj-$(CONFIG_ACPI_PCI) += pci.o -common-obj-$(CONFIG_TPM) += tpm.o - -common-obj-$(CONFIG_IPMI) += ipmi.o -common-obj-$(call lnot,$(CONFIG_IPMI)) += ipmi-stub.o -else -common-obj-y += acpi-stub.o aml-build-stub.o -endif -common-obj-$(CONFIG_ALL) += acpi-stub.o aml-build-stub.o acpi-x86-stub.o ipmi-stub.o diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build new file mode 100644 index 0000000000..dd69577212 --- /dev/null +++ b/hw/acpi/meson.build @@ -0,0 +1,25 @@ +acpi_ss = ss.source_set() +acpi_ss.add(files( + 'acpi_interface.c', + 'aml-build.c', + 'bios-linker-loader.c', + 'utils.c', +)) +acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu.c')) +acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu_hotplug.c')) +acpi_ss.add(when: 'CONFIG_ACPI_MEMORY_HOTPLUG', if_true: files('memory_hotplug.c')) +acpi_ss.add(when: 'CONFIG_ACPI_NVDIMM', if_true: files('nvdimm.c')) +acpi_ss.add(when: 'CONFIG_ACPI_PCI', if_true: files('pci.c')) +acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.c')) +acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device.c')) +acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c')) +acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c')) +acpi_ss.add(when: 'CONFIG_ACPI_X86', if_true: files('core.c', 'piix4.c', 'pcihp.c'), if_false: files('acpi-stub.c')) +acpi_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('ich9.c', 'tco.c')) +acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c')) +acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c')) +acpi_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c')) +softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c')) +softmmu_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-build-stub.c', + 'acpi-x86-stub.c', 'ipmi-stub.c')) diff --git a/hw/meson.build b/hw/meson.build index ffa3f06dc0..55ca2b2b61 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,3 +1,4 @@ +subdir('acpi') subdir('adc') subdir('audio') subdir('block') From patchwork Fri Aug 21 10:23:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275901 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CF0AC433DF for ; Fri, 21 Aug 2020 11:18:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB09C2072D for ; Fri, 21 Aug 2020 11:18:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BTlSx5It" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB09C2072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k953j-00007x-5j for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:18:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Ep-0003xU-0x for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:35 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:49907 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Eb-0001vy-Oc for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=htenXe+bE4Vt8GFjsvPnZFdTq7RUGac/1XiXsymQuBs=; b=BTlSx5ItgdWN0uO7ICl8J/3hZGHVziXBj904anWXMDji1M1wQ7mq4yE+xliK4N8a402SDC ZjUOrxh3sGqk67yrsFlagQxSVuaS9REIXetSZ9uQLGay66WGxNC7oSU36YBKEnfYDNhcju /kwlkyyYSMOrrDZjtXWJhGqxPd3i7tY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-429-mAO0GxjPMQ28PWUSZuFLbg-1; Fri, 21 Aug 2020 06:25:14 -0400 X-MC-Unique: mAO0GxjPMQ28PWUSZuFLbg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DBF2E81F02D for ; Fri, 21 Aug 2020 10:25:13 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85A9010098AE; Fri, 21 Aug 2020 10:25:13 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 129/152] meson: target Date: Fri, 21 Aug 2020 06:23:06 -0400 Message-Id: <20200821102329.29777-130-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Similar to hw_arch, each architecture defines two sourceset which are placed in dictionaries target_arch and target_softmmu_arch. These are then picked up from there when building the per-emulator static_library. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile.target | 3 +- libdecnumber/Makefile.objs | 5 -- libdecnumber/meson.build | 7 +++ meson.build | 11 ++++ scripts/decodetree.py | 2 +- target/alpha/Makefile.objs | 4 -- target/alpha/meson.build | 18 +++++++ target/arm/Makefile.objs | 89 --------------------------------- target/arm/meson.build | 62 +++++++++++++++++++++++ target/avr/Makefile.objs | 34 ------------- target/avr/disas.c | 2 +- target/avr/meson.build | 20 ++++++++ target/avr/translate.c | 2 +- target/cris/Makefile.objs | 3 -- target/cris/meson.build | 14 ++++++ target/hppa/Makefile.objs | 11 ---- target/hppa/meson.build | 19 +++++++ target/hppa/translate.c | 2 +- target/i386/Makefile.objs | 23 --------- target/i386/hvf/Makefile.objs | 2 - target/i386/hvf/meson.build | 12 +++++ target/i386/meson.build | 40 +++++++++++++++ target/lm32/Makefile.objs | 4 -- target/lm32/meson.build | 15 ++++++ target/m68k/Makefile.objs | 5 -- target/m68k/meson.build | 17 +++++++ target/meson.build | 22 ++++++++ target/microblaze/Makefile.objs | 3 -- target/microblaze/meson.build | 14 ++++++ target/mips/Makefile.objs | 6 --- target/mips/meson.build | 24 +++++++++ target/moxie/Makefile.objs | 2 - target/moxie/meson.build | 14 ++++++ target/nios2/Makefile.objs | 4 -- target/nios2/meson.build | 15 ++++++ target/openrisc/Makefile.objs | 15 ------ target/openrisc/disas.c | 2 +- target/openrisc/meson.build | 23 +++++++++ target/openrisc/translate.c | 2 +- target/ppc/Makefile.objs | 20 -------- target/ppc/meson.build | 37 ++++++++++++++ target/riscv/Makefile.objs | 28 ----------- target/riscv/meson.build | 34 +++++++++++++ target/riscv/translate.c | 4 +- target/rx/Makefile.objs | 11 ---- target/rx/disas.c | 2 +- target/rx/meson.build | 16 ++++++ target/rx/translate.c | 2 +- target/s390x/Makefile.objs | 10 ---- target/s390x/meson.build | 42 +++++++++++++++- target/sh4/Makefile.objs | 3 -- target/sh4/meson.build | 14 ++++++ target/sparc/Makefile.objs | 7 --- target/sparc/meson.build | 23 +++++++++ target/tilegx/Makefile.objs | 1 - target/tilegx/meson.build | 13 +++++ target/tricore/Makefile.objs | 1 - target/tricore/meson.build | 15 ++++++ target/unicore32/Makefile.objs | 8 --- target/unicore32/meson.build | 14 ++++++ target/xtensa/Makefile.objs | 16 ------ target/xtensa/meson.build | 30 +++++++++++ 62 files changed, 595 insertions(+), 328 deletions(-) delete mode 100644 libdecnumber/Makefile.objs create mode 100644 libdecnumber/meson.build mode change 100755 => 100644 scripts/decodetree.py delete mode 100644 target/alpha/Makefile.objs create mode 100644 target/alpha/meson.build delete mode 100644 target/arm/Makefile.objs create mode 100644 target/arm/meson.build delete mode 100644 target/avr/Makefile.objs create mode 100644 target/avr/meson.build delete mode 100644 target/cris/Makefile.objs create mode 100644 target/cris/meson.build delete mode 100644 target/hppa/Makefile.objs create mode 100644 target/hppa/meson.build delete mode 100644 target/i386/Makefile.objs delete mode 100644 target/i386/hvf/Makefile.objs create mode 100644 target/i386/hvf/meson.build create mode 100644 target/i386/meson.build delete mode 100644 target/lm32/Makefile.objs create mode 100644 target/lm32/meson.build delete mode 100644 target/m68k/Makefile.objs create mode 100644 target/m68k/meson.build delete mode 100644 target/microblaze/Makefile.objs create mode 100644 target/microblaze/meson.build delete mode 100644 target/mips/Makefile.objs create mode 100644 target/mips/meson.build delete mode 100644 target/moxie/Makefile.objs create mode 100644 target/moxie/meson.build delete mode 100644 target/nios2/Makefile.objs create mode 100644 target/nios2/meson.build delete mode 100644 target/openrisc/Makefile.objs create mode 100644 target/openrisc/meson.build delete mode 100644 target/ppc/Makefile.objs create mode 100644 target/ppc/meson.build delete mode 100644 target/riscv/Makefile.objs create mode 100644 target/riscv/meson.build delete mode 100644 target/rx/Makefile.objs create mode 100644 target/rx/meson.build delete mode 100644 target/s390x/Makefile.objs delete mode 100644 target/sh4/Makefile.objs create mode 100644 target/sh4/meson.build delete mode 100644 target/sparc/Makefile.objs create mode 100644 target/sparc/meson.build delete mode 100644 target/tilegx/Makefile.objs create mode 100644 target/tilegx/meson.build delete mode 100644 target/tricore/Makefile.objs create mode 100644 target/tricore/meson.build delete mode 100644 target/unicore32/Makefile.objs create mode 100644 target/unicore32/meson.build delete mode 100644 target/xtensa/Makefile.objs create mode 100644 target/xtensa/meson.build diff --git a/Makefile.target b/Makefile.target index 28cefba1de..1ab8773402 100644 --- a/Makefile.target +++ b/Makefile.target @@ -116,7 +116,6 @@ 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) @@ -168,7 +167,7 @@ LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOM LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS) LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS) LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS) -LIBS := $(LIBS) $(VIRGL_LIBS) +LIBS := $(LIBS) $(VIRGL_LIBS) $(CURSES_LIBS) generated-files-y += hmp-commands.h hmp-commands-info.h diff --git a/libdecnumber/Makefile.objs b/libdecnumber/Makefile.objs deleted file mode 100644 index d81db0443a..0000000000 --- a/libdecnumber/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -obj-y += decContext.o -obj-y += decNumber.o -obj-y += dpd/decimal32.o -obj-y += dpd/decimal64.o -obj-y += dpd/decimal128.o diff --git a/libdecnumber/meson.build b/libdecnumber/meson.build new file mode 100644 index 0000000000..4d04139af4 --- /dev/null +++ b/libdecnumber/meson.build @@ -0,0 +1,7 @@ +libdecnumber = files( + 'decContext.c', + 'decNumber.c', + 'dpd/decimal128.c', + 'dpd/decimal32.c', + 'dpd/decimal64.c', +) diff --git a/meson.build b/meson.build index 5c9f66d2a7..ac59ccc935 100644 --- a/meson.build +++ b/meson.build @@ -647,10 +647,15 @@ libqemuutil = static_library('qemuutil', qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) +decodetree = generator(find_program('scripts/decodetree.py'), + output: 'decode-@BASENAME@.c.inc', + arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@']) + subdir('audio') subdir('io') subdir('chardev') subdir('fsdev') +subdir('libdecnumber') subdir('target') subdir('dump') @@ -787,6 +792,9 @@ foreach target : target_dirs if target.endswith('-softmmu') qemu_target_name = 'qemu-system-' + target_name target_type='system' + t = target_softmmu_arch[arch].apply(config_target, strict: false) + arch_srcs += t.sources() + hw_dir = target_name == 'sparc64' ? 'sparc64' : arch hw = hw_arch[hw_dir].apply(config_target, strict: false) arch_srcs += hw.sources() @@ -807,6 +815,9 @@ foreach target : target_dirs ) endif + t = target_arch[arch].apply(config_target, strict: false) + arch_srcs += t.sources() + target_common = common_ss.apply(config_target, strict: false) objects = common_all.extract_objects(target_common.sources()) diff --git a/scripts/decodetree.py b/scripts/decodetree.py old mode 100755 new mode 100644 index 694757b6c2..4cd1e10904 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -1257,7 +1257,7 @@ def main(): long_opts = ['decode=', 'translate=', 'output=', 'insnwidth=', 'static-decode=', 'varinsnwidth='] try: - (opts, args) = getopt.getopt(sys.argv[1:], 'o:vw:', long_opts) + (opts, args) = getopt.gnu_getopt(sys.argv[1:], 'o:vw:', long_opts) except getopt.GetoptError as err: error(0, err) for o, a in opts: diff --git a/target/alpha/Makefile.objs b/target/alpha/Makefile.objs deleted file mode 100644 index 63664629f6..0000000000 --- a/target/alpha/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -obj-$(CONFIG_SOFTMMU) += machine.o -obj-y += translate.o helper.o cpu.o -obj-y += int_helper.o fpu_helper.o vax_helper.o sys_helper.o mem_helper.o -obj-y += gdbstub.o diff --git a/target/alpha/meson.build b/target/alpha/meson.build new file mode 100644 index 0000000000..1aec55abb4 --- /dev/null +++ b/target/alpha/meson.build @@ -0,0 +1,18 @@ +alpha_ss = ss.source_set() +alpha_ss.add(files( + 'cpu.c', + 'fpu_helper.c', + 'gdbstub.c', + 'helper.c', + 'int_helper.c', + 'mem_helper.c', + 'sys_helper.c', + 'translate.c', + 'vax_helper.c', +)) + +alpha_softmmu_ss = ss.source_set() +alpha_softmmu_ss.add(files('machine.c')) + +target_arch += {'alpha': alpha_ss} +target_softmmu_arch += {'alpha': alpha_softmmu_ss} diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs deleted file mode 100644 index 317eed993f..0000000000 --- a/target/arm/Makefile.objs +++ /dev/null @@ -1,89 +0,0 @@ -obj-$(CONFIG_TCG) += arm-semi.o -obj-y += helper.o vfp_helper.o -obj-y += cpu.o gdbstub.o -obj-$(TARGET_AARCH64) += cpu64.o gdbstub64.o - -obj-$(CONFIG_SOFTMMU) += machine.o arch_dump.o monitor.o -obj-$(CONFIG_SOFTMMU) += arm-powerctl.o - -obj-$(CONFIG_KVM) += kvm.o -obj-$(call land,$(CONFIG_KVM),$(call lnot,$(TARGET_AARCH64))) += kvm32.o -obj-$(call land,$(CONFIG_KVM),$(TARGET_AARCH64)) += kvm64.o -obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o - -DECODETREE = $(SRC_PATH)/scripts/decodetree.py - -target/arm/decode-sve.c.inc: $(SRC_PATH)/target/arm/sve.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --decode disas_sve -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-neon-shared.c.inc: $(SRC_PATH)/target/arm/neon-shared.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --static-decode disas_neon_shared -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-neon-dp.c.inc: $(SRC_PATH)/target/arm/neon-dp.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --static-decode disas_neon_dp -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-neon-ls.c.inc: $(SRC_PATH)/target/arm/neon-ls.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --static-decode disas_neon_ls -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-vfp.c.inc: $(SRC_PATH)/target/arm/vfp.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --static-decode disas_vfp -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-vfp-uncond.c.inc: $(SRC_PATH)/target/arm/vfp-uncond.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --static-decode disas_vfp_uncond -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-a32.c.inc: $(SRC_PATH)/target/arm/a32.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --static-decode disas_a32 -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-a32-uncond.c.inc: $(SRC_PATH)/target/arm/a32-uncond.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --static-decode disas_a32_uncond -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-t32.c.inc: $(SRC_PATH)/target/arm/t32.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --static-decode disas_t32 -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/decode-t16.c.inc: $(SRC_PATH)/target/arm/t16.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) -w 16 --static-decode disas_t16 -o $@ $<,\ - "GEN", $(TARGET_DIR)$@) - -target/arm/translate-sve.o: target/arm/decode-sve.c.inc -target/arm/translate.o: target/arm/decode-neon-shared.c.inc -target/arm/translate.o: target/arm/decode-neon-dp.c.inc -target/arm/translate.o: target/arm/decode-neon-ls.c.inc -target/arm/translate.o: target/arm/decode-vfp.c.inc -target/arm/translate.o: target/arm/decode-vfp-uncond.c.inc -target/arm/translate.o: target/arm/decode-a32.c.inc -target/arm/translate.o: target/arm/decode-a32-uncond.c.inc -target/arm/translate.o: target/arm/decode-t32.c.inc -target/arm/translate.o: target/arm/decode-t16.c.inc - -obj-y += tlb_helper.o debug_helper.o -obj-y += translate.o op_helper.o -obj-y += crypto_helper.o -obj-y += iwmmxt_helper.o vec_helper.o neon_helper.o -obj-y += m_helper.o -obj-y += cpu_tcg.o - -obj-$(CONFIG_SOFTMMU) += psci.o - -obj-$(TARGET_AARCH64) += translate-a64.o helper-a64.o -obj-$(TARGET_AARCH64) += translate-sve.o sve_helper.o -obj-$(TARGET_AARCH64) += pauth_helper.o -obj-$(TARGET_AARCH64) += mte_helper.o diff --git a/target/arm/meson.build b/target/arm/meson.build new file mode 100644 index 0000000000..bd46cdb523 --- /dev/null +++ b/target/arm/meson.build @@ -0,0 +1,62 @@ +gen = [ + decodetree.process('sve.decode', extra_args: '--decode=disas_sve'), + decodetree.process('neon-shared.decode', extra_args: '--static-decode=disas_neon_shared'), + decodetree.process('neon-dp.decode', extra_args: '--static-decode=disas_neon_dp'), + decodetree.process('neon-ls.decode', extra_args: '--static-decode=disas_neon_ls'), + decodetree.process('vfp.decode', extra_args: '--static-decode=disas_vfp'), + decodetree.process('vfp-uncond.decode', extra_args: '--static-decode=disas_vfp_uncond'), + decodetree.process('a32.decode', extra_args: '--static-decode=disas_a32'), + decodetree.process('a32-uncond.decode', extra_args: '--static-decode=disas_a32_uncond'), + decodetree.process('t32.decode', extra_args: '--static-decode=disas_t32'), + decodetree.process('t16.decode', extra_args: ['-w', '16', '--static-decode=disas_t16']), +] + +arm_ss = ss.source_set() +arm_ss.add(gen) +arm_ss.add(files( + 'cpu.c', + 'crypto_helper.c', + 'debug_helper.c', + 'gdbstub.c', + 'helper.c', + 'iwmmxt_helper.c', + 'm_helper.c', + 'neon_helper.c', + 'op_helper.c', + 'tlb_helper.c', + 'translate.c', + 'vec_helper.c', + 'vfp_helper.c', + 'cpu_tcg.c', +)) +arm_ss.add(zlib) + +arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c')) + +kvm_ss = ss.source_set() +kvm_ss.add(when: 'TARGET_AARCH64', if_true: files('kvm64.c'), if_false: files('kvm32.c')) +arm_ss.add_all(when: 'CONFIG_KVM', if_true: kvm_ss) +arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) + +arm_ss.add(when: 'TARGET_AARCH64', if_true: files( + 'cpu64.c', + 'gdbstub64.c', + 'helper-a64.c', + 'mte_helper.c', + 'pauth_helper.c', + 'sve_helper.c', + 'translate-a64.c', + 'translate-sve.c', +)) + +arm_softmmu_ss = ss.source_set() +arm_softmmu_ss.add(files( + 'arch_dump.c', + 'arm-powerctl.c', + 'machine.c', + 'monitor.c', + 'psci.c', +)) + +target_arch += {'arm': arm_ss} +target_softmmu_arch += {'arm': arm_softmmu_ss} diff --git a/target/avr/Makefile.objs b/target/avr/Makefile.objs deleted file mode 100644 index fb94a0b069..0000000000 --- a/target/avr/Makefile.objs +++ /dev/null @@ -1,34 +0,0 @@ -# -# QEMU AVR -# -# Copyright (c) 2016-2020 Michael Rolnik -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, see -# -# - -DECODETREE = $(SRC_PATH)/scripts/decodetree.py -decode-y = $(SRC_PATH)/target/avr/insn.decode - -target/avr/decode_insn.c.inc: $(decode-y) $(DECODETREE) - $(call quiet-command, \ - $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn --insnwidth 16 $<, \ - "GEN", $(TARGET_DIR)$@) - -target/avr/translate.o: target/avr/decode_insn.c.inc - -obj-y += translate.o cpu.o helper.o -obj-y += gdbstub.o -obj-y += disas.o -obj-$(CONFIG_SOFTMMU) += machine.o diff --git a/target/avr/disas.c b/target/avr/disas.c index f15dc7911a..b7689e8d7c 100644 --- a/target/avr/disas.c +++ b/target/avr/disas.c @@ -60,7 +60,7 @@ static int append_16(DisasContext *ctx, int x) /* Include the auto-generated decoder. */ static bool decode_insn(DisasContext *ctx, uint16_t insn); -#include "decode_insn.c.inc" +#include "decode-insn.c.inc" #define output(mnemonic, format, ...) \ (pctx->info->fprintf_func(pctx->info->stream, "%-9s " format, \ diff --git a/target/avr/meson.build b/target/avr/meson.build new file mode 100644 index 0000000000..7e8e29c59d --- /dev/null +++ b/target/avr/meson.build @@ -0,0 +1,20 @@ +gen = [ + decodetree.process('insn.decode', extra_args: [ '--decode', 'decode_insn', + '--insnwidth', '16' ]) +] + +avr_ss = ss.source_set() +avr_softmmu_ss = ss.source_set() + +avr_ss.add(gen) +avr_ss.add(files( + 'translate.c', + 'helper.c', + 'cpu.c', + 'gdbstub.c', + 'disas.c')) + +avr_softmmu_ss.add(files('machine.c')) + +target_arch += {'avr': avr_ss} +target_softmmu_arch += {'avr': avr_softmmu_ss} diff --git a/target/avr/translate.c b/target/avr/translate.c index 9eb14f63f0..850c5941d9 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -198,7 +198,7 @@ static bool avr_have_feature(DisasContext *ctx, int feature) } static bool decode_insn(DisasContext *ctx, uint16_t insn); -#include "decode_insn.c.inc" +#include "decode-insn.c.inc" /* * Arithmetic Instructions diff --git a/target/cris/Makefile.objs b/target/cris/Makefile.objs deleted file mode 100644 index 7779227fc4..0000000000 --- a/target/cris/Makefile.objs +++ /dev/null @@ -1,3 +0,0 @@ -obj-y += translate.o op_helper.o helper.o cpu.o -obj-y += gdbstub.o -obj-$(CONFIG_SOFTMMU) += mmu.o machine.o diff --git a/target/cris/meson.build b/target/cris/meson.build new file mode 100644 index 0000000000..67c3793c85 --- /dev/null +++ b/target/cris/meson.build @@ -0,0 +1,14 @@ +cris_ss = ss.source_set() +cris_ss.add(files( + 'cpu.c', + 'gdbstub.c', + 'helper.c', + 'op_helper.c', + 'translate.c', +)) + +cris_softmmu_ss = ss.source_set() +cris_softmmu_ss.add(files('mmu.c', 'machine.c')) + +target_arch += {'cris': cris_ss} +target_softmmu_arch += {'cris': cris_softmmu_ss} diff --git a/target/hppa/Makefile.objs b/target/hppa/Makefile.objs deleted file mode 100644 index 190cbff197..0000000000 --- a/target/hppa/Makefile.objs +++ /dev/null @@ -1,11 +0,0 @@ -obj-y += translate.o helper.o cpu.o op_helper.o gdbstub.o mem_helper.o -obj-y += int_helper.o -obj-$(CONFIG_SOFTMMU) += machine.o - -DECODETREE = $(SRC_PATH)/scripts/decodetree.py - -target/hppa/decode.c.inc: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@) - -target/hppa/translate.o: target/hppa/decode.c.inc diff --git a/target/hppa/meson.build b/target/hppa/meson.build new file mode 100644 index 0000000000..8a7ff82efc --- /dev/null +++ b/target/hppa/meson.build @@ -0,0 +1,19 @@ +gen = decodetree.process('insns.decode') + +hppa_ss = ss.source_set() +hppa_ss.add(gen) +hppa_ss.add(files( + 'cpu.c', + 'gdbstub.c', + 'helper.c', + 'int_helper.c', + 'mem_helper.c', + 'op_helper.c', + 'translate.c', +)) + +hppa_softmmu_ss = ss.source_set() +hppa_softmmu_ss.add(files('machine.c')) + +target_arch += {'hppa': hppa_ss} +target_softmmu_arch += {'hppa': hppa_softmmu_ss} diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 316f58562e..f5765ef688 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -334,7 +334,7 @@ static int expand_shl11(DisasContext *ctx, int val) /* Include the auto-generated decoder. */ -#include "decode.c.inc" +#include "decode-insns.c.inc" /* We are not using a goto_tb (for whatever reason), but have updated the iaq (for whatever reason), so don't do it again on exit. */ diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs deleted file mode 100644 index 0b93143e27..0000000000 --- a/target/i386/Makefile.objs +++ /dev/null @@ -1,23 +0,0 @@ -obj-y += helper.o cpu.o gdbstub.o xsave_helper.o -obj-$(CONFIG_TCG) += translate.o -obj-$(CONFIG_TCG) += bpt_helper.o cc_helper.o excp_helper.o fpu_helper.o -obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o mpx_helper.o -obj-$(CONFIG_TCG) += seg_helper.o smm_helper.o svm_helper.o -obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o -obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o -ifeq ($(CONFIG_SOFTMMU),y) -obj-y += machine.o arch_memory_mapping.o arch_dump.o monitor.o -obj-$(CONFIG_KVM) += kvm.o -obj-$(CONFIG_HYPERV) += hyperv.o -obj-$(call lnot,$(CONFIG_HYPERV)) += hyperv-stub.o -ifeq ($(CONFIG_WIN32),y) -obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-windows.o -endif -ifeq ($(CONFIG_POSIX),y) -obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o -endif -obj-$(CONFIG_HVF) += hvf/ -obj-$(CONFIG_WHPX) += whpx-all.o -endif -obj-$(CONFIG_SEV) += sev.o -obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o diff --git a/target/i386/hvf/Makefile.objs b/target/i386/hvf/Makefile.objs deleted file mode 100644 index 927b86bc67..0000000000 --- a/target/i386/hvf/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -obj-y += hvf.o -obj-y += x86.o x86_cpuid.o x86_decode.o x86_descr.o x86_emu.o x86_flags.o x86_mmu.o x86hvf.o x86_task.o diff --git a/target/i386/hvf/meson.build b/target/i386/hvf/meson.build new file mode 100644 index 0000000000..c8a43717ee --- /dev/null +++ b/target/i386/hvf/meson.build @@ -0,0 +1,12 @@ +i386_softmmu_ss.add(when: [hvf, 'CONFIG_HVF'], if_true: files( + 'hvf.c', + 'x86.c', + 'x86_cpuid.c', + 'x86_decode.c', + 'x86_descr.c', + 'x86_emu.c', + 'x86_flags.c', + 'x86_mmu.c', + 'x86_task.c', + 'x86hvf.c', +)) diff --git a/target/i386/meson.build b/target/i386/meson.build new file mode 100644 index 0000000000..e0b71ade56 --- /dev/null +++ b/target/i386/meson.build @@ -0,0 +1,40 @@ +i386_ss = ss.source_set() +i386_ss.add(files( + 'cpu.c', + 'gdbstub.c', + 'helper.c', + 'xsave_helper.c', +)) +i386_ss.add(when: 'CONFIG_TCG', if_true: files( + 'bpt_helper.c', + 'cc_helper.c', + 'excp_helper.c', + 'fpu_helper.c', + 'int_helper.c', + 'mem_helper.c', + 'misc_helper.c', + 'mpx_helper.c', + 'seg_helper.c', + 'smm_helper.c', + 'svm_helper.c', + 'translate.c'), if_false: files('tcg-stub.c')) +i386_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) +i386_ss.add(when: 'CONFIG_SEV', if_true: files('sev.c'), if_false: files('sev-stub.c')) + +i386_softmmu_ss = ss.source_set() +i386_softmmu_ss.add(files( + 'arch_dump.c', + 'arch_memory_mapping.c', + 'machine.c', + 'monitor.c', +)) +i386_softmmu_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'), if_false: files('hyperv-stub.c')) +i386_softmmu_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) +i386_softmmu_ss.add(when: 'CONFIG_WHPX', if_true: files('whpx-all.c')) +i386_softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_HAX'], if_true: files('hax-all.c', 'hax-mem.c', 'hax-posix.c')) +i386_softmmu_ss.add(when: ['CONFIG_WIN32', 'CONFIG_HAX'], if_true: files('hax-all.c', 'hax-mem.c', 'hax-windows.c')) + +subdir('hvf') + +target_arch += {'i386': i386_ss} +target_softmmu_arch += {'i386': i386_softmmu_ss} diff --git a/target/lm32/Makefile.objs b/target/lm32/Makefile.objs deleted file mode 100644 index c3e1bd6bd6..0000000000 --- a/target/lm32/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -obj-y += translate.o op_helper.o helper.o cpu.o -obj-y += gdbstub.o -obj-y += lm32-semi.o -obj-$(CONFIG_SOFTMMU) += machine.o diff --git a/target/lm32/meson.build b/target/lm32/meson.build new file mode 100644 index 0000000000..ef0eef07f1 --- /dev/null +++ b/target/lm32/meson.build @@ -0,0 +1,15 @@ +lm32_ss = ss.source_set() +lm32_ss.add(files( + 'cpu.c', + 'gdbstub.c', + 'helper.c', + 'lm32-semi.c', + 'op_helper.c', + 'translate.c', +)) + +lm32_softmmu_ss = ss.source_set() +lm32_softmmu_ss.add(files('machine.c')) + +target_arch += {'lm32': lm32_ss} +target_softmmu_arch += {'lm32': lm32_softmmu_ss} diff --git a/target/m68k/Makefile.objs b/target/m68k/Makefile.objs deleted file mode 100644 index ac61948676..0000000000 --- a/target/m68k/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -obj-y += m68k-semi.o -obj-y += translate.o op_helper.o helper.o cpu.o -obj-y += fpu_helper.o softfloat.o -obj-y += gdbstub.o -obj-$(CONFIG_SOFTMMU) += monitor.o diff --git a/target/m68k/meson.build b/target/m68k/meson.build new file mode 100644 index 0000000000..05cd9fbd1e --- /dev/null +++ b/target/m68k/meson.build @@ -0,0 +1,17 @@ +m68k_ss = ss.source_set() +m68k_ss.add(files( + 'cpu.c', + 'fpu_helper.c', + 'gdbstub.c', + 'helper.c', + 'm68k-semi.c', + 'op_helper.c', + 'softfloat.c', + 'translate.c', +)) + +m68k_softmmu_ss = ss.source_set() +m68k_softmmu_ss.add(files('monitor.c')) + +target_arch += {'m68k': m68k_ss} +target_softmmu_arch += {'m68k': m68k_softmmu_ss} diff --git a/target/meson.build b/target/meson.build index e29dd3e01f..9f0ae93b75 100644 --- a/target/meson.build +++ b/target/meson.build @@ -1 +1,23 @@ +subdir('alpha') +subdir('arm') +subdir('avr') +subdir('cris') +subdir('hppa') +subdir('i386') +subdir('lm32') +subdir('m68k') +subdir('microblaze') +subdir('mips') +subdir('moxie') +subdir('nios2') +subdir('openrisc') +subdir('ppc') +subdir('riscv') +subdir('rx') subdir('s390x') +subdir('sh4') +subdir('sparc') +subdir('tilegx') +subdir('tricore') +subdir('unicore32') +subdir('xtensa') diff --git a/target/microblaze/Makefile.objs b/target/microblaze/Makefile.objs deleted file mode 100644 index f3d7b44c89..0000000000 --- a/target/microblaze/Makefile.objs +++ /dev/null @@ -1,3 +0,0 @@ -obj-y += translate.o op_helper.o helper.o cpu.o -obj-y += gdbstub.o -obj-$(CONFIG_SOFTMMU) += mmu.o diff --git a/target/microblaze/meson.build b/target/microblaze/meson.build new file mode 100644 index 0000000000..b8fe4afe61 --- /dev/null +++ b/target/microblaze/meson.build @@ -0,0 +1,14 @@ +microblaze_ss = ss.source_set() +microblaze_ss.add(files( + 'cpu.c', + 'gdbstub.c', + 'helper.c', + 'op_helper.c', + 'translate.c', +)) + +microblaze_softmmu_ss = ss.source_set() +microblaze_softmmu_ss.add(files('mmu.c')) + +target_arch += {'microblaze': microblaze_ss} +target_softmmu_arch += {'microblaze': microblaze_softmmu_ss} diff --git a/target/mips/Makefile.objs b/target/mips/Makefile.objs deleted file mode 100644 index b820b3b7bc..0000000000 --- a/target/mips/Makefile.objs +++ /dev/null @@ -1,6 +0,0 @@ -obj-y += translate.o cpu.o gdbstub.o helper.o -obj-y += op_helper.o cp0_helper.o fpu_helper.o -obj-y += dsp_helper.o lmmi_helper.o msa_helper.o -obj-$(CONFIG_SOFTMMU) += mips-semi.o -obj-$(CONFIG_SOFTMMU) += machine.o cp0_timer.o -obj-$(CONFIG_KVM) += kvm.o diff --git a/target/mips/meson.build b/target/mips/meson.build new file mode 100644 index 0000000000..fa1f024e78 --- /dev/null +++ b/target/mips/meson.build @@ -0,0 +1,24 @@ +mips_ss = ss.source_set() +mips_ss.add(files( + 'cp0_helper.c', + 'cpu.c', + 'dsp_helper.c', + 'fpu_helper.c', + 'gdbstub.c', + 'helper.c', + 'lmmi_helper.c', + 'msa_helper.c', + 'op_helper.c', + 'translate.c', +)) +mips_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) + +mips_softmmu_ss = ss.source_set() +mips_softmmu_ss.add(files( + 'cp0_timer.c', + 'machine.c', + 'mips-semi.c', +)) + +target_arch += {'mips': mips_ss} +target_softmmu_arch += {'mips': mips_softmmu_ss} diff --git a/target/moxie/Makefile.objs b/target/moxie/Makefile.objs deleted file mode 100644 index 6381d4d636..0000000000 --- a/target/moxie/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -obj-y += translate.o helper.o machine.o cpu.o machine.o -obj-$(CONFIG_SOFTMMU) += mmu.o diff --git a/target/moxie/meson.build b/target/moxie/meson.build new file mode 100644 index 0000000000..b4beb528cc --- /dev/null +++ b/target/moxie/meson.build @@ -0,0 +1,14 @@ +moxie_ss = ss.source_set() +moxie_ss.add(files( + 'cpu.c', + 'helper.c', + 'machine.c', + 'machine.c', + 'translate.c', +)) + +moxie_softmmu_ss = ss.source_set() +moxie_softmmu_ss.add(files('mmu.c')) + +target_arch += {'moxie': moxie_ss} +target_softmmu_arch += {'moxie': moxie_softmmu_ss} diff --git a/target/nios2/Makefile.objs b/target/nios2/Makefile.objs deleted file mode 100644 index 010de0e7a6..0000000000 --- a/target/nios2/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -obj-y += translate.o op_helper.o helper.o cpu.o mmu.o nios2-semi.o -obj-$(CONFIG_SOFTMMU) += monitor.o - -$(obj)/op_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS) diff --git a/target/nios2/meson.build b/target/nios2/meson.build new file mode 100644 index 0000000000..e643917db1 --- /dev/null +++ b/target/nios2/meson.build @@ -0,0 +1,15 @@ +nios2_ss = ss.source_set() +nios2_ss.add(files( + 'cpu.c', + 'helper.c', + 'mmu.c', + 'nios2-semi.c', + 'op_helper.c', + 'translate.c', +)) + +nios2_softmmu_ss = ss.source_set() +nios2_softmmu_ss.add(files('monitor.c')) + +target_arch += {'nios2': nios2_ss} +target_softmmu_arch += {'nios2': nios2_softmmu_ss} diff --git a/target/openrisc/Makefile.objs b/target/openrisc/Makefile.objs deleted file mode 100644 index 423d64512e..0000000000 --- a/target/openrisc/Makefile.objs +++ /dev/null @@ -1,15 +0,0 @@ -obj-$(CONFIG_SOFTMMU) += machine.o -obj-y += cpu.o exception.o interrupt.o mmu.o translate.o disas.o -obj-y += exception_helper.o fpu_helper.o \ - interrupt_helper.o sys_helper.o -obj-y += gdbstub.o - -DECODETREE = $(SRC_PATH)/scripts/decodetree.py - -target/openrisc/decode.c.inc: \ - $(SRC_PATH)/target/openrisc/insns.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@) - -target/openrisc/translate.o: target/openrisc/decode.c.inc -target/openrisc/disas.o: target/openrisc/decode.c.inc diff --git a/target/openrisc/disas.c b/target/openrisc/disas.c index cc91775344..dc025bd64d 100644 --- a/target/openrisc/disas.c +++ b/target/openrisc/disas.c @@ -25,7 +25,7 @@ typedef disassemble_info DisasContext; /* Include the auto-generated decoder. */ -#include "decode.c.inc" +#include "decode-insns.c.inc" #define output(mnemonic, format, ...) \ (info->fprintf_func(info->stream, "%-9s " format, \ diff --git a/target/openrisc/meson.build b/target/openrisc/meson.build new file mode 100644 index 0000000000..9774a58306 --- /dev/null +++ b/target/openrisc/meson.build @@ -0,0 +1,23 @@ +gen = decodetree.process('insns.decode') + +openrisc_ss = ss.source_set() +openrisc_ss.add(gen) +openrisc_ss.add(files( + 'cpu.c', + 'disas.c', + 'exception.c', + 'exception_helper.c', + 'fpu_helper.c', + 'gdbstub.c', + 'interrupt.c', + 'interrupt_helper.c', + 'mmu.c', + 'sys_helper.c', + 'translate.c', +)) + +openrisc_softmmu_ss = ss.source_set() +openrisc_softmmu_ss.add(files('machine.c')) + +target_arch += {'openrisc': openrisc_ss} +target_softmmu_arch += {'openrisc': openrisc_softmmu_ss} diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 573428b8ea..c6dce879f1 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -65,7 +65,7 @@ static inline bool is_user(DisasContext *dc) } /* Include the auto-generated decoder. */ -#include "decode.c.inc" +#include "decode-insns.c.inc" static TCGv cpu_sr; static TCGv cpu_regs[32]; diff --git a/target/ppc/Makefile.objs b/target/ppc/Makefile.objs deleted file mode 100644 index e8fa18ce13..0000000000 --- a/target/ppc/Makefile.objs +++ /dev/null @@ -1,20 +0,0 @@ -obj-y += cpu-models.o -obj-y += cpu.o -obj-y += translate.o -ifeq ($(CONFIG_SOFTMMU),y) -obj-y += machine.o mmu_helper.o mmu-hash32.o monitor.o arch_dump.o -obj-$(TARGET_PPC64) += mmu-hash64.o mmu-book3s-v3.o compat.o -obj-$(TARGET_PPC64) += mmu-radix64.o -endif -obj-$(CONFIG_KVM) += kvm.o -obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o -obj-y += dfp_helper.o -obj-y += excp_helper.o -obj-y += fpu_helper.o -obj-y += int_helper.o -obj-y += timebase_helper.o -obj-y += misc_helper.o -obj-y += mem_helper.o -obj-y += ../../libdecnumber/ -obj-$(CONFIG_USER_ONLY) += user_only_helper.o -obj-y += gdbstub.o diff --git a/target/ppc/meson.build b/target/ppc/meson.build new file mode 100644 index 0000000000..bbfef90e08 --- /dev/null +++ b/target/ppc/meson.build @@ -0,0 +1,37 @@ +ppc_ss = ss.source_set() +ppc_ss.add(files( + 'cpu-models.c', + 'cpu.c', + 'dfp_helper.c', + 'excp_helper.c', + 'fpu_helper.c', + 'gdbstub.c', + 'int_helper.c', + 'mem_helper.c', + 'misc_helper.c', + 'timebase_helper.c', + 'translate.c', +)) + +ppc_ss.add(libdecnumber) + +ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) +ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c')) + +ppc_softmmu_ss = ss.source_set() +ppc_softmmu_ss.add(files( + 'arch_dump.c', + 'machine.c', + 'mmu-hash32.c', + 'mmu_helper.c', + 'monitor.c', +)) +ppc_softmmu_ss.add(when: 'TARGET_PPC64', if_true: files( + 'compat.c', + 'mmu-book3s-v3.c', + 'mmu-hash64.c', + 'mmu-radix64.c', +)) + +target_arch += {'ppc': ppc_ss} +target_softmmu_arch += {'ppc': ppc_softmmu_ss} diff --git a/target/riscv/Makefile.objs b/target/riscv/Makefile.objs deleted file mode 100644 index 1cd4c58005..0000000000 --- a/target/riscv/Makefile.objs +++ /dev/null @@ -1,28 +0,0 @@ -obj-y += translate.o op_helper.o cpu_helper.o cpu.o csr.o fpu_helper.o vector_helper.o gdbstub.o -obj-$(CONFIG_SOFTMMU) += pmp.o - -ifeq ($(CONFIG_SOFTMMU),y) -obj-y += monitor.o -endif - -DECODETREE = $(SRC_PATH)/scripts/decodetree.py - -decode32-y = $(SRC_PATH)/target/riscv/insn32.decode -decode32-$(TARGET_RISCV64) += $(SRC_PATH)/target/riscv/insn32-64.decode - -decode16-y = $(SRC_PATH)/target/riscv/insn16.decode -decode16-$(TARGET_RISCV32) += $(SRC_PATH)/target/riscv/insn16-32.decode -decode16-$(TARGET_RISCV64) += $(SRC_PATH)/target/riscv/insn16-64.decode - -target/riscv/decode_insn32.c.inc: $(decode32-y) $(DECODETREE) - $(call quiet-command, \ - $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn32 \ - $(decode32-y), "GEN", $(TARGET_DIR)$@) - -target/riscv/decode_insn16.c.inc: $(decode16-y) $(DECODETREE) - $(call quiet-command, \ - $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn16 \ - --insnwidth 16 $(decode16-y), "GEN", $(TARGET_DIR)$@) - -target/riscv/translate.o: target/riscv/decode_insn32.c.inc \ - target/riscv/decode_insn16.c.inc diff --git a/target/riscv/meson.build b/target/riscv/meson.build new file mode 100644 index 0000000000..abd647fea1 --- /dev/null +++ b/target/riscv/meson.build @@ -0,0 +1,34 @@ +# FIXME extra_args should accept files() +dir = meson.current_source_dir() +gen32 = [ + decodetree.process('insn16.decode', extra_args: [dir / 'insn16-32.decode', '--static-decode=decode_insn16', '--insnwidth=16']), + decodetree.process('insn32.decode', extra_args: '--static-decode=decode_insn32'), +] + +gen64 = [ + decodetree.process('insn16.decode', extra_args: [dir / 'insn16-64.decode', '--static-decode=decode_insn16', '--insnwidth=16']), + decodetree.process('insn32.decode', extra_args: [dir / 'insn32-64.decode', '--static-decode=decode_insn32']), +] + +riscv_ss = ss.source_set() +riscv_ss.add(when: 'TARGET_RISCV32', if_true: gen32) +riscv_ss.add(when: 'TARGET_RISCV64', if_true: gen64) +riscv_ss.add(files( + 'cpu.c', + 'cpu_helper.c', + 'csr.c', + 'fpu_helper.c', + 'gdbstub.c', + 'op_helper.c', + 'vector_helper.c', + 'translate.c', +)) + +riscv_softmmu_ss = ss.source_set() +riscv_softmmu_ss.add(files( + 'pmp.c', + 'monitor.c' +)) + +target_arch += {'riscv': riscv_ss} +target_softmmu_arch += {'riscv': riscv_softmmu_ss} diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 5ef5613909..d0485c0750 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -583,7 +583,7 @@ static int ex_rvc_shifti(DisasContext *ctx, int imm) } /* Include the auto-generated decoder for 32 bit insn */ -#include "decode_insn32.c.inc" +#include "decode-insn32.c.inc" static bool gen_arith_imm_fn(DisasContext *ctx, arg_i *a, void (*func)(TCGv, TCGv, target_long)) @@ -728,7 +728,7 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, #include "insn_trans/trans_privileged.c.inc" /* Include the auto-generated decoder for 16 bit insn */ -#include "decode_insn16.c.inc" +#include "decode-insn16.c.inc" static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode) { diff --git a/target/rx/Makefile.objs b/target/rx/Makefile.objs deleted file mode 100644 index cc3c4204a1..0000000000 --- a/target/rx/Makefile.objs +++ /dev/null @@ -1,11 +0,0 @@ -obj-y += translate.o op_helper.o helper.o cpu.o gdbstub.o disas.o - -DECODETREE = $(SRC_PATH)/scripts/decodetree.py - -target/rx/decode.c.inc: \ - $(SRC_PATH)/target/rx/insns.decode $(DECODETREE) - $(call quiet-command,\ - $(PYTHON) $(DECODETREE) --varinsnwidth 32 -o $@ $<, "GEN", $(TARGET_DIR)$@) - -target/rx/translate.o: target/rx/decode.c.inc -target/rx/disas.o: target/rx/decode.c.inc diff --git a/target/rx/disas.c b/target/rx/disas.c index 60eff6f55f..67b9328829 100644 --- a/target/rx/disas.c +++ b/target/rx/disas.c @@ -100,7 +100,7 @@ static int bdsp_s(DisasContext *ctx, int d) } /* Include the auto-generated decoder. */ -#include "decode.c.inc" +#include "decode-insns.c.inc" static void dump_bytes(DisasContext *ctx) { diff --git a/target/rx/meson.build b/target/rx/meson.build new file mode 100644 index 0000000000..8de0ad49b9 --- /dev/null +++ b/target/rx/meson.build @@ -0,0 +1,16 @@ +gen = [ + decodetree.process('insns.decode', extra_args: [ '--varinsnwidth', '32' ]) +] + +rx_ss = ss.source_set() +rx_ss.add(gen) +rx_ss.add(files( + 'translate.c', + 'op_helper.c', + 'helper.c', + 'cpu.c', + 'gdbstub.c', + 'disas.c')) + +target_arch += {'rx': rx_ss} +target_softmmu_arch += {'rx': ss.source_set()} diff --git a/target/rx/translate.c b/target/rx/translate.c index bc49614cbb..da9713d362 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -124,7 +124,7 @@ static int bdsp_s(DisasContext *ctx, int d) } /* Include the auto-generated decoder. */ -#include "decode.c.inc" +#include "decode-insns.c.inc" void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags) { diff --git a/target/s390x/Makefile.objs b/target/s390x/Makefile.objs deleted file mode 100644 index 9b9accc5fd..0000000000 --- a/target/s390x/Makefile.objs +++ /dev/null @@ -1,10 +0,0 @@ -obj-y += cpu.o cpu_models.o cpu_features.o gdbstub.o interrupt.o helper.o -obj-$(CONFIG_TCG) += translate.o cc_helper.o excp_helper.o fpu_helper.o -obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o crypto_helper.o -obj-$(CONFIG_TCG) += vec_helper.o vec_int_helper.o vec_string_helper.o -obj-$(CONFIG_TCG) += vec_fpu_helper.o -obj-$(CONFIG_SOFTMMU) += machine.o ioinst.o arch_dump.o mmu_helper.o diag.o -obj-$(CONFIG_SOFTMMU) += sigp.o -obj-$(CONFIG_KVM) += kvm.o -obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o -obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o diff --git a/target/s390x/meson.build b/target/s390x/meson.build index ddf8d20a36..27d248ef6e 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -1,3 +1,30 @@ +s390x_ss = ss.source_set() +s390x_ss.add(files( + 'cpu.c', + 'cpu_features.c', + 'cpu_models.c', + 'gdbstub.c', + 'helper.c', + 'interrupt.c', +)) + +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'cc_helper.c', + 'crypto_helper.c', + 'excp_helper.c', + 'fpu_helper.c', + 'int_helper.c', + 'mem_helper.c', + 'misc_helper.c', + 'translate.c', + 'vec_fpu_helper.c', + 'vec_helper.c', + 'vec_int_helper.c', + 'vec_string_helper.c', +), if_false: 'tcg-stub.c') + +s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) + gen_features = executable('gen-features', 'gen-features.c', native: true, build_by_default: false) @@ -6,4 +33,17 @@ gen_features_h = custom_target('gen-features.h', capture: true, command: gen_features) -specific_ss.add(gen_features_h) +s390x_ss.add(gen_features_h) + +s390x_softmmu_ss = ss.source_set() +s390x_softmmu_ss.add(files( + 'arch_dump.c', + 'diag.c', + 'ioinst.c', + 'machine.c', + 'mmu_helper.c', + 'sigp.c', +)) + +target_arch += {'s390x': s390x_ss} +target_softmmu_arch += {'s390x': s390x_softmmu_ss} diff --git a/target/sh4/Makefile.objs b/target/sh4/Makefile.objs deleted file mode 100644 index 2c25d96e65..0000000000 --- a/target/sh4/Makefile.objs +++ /dev/null @@ -1,3 +0,0 @@ -obj-y += translate.o op_helper.o helper.o cpu.o -obj-$(CONFIG_SOFTMMU) += monitor.o -obj-y += gdbstub.o diff --git a/target/sh4/meson.build b/target/sh4/meson.build new file mode 100644 index 0000000000..56a57576da --- /dev/null +++ b/target/sh4/meson.build @@ -0,0 +1,14 @@ +sh4_ss = ss.source_set() +sh4_ss.add(files( + 'cpu.c', + 'gdbstub.c', + 'helper.c', + 'op_helper.c', + 'translate.c', +)) + +sh4_softmmu_ss = ss.source_set() +sh4_softmmu_ss.add(files('monitor.c')) + +target_arch += {'sh4': sh4_ss} +target_softmmu_arch += {'sh4': sh4_softmmu_ss} diff --git a/target/sparc/Makefile.objs b/target/sparc/Makefile.objs deleted file mode 100644 index ec905698c5..0000000000 --- a/target/sparc/Makefile.objs +++ /dev/null @@ -1,7 +0,0 @@ -obj-$(CONFIG_SOFTMMU) += machine.o monitor.o -obj-y += translate.o helper.o cpu.o -obj-y += fop_helper.o cc_helper.o win_helper.o mmu_helper.o ldst_helper.o -obj-$(TARGET_SPARC) += int32_helper.o -obj-$(TARGET_SPARC64) += int64_helper.o -obj-$(TARGET_SPARC64) += vis_helper.o -obj-y += gdbstub.o diff --git a/target/sparc/meson.build b/target/sparc/meson.build new file mode 100644 index 0000000000..a3638b9503 --- /dev/null +++ b/target/sparc/meson.build @@ -0,0 +1,23 @@ +sparc_ss = ss.source_set() +sparc_ss.add(files( + 'cc_helper.c', + 'cpu.c', + 'fop_helper.c', + 'gdbstub.c', + 'helper.c', + 'ldst_helper.c', + 'mmu_helper.c', + 'translate.c', + 'win_helper.c', +)) +sparc_ss.add(when: 'TARGET_SPARC', if_true: files('int32_helper.c')) +sparc_ss.add(when: 'TARGET_SPARC64', if_true: files('int64_helper.c', 'vis_helper.c')) + +sparc_softmmu_ss = ss.source_set() +sparc_softmmu_ss.add(files( + 'machine.c', + 'monitor.c', +)) + +target_arch += {'sparc': sparc_ss} +target_softmmu_arch += {'sparc': sparc_softmmu_ss} diff --git a/target/tilegx/Makefile.objs b/target/tilegx/Makefile.objs deleted file mode 100644 index 0db778f407..0000000000 --- a/target/tilegx/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -obj-y += cpu.o translate.o helper.o simd_helper.o diff --git a/target/tilegx/meson.build b/target/tilegx/meson.build new file mode 100644 index 0000000000..678590439c --- /dev/null +++ b/target/tilegx/meson.build @@ -0,0 +1,13 @@ +tilegx_ss = ss.source_set() +tilegx_ss.add(files( + 'cpu.c', + 'helper.c', + 'simd_helper.c', + 'translate.c', +)) +tilegx_ss.add(zlib) + +tilegx_softmmu_ss = ss.source_set() + +target_arch += {'tilegx': tilegx_ss} +target_softmmu_arch += {'tilegx': tilegx_softmmu_ss} diff --git a/target/tricore/Makefile.objs b/target/tricore/Makefile.objs deleted file mode 100644 index 281b55f08d..0000000000 --- a/target/tricore/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -obj-y += translate.o helper.o cpu.o op_helper.o fpu_helper.o gdbstub.o diff --git a/target/tricore/meson.build b/target/tricore/meson.build new file mode 100644 index 0000000000..0ccc829517 --- /dev/null +++ b/target/tricore/meson.build @@ -0,0 +1,15 @@ +tricore_ss = ss.source_set() +tricore_ss.add(files( + 'cpu.c', + 'fpu_helper.c', + 'helper.c', + 'op_helper.c', + 'translate.c', + 'gdbstub.c', +)) +tricore_ss.add(zlib) + +tricore_softmmu_ss = ss.source_set() + +target_arch += {'tricore': tricore_ss} +target_softmmu_arch += {'tricore': tricore_softmmu_ss} diff --git a/target/unicore32/Makefile.objs b/target/unicore32/Makefile.objs deleted file mode 100644 index 35d8bf530d..0000000000 --- a/target/unicore32/Makefile.objs +++ /dev/null @@ -1,8 +0,0 @@ -obj-y += translate.o op_helper.o helper.o cpu.o -obj-y += ucf64_helper.o - -obj-$(CONFIG_SOFTMMU) += softmmu.o - -# Huh? Uses curses directly instead of using ui/console.h interfaces ... -helper.o-cflags := $(CURSES_CFLAGS) -helper.o-libs := $(CURSES_LIBS) diff --git a/target/unicore32/meson.build b/target/unicore32/meson.build new file mode 100644 index 0000000000..0fa78772eb --- /dev/null +++ b/target/unicore32/meson.build @@ -0,0 +1,14 @@ +unicore32_ss = ss.source_set() +unicore32_ss.add(files( + 'cpu.c', + 'helper.c', + 'op_helper.c', + 'translate.c', + 'ucf64_helper.c', +), curses) + +unicore32_softmmu_ss = ss.source_set() +unicore32_softmmu_ss.add(files('softmmu.c')) + +target_arch += {'unicore32': unicore32_ss} +target_softmmu_arch += {'unicore32': unicore32_softmmu_ss} diff --git a/target/xtensa/Makefile.objs b/target/xtensa/Makefile.objs deleted file mode 100644 index c7e7fe6063..0000000000 --- a/target/xtensa/Makefile.objs +++ /dev/null @@ -1,16 +0,0 @@ -obj-y += core-dc232b.o -obj-y += core-dc233c.o -obj-y += core-de212.o -obj-y += core-fsf.o -obj-y += core-sample_controller.o -obj-y += core-test_kc705_be.o -obj-y += core-test_mmuhifi_c3.o -obj-$(CONFIG_SOFTMMU) += monitor.o xtensa-semi.o -obj-y += xtensa-isa.o -obj-y += translate.o op_helper.o helper.o cpu.o -obj-$(CONFIG_SOFTMMU) += dbg_helper.o -obj-y += exc_helper.o -obj-y += fpu_helper.o -obj-y += gdbstub.o -obj-$(CONFIG_SOFTMMU) += mmu_helper.o -obj-y += win_helper.o diff --git a/target/xtensa/meson.build b/target/xtensa/meson.build new file mode 100644 index 0000000000..27e453e1d1 --- /dev/null +++ b/target/xtensa/meson.build @@ -0,0 +1,30 @@ +xtensa_ss = ss.source_set() +xtensa_ss.add(files( + 'core-dc232b.c', + 'core-dc233c.c', + 'core-de212.c', + 'core-fsf.c', + 'core-sample_controller.c', + 'core-test_kc705_be.c', + 'core-test_mmuhifi_c3.c', + 'cpu.c', + 'exc_helper.c', + 'fpu_helper.c', + 'gdbstub.c', + 'helper.c', + 'op_helper.c', + 'translate.c', + 'win_helper.c', + 'xtensa-isa.c', +)) + +xtensa_softmmu_ss = ss.source_set() +xtensa_softmmu_ss.add(files( + 'dbg_helper.c', + 'mmu_helper.c', + 'monitor.c', + 'xtensa-semi.c', +)) + +target_arch += {'xtensa': xtensa_ss} +target_softmmu_arch += {'xtensa': xtensa_softmmu_ss} From patchwork Fri Aug 21 10:23:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275899 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44210C433DF for ; Fri, 21 Aug 2020 11:19:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E36972072D for ; Fri, 21 Aug 2020 11:19:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VxMYf7BC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E36972072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9553-0003hk-5h for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:19:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Es-000436-Ov for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Ee-0001wp-6r for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=38RGb7aqm1a2gH7HIGUz5q7sdRe+MQnlsi3ETwfw4j8=; b=VxMYf7BCLVZn5y9traRsJ1N+eLRi5xEgsbKnCVEHJHYn1XyvgO349SnhN8I2hp76LxAnAD HLdJ+0GhmZQEeaNb7khOfFNwU+RdLKKC1jo3fmOdXM15pmCXmdDvrqFsuT1oVy7mT6XoXD Lrmbn6ge05Pj6Qxn2LroLV40d7OEqgw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-73-C7XeFC5wOWycWKTU-NV64w-1; Fri, 21 Aug 2020 06:25:20 -0400 X-MC-Unique: C7XeFC5wOWycWKTU-NV64w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C0A831009441 for ; Fri, 21 Aug 2020 10:25:19 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F8517AEC5; Fri, 21 Aug 2020 10:25:19 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 135/152] meson: link emulators without Makefile.target Date: Fri, 21 Aug 2020 06:23:12 -0400 Message-Id: <20200821102329.29777-136-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The binaries move to the root directory, e.g. qemu-system-i386 or qemu-arm. This requires changes to qtests, CI, etc. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- .gitlab-ci.yml | 6 +- Makefile | 35 +---- Makefile.objs | 32 ----- Makefile.target | 153 +--------------------- configure | 43 +----- docs/devel/blkverify.txt | 4 +- docs/devel/testing.rst | 4 +- docs/interop/live-block-operations.rst | 4 +- meson.build | 73 ++++++++++- os-posix.c | 4 +- plugins/meson.build | 10 +- rules.mak | 1 - scripts/device-crash-test | 2 +- scripts/oss-fuzz/build.sh | 20 +-- softmmu/Makefile.objs | 2 - target/s390x/meson.build | 13 ++ tests/Makefile.include | 4 +- tests/acceptance/avocado_qemu/__init__.py | 3 +- tests/data/acpi/rebuild-expected-aml.sh | 2 +- tests/multiboot/run_test.sh | 2 +- tests/qemu-iotests/check | 6 +- tests/qtest/fuzz/Makefile.include | 39 ------ tests/qtest/fuzz/i440fx_fuzz.c | 4 +- tests/qtest/fuzz/meson.build | 35 +++++ tests/qtest/fuzz/qtest_wrappers.c | 2 +- tests/qtest/fuzz/virtio_net_fuzz.c | 3 +- tests/qtest/fuzz/virtio_scsi_fuzz.c | 8 +- tests/qtest/libqos/qgraph.h | 2 +- tests/qtest/meson.build | 2 +- tests/qtest/rtas-test.c | 2 +- tests/tcg/configure.sh | 4 +- util/module.c | 1 - 32 files changed, 181 insertions(+), 344 deletions(-) delete mode 100644 softmmu/Makefile.objs delete mode 100644 tests/qtest/fuzz/Makefile.include create mode 100644 tests/qtest/fuzz/meson.build diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9820066379..b7967b9a13 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -265,9 +265,9 @@ build-tci: - make run-tcg-tests-x86_64-softmmu - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test - for tg in $TARGETS ; do - export QTEST_QEMU_BINARY="${tg}-softmmu/qemu-system-${tg}" ; + export QTEST_QEMU_BINARY="./qemu-system-${tg}" ; ./tests/qtest/boot-serial-test || exit 1 ; ./tests/qtest/cdrom-test || exit 1 ; done - - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/pxe-test - - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x" ./tests/qtest/pxe-test -m slow + - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test + - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow diff --git a/Makefile b/Makefile index ae0aa62082..fe8c63acad 100644 --- a/Makefile +++ b/Makefile @@ -121,9 +121,6 @@ include $(SRC_PATH)/rules.mak # lor is defined in rules.mak CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)) -generated-files-y += target/s390x/gen-features.h -target/s390x/gen-features.h: Makefile.ninja - generated-files-y += .git-submodule-status # Don't try to regenerate Makefile or configure @@ -187,29 +184,6 @@ config-host.h-timestamp: config-host.mak TARGET_DIRS_RULES := $(foreach t, all fuzz clean install, $(addsuffix /$(t), $(TARGET_DIRS))) -SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES)) -$(SOFTMMU_ALL_RULES): $(authz-obj-y) -$(SOFTMMU_ALL_RULES): $(block-obj-y) -$(SOFTMMU_ALL_RULES): $(chardev-obj-y) -$(SOFTMMU_ALL_RULES): $(crypto-obj-y) -$(SOFTMMU_ALL_RULES): $(io-obj-y) -$(SOFTMMU_ALL_RULES): $(qom-obj-y) -$(SOFTMMU_ALL_RULES): config-all-devices.mak - -SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES)) -$(SOFTMMU_FUZZ_RULES): $(authz-obj-y) -$(SOFTMMU_FUZZ_RULES): $(block-obj-y) -$(SOFTMMU_FUZZ_RULES): $(chardev-obj-y) -$(SOFTMMU_FUZZ_RULES): $(crypto-obj-y) -$(SOFTMMU_FUZZ_RULES): $(io-obj-y) -$(SOFTMMU_FUZZ_RULES): config-all-devices.mak -$(SOFTMMU_FUZZ_RULES): $(edk2-decompressed) - -# meson: this is sub-optimal but going away after conversion -TARGET_DEPS = $(patsubst %,%-config-target.h, $(TARGET_DIRS)) -TARGET_DEPS += $(patsubst %,%-config-devices.h, $(filter %-softmmu,$(TARGET_DIRS))) -TARGET_DEPS += $(patsubst %,libqemu-%.fa, $(TARGET_DIRS)) - .PHONY: $(TARGET_DIRS_RULES) # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that # $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal @@ -252,11 +226,7 @@ slirp/all: .git-submodule-status CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" \ CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)") -$(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \ - $(qom-obj-y) block.syms qemu.syms - -$(filter %/fuzz, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \ - $(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY)) +$(filter %/all, $(TARGET_DIRS_RULES)): ROM_DIRS = $(addprefix pc-bios/, $(ROMS)) ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) @@ -278,8 +248,6 @@ Makefile: $(version-obj-y) ###################################################################### -COMMON_LDADDS = libqemuutil.a - clean: recurse-clean ninja-clean clean-ctlist -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean # avoid old build problems by removing potentially incorrect old files @@ -313,6 +281,7 @@ distclean: clean ninja-distclean rm -f po/*.mo tests/qemu-iotests/common.env rm -f roms/seabios/config.mak roms/vgabios/config.mak rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols + rm -f *-config-target.h *-config-devices.mak *-config-devices.h rm -rf meson-private meson-logs meson-info compile_commands.json rm -f Makefile.ninja ninjatool ninjatool.stamp Makefile.mtest rm -f config.log diff --git a/Makefile.objs b/Makefile.objs index 83622c58a5..5295c3a623 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -33,38 +33,6 @@ io-obj-y = io/libio.fa endif # CONFIG_SOFTMMU or CONFIG_TOOLS -###################################################################### -# Target independent part of system emulation. The long term path is to -# suppress *all* target specific code in case of system emulation, i.e. a -# single QEMU executable should support all CPUs and machines. - -ifeq ($(CONFIG_SOFTMMU),y) -common-obj-y = - -common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF) -common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF) -common-obj-$(CONFIG_AUDIO_PA) += audio-pa$(DSOSUF) -common-obj-$(CONFIG_AUDIO_SDL) += audio-sdl$(DSOSUF) - -common-obj-$(if $(CONFIG_CURSES),m) += ui-curses$(DSOSUF) -common-obj-$(if $(CONFIG_GTK),m) += ui-gtk$(DSOSUF) -common-obj-$(if $(CONFIG_SDL),m) += ui-sdl$(DSOSUF) -common-obj-$(if $(CONFIG_SPICE),m) += ui-spice-app$(DSOSUF) - -common-obj-$(if $(CONFIG_CURL),m) += block-curl$(DSOSUF) -common-obj-$(if $(CONFIG_GLUSTERFS),m) += block-gluster$(DSOSUF) -common-obj-$(if $(CONFIG_LIBISCSI),m) += block-iscsi$(DSOSUF) -common-obj-$(if $(CONFIG_LIBNFS),m) += block-nfs$(DSOSUF) -common-obj-$(if $(CONFIG_LIBSSH),m) += block-ssh$(DSOSUF) -common-obj-$(if $(CONFIG_RBD),m) += block-rbd$(DSOSUF) - -common-obj-$(if $(CONFIG_LZFSE),m) += block-dmg-lzfse$(DSOSUF) -common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF) - -common-obj-y += libqmp.fa - -endif # CONFIG_SOFTMMU - ###################################################################### # Resource file for Windows executables version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o diff --git a/Makefile.target b/Makefile.target index 2b7280b272..8ee4c78b3f 100644 --- a/Makefile.target +++ b/Makefile.target @@ -6,43 +6,16 @@ include ../config-host.mak include config-target.mak include $(SRC_PATH)/rules.mak -FULL_TARGET_NAME=$(TARGET_NAME)-$(if $(CONFIG_SOFTMMU),softmmu,linux-user) - -ifdef CONFIG_SOFTMMU -include ../$(FULL_TARGET_NAME)-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 - -QEMU_CFLAGS += -DCONFIG_TARGET=\"../$(FULL_TARGET_NAME)-config-target.h\" -QEMU_CFLAGS += -DCONFIG_DEVICES=\"../$(FULL_TARGET_NAME)-config-devices.h\" 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 -LIBQEMU = ../libqemu-$(FULL_TARGET_NAME).fa -PROGS=$(QEMU_PROG) $(QEMU_PROGW) STPFILES= ifdef CONFIG_TRACE_SYSTEMTAP @@ -98,109 +71,10 @@ stap: endif .PHONY: stap -all: $(PROGS) stap - -# Dummy command so that make thinks it has done something - @true - -obj-y += $(LIBQEMU) - -obj-y += trace/ - -######################################################### -LIBS := $(libs_cpu) $(LIBS) - -######################################################### -# 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) - -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) - -endif #CONFIG_BSD_USER - -######################################################### -# System emulator target -ifdef CONFIG_SOFTMMU -obj-y += softmmu/ -obj-y += gdbstub.o -LIBS := $(libs_softmmu) $(LIBS) - -# Temporary until emulators are linked by Meson -LIBS := $(LIBS) @../block.syms @../qemu.syms -ifneq ($(CONFIG_MODULES),y) -LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS) -LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS) $(GIO_LIBS) -endif -LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS) -LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS) -LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS) -LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS) -LIBS := $(LIBS) $(VIRGL_LIBS) $(CURSES_LIBS) - -ifeq ($(CONFIG_PLUGIN),y) -ifdef CONFIG_HAS_LD_DYNAMIC_LIST -LIBS += -Wl,--dynamic-list=$(BUILD_DIR)/qemu-plugins-ld.symbols -else -ifdef CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST -LIBS += -Wl,-exported_symbols_list,$(BUILD_DIR)/qemu-plugins-ld64.symbols -endif -endif -endif - -generated-files-y += hmp-commands.h hmp-commands-info.h - -endif # CONFIG_SOFTMMU - -dummy := $(call unnest-vars,,obj-y) -all-obj-y := $(obj-y) - -include $(SRC_PATH)/Makefile.objs -dummy := $(call fix-paths,../,, \ - authz-obj-y \ - block-obj-y \ - chardev-obj-y \ - crypto-obj-y \ - io-obj-y \ - qom-obj-y) -dummy := $(call unnest-vars,..,common-obj-y) - -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): ../$(FULL_TARGET_NAME)-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 +all: stap -clean: clean-target - rm -f *.a *~ $(PROGS) +clean: + rm -f *.a *~ 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 @@ -208,26 +82,7 @@ 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" @@ -235,4 +90,4 @@ ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp" endif -Makefile: $(generated-files-y) +.PHONY: all clean install diff --git a/configure b/configure index a82d2ce48e..9f8fd03650 100755 --- a/configure +++ b/configure @@ -358,7 +358,6 @@ audio_drv_list="" block_drv_rw_whitelist="" block_drv_ro_whitelist="" host_cc="cc" -libs_cpu="" libs_softmmu="" libs_tools="" audio_win_int="" @@ -5473,7 +5472,6 @@ case "$capstone" in else LIBCAPSTONE=libcapstone.a fi - libs_cpu="-L$PWD/capstone -lcapstone $libs_cpu" capstone_libs="-L$PWD/capstone -lcapstone" capstone_cflags="-I${source_path}/capstone/include" ;; @@ -5482,7 +5480,6 @@ case "$capstone" in capstone_libs="$($pkg_config --libs capstone)" capstone_cflags="$($pkg_config --cflags capstone)" QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags capstone)" - libs_cpu="$($pkg_config --libs capstone) $libs_cpu" ;; no) @@ -6399,7 +6396,10 @@ fi if test "$fuzzing" = "yes" ; then write_c_fuzzer_skeleton if compile_prog "$CPU_CFLAGS -Werror -fsanitize=fuzzer" ""; then - have_fuzzer=yes + have_fuzzer=yes + else + error_exit "Your compiler doesn't support -fsanitize=fuzzer" + exit 1 fi fi @@ -6911,7 +6911,6 @@ echo "qemu_helperdir=$libexecdir" >> $config_host_mak echo "qemu_localedir=$qemu_localedir" >> $config_host_mak echo "qemu_icondir=$qemu_icondir" >> $config_host_mak echo "qemu_desktopdir=$qemu_desktopdir" >> $config_host_mak -echo "libs_cpu=$libs_cpu" >> $config_host_mak echo "libs_softmmu=$libs_softmmu" >> $config_host_mak echo "GIT=$git" >> $config_host_mak echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak @@ -7776,14 +7775,7 @@ if test "$have_mlockall" = "yes" ; then echo "HAVE_MLOCKALL=y" >> $config_host_mak fi if test "$fuzzing" = "yes" ; then - if test "$have_fuzzer" = "yes"; then - FUZZ_LDFLAGS=" -fsanitize=fuzzer" - FUZZ_CFLAGS=" -fsanitize=fuzzer" - QEMU_CFLAGS="$QEMU_CFLAGS -fsanitize=fuzzer-no-link" - else - error_exit "Your compiler doesn't support -fsanitize=fuzzer" - exit 1 - fi + QEMU_CFLAGS="$QEMU_CFLAGS -fsanitize=fuzzer-no-link" fi if test "$plugins" = "yes" ; then @@ -7898,8 +7890,6 @@ if test "$libudev" != "no"; then fi if test "$fuzzing" != "no"; then echo "CONFIG_FUZZ=y" >> $config_host_mak - echo "FUZZ_CFLAGS=$FUZZ_CFLAGS" >> $config_host_mak - echo "FUZZ_LDFLAGS=$FUZZ_LDFLAGS" >> $config_host_mak fi if test "$edk2_blobs" = "yes" ; then @@ -8172,8 +8162,6 @@ if [ "$TARGET_SYSTBL_ABI" != "" ] && [ "$TARGET_SYSTBL" = "" ]; then TARGET_SYSTBL=syscall.tbl fi -symlink "$source_path/Makefile.target" "$target_dir/Makefile" - upper() { echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]' } @@ -8249,9 +8237,6 @@ fi # generate QEMU_CFLAGS/QEMU_LDFLAGS for targets -cflags="" -ldflags="" - disas_config() { echo "CONFIG_${1}_DIS=y" >> $config_target_mak echo "CONFIG_${1}_DIS=y" >> config-all-disas.mak @@ -8336,24 +8321,6 @@ if test "$tcg_interpreter" = "yes" ; then disas_config "TCI" fi -# Newer kernels on s390 check for an S390_PGSTE program header and -# enable the pgste page table extensions in that case. This makes -# the vm.allocate_pgste sysctl unnecessary. We enable this program -# header if -# - we build on s390x -# - we build the system emulation for s390x (qemu-system-s390x) -# - KVM is enabled -# - the linker supports --s390-pgste -if test "$TARGET_ARCH" = "s390x" && test "$target_softmmu" = "yes" && \ - test "$ARCH" = "s390x" && test "$kvm" = "yes"; then - if ld_has --s390-pgste ; then - ldflags="-Wl,--s390-pgste $ldflags" - fi -fi - -echo "QEMU_LDFLAGS+=$ldflags" >> $config_target_mak -echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak - done # for target in $targets echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak diff --git a/docs/devel/blkverify.txt b/docs/devel/blkverify.txt index d556dc4e6d..aca826c51c 100644 --- a/docs/devel/blkverify.txt +++ b/docs/devel/blkverify.txt @@ -62,8 +62,8 @@ A more realistic scenario is verifying the installation of a guest OS: $ ./qemu-img create raw.img 16G $ ./qemu-img create -f qcow2 test.qcow2 16G - $ x86_64-softmmu/qemu-system-x86_64 -cdrom debian.iso \ - -drive file=blkverify:raw.img:test.qcow2 + $ ./qemu-system-x86_64 -cdrom debian.iso \ + -drive file=blkverify:raw.img:test.qcow2 If the installation is aborted when blkverify detects corruption, use qemu-io to explore the contents of the disk image at the sector in question. diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index a4264691be..196e3bc35e 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -819,7 +819,7 @@ the following approaches: 1) Set ``qemu_bin``, and use the given binary 2) Do not set ``qemu_bin``, and use a QEMU binary named like - "${arch}-softmmu/qemu-system-${arch}", either in the current + "qemu-system-${arch}", either in the current working directory, or in the current source tree. The resulting ``qemu_bin`` value will be preserved in the @@ -886,7 +886,7 @@ like the following: .. code:: - PARAMS (key=qemu_bin, path=*, default=x86_64-softmmu/qemu-system-x86_64) => 'x86_64-softmmu/qemu-system-x86_64 + PARAMS (key=qemu_bin, path=*, default=./qemu-system-x86_64) => './qemu-system-x86_64 arch ~~~~ diff --git a/docs/interop/live-block-operations.rst b/docs/interop/live-block-operations.rst index 48afdc7927..e13f5a21f8 100644 --- a/docs/interop/live-block-operations.rst +++ b/docs/interop/live-block-operations.rst @@ -129,7 +129,7 @@ To show some example invocations of command-line, we will use the following invocation of QEMU, with a QMP server running over UNIX socket:: - $ ./x86_64-softmmu/qemu-system-x86_64 -display none -no-user-config \ + $ ./qemu-system-x86_64 -display none -no-user-config \ -M q35 -nodefaults -m 512 \ -blockdev node-name=node-A,driver=qcow2,file.driver=file,file.node-name=file,file.filename=./a.qcow2 \ -device virtio-blk,drive=node-A,id=virtio0 \ @@ -694,7 +694,7 @@ instance, with the following invocation. (As noted earlier, for simplicity's sake, the destination QEMU is started on the same host, but it could be located elsewhere):: - $ ./x86_64-softmmu/qemu-system-x86_64 -display none -no-user-config \ + $ ./qemu-system-x86_64 -display none -no-user-config \ -M q35 -nodefaults -m 512 \ -blockdev node-name=node-TargetDisk,driver=qcow2,file.driver=file,file.node-name=file,file.filename=./target-disk.qcow2 \ -device virtio-blk,drive=node-TargetDisk,id=virtio0 \ diff --git a/meson.build b/meson.build index fa47410c29..9db1b7b705 100644 --- a/meson.build +++ b/meson.build @@ -215,10 +215,12 @@ brlapi = not_found if 'CONFIG_BRLAPI' in config_host brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split()) endif +sdlwindows = false sdl = not_found if 'CONFIG_SDL' in config_host sdl = declare_dependency(compile_args: config_host['SDL_CFLAGS'].split(), link_args: config_host['SDL_LIBS'].split()) + sdlwindows = config_host['SDL_LIBS'].contains('-mwindows') endif rbd = not_found if 'CONFIG_RBD' in config_host @@ -529,6 +531,7 @@ user_ss = ss.source_set() bsd_user_ss = ss.source_set() linux_user_ss = ss.source_set() specific_ss = ss.source_set() +specific_fuzz_ss = ss.source_set() modules = {} hw_arch = {} @@ -743,6 +746,7 @@ specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss) # needed for fuzzing binaries subdir('tests/qtest/libqos') +subdir('tests/qtest/fuzz') block_mods = [] softmmu_mods = [] @@ -805,7 +809,10 @@ foreach m : block_mods + softmmu_mods install_dir: config_host['qemu_moddir']) endforeach -common_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: softmmu_ss) +softmmu_ss.add(authz, block, chardev, crypto, io, qmp) +common_ss.add(qom, qemuutil) + +common_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: [softmmu_ss]) common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) common_all = common_ss.apply(config_all, strict: false) @@ -817,11 +824,17 @@ common_all = static_library('common', feature_to_c = find_program('scripts/feature_to_c.sh') +emulators = [] foreach target : target_dirs config_target = config_target_mak[target] target_name = config_target['TARGET_NAME'] arch = config_target['TARGET_BASE_ARCH'] arch_srcs = [] + arch_deps = [] + c_args = ['-DNEED_CPU_H', + '-DCONFIG_TARGET="@0@-config-target.h"'.format(target), + '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)] + link_args = [] target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])] if targetos == 'linux' @@ -832,12 +845,15 @@ foreach target : target_dirs target_type='system' t = target_softmmu_arch[arch].apply(config_target, strict: false) arch_srcs += t.sources() + arch_deps += t.dependencies() hw_dir = target_name == 'sparc64' ? 'sparc64' : arch hw = hw_arch[hw_dir].apply(config_target, strict: false) arch_srcs += hw.sources() + arch_deps += hw.dependencies() arch_srcs += config_devices_h[target] + link_args += ['@block.syms', '@qemu.syms'] else abi = config_target['TARGET_ABI_DIR'] target_type='user' @@ -874,9 +890,11 @@ foreach target : target_dirs t = target_arch[arch].apply(config_target, strict: false) arch_srcs += t.sources() + arch_deps += t.dependencies() target_common = common_ss.apply(config_target, strict: false) objects = common_all.extract_objects(target_common.sources()) + deps = target_common.dependencies() # TODO: Change to generator once obj-y goes away config_target_h = custom_target(target + '-config-target.h', @@ -887,15 +905,60 @@ foreach target : target_dirs target_specific = specific_ss.apply(config_target, strict: false) arch_srcs += target_specific.sources() + arch_deps += target_specific.dependencies() - static_library('qemu-' + target, + lib = static_library('qemu-' + target, sources: arch_srcs + [config_target_h] + genh, objects: objects, include_directories: target_inc, - c_args: ['-DNEED_CPU_H', - '-DCONFIG_TARGET="@0@-config-target.h"'.format(target), - '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)], + c_args: c_args, + build_by_default: false, name_suffix: 'fa') + + if target.endswith('-softmmu') + execs = [{ + 'name': 'qemu-system-' + target_name, + 'gui': false, + 'sources': files('softmmu/main.c'), + 'dependencies': [] + }] + if sdlwindows + execs += [{ + 'name': 'qemu-system-' + target_name + 'w', + 'gui': true, + 'sources': files('softmmu/main.c'), + 'dependencies': [] + }] + endif + if config_host.has_key('CONFIG_FUZZ') + specific_fuzz = specific_fuzz_ss.apply(config_target, strict: false) + execs += [{ + 'name': 'qemu-fuzz-' + target_name, + 'gui': false, + 'sources': specific_fuzz.sources(), + 'dependencies': specific_fuzz.dependencies(), + 'link_depends': [files('tests/qtest/fuzz/fork_fuzz.ld')], + }] + endif + else + execs = [{ + 'name': 'qemu-' + target_name, + 'gui': false, + 'sources': [], + 'dependencies': [] + }] + endif + foreach exe: execs + emulators += executable(exe['name'], exe['sources'], + install: true, + c_args: c_args, + dependencies: arch_deps + deps + exe['dependencies'], + objects: lib.extract_all_objects(recursive: true), + link_language: link_language, + link_depends: [block_syms, qemu_syms] + exe.get('link_depends', []), + link_args: link_args, + gui_app: exe['gui']) + endforeach endforeach # Other build targets diff --git a/os-posix.c b/os-posix.c index 3572db3f44..bf98508b6d 100644 --- a/os-posix.c +++ b/os-posix.c @@ -82,7 +82,7 @@ void os_setup_signal_handling(void) /* * Find a likely location for support files using the location of the binary. - * When running from the build tree this will be "$bindir/../pc-bios". + * When running from the build tree this will be "$bindir/pc-bios". * Otherwise, this is CONFIG_QEMU_DATADIR. * * The caller must use g_free() to free the returned data when it is @@ -96,7 +96,7 @@ char *os_find_datadir(void) exec_dir = qemu_get_exec_dir(); g_return_val_if_fail(exec_dir != NULL, NULL); - dir = g_build_filename(exec_dir, "..", "pc-bios", NULL); + dir = g_build_filename(exec_dir, "pc-bios", NULL); if (g_file_test(dir, G_FILE_TEST_IS_DIR)) { return g_steal_pointer(&dir); } diff --git a/plugins/meson.build b/plugins/meson.build index 9608e5293f..e77723010e 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -1,5 +1,13 @@ +if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host + plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.build_root() / 'qemu-plugins-ld.symbols')] +elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host + plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.build_root() / 'qemu-plugins-ld64.symbols')] +else + plugin_ldflags = [] +endif + specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files( 'loader.c', 'core.c', 'api.c', -)]) +), declare_dependency(link_args: plugin_ldflags)]) diff --git a/rules.mak b/rules.mak index 8285fe529a..6488dc3dc6 100644 --- a/rules.mak +++ b/rules.mak @@ -21,7 +21,6 @@ MAKEFLAGS += -rR %.cpp: %.m: %.mak: -clean-target: # Flags for dependency generation QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 305d0427af..866baf7058 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -383,7 +383,7 @@ def binariesToTest(args, testcase): if args.qemu: r = args.qemu else: - r = glob.glob('./*-softmmu/qemu-system-*') + r = glob.glob('./qemu-system-*') return r diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh index 52430cb620..f0b7442c96 100755 --- a/scripts/oss-fuzz/build.sh +++ b/scripts/oss-fuzz/build.sh @@ -64,24 +64,26 @@ mkdir -p "$DEST_DIR/lib/" # Copy the shared libraries here # Build once to get the list of dynamic lib paths, and copy them over ../configure --disable-werror --cc="$CC" --cxx="$CXX" --enable-fuzzing \ + --prefix="$DEST_DIR" --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" \ --extra-cflags="$EXTRA_CFLAGS" --target-list="i386-softmmu" -if ! make "-j$(nproc)" i386-softmmu/fuzz; then +if ! make "-j$(nproc)" qemu-fuzz-i386; then fatal "Build failed. Please specify a compiler with fuzzing support"\ "using the \$CC and \$CXX environemnt variables"\ "\nFor example: CC=clang CXX=clang++ $0" fi -for i in $(ldd ./i386-softmmu/qemu-fuzz-i386 | cut -f3 -d' '); do +for i in $(ldd ./qemu-fuzz-i386 | cut -f3 -d' '); do cp "$i" "$DEST_DIR/lib/" done -rm ./i386-softmmu/qemu-fuzz-i386 +rm qemu-fuzz-i386 # Build a second time to build the final binary with correct rpath -../configure --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" --disable-werror \ - --cc="$CC" --cxx="$CXX" --extra-cflags="$EXTRA_CFLAGS" \ - --extra-ldflags="-Wl,-rpath,'\$\$ORIGIN/lib'" -make "-j$(nproc)" i386-softmmu/fuzz +../configure --disable-werror --cc="$CC" --cxx="$CXX" --enable-fuzzing \ + --prefix="$DEST_DIR" --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" \ + --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="-Wl,-rpath,'\$\$ORIGIN/lib'" \ + --target-list="i386-softmmu" +make "-j$(nproc)" qemu-fuzz-i386 V=1 # Copy over the datadir cp -r ../pc-bios/ "$DEST_DIR/pc-bios" @@ -90,9 +92,9 @@ cp -r ../pc-bios/ "$DEST_DIR/pc-bios" # of available fuzz-targets. Copy over the qemu-fuzz-i386, naming it according # to each available fuzz target (See 05509c8e6d fuzz: select fuzz target using # executable name) -for target in $(./i386-softmmu/qemu-fuzz-i386 | awk '$1 ~ /\*/ {print $2}'); +for target in $(./qemu-fuzz-i386 | awk '$1 ~ /\*/ {print $2}'); do - cp ./i386-softmmu/qemu-fuzz-i386 "$DEST_DIR/qemu-fuzz-i386-target-$target" + cp qemu-fuzz-i386 "$DEST_DIR/qemu-fuzz-i386-target-$target" done echo "Done. The fuzzers are located in $DEST_DIR" diff --git a/softmmu/Makefile.objs b/softmmu/Makefile.objs deleted file mode 100644 index ec74d8a9fa..0000000000 --- a/softmmu/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -softmmu-main-y = softmmu/main.o -main.o-cflags := $(SDL_CFLAGS) diff --git a/target/s390x/meson.build b/target/s390x/meson.build index 27d248ef6e..d2a3315903 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -45,5 +45,18 @@ s390x_softmmu_ss.add(files( 'sigp.c', )) +# Newer kernels on s390 check for an S390_PGSTE program header and +# enable the pgste page table extensions in that case. This makes +# the vm.allocate_pgste sysctl unnecessary. We enable this program +# header if +# - we build on s390x +# - we build the system emulation for s390x (qemu-system-s390x) +# - KVM is enabled +# - the linker supports --s390-pgste +if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste') + s390x_softmmu_ss.add(when: 'CONFIG_KVM', + if_true: declare_dependency(link_args: ['-Wl,--s390-pgste'])) +endif + target_arch += {'s390x': s390x_ss} target_softmmu_arch += {'s390x': s390x_softmmu_ss} diff --git a/tests/Makefile.include b/tests/Makefile.include index 609a40c6e5..4a2435342a 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -457,7 +457,7 @@ build-tcg-tests-%: $(if $(CONFIG_PLUGIN),plugins) V="$(V)" TARGET="$*" guest-tests, \ "BUILD", "TCG tests for $*") -run-tcg-tests-%: build-tcg-tests-% %/all +run-tcg-tests-%: build-tcg-tests-% all $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \ -f $(SRC_PATH)/tests/tcg/Makefile.qemu \ SRC_PATH=$(SRC_PATH) SPEED="$(SPEED)" \ @@ -485,7 +485,7 @@ QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu .PHONY: check-tests/check-block.sh check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \ qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \ - $(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS))) + $(patsubst %-softmmu,qemu-system-%,$(filter %-softmmu,$(TARGET_DIRS))) @$< # Python venv for running tests diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index 77d1c1d9ff..db9c0f5d79 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -57,8 +57,7 @@ def pick_default_qemu_bin(arch=None): # qemu binary path does not match arch for powerpc, handle it if 'ppc64le' in arch: arch = 'ppc64' - qemu_bin_relative_path = os.path.join("%s-softmmu" % arch, - "qemu-system-%s" % arch) + qemu_bin_relative_path = "./qemu-system-%s" % arch if is_readable_executable_file(qemu_bin_relative_path): return qemu_bin_relative_path diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh index 76cd797d1e..fc78770544 100755 --- a/tests/data/acpi/rebuild-expected-aml.sh +++ b/tests/data/acpi/rebuild-expected-aml.sh @@ -12,7 +12,7 @@ # This work is licensed under the terms of the GNU GPLv2. # See the COPYING.LIB file in the top-level directory. -qemu_bins="x86_64-softmmu/qemu-system-x86_64 aarch64-softmmu/qemu-system-aarch64" +qemu_bins="./qemu-system-x86_64 ./qemu-system-aarch64" if [ ! -e "tests/qtest/bios-tables-test" ]; then echo "Test: bios-tables-test is required! Run make check before this script." diff --git a/tests/multiboot/run_test.sh b/tests/multiboot/run_test.sh index 98df91e6af..f968bf797e 100755 --- a/tests/multiboot/run_test.sh +++ b/tests/multiboot/run_test.sh @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -QEMU=${QEMU:-"../../x86_64-softmmu/qemu-system-x86_64"} +QEMU=${QEMU:-"../../qemu-system-x86_64"} run_qemu() { local kernel=$1 diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 0657f7286c..3ab859ac1a 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -577,11 +577,11 @@ if [ -z "$QEMU_PROG" ] then if [ -x "$build_iotests/qemu" ]; then export QEMU_PROG="$build_iotests/qemu" - elif [ -x "$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" ]; then - export QEMU_PROG="$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" + elif [ -x "$build_root/qemu-system-${qemu_arch}" ]; then + export QEMU_PROG="$build_root/qemu-system-${qemu_arch}" else pushd "$build_root" > /dev/null - for binary in *-softmmu/qemu-system-* + for binary in qemu-system-* do if [ -x "$binary" ] then diff --git a/tests/qtest/fuzz/Makefile.include b/tests/qtest/fuzz/Makefile.include deleted file mode 100644 index 5bde793bf2..0000000000 --- a/tests/qtest/fuzz/Makefile.include +++ /dev/null @@ -1,39 +0,0 @@ -QEMU_PROG_FUZZ=qemu-fuzz-$(TARGET_NAME)$(EXESUF) - -fuzz-obj-y += tests/qtest/libqtest.o -fuzz-obj-y += $(libqos-obj-y) -fuzz-obj-y += tests/qtest/fuzz/fuzz.o # Fuzzer skeleton -fuzz-obj-y += tests/qtest/fuzz/fork_fuzz.o -fuzz-obj-y += tests/qtest/fuzz/qos_fuzz.o -fuzz-obj-y += tests/qtest/fuzz/qtest_wrappers.o - -# Targets -fuzz-obj-$(CONFIG_PCI_I440FX) += tests/qtest/fuzz/i440fx_fuzz.o -fuzz-obj-$(CONFIG_VIRTIO_NET) += tests/qtest/fuzz/virtio_net_fuzz.o -fuzz-obj-$(CONFIG_SCSI) += tests/qtest/fuzz/virtio_scsi_fuzz.o - -FUZZ_CFLAGS += -I$(SRC_PATH)/tests -I$(SRC_PATH)/tests/qtest - -# Linker Script to force coverage-counters into known regions which we can mark -# shared -FUZZ_LDFLAGS += -Xlinker -T$(SRC_PATH)/tests/qtest/fuzz/fork_fuzz.ld - -FUZZ_LDFLAGS += -Wl,-wrap,qtest_inb -FUZZ_LDFLAGS += -Wl,-wrap,qtest_inw -FUZZ_LDFLAGS += -Wl,-wrap,qtest_inl -FUZZ_LDFLAGS += -Wl,-wrap,qtest_outb -FUZZ_LDFLAGS += -Wl,-wrap,qtest_outw -FUZZ_LDFLAGS += -Wl,-wrap,qtest_outl -FUZZ_LDFLAGS += -Wl,-wrap,qtest_readb -FUZZ_LDFLAGS += -Wl,-wrap,qtest_readw -FUZZ_LDFLAGS += -Wl,-wrap,qtest_readl -FUZZ_LDFLAGS += -Wl,-wrap,qtest_readq -FUZZ_LDFLAGS += -Wl,-wrap,qtest_writeb -FUZZ_LDFLAGS += -Wl,-wrap,qtest_writew -FUZZ_LDFLAGS += -Wl,-wrap,qtest_writel -FUZZ_LDFLAGS += -Wl,-wrap,qtest_writeq -FUZZ_LDFLAGS += -Wl,-wrap,qtest_memread -FUZZ_LDFLAGS += -Wl,-wrap,qtest_bufread -FUZZ_LDFLAGS += -Wl,-wrap,qtest_memwrite -FUZZ_LDFLAGS += -Wl,-wrap,qtest_bufwrite -FUZZ_LDFLAGS += -Wl,-wrap,qtest_memset diff --git a/tests/qtest/fuzz/i440fx_fuzz.c b/tests/qtest/fuzz/i440fx_fuzz.c index f45373f5d3..86796bff2b 100644 --- a/tests/qtest/fuzz/i440fx_fuzz.c +++ b/tests/qtest/fuzz/i440fx_fuzz.c @@ -17,8 +17,8 @@ #include "tests/qtest/libqos/pci.h" #include "tests/qtest/libqos/pci-pc.h" #include "fuzz.h" -#include "fuzz/qos_fuzz.h" -#include "fuzz/fork_fuzz.h" +#include "qos_fuzz.h" +#include "fork_fuzz.h" #define I440FX_PCI_HOST_BRIDGE_CFG 0xcf8 diff --git a/tests/qtest/fuzz/meson.build b/tests/qtest/fuzz/meson.build new file mode 100644 index 0000000000..bb0a3f271d --- /dev/null +++ b/tests/qtest/fuzz/meson.build @@ -0,0 +1,35 @@ +specific_fuzz_ss.add(files('fuzz.c', 'fork_fuzz.c', 'qos_fuzz.c', + 'qtest_wrappers.c'), qos) + +# Targets +specific_fuzz_ss.add(when: 'CONFIG_I440FX', if_true: files('i440fx_fuzz.c')) +specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio_net_fuzz.c')) +specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio_scsi_fuzz.c')) + +# unfortunately declare_dependency does not support link_depends, so +# this will be duplicated in meson.build +fork_fuzz = declare_dependency( + link_args: ['-fsanitize=fuzzer', + '-Wl,-T,' + (meson.current_source_dir() / 'fork_fuzz.ld'), + '-Wl,-wrap,qtest_inb', + '-Wl,-wrap,qtest_inw', + '-Wl,-wrap,qtest_inl', + '-Wl,-wrap,qtest_outb', + '-Wl,-wrap,qtest_outw', + '-Wl,-wrap,qtest_outl', + '-Wl,-wrap,qtest_readb', + '-Wl,-wrap,qtest_readw', + '-Wl,-wrap,qtest_readl', + '-Wl,-wrap,qtest_readq', + '-Wl,-wrap,qtest_writeb', + '-Wl,-wrap,qtest_writew', + '-Wl,-wrap,qtest_writel', + '-Wl,-wrap,qtest_writeq', + '-Wl,-wrap,qtest_memread', + '-Wl,-wrap,qtest_bufread', + '-Wl,-wrap,qtest_memwrite', + '-Wl,-wrap,qtest_bufwrite', + '-Wl,-wrap,qtest_memset'] +) + +specific_fuzz_ss.add(fork_fuzz) diff --git a/tests/qtest/fuzz/qtest_wrappers.c b/tests/qtest/fuzz/qtest_wrappers.c index 713c830cdb..0580f8df86 100644 --- a/tests/qtest/fuzz/qtest_wrappers.c +++ b/tests/qtest/fuzz/qtest_wrappers.c @@ -12,7 +12,7 @@ */ #include "qemu/osdep.h" -#include "cpu.h" +#include "hw/core/cpu.h" #include "exec/ioport.h" #include "fuzz.h" diff --git a/tests/qtest/fuzz/virtio_net_fuzz.c b/tests/qtest/fuzz/virtio_net_fuzz.c index 277a9e2b64..0e873ab8e2 100644 --- a/tests/qtest/fuzz/virtio_net_fuzz.c +++ b/tests/qtest/fuzz/virtio_net_fuzz.c @@ -61,7 +61,8 @@ static void virtio_net_fuzz_multi(QTestState *s, * backend. Otherwise, always place the input on a virtqueue. */ if (vqa.rx && sockfds_initialized) { - write(sockfds[0], Data, vqa.length); + int ignored = write(sockfds[0], Data, vqa.length); + (void) ignored; } else { vqa.rx = 0; uint64_t req_addr = guest_alloc(t_alloc, vqa.length); diff --git a/tests/qtest/fuzz/virtio_scsi_fuzz.c b/tests/qtest/fuzz/virtio_scsi_fuzz.c index 3a9ea13736..6ff6fabe4a 100644 --- a/tests/qtest/fuzz/virtio_scsi_fuzz.c +++ b/tests/qtest/fuzz/virtio_scsi_fuzz.c @@ -12,10 +12,10 @@ #include "qemu/osdep.h" -#include "tests/qtest/libqtest.h" -#include "libqos/virtio-scsi.h" -#include "libqos/virtio.h" -#include "libqos/virtio-pci.h" +#include "tests/qtest/libqos/libqtest.h" +#include "tests/qtest/libqos/virtio-scsi.h" +#include "tests/qtest/libqos/virtio.h" +#include "tests/qtest/libqos/virtio-pci.h" #include "standard-headers/linux/virtio_ids.h" #include "standard-headers/linux/virtio_pci.h" #include "standard-headers/linux/virtio_scsi.h" diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h index 10543269ce..5f63d352ca 100644 --- a/tests/qtest/libqos/qgraph.h +++ b/tests/qtest/libqos/qgraph.h @@ -226,7 +226,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg); * my_test <--consumed_by-- my_interface <--produces--+ * * Assuming there the binary is - * QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 + * QTEST_QEMU_BINARY=./qemu-system-x86_64 * a valid test path will be: * "/x86_64/pc/other_node/my_driver/my_interface/my_test". * diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 30cb88d919..8f8fdb1336 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -234,7 +234,7 @@ foreach dir : target_dirs qtest_env = environment() qtest_env.set('QTEST_QEMU_IMG', './qemu-img') qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh') - qtest_env.set('QTEST_QEMU_BINARY', '@0@-softmmu/qemu-system-@0@'.format(target_base)) + qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base) foreach test : qtests # Executables are shared across targets, declare them only the first time we diff --git a/tests/qtest/rtas-test.c b/tests/qtest/rtas-test.c index a7e83e7d40..16751dbd2f 100644 --- a/tests/qtest/rtas-test.c +++ b/tests/qtest/rtas-test.c @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) g_test_init(&argc, &argv, NULL); if (strcmp(arch, "ppc64")) { - g_printerr("RTAS requires ppc64-softmmu/qemu-system-ppc64\n"); + g_printerr("RTAS requires qemu-system-ppc64\n"); exit(EXIT_FAILURE); } qtest_add_func("rtas/get-time-of-day", test_rtas_get_time_of_day); diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 102578caa5..7d714f902a 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -193,11 +193,11 @@ for target in $target_list; do case $target in *-linux-user | *-bsd-user) echo "CONFIG_USER_ONLY=y" >> $config_target_mak - echo "QEMU=\$(BUILD_DIR)/$target/qemu-$arch" >> $config_target_mak + echo "QEMU=\$(BUILD_DIR)/qemu-$arch" >> $config_target_mak ;; *-softmmu) echo "CONFIG_SOFTMMU=y" >> $config_target_mak - echo "QEMU=\$(BUILD_DIR)/$target/qemu-system-$arch" >> $config_target_mak + echo "QEMU=\$(BUILD_DIR)/qemu-system-$arch" >> $config_target_mak ;; esac diff --git a/util/module.c b/util/module.c index 0ab00851f0..c956ef096b 100644 --- a/util/module.c +++ b/util/module.c @@ -205,7 +205,6 @@ bool module_load_one(const char *prefix, const char *lib_name) dirs[n_dirs++] = g_strdup_printf("%s", search_dir); } dirs[n_dirs++] = g_strdup_printf("%s", CONFIG_QEMU_MODDIR); - dirs[n_dirs++] = g_strdup_printf("%s/..", exec_dir ? : ""); dirs[n_dirs++] = g_strdup_printf("%s", exec_dir ? : ""); #ifdef CONFIG_MODULE_UPGRADES From patchwork Fri Aug 21 10:23:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B2E9C433E1 for ; Fri, 21 Aug 2020 11:26:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 269062054F for ; Fri, 21 Aug 2020 11:26:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WrYbpykK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 269062054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k95Bh-0003Pt-9t for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:26:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94F1-000484-38 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33257) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Eh-0001z8-6r for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lNf6IAPkpNupdQ6XZQ7YWjwyEv/hOuxmO0wFYOnC96Q=; b=WrYbpykKYX0X8loh/ybkLsB7mCxW0R2C1Wc9UShx1i3CI1YdXdpq3jHrDk370iFEMpGjdv Y8yEEXz9RMqDRkpPqoFviDBQozOdq+F0QeIuAm32hqe7agkkY1uIfoMf8XwV8JIhktGWAN q5iS9wK2chhnJTqoG/jY4xGDpPHSY88= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-83-tUIQ-3ciMkaJEQi3hXHJrw-1; Fri, 21 Aug 2020 06:25:23 -0400 X-MC-Unique: tUIQ-3ciMkaJEQi3hXHJrw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5013F1009441 for ; Fri, 21 Aug 2020 10:25:22 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C6B0101E247 for ; Fri, 21 Aug 2020 10:25:22 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 141/152] docs: automatically track manual dependencies Date: Fri, 21 Aug 2020 06:23:18 -0400 Message-Id: <20200821102329.29777-142-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:26:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- docs/conf.py | 2 +- docs/meson.build | 21 ++++++++++------- docs/sphinx/depfile.py | 51 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 docs/sphinx/depfile.py diff --git a/docs/conf.py b/docs/conf.py index d6e173ef77..0dbd90dc11 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -67,7 +67,7 @@ needs_sphinx = '1.6' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['kerneldoc', 'qmp_lexer', 'hxtool'] +extensions = ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/meson.build b/docs/meson.build index 20fc92e2fe..8b059a8e39 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -34,16 +34,21 @@ if build_docs sphinxmans = [] foreach manual : manuals private_dir = meson.current_build_dir() / (manual + '.p') + output_dir = meson.current_build_dir() / manual input_dir = meson.current_source_dir() / manual - sphinxdocs += custom_target(manual + ' manual', - build_always_stale: true, + + this_manual = custom_target(manual + ' manual', build_by_default: build_docs, - output: manual, - command: [SPHINX_ARGS, '-b', 'html', '-d', private_dir, - input_dir, meson.current_build_dir() / manual]) + output: [manual + '.stamp'], + input: [files('conf.py'), files(manual / 'conf.py')], + depfile: manual + '.d', + command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@', + '-Ddepfile_stamp=@OUTPUT0@', + '-b', 'html', '-d', private_dir, + input_dir, output_dir]) + sphinxdocs += this_manual if build_docs and manual != 'devel' - install_subdir(meson.current_build_dir() / manual, - install_dir: config_host['qemu_docdir']) + install_subdir(output_dir, install_dir: config_host['qemu_docdir']) endif these_man_pages = [] @@ -54,9 +59,9 @@ if build_docs endforeach if these_man_pages.length() > 0 sphinxmans += custom_target(manual + ' man pages', - build_always_stale: true, build_by_default: build_docs, output: these_man_pages, + input: this_manual, install: build_docs, install_dir: install_dirs, command: [SPHINX_ARGS, '-b', 'man', '-d', private_dir, diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py new file mode 100644 index 0000000000..277fdf0f56 --- /dev/null +++ b/docs/sphinx/depfile.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# +# QEMU depfile generation extension +# +# Copyright (c) 2020 Red Hat, Inc. +# +# This work is licensed under the terms of the GNU GPLv2 or later. +# See the COPYING file in the top-level directory. + +"""depfile is a Sphinx extension that writes a dependency file for + an external build system""" + +import os +import sphinx + +__version__ = '1.0' + +def get_infiles(env): + for x in env.found_docs: + yield env.doc2path(x) + yield from ((os.path.join(env.srcdir, dep) + for dep in env.dependencies[x])) + +def write_depfile(app, env): + if not env.config.depfile: + return + + # Using a directory as the output file does not work great because + # its timestamp does not necessarily change when the contents change. + # So create a timestamp file. + if env.config.depfile_stamp: + with open(env.config.depfile_stamp, 'w') as f: + pass + + with open(env.config.depfile, 'w') as f: + print((env.config.depfile_stamp or app.outdir) + ": \\", file=f) + print(*get_infiles(env), file=f) + for x in get_infiles(env): + print(x + ":", file=f) + + +def setup(app): + app.add_config_value('depfile', None, 'env') + app.add_config_value('depfile_stamp', None, 'env') + app.connect('env-updated', write_depfile) + + return dict( + version = __version__, + parallel_read_safe = True, + parallel_write_safe = True + ) From patchwork Fri Aug 21 10:23:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4119AC433DF for ; Fri, 21 Aug 2020 11:32:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA58820720 for ; Fri, 21 Aug 2020 11:32:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KuPOJpB9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA58820720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k95HR-00081f-4h for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:32:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94F6-0004J3-Ug for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Ej-0001zt-7h for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OfzoV8/Q9g3/HeRjc+JcJSyCJbb7SzyXUfCCW5rOt8k=; b=KuPOJpB9WVIpJH22oZPHmdH0Asj2PbJJpB44rAJF/wdolTF+KG5Uz92Z/Pmnx7P8dIxtcX 8mBvcsCGKUURLGnMKJz+BzGAv7M7xU+fHWpsXniH+4h6WWzRVvH0goHbWq7urAY0hvwuwh g8mcmUfq/jT7VQO6FQWA8aLntRJOHyg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-482-Dzo9Jv61OfqpU_PXbX41TQ-1; Fri, 21 Aug 2020 06:25:24 -0400 X-MC-Unique: Dzo9Jv61OfqpU_PXbX41TQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5F5F1191E2A2 for ; Fri, 21 Aug 2020 10:25:23 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B69710098AE for ; Fri, 21 Aug 2020 10:25:23 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 144/152] rules.mak: drop unneeded macros Date: Fri, 21 Aug 2020 06:23:21 -0400 Message-Id: <20200821102329.29777-145-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 02:43:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- .gitignore | 1 - Makefile | 7 +- configure | 55 ++------- docs/devel/build-system.txt | 5 +- rules.mak | 231 +----------------------------------- scripts/create_config | 6 +- 6 files changed, 23 insertions(+), 282 deletions(-) diff --git a/.gitignore b/.gitignore index d1e5e06242..4ccb9ed975 100644 --- a/.gitignore +++ b/.gitignore @@ -80,7 +80,6 @@ *.msi *.dll *.so -*.mo *.fn *.ky *.log diff --git a/Makefile b/Makefile index f442895309..f33ec16a81 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ endif include $(SRC_PATH)/tests/Makefile.include -all: recurse-all modules +all: recurse-all # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib="" @@ -197,7 +197,7 @@ clean: recurse-clean ninja-clean clean-ctlist -test -f ninjatool && ./ninjatool $(if $(V),-v,) -t clean # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h - find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ + find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \ ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ @@ -382,9 +382,6 @@ print-help = $(quiet-@)$(call print-help-run,$1,$2) help: @echo 'Generic targets:' $(call print-help,all,Build all) -ifdef CONFIG_MODULES - $(call print-help,modules,Build all modules) -endif $(call print-help,dir/file.o,Build specified target only) $(call print-help,install,Install QEMU, documentation and tools) $(call print-help,ctags/TAGS,Generate tags file for editors) diff --git a/configure b/configure index b7cf35c09f..3b0c33450b 100755 --- a/configure +++ b/configure @@ -74,7 +74,6 @@ TMPC="${TMPDIR1}/${TMPB}.c" TMPO="${TMPDIR1}/${TMPB}.o" TMPCXX="${TMPDIR1}/${TMPB}.cxx" TMPE="${TMPDIR1}/${TMPB}.exe" -TMPMO="${TMPDIR1}/${TMPB}.mo" TMPTXT="${TMPDIR1}/${TMPB}.txt" rm -f config.log @@ -465,7 +464,7 @@ bigendian="no" mingw32="no" gcov="no" EXESUF="" -DSOSUF=".so" +HOST_DSOSUF=".so" LDFLAGS_SHARED="-shared" modules="no" module_upgrades="no" @@ -997,7 +996,7 @@ fi if test "$mingw32" = "yes" ; then EXESUF=".exe" - DSOSUF=".dll" + HOST_DSOSUF=".dll" # MinGW needs -mthreads for TLS and macro _MT. CFLAGS="-mthreads $CFLAGS" LIBS="-lwinmm -lws2_32 $LIBS" @@ -6251,31 +6250,6 @@ EOF fi fi -################################################# -# Sparc implicitly links with --relax, which is -# incompatible with -r, so --no-relax should be -# given. It does no harm to give it on other -# platforms too. - -# Note: the prototype is needed since QEMU_CFLAGS -# contains -Wmissing-prototypes -cat > $TMPC << EOF -extern int foo(void); -int foo(void) { return 0; } -EOF -if ! compile_object ""; then - error_exit "Failed to compile object file for LD_REL_FLAGS test" -fi -for i in '-Wl,-r -Wl,--no-relax' -Wl,-r -r; do - if do_cc -nostdlib $i -o $TMPMO $TMPO; then - LD_REL_FLAGS=$i - break - fi -done -if test "$modules" = "yes" && test "$LD_REL_FLAGS" = ""; then - feature_not_found "modules" "Cannot find how to build relocatable objects" -fi - ########################################## # check for sysmacros.h @@ -7007,12 +6981,7 @@ fi echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak for drv in $audio_drv_list; do def=CONFIG_AUDIO_$(echo $drv | LC_ALL=C tr '[a-z]' '[A-Z]') - case "$drv" in - alsa | oss | pa | sdl) - echo "$def=m" >> $config_host_mak ;; - *) - echo "$def=y" >> $config_host_mak ;; - esac + echo "$def=y" >> $config_host_mak done if test "$alsa" = "yes" ; then echo "CONFIG_ALSA=y" >> $config_host_mak @@ -7101,7 +7070,7 @@ if test "$iconv" = "yes" ; then echo "ICONV_LIBS=$iconv_lib" >> $config_host_mak fi if test "$curses" = "yes" ; then - echo "CONFIG_CURSES=m" >> $config_host_mak + echo "CONFIG_CURSES=y" >> $config_host_mak echo "CURSES_CFLAGS=$curses_inc" >> $config_host_mak echo "CURSES_LIBS=$curses_lib" >> $config_host_mak fi @@ -7196,7 +7165,7 @@ if test "$bswap_h" = "yes" ; then echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak fi if test "$curl" = "yes" ; then - echo "CONFIG_CURL=m" >> $config_host_mak + echo "CONFIG_CURL=y" >> $config_host_mak echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak echo "CURL_LIBS=$curl_libs" >> $config_host_mak fi @@ -7205,7 +7174,7 @@ if test "$brlapi" = "yes" ; then echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak fi if test "$gtk" = "yes" ; then - echo "CONFIG_GTK=m" >> $config_host_mak + echo "CONFIG_GTK=y" >> $config_host_mak echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak echo "GTK_LIBS=$gtk_libs" >> $config_host_mak if test "$gtk_gl" = "yes" ; then @@ -7468,13 +7437,13 @@ if test "$zstd" = "yes" ; then fi if test "$libiscsi" = "yes" ; then - echo "CONFIG_LIBISCSI=m" >> $config_host_mak + echo "CONFIG_LIBISCSI=y" >> $config_host_mak echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak echo "LIBISCSI_LIBS=$libiscsi_libs" >> $config_host_mak fi if test "$libnfs" = "yes" ; then - echo "CONFIG_LIBNFS=m" >> $config_host_mak + echo "CONFIG_LIBNFS=y" >> $config_host_mak echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak fi @@ -7496,7 +7465,7 @@ if test "$qom_cast_debug" = "yes" ; then echo "CONFIG_QOM_CAST_DEBUG=y" >> $config_host_mak fi if test "$rbd" = "yes" ; then - echo "CONFIG_RBD=m" >> $config_host_mak + echo "CONFIG_RBD=y" >> $config_host_mak echo "RBD_LIBS=$rbd_libs" >> $config_host_mak fi @@ -7568,7 +7537,7 @@ if test "$getauxval" = "yes" ; then fi if test "$glusterfs" = "yes" ; then - echo "CONFIG_GLUSTERFS=m" >> $config_host_mak + echo "CONFIG_GLUSTERFS=y" >> $config_host_mak echo "GLUSTERFS_CFLAGS=$glusterfs_cflags" >> $config_host_mak echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak fi @@ -7598,7 +7567,7 @@ if test "$glusterfs_iocb_has_stat" = "yes" ; then fi if test "$libssh" = "yes" ; then - echo "CONFIG_LIBSSH=m" >> $config_host_mak + echo "CONFIG_LIBSSH=y" >> $config_host_mak echo "LIBSSH_CFLAGS=$libssh_cflags" >> $config_host_mak echo "LIBSSH_LIBS=$libssh_libs" >> $config_host_mak fi @@ -7858,7 +7827,7 @@ echo "LIBS+=$LIBS" >> $config_host_mak echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak echo "PTHREAD_LIB=$PTHREAD_LIB" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak -echo "DSOSUF=$DSOSUF" >> $config_host_mak +echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak echo "LDFLAGS_SHARED=$LDFLAGS_SHARED" >> $config_host_mak echo "LIBS_QGA=$libs_qga" >> $config_host_mak echo "TASN1_LIBS=$tasn1_libs" >> $config_host_mak diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt index 41bd08ea3a..fea67b207c 100644 --- a/docs/devel/build-system.txt +++ b/docs/devel/build-system.txt @@ -404,10 +404,7 @@ using Makefile.target for the build rules. - rules.mak This file provides the generic helper rules for invoking build tools, in -particular the compiler and linker. This also contains the magic (hairy) -'unnest-vars' function which is used to merge the variable definitions -from all Makefile.objs in the source tree down into the main Makefile -context. +particular the compiler and linker. - default-configs/*.mak diff --git a/rules.mak b/rules.mak index 6cab0b9cbd..c66c8218f0 100644 --- a/rules.mak +++ b/rules.mak @@ -33,11 +33,6 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d # different for target-dependent ones. QEMU_LOCAL_INCLUDES = -iquote $(BUILD_DIR) -iquote $(BUILD_DIR)/$(@D) -iquote $(@D) -WL_U := -Wl,-u, -find-symbols = $(if $1, $(sort $(shell $(NM) -P -g $1 | $2))) -defined-symbols = $(call find-symbols,$1,awk '$$2!="U"{print $$1}') -undefined-symbols = $(call find-symbols,$1,awk '$$2=="U"{print $$1}') - WL := -Wl, ifdef CONFIG_DARWIN whole-archive = $(WL)-force_load,$1 @@ -45,32 +40,7 @@ else whole-archive = $(WL)--whole-archive $1 $(WL)--no-whole-archive endif -# All the .mo objects in -m variables are also added into corresponding -y -# variable in unnest-vars, but filtered out here, when LINK is called. -# -# The .mo objects are supposed to be linked as a DSO, for module build. So here -# they are only used as a placeholders to generate those "archive undefined" -# symbol options (-Wl,-u,$symbol_name), which are the archive functions -# referenced by the code in the DSO. -# -# Also the presence in -y variables will also guarantee they are built before -# linking executables that will load them. So we can look up symbol reference -# in LINK. -# -# This is necessary because the exectuable itself may not use the function, in -# which case the function would not be linked in. Then the DSO loading will -# fail because of the missing symbol. -process-archive-undefs = $(filter-out %.a %.fa %.mo %$(DSOSUF),$1) \ - $(addprefix $(WL_U), \ - $(filter $(call defined-symbols,$(filter %.a %.fa, $1)), \ - $(call undefined-symbols,$(filter %.mo %$(DSOSUF),$1)))) \ - $(foreach l,$(filter %.fa,$1),$(call whole-archive,$l)) \ - $(filter %.a,$1) - -extract-libs = $(strip $(foreach o,$(filter-out %.mo %$(DSOSUF),$1),$($o-libs))) -expand-objs = $(strip $(sort $(filter %.o,$1)) \ - $(foreach o,$(filter %.mo %$(DSOSUF),$1),$($o-objs)) \ - $(filter-out %.o %.mo %$(DSOSUF),$1)) +extract-libs = $(strip $(foreach o,$1,$($o-libs))) %.o: %.c @mkdir -p $(dir $@) @@ -83,7 +53,9 @@ expand-objs = $(strip $(sort $(filter %.o,$1)) \ LINKPROG = $(or $(CXX),$(CC)) LINK = $(call quiet-command, $(LINKPROG) $(CFLAGS) $(QEMU_LDFLAGS) -o $@ \ - $(call process-archive-undefs, $1) \ + $(filter-out %.a %.fa,$1) \ + $(foreach l,$(filter %.fa,$1),$(call whole-archive,$l)) \ + $(filter %.a,$1) \ $(call extract-libs,$1) $(LIBS),"LINK","$(TARGET_DIR)$@") %.o: %.S @@ -109,25 +81,11 @@ LINK = $(call quiet-command, $(LINKPROG) $(CFLAGS) $(QEMU_LDFLAGS) -o $@ \ %.o: %.dtrace $(call quiet-command,dtrace -o $@ -G -s $<,"GEN","$(TARGET_DIR)$@") -DSO_OBJ_CFLAGS := -fPIC -DBUILD_DSO -module-common.o: CFLAGS += $(DSO_OBJ_CFLAGS) -%$(DSOSUF): QEMU_LDFLAGS += $(LDFLAGS_SHARED) -%$(DSOSUF): %.mo - $(call LINK,$^) - @# Copy to build root so modules can be loaded when program started without install - $(if $(findstring /,$@),$(call quiet-command,cp $@ $(subst /,-,$@),"CP","$(subst /,-,$@)")) - - -LD_REL := $(CC) -nostdlib $(LD_REL_FLAGS) - -%.mo: - $(call quiet-command,$(LD_REL) -o $@ $^,"LD","$(TARGET_DIR)$@") - .PHONY: modules modules: %$(EXESUF): %.o - $(call LINK,$(filter %.o %.a %.mo %.fa, $^)) + $(call LINK,$(filter %.o %.a %.fa, $^)) %.a: $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,"AR","$(TARGET_DIR)$@") @@ -160,15 +118,6 @@ define install-prog $(if $(STRIP),$(STRIP) $(foreach T,$1,"$2/$(notdir $T)"),) endef -# find-in-path -# Usage: $(call find-in-path, prog) -# Looks in the PATH if the argument contains no slash, else only considers one -# specific directory. Returns an # empty string if the program doesn't exist -# there. -find-in-path = $(if $(findstring /, $1), \ - $(wildcard $1), \ - $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH))))) - # Logical functions (for operating on y/n values like CONFIG_FOO vars) # Inputs to these must be either "y" (true) or "n" or "" (both false) # Output is always either "y" or "n". @@ -205,175 +154,5 @@ clean: clean-timestamp # will delete the target of a rule if commands exit with a nonzero exit status .DELETE_ON_ERROR: -# save-vars -# Usage: $(call save-vars, vars) -# Save each variable $v in $vars as save-vars-$v, save their object's -# variables, then clear $v. saved-vars-$v contains the variables that -# where saved for the objects, in order to speedup load-vars. -define save-vars - $(foreach v,$1, - $(eval save-vars-$v := $(value $v)) - $(eval saved-vars-$v := $(foreach o,$($v), \ - $(if $($o-cflags), $o-cflags $(eval save-vars-$o-cflags := $($o-cflags))$(eval $o-cflags := )) \ - $(if $($o-libs), $o-libs $(eval save-vars-$o-libs := $($o-libs))$(eval $o-libs := )) \ - $(if $($o-objs), $o-objs $(eval save-vars-$o-objs := $($o-objs))$(eval $o-objs := )))) - $(eval $v := )) -endef - -# load-vars -# Usage: $(call load-vars, vars, add_var) -# Load the saved value for each variable in @vars, and the per object -# variables. -# Append @add_var's current value to the loaded value. -define load-vars - $(eval $2-new-value := $(value $2)) - $(foreach v,$1, - $(eval $v := $(value save-vars-$v)) - $(foreach o,$(saved-vars-$v), - $(eval $o := $(save-vars-$o)) $(eval save-vars-$o := )) - $(eval save-vars-$v := ) - $(eval saved-vars-$v := )) - $(eval $2 := $(value $2) $($2-new-value)) -endef - -# fix-paths -# Usage: $(call fix-paths, obj_path, src_path, vars) -# Add prefix @obj_path to all objects in @vars, and add prefix @src_path to all -# directories in @vars. -define fix-paths - $(foreach v,$3, - $(foreach o,$($v), - $(if $($o-libs), - $(eval $1$o-libs := $($o-libs))) - $(if $($o-cflags), - $(eval $1$o-cflags := $($o-cflags))) - $(if $($o-objs), - $(eval $1$o-objs := $(addprefix $1,$($o-objs))))) - $(eval $v := $(addprefix $1,$(filter-out %/,$($v))) \ - $(addprefix $2,$(filter %/,$($v))))) -endef - -# unnest-var-recursive -# Usage: $(call unnest-var-recursive, obj_prefix, vars, var) -# -# Unnest @var by including subdir Makefile.objs, while protect others in @vars -# unchanged. -# -# @obj_prefix is the starting point of object path prefix. -# -define unnest-var-recursive - $(eval dirs := $(sort $(filter %/,$($3)))) - $(eval $3 := $(filter-out %/,$($3))) - $(foreach d,$(dirs:%/=%), - $(call save-vars,$2) - $(eval obj := $(if $1,$1/)$d) - $(eval -include $(SRC_PATH)/$d/Makefile.objs) - $(call fix-paths,$(if $1,$1/)$d/,$d/,$2) - $(call load-vars,$2,$3) - $(call unnest-var-recursive,$1,$2,$3)) -endef - -# unnest-vars -# Usage: $(call unnest-vars, obj_prefix, vars) -# -# @obj_prefix: object path prefix, can be empty, or '..', etc. Don't include -# ending '/'. -# -# @vars: the list of variable names to unnest. -# -# This macro will scan subdirectories's Makefile.objs, include them, to build -# up each variable listed in @vars. -# -# Per object and per module cflags and libs are saved with relative path fixed -# as well, those variables include -libs, -cflags and -objs. Items in -objs are -# also fixed to relative path against SRC_PATH plus the prefix @obj_prefix. -# -# All nested variables postfixed by -m in names are treated as DSO variables, -# and will be built as modules, if enabled. -# -# A simple example of the unnest: -# -# obj_prefix = .. -# vars = hot cold -# hot = fire.o sun.o season/ -# cold = snow.o water/ season/ -# -# Unnest through a faked source directory structure: -# -# SRC_PATH -# ├── water -# │ └── Makefile.objs──────────────────┐ -# │ │ hot += steam.o │ -# │ │ cold += ice.mo │ -# │ │ ice.mo-libs := -licemaker │ -# │ │ ice.mo-objs := ice1.o ice2.o │ -# │ └──────────────────────────────┘ -# │ -# └── season -# └── Makefile.objs──────┐ -# │ hot += summer.o │ -# │ cold += winter.o │ -# └──────────────────┘ -# -# In the end, the result will be: -# -# hot = ../fire.o ../sun.o ../season/summer.o -# cold = ../snow.o ../water/ice.mo ../season/winter.o -# ../water/ice.mo-libs = -licemaker -# ../water/ice.mo-objs = ../water/ice1.o ../water/ice2.o -# -# Note that 'hot' didn't include 'water/' in the input, so 'steam.o' is not -# included. -# -define unnest-vars - # In the case of target build (i.e. $1 == ..), fix path for top level - # Makefile.objs objects - $(if $1,$(call fix-paths,$1/,,$2)) - - # Descend and include every subdir Makefile.objs - $(foreach v, $2, - $(call unnest-var-recursive,$1,$2,$v) - # Pass the .mo-cflags and .mo-libs along to its member objects - $(foreach o, $(filter %.mo,$($v)), - $(foreach p,$($o-objs), - $(if $($o-cflags), $(eval $p-cflags += $($o-cflags))) - $(if $($o-libs), $(eval $p-libs += $($o-libs)))))) - - # For all %.mo objects that are directly added into -y, just expand them - $(foreach v,$(filter %-y,$2), - $(eval $v := $(foreach o,$($v),$(if $($o-objs),$($o-objs),$o)))) - - $(foreach v,$(filter %-m,$2), - # All .o found in *-m variables are single object modules, create .mo - # for them - $(foreach o,$(filter %.o,$($v)), - $(eval $(o:%.o=%.mo)-objs := $o)) - # Now unify .o in -m variable to .mo - $(eval $v := $($v:%.o=%.mo)) - $(eval modules-m += $($v)) - - # For module build, build shared libraries during "make modules" - # For non-module build, add -m to -y - $(if $(CONFIG_MODULES), - $(foreach o,$($v), - $(eval $($o-objs): CFLAGS += $(DSO_OBJ_CFLAGS)) - $(eval $o: $($o-objs))) - $(eval $(patsubst %-m,%-y,$v) += $($v)) - $(eval modules: $($v:%.mo=%$(DSOSUF))), - $(eval $(patsubst %-m,%-y,$v) += $(call expand-objs, $($v))))) - - # Post-process all the unnested vars - $(foreach v,$2, - $(foreach o, $(filter %.mo,$($v)), - # Find all the .mo objects in variables and add dependency rules - # according to .mo-objs. Report error if not set - $(if $($o-objs), - $(eval $(o:%.mo=%$(DSOSUF)): module-common.o $($o-objs)))) - $(shell mkdir -p ./ $(sort $(dir $($v)))) - # Include all the .d files - $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$(filter %.o,$($v))))) - $(eval $v := $(filter-out %/,$($v)))) -endef - print-%: @echo '$*=$($*)' diff --git a/scripts/create_config b/scripts/create_config index bc82661041..ec5c0b4124 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -91,6 +91,9 @@ case $line in name=${line%=*} echo "#define $name 1" ;; + HOST_DSOSUF=*) + echo "#define HOST_DSOSUF \"${line#*=}\"" + ;; HOST_*=*) # configuration name=${line%=*} value=${line#*=} @@ -123,9 +126,6 @@ case $line in value=${line#*=} echo "#define $name $value" ;; - DSOSUF=*) - echo "#define HOST_DSOSUF \"${line#*=}\"" - ;; esac done # read From patchwork Fri Aug 21 10:23:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275892 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38B69C433DF for ; Fri, 21 Aug 2020 11:24:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E816F2054F for ; Fri, 21 Aug 2020 11:24:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ITJK1Vmf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E816F2054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k95AE-0008NR-4w for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:24:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94F0-000474-Lo for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:46 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55920 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Eh-0001z7-8U for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e/FE7GaYJZpYnykstMaSEf/ndhM7EMGvQmJ1oC9Q/v4=; b=ITJK1VmfOhKv3TeyWP95+JqMUEKi/H27FsHrV/SG6KOeFsRD5OTA7jOiZdsm2dGQQmOIaj vjydq/60N9rIKUSCEPHQpOLqWIX0jjNb4XCpmxSQ7QLVRfZx62/WfIInXlkBKk3/IcMjfL s8wZGP6pEWGFwMl4WaeDkBgoazpJFYg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-535-pMfQ1fmPM_WH27RvpWtZHw-1; Fri, 21 Aug 2020 06:25:24 -0400 X-MC-Unique: pMfQ1fmPM_WH27RvpWtZHw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE63181F02F for ; Fri, 21 Aug 2020 10:25:23 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7BEB2101E247 for ; Fri, 21 Aug 2020 10:25:23 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 145/152] meson: replace create-config with meson configure_file Date: Fri, 21 Aug 2020 06:23:22 -0400 Message-Id: <20200821102329.29777-146-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Move the create-config logic to meson.build; create a configuration_data object and let meson handle the quoting and output. Signed-off-by: Paolo Bonzini --- Makefile | 3 +- block.c | 2 + configure | 11 +-- meson.build | 96 +++++++++++++++++------- scripts/create_config | 131 --------------------------------- tests/qtest/bios-tables-test.c | 2 +- util/module.c | 4 +- 7 files changed, 81 insertions(+), 168 deletions(-) delete mode 100755 scripts/create_config diff --git a/Makefile b/Makefile index f33ec16a81..aa582d6554 100644 --- a/Makefile +++ b/Makefile @@ -143,6 +143,7 @@ endif include $(SRC_PATH)/tests/Makefile.include all: recurse-all +Makefile: $(addsuffix /all, $(SUBDIRS)) # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib="" @@ -206,7 +207,7 @@ clean: recurse-clean ninja-clean clean-ctlist rm -f fsdev/*.pod scsi/*.pod rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) -VERSION ?= $(shell cat VERSION) +VERSION = $(shell cat $(SRC_PATH)/VERSION) dist: qemu-$(VERSION).tar.bz2 diff --git a/block.c b/block.c index 67c5028dd8..2ba76b2c36 100644 --- a/block.c +++ b/block.c @@ -433,9 +433,11 @@ static int bdrv_format_is_whitelisted(const char *format_name, bool read_only) { static const char *whitelist_rw[] = { CONFIG_BDRV_RW_WHITELIST + NULL }; static const char *whitelist_ro[] = { CONFIG_BDRV_RO_WHITELIST + NULL }; const char **p; diff --git a/configure b/configure index 3b0c33450b..ebfac48ed9 100755 --- a/configure +++ b/configure @@ -6958,8 +6958,9 @@ if test "$slirp" != "no"; then echo "SLIRP_CFLAGS=$slirp_cflags" >> $config_host_mak echo "SLIRP_LIBS=$slirp_libs" >> $config_host_mak fi +subdirs= if [ "$slirp" = "git" -o "$slirp" = "internal" ]; then - echo "config-host.h: slirp/all" >> $config_host_mak + subdirs="$subdirs slirp" fi if test "$vde" = "yes" ; then echo "CONFIG_VDE=y" >> $config_host_mak @@ -7032,7 +7033,6 @@ if test "$xfs" = "yes" ; then echo "CONFIG_XFS=y" >> $config_host_mak fi qemu_version=$(head $source_path/VERSION) -echo "VERSION=$qemu_version" >>$config_host_mak echo "PKGVERSION=$pkgversion" >>$config_host_mak echo "SRC_PATH=$source_path" >> $config_host_mak echo "TARGET_DIRS=$target_list" >> $config_host_mak @@ -7793,7 +7793,7 @@ echo "GENISOIMAGE=$genisoimage" >> $config_host_mak echo "MESON=$meson" >> $config_host_mak echo "CC=$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then - echo "IASL=$iasl" >> $config_host_mak + echo "CONFIG_IASL=$iasl" >> $config_host_mak fi echo "CXX=$cxx" >> $config_host_mak echo "OBJCC=$objcc" >> $config_host_mak @@ -8283,11 +8283,12 @@ echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak echo "PIXMAN_LIBS=$pixman_libs" >> $config_host_mak if [ "$fdt" = "git" ]; then - echo "config-host.h: dtc/all" >> $config_host_mak + subdirs="$subdirs dtc" fi if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then - echo "config-host.h: capstone/all" >> $config_host_mak + subdirs="$subdirs capstone" fi +echo "SUBDIRS=$subdirs" >> $config_host_mak if test -n "$LIBCAPSTONE"; then echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 02a8bd5a63..0b03726ad3 100644 --- a/meson.build +++ b/meson.build @@ -12,6 +12,8 @@ config_host = keyval.load(meson.current_build_dir() / 'config-host.mak') config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak') enable_modules = 'CONFIG_MODULES' in config_host build_docs = 'BUILD_DOCS' in config_host +config_host_data = configuration_data() +genh = [] add_project_arguments(config_host['QEMU_CFLAGS'].split(), native: false, language: ['c', 'objc']) @@ -359,13 +361,43 @@ if 'CONFIG_LIBPMEM' in config_host link_args: config_host['LIBPMEM_LIBS'].split()) endif -create_config = find_program('scripts/create_config') +# Create config-host.h + +config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version())) +config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]) +config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) +config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) + +arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] +strings = ['HOST_DSOSUF', 'CONFIG_IASL', 'qemu_confdir', 'qemu_datadir', + 'qemu_moddir', 'qemu_localstatedir', 'qemu_helperdir', 'qemu_localedir', + 'qemu_icondir', 'qemu_desktopdir', 'qemu_firmwarepath'] +foreach k, v: config_host + if arrays.contains(k) + if v != '' + v = '"' + '", "'.join(v.split()) + '", ' + endif + config_host_data.set(k, v) + elif k == 'ARCH' + config_host_data.set('HOST_' + v.to_upper(), 1) + elif strings.contains(k) + if not k.startswith('CONFIG_') + k = 'CONFIG_' + k.to_upper() + endif + config_host_data.set_quoted(k, v) + elif k.startswith('CONFIG_') or k.startswith('HAVE_') or k.startswith('HOST_') + config_host_data.set(k, v == 'y' ? 1 : v) + endif +endforeach +genh += configure_file(output: 'config-host.h', configuration: config_host_data) + minikconf = find_program('scripts/minikconf.py') target_dirs = config_host['TARGET_DIRS'].split() have_user = false have_system = false config_devices_mak_list = [] config_devices_h = {} +config_target_h = {} config_target_mak = {} kconfig_external_symbols = [ 'CONFIG_KVM', @@ -381,16 +413,36 @@ kconfig_external_symbols = [ 'CONFIG_LINUX', 'CONFIG_PVRDMA', ] +ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS'] foreach target : target_dirs have_user = have_user or target.endswith('-user') - config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak') + config_host + config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak') + + config_target_data = configuration_data() + foreach k, v: config_target + if not k.startswith('TARGET_') and not k.startswith('CONFIG_') + # do nothing + elif ignored.contains(k) + # do nothing + elif k == 'TARGET_BASE_ARCH' + config_target_data.set('TARGET_' + v.to_upper(), 1) + elif k == 'TARGET_NAME' + config_target_data.set_quoted(k, v) + elif v == 'y' + config_target_data.set(k, 1) + else + config_target_data.set(k, v) + endif + endforeach + config_target_h += {target: configure_file(output: target + '-config-target.h', + configuration: config_target_data)} if target.endswith('-softmmu') have_system = true base_kconfig = [] foreach sym : kconfig_external_symbols - if sym in config_target + if sym in config_target or sym in config_host base_kconfig += '@0@=y'.format(sym) endif endforeach @@ -404,14 +456,16 @@ foreach target : target_dirs command: [minikconf, config_host['CONFIG_MINIKCONF_MODE'], config_devices_mak, '@DEPFILE@', '@INPUT@', base_kconfig]) - config_devices_h += {target: custom_target( - target + '-config-devices.h', - input: config_devices_mak, - output: target + '-config-devices.h', - capture: true, - command: [create_config, '@INPUT@'])} + + config_devices_data = configuration_data() + config_devices = keyval.load(config_devices_mak) + foreach k, v: config_devices + config_devices_data.set(k, 1) + endforeach config_devices_mak_list += config_devices_mak - config_target += keyval.load(config_devices_mak) + config_devices_h += {target: configure_file(output: target + '-config-devices.h', + configuration: config_devices_data)} + config_target += config_devices endif config_target_mak += {target: config_target} endforeach @@ -451,7 +505,6 @@ config_all += { # Generators -genh = [] hxtool = find_program('scripts/hxtool') shaderinclude = find_program('scripts/shaderinclude.pl') qapi_gen = find_program('scripts/qapi-gen.py') @@ -481,7 +534,7 @@ tracetool = [ qemu_version_cmd = [find_program('scripts/qemu-version.sh'), meson.current_source_dir(), - config_host['PKGVERSION'], config_host['VERSION']] + config_host['PKGVERSION'], meson.project_version()] qemu_version = custom_target('qemu-version.h', output: 'qemu-version.h', command: qemu_version_cmd, @@ -490,13 +543,6 @@ qemu_version = custom_target('qemu-version.h', build_always_stale: true) genh += qemu_version -config_host_h = custom_target('config-host.h', - input: meson.current_build_dir() / 'config-host.mak', - output: 'config-host.h', - capture: true, - command: [create_config, '@INPUT@']) -genh += config_host_h - hxdep = [] hx_headers = [ ['qemu-options.hx', 'qemu-options.def'], @@ -830,13 +876,14 @@ foreach target : target_dirs config_target = config_target_mak[target] target_name = config_target['TARGET_NAME'] arch = config_target['TARGET_BASE_ARCH'] - arch_srcs = [] + arch_srcs = [config_target_h[target]] arch_deps = [] c_args = ['-DNEED_CPU_H', '-DCONFIG_TARGET="@0@-config-target.h"'.format(target), '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)] link_args = [] + config_target += config_host target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])] if targetos == 'linux' target_inc += include_directories('linux-headers', is_system: true) @@ -897,19 +944,12 @@ foreach target : target_dirs objects = common_all.extract_objects(target_common.sources()) deps = target_common.dependencies() - # TODO: Change to generator once obj-y goes away - config_target_h = custom_target(target + '-config-target.h', - input: meson.current_build_dir() / target / 'config-target.mak', - output: target + '-config-target.h', - capture: true, - command: [create_config, '@INPUT@']) - target_specific = specific_ss.apply(config_target, strict: false) arch_srcs += target_specific.sources() arch_deps += target_specific.dependencies() lib = static_library('qemu-' + target, - sources: arch_srcs + [config_target_h] + genh, + sources: arch_srcs + genh, objects: objects, include_directories: target_inc, c_args: c_args, diff --git a/scripts/create_config b/scripts/create_config deleted file mode 100755 index ec5c0b4124..0000000000 --- a/scripts/create_config +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/sh - -test $# -gt 0 && exec < $1 - -echo "/* Automatically generated by create_config - do not modify */" - -while read line; do - -case $line in - VERSION=*) # configuration - version=${line#*=} - major=$(echo "$version" | cut -d. -f1) - minor=$(echo "$version" | cut -d. -f2) - micro=$(echo "$version" | cut -d. -f3) - echo "#define QEMU_VERSION \"$version\"" - echo "#define QEMU_VERSION_MAJOR $major" - echo "#define QEMU_VERSION_MINOR $minor" - echo "#define QEMU_VERSION_MICRO $micro" - ;; - qemu_*dir=* | qemu_*path=*) # qemu-specific directory configuration - name=${line%=*} - value=${line#*=} - define_name=$(echo $name | LC_ALL=C tr '[a-z]' '[A-Z]') - eval "define_value=\"$value\"" - echo "#define CONFIG_$define_name \"$define_value\"" - # save for the next definitions - eval "$name=\$define_value" - ;; - prefix=*) - # save for the next definitions - prefix=${line#*=} - ;; - IASL=*) # iasl executable - value=${line#*=} - echo "#define CONFIG_IASL $value" - ;; - CONFIG_AUDIO_DRIVERS=*) - drivers=${line#*=} - echo "#define CONFIG_AUDIO_DRIVERS \\" - for drv in $drivers; do - echo " \"${drv}\",\\" - done - echo "" - ;; - CONFIG_BDRV_RW_WHITELIST=*) - echo "#define CONFIG_BDRV_RW_WHITELIST\\" - for drv in ${line#*=}; do - echo " \"${drv}\",\\" - done - echo " NULL" - ;; - CONFIG_BDRV_RO_WHITELIST=*) - echo "#define CONFIG_BDRV_RO_WHITELIST\\" - for drv in ${line#*=}; do - echo " \"${drv}\",\\" - done - echo " NULL" - ;; - CONFIG_*=y) # configuration - name=${line%=*} - echo "#define $name 1" - ;; - CONFIG_*=n) # configuration - ;; - CONFIG_*=*) # configuration - name=${line%=*} - value=${line#*=} - echo "#define $name $value" - ;; - HAVE_*=y) # configuration - name=${line%=*} - echo "#define $name 1" - ;; - HAVE_*=*) # configuration - name=${line%=*} - value=${line#*=} - echo "#define $name $value" - ;; - ARCH=*) # configuration - arch=${line#*=} - arch_name=$(echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]') - echo "#define HOST_$arch_name 1" - ;; - HOST_USB=*) - # do nothing - ;; - HOST_CC=*) - # do nothing - ;; - HOST_*=y) # configuration - name=${line%=*} - echo "#define $name 1" - ;; - HOST_DSOSUF=*) - echo "#define HOST_DSOSUF \"${line#*=}\"" - ;; - HOST_*=*) # configuration - name=${line%=*} - value=${line#*=} - echo "#define $name $value" - ;; - TARGET_BASE_ARCH=*) # configuration - target_base_arch=${line#*=} - base_arch_name=$(echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]') - echo "#define TARGET_$base_arch_name 1" - ;; - TARGET_XML_FILES=*) - # do nothing - ;; - TARGET_ABI_DIR=*) - # do nothing - ;; - TARGET_NAME=*) - target_name=${line#*=} - echo "#define TARGET_NAME \"$target_name\"" - ;; - TARGET_DIRS=*) - # do nothing - ;; - TARGET_*=y) # configuration - name=${line%=*} - echo "#define $name 1" - ;; - TARGET_*=*) # configuration - name=${line%=*} - value=${line#*=} - echo "#define $name $value" - ;; -esac - -done # read diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index d49b3988ec..d25ff35492 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -88,7 +88,7 @@ typedef struct { static char disk[] = "tests/acpi-test-disk-XXXXXX"; static const char *data_dir = "tests/data/acpi"; #ifdef CONFIG_IASL -static const char *iasl = stringify(CONFIG_IASL); +static const char *iasl = CONFIG_IASL; #else static const char *iasl; #endif diff --git a/util/module.c b/util/module.c index c956ef096b..6e63006a8f 100644 --- a/util/module.c +++ b/util/module.c @@ -113,7 +113,7 @@ static int module_load_file(const char *fname) { GModule *g_module; void (*sym)(void); - const char *dsosuf = HOST_DSOSUF; + const char *dsosuf = CONFIG_HOST_DSOSUF; int len = strlen(fname); int suf_len = strlen(dsosuf); ModuleEntry *e, *next; @@ -221,7 +221,7 @@ bool module_load_one(const char *prefix, const char *lib_name) for (i = 0; i < n_dirs; i++) { fname = g_strdup_printf("%s/%s%s", - dirs[i], module_name, HOST_DSOSUF); + dirs[i], module_name, CONFIG_HOST_DSOSUF); ret = module_load_file(fname); g_free(fname); fname = NULL; From patchwork Fri Aug 21 10:23:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275897 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76D33C433E1 for ; Fri, 21 Aug 2020 11:21:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FBA92072D for ; Fri, 21 Aug 2020 11:21:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iJtVPGuU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FBA92072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k956s-0000BD-DW for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:21:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94Ez-00046s-68 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:46 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:57477 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Eh-0001zP-V1 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PoSFeDYUgSrg16Q2NruXKDWeicOTJg3xv5sy0VBYEjU=; b=iJtVPGuUqEnHh/zRJ11nRZu965bHsGhX+0/Vid5WX3peotBlQUmfwlC5J9odUPMPGPHErR dNYpuRuIzoQXYOYo/MO80OsIqzBYQHQPxviEV9xBwGaGVgKqhQTk4KNobrYFhmIfyDrgQF tOs9iqCAESzmOnIO2ROWC67L2AZMRpo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-297-N-vtvPo-P4mHBtRTIfmw8Q-1; Fri, 21 Aug 2020 06:25:25 -0400 X-MC-Unique: N-vtvPo-P4mHBtRTIfmw8Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 58776801AEE for ; Fri, 21 Aug 2020 10:25:24 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2571F10098AE for ; Fri, 21 Aug 2020 10:25:24 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 147/152] meson: move SDL and SDL-image detection to meson Date: Fri, 21 Aug 2020 06:23:24 -0400 Message-Id: <20200821102329.29777-148-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- chardev/meson.build | 2 +- configure | 142 +++----------------------------------------- meson.build | 32 +++++++--- meson_options.txt | 2 + softmmu/main.c | 1 + ui/meson.build | 4 +- 6 files changed, 37 insertions(+), 146 deletions(-) create mode 100644 meson_options.txt diff --git a/chardev/meson.build b/chardev/meson.build index 02f914d6c0..a46a6237be 100644 --- a/chardev/meson.build +++ b/chardev/meson.build @@ -36,7 +36,7 @@ softmmu_ss.add(when: ['CONFIG_SPICE', spice], if_true: files('spice.c')) chardev_modules = {} -if config_host.has_key('CONFIG_BRLAPI') and config_host.has_key('CONFIG_SDL') +if config_host.has_key('CONFIG_BRLAPI') and sdl.found() module_ss = ss.source_set() module_ss.add(when: [sdl, brlapi], if_true: files('baum.c')) chardev_modules += { 'brlapi': module_ss } diff --git a/configure b/configure index 379b6a3446..5448c9624d 100755 --- a/configure +++ b/configure @@ -418,8 +418,8 @@ curses="" docs="" fdt="" netmap="no" -sdl="" -sdl_image="" +sdl="auto" +sdl_image="auto" virtfs="" mpath="" vnc="yes" @@ -1133,13 +1133,13 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --disable-sdl) sdl="no" + --disable-sdl) sdl="disabled" ;; - --enable-sdl) sdl="yes" + --enable-sdl) sdl="enabled" ;; - --disable-sdl-image) sdl_image="no" + --disable-sdl-image) sdl_image="disabled" ;; - --enable-sdl-image) sdl_image="yes" + --enable-sdl-image) sdl_image="enabled" ;; --disable-qom-cast-debug) qom_cast_debug="no" ;; @@ -2431,7 +2431,7 @@ if test "$cocoa" = "yes"; then error_exit "Cocoa and GTK UIs cannot both be enabled at once" fi gtk=no - sdl=no + sdl=disabled fi # Some versions of Mac OS X incorrectly define SIZE_MAX @@ -3330,125 +3330,6 @@ if test "$vte" != "no"; then fi fi -########################################## -# SDL probe - -# Look for sdl configuration program (pkg-config or sdl2-config). Try -# sdl2-config even without cross prefix, and favour pkg-config over sdl2-config. - -sdl_probe () -{ - if $pkg_config sdl2 --exists; then - sdlconfig="$pkg_config sdl2" - sdlversion=$($sdlconfig --modversion 2>/dev/null) - elif has "$sdl2_config"; then - sdlconfig="$sdl2_config" - sdlversion=$($sdlconfig --version) - else - if test "$sdl" = "yes" ; then - feature_not_found "sdl" "Install SDL2-devel" - fi - sdl=no - # no need to do the rest - return - fi - if test -n "$cross_prefix" && test "$(basename "$sdlconfig")" = sdl2-config; then - echo warning: using "\"$sdlconfig\"" to detect cross-compiled sdl >&2 - fi - - cat > $TMPC << EOF -#include -#undef main /* We don't want SDL to override our main() */ -int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } -EOF - sdl_cflags=$($sdlconfig --cflags 2>/dev/null) - sdl_cflags="$sdl_cflags -Wno-undef" # workaround 2.0.8 bug - if test "$static" = "yes" ; then - if $pkg_config sdl2 --exists; then - sdl_libs=$($pkg_config sdl2 --static --libs 2>/dev/null) - else - sdl_libs=$($sdlconfig --static-libs 2>/dev/null) - fi - else - sdl_libs=$($sdlconfig --libs 2>/dev/null) - fi - if compile_prog "$sdl_cflags" "$sdl_libs" ; then - sdl=yes - - # static link with sdl ? (note: sdl.pc's --static --libs is broken) - if test "$sdl" = "yes" && test "$static" = "yes" ; then - if test $? = 0 && echo $sdl_libs | grep -- -laa > /dev/null; then - sdl_libs="$sdl_libs $(aalib-config --static-libs 2>/dev/null)" - sdl_cflags="$sdl_cflags $(aalib-config --cflags 2>/dev/null)" - fi - if compile_prog "$sdl_cflags" "$sdl_libs" ; then - : - else - sdl=no - fi - fi # static link - else # sdl not found - if test "$sdl" = "yes" ; then - feature_not_found "sdl" "Install SDL2 devel" - fi - sdl=no - fi # sdl compile test -} - -sdl_image_probe () -{ - if test "$sdl_image" != "no" ; then - if $pkg_config SDL2_image --exists; then - if test "$static" = "yes"; then - sdl_image_libs=$($pkg_config SDL2_image --libs --static 2>/dev/null) - else - sdl_image_libs=$($pkg_config SDL2_image --libs 2>/dev/null) - fi - sdl_image_cflags=$($pkg_config SDL2_image --cflags 2>/dev/null) - sdl_image=yes - - sdl_cflags="$sdl_cflags $sdl_image_cflags" - sdl_libs="$sdl_libs $sdl_image_libs" - else - if test "$sdl_image" = "yes" ; then - feature_not_found "sdl_image" "Install SDL Image devel" - else - sdl_image=no - fi - fi - fi -} - -if test "$sdl" != "no" ; then - sdl_probe -fi - -if test "$sdl" = "yes" ; then - sdl_image_probe -else - if test "$sdl_image" = "yes"; then - echo "warning: SDL Image requested, but SDL is not available, disabling" - fi - sdl_image=no -fi - -if test "$sdl" = "yes" ; then - cat > $TMPC < -#if defined(SDL_VIDEO_DRIVER_X11) -#include -#else -#error No x11 support -#endif -int main(void) { return 0; } -EOF - if compile_prog "$sdl_cflags $x11_cflags" "$sdl_libs $x11_libs" ; then - need_x11=yes - sdl_cflags="$sdl_cflags $x11_cflags" - sdl_libs="$sdl_libs $x11_libs" - fi -fi - ########################################## # RDMA needs OpenFabrics libraries if test "$rdma" != "no" ; then @@ -7050,14 +6931,6 @@ if test "$have_x11" = "yes" && test "$need_x11" = "yes"; then echo "X11_CFLAGS=$x11_cflags" >> $config_host_mak echo "X11_LIBS=$x11_libs" >> $config_host_mak fi -if test "$sdl" = "yes" ; then - echo "CONFIG_SDL=m" >> $config_host_mak - echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak - echo "SDL_LIBS=$sdl_libs" >> $config_host_mak - if test "$sdl_image" = "yes" ; then - echo "CONFIG_SDL_IMAGE=y" >> $config_host_mak - fi -fi if test "$cocoa" = "yes" ; then echo "CONFIG_COCOA=y" >> $config_host_mak fi @@ -8449,6 +8322,7 @@ NINJA=$PWD/ninjatool $meson setup \ -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \ -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \ -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \ + -Dsdl=$sdl -Dsdl_image=$sdl_image \ $cross_arg \ "$PWD" "$source_path" diff --git a/meson.build b/meson.build index 0b03726ad3..f0374e8508 100644 --- a/meson.build +++ b/meson.build @@ -11,6 +11,7 @@ cc = meson.get_compiler('c') config_host = keyval.load(meson.current_build_dir() / 'config-host.mak') config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak') enable_modules = 'CONFIG_MODULES' in config_host +enable_static = 'CONFIG_STATIC' in config_host build_docs = 'BUILD_DOCS' in config_host config_host_data = configuration_data() genh = [] @@ -218,13 +219,24 @@ brlapi = not_found if 'CONFIG_BRLAPI' in config_host brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split()) endif -sdlwindows = false -sdl = not_found -if 'CONFIG_SDL' in config_host - sdl = declare_dependency(compile_args: config_host['SDL_CFLAGS'].split(), - link_args: config_host['SDL_LIBS'].split()) - sdlwindows = config_host['SDL_LIBS'].contains('-mwindows') + +sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static, + include_type: 'system') +sdl_image = not_found +if sdl.found() + # work around 2.0.8 bug + sdl = declare_dependency(compile_args: '-Wno-undef', + dependencies: sdl) + sdl_image = dependency('sdl-image', required: get_option('sdl_image'), + static: enable_static) +else + if get_option('sdl_image').enabled() + error('sdl-image required, but SDL was @0@', + get_option('sdl').disabled() ? 'disabled' : 'not found') + endif + sdl_image = not_found endif + rbd = not_found if 'CONFIG_RBD' in config_host rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split()) @@ -363,6 +375,8 @@ endif # Create config-host.h +config_host_data.set('CONFIG_SDL', sdl.found()) +config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version())) config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]) config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) @@ -963,7 +977,7 @@ foreach target : target_dirs 'sources': files('softmmu/main.c'), 'dependencies': [] }] - if sdlwindows + if targetos == 'windows' and (sdl.found() or gtk.found()) execs += [{ 'name': 'qemu-system-' + target_name + 'w', 'gui': true, @@ -1239,8 +1253,8 @@ if targetos == 'darwin' summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')} endif # TODO: add back version -summary_info += {'SDL support': config_host.has_key('CONFIG_SDL')} -summary_info += {'SDL image support': config_host.has_key('CONFIG_SDL_IMAGE')} +summary_info += {'SDL support': sdl.found()} +summary_info += {'SDL image support': sdl_image.found()} # TODO: add back version summary_info += {'GTK support': config_host.has_key('CONFIG_GTK')} summary_info += {'GTK GL support': config_host.has_key('CONFIG_GTK_GL')} diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000000..e548211f34 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,2 @@ +option('sdl', type : 'feature', value : 'auto') +option('sdl_image', type : 'feature', value : 'auto') diff --git a/softmmu/main.c b/softmmu/main.c index 7adc530c73..639c67ff48 100644 --- a/softmmu/main.c +++ b/softmmu/main.c @@ -29,6 +29,7 @@ #ifdef CONFIG_SDL #if defined(__APPLE__) || defined(main) #include +static int qemu_main(int argc, char **argv, char **envp); int main(int argc, char **argv) { return qemu_main(argc, argv, NULL); diff --git a/ui/meson.build b/ui/meson.build index 66282c398d..daec6c405e 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -55,11 +55,11 @@ if config_host.has_key('CONFIG_GTK') and config_host.has_key('CONFIG_VTE') ui_modules += {'gtk' : gtk_ss} endif -if config_host.has_key('CONFIG_SDL') +if sdl.found() softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c')) sdl_ss = ss.source_set() - sdl_ss.add(pixman, glib, files( + sdl_ss.add(sdl, sdl_image, pixman, glib, files( 'sdl2-2d.c', 'sdl2-input.c', 'sdl2.c', From patchwork Fri Aug 21 10:23:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E958BC433E1 for ; Fri, 21 Aug 2020 11:29:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A561F2054F for ; Fri, 21 Aug 2020 11:29:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZJq4ksXd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A561F2054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k95EK-0001r2-Rp for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:29:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94F4-0004Br-51 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:50 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:55361 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Ei-0001zZ-Fu for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zRoWB/SWs+nUi6unxQrdLEoud1O65gXF2sC7RbCdv6M=; b=ZJq4ksXdEOWo3oUBFgEg+95GxqgQL0RlruN+KNDnjsjEsOcftnGVOdUHZ9hCCWPwmAFBTz kZPIhhyd4jjrRctUuwbD1KTGYHynHu+GUjLBgkeMfZWXonoMFwt/pzVg/9bmYbUI17KifV T8VamHDNXEzKNG6H02EhAf7Nw6abzQg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-347-8NVwZTpQNz2eRuCY_k_Wyg-1; Fri, 21 Aug 2020 06:25:25 -0400 X-MC-Unique: 8NVwZTpQNz2eRuCY_k_Wyg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AA0BB56B2C for ; Fri, 21 Aug 2020 10:25:24 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76AD810098AE for ; Fri, 21 Aug 2020 10:25:24 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 148/152] meson: convert VNC and dependent libraries to meson Date: Fri, 21 Aug 2020 06:23:25 -0400 Message-Id: <20200821102329.29777-149-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- configure | 122 +++++----------------------------------------- meson.build | 40 +++++++++------ meson_options.txt | 4 ++ ui/meson.build | 10 ++-- 4 files changed, 45 insertions(+), 131 deletions(-) diff --git a/configure b/configure index 5448c9624d..56b2432f47 100755 --- a/configure +++ b/configure @@ -422,12 +422,12 @@ sdl="auto" sdl_image="auto" virtfs="" mpath="" -vnc="yes" +vnc="enabled" sparse="no" vde="" -vnc_sasl="" -vnc_jpeg="" -vnc_png="" +vnc_sasl="auto" +vnc_jpeg="auto" +vnc_png="auto" xkbcommon="" xen="" xen_ctrl_version="" @@ -1153,9 +1153,9 @@ for opt do ;; --enable-mpath) mpath="yes" ;; - --disable-vnc) vnc="no" + --disable-vnc) vnc="disabled" ;; - --enable-vnc) vnc="yes" + --enable-vnc) vnc="enabled" ;; --oss-lib=*) oss_lib="$optarg" ;; @@ -1191,17 +1191,17 @@ for opt do ;; --disable-strip) strip_opt="no" ;; - --disable-vnc-sasl) vnc_sasl="no" + --disable-vnc-sasl) vnc_sasl="disabled" ;; - --enable-vnc-sasl) vnc_sasl="yes" + --enable-vnc-sasl) vnc_sasl="enabled" ;; - --disable-vnc-jpeg) vnc_jpeg="no" + --disable-vnc-jpeg) vnc_jpeg="disabled" ;; - --enable-vnc-jpeg) vnc_jpeg="yes" + --enable-vnc-jpeg) vnc_jpeg="enabled" ;; - --disable-vnc-png) vnc_png="no" + --disable-vnc-png) vnc_png="disabled" ;; - --enable-vnc-png) vnc_png="yes" + --enable-vnc-png) vnc_png="enabled" ;; --disable-slirp) slirp="no" ;; @@ -3424,85 +3424,6 @@ EOF fi fi -########################################## -# VNC SASL detection -if test "$vnc" = "yes" && test "$vnc_sasl" != "no" ; then - cat > $TMPC < -#include -int main(void) { sasl_server_init(NULL, "qemu"); return 0; } -EOF - # Assuming Cyrus-SASL installed in /usr prefix - # QEMU defines struct iovec in "qemu/osdep.h", - # we don't want libsasl to redefine it in . - vnc_sasl_cflags="-DSTRUCT_IOVEC_DEFINED" - vnc_sasl_libs="-lsasl2" - if compile_prog "$vnc_sasl_cflags" "$vnc_sasl_libs" ; then - vnc_sasl=yes - libs_softmmu="$vnc_sasl_libs $libs_softmmu" - QEMU_CFLAGS="$QEMU_CFLAGS $vnc_sasl_cflags" - else - if test "$vnc_sasl" = "yes" ; then - feature_not_found "vnc-sasl" "Install Cyrus SASL devel" - fi - vnc_sasl=no - fi -fi - -########################################## -# VNC JPEG detection -if test "$vnc" = "yes" && test "$vnc_jpeg" != "no" ; then -cat > $TMPC < -#include -int main(void) { struct jpeg_compress_struct s; jpeg_create_compress(&s); return 0; } -EOF - vnc_jpeg_cflags="" - vnc_jpeg_libs="-ljpeg" - if compile_prog "$vnc_jpeg_cflags" "$vnc_jpeg_libs" ; then - vnc_jpeg=yes - libs_softmmu="$vnc_jpeg_libs $libs_softmmu" - QEMU_CFLAGS="$QEMU_CFLAGS $vnc_jpeg_cflags" - else - if test "$vnc_jpeg" = "yes" ; then - feature_not_found "vnc-jpeg" "Install libjpeg-turbo devel" - fi - vnc_jpeg=no - fi -fi - -########################################## -# VNC PNG detection -if test "$vnc" = "yes" && test "$vnc_png" != "no" ; then -cat > $TMPC < -#include -#include -int main(void) { - png_structp png_ptr; - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - return png_ptr != 0; -} -EOF - if $pkg_config libpng --exists; then - vnc_png_cflags=$($pkg_config libpng --cflags) - vnc_png_libs=$($pkg_config libpng --libs) - else - vnc_png_cflags="" - vnc_png_libs="-lpng" - fi - if compile_prog "$vnc_png_cflags" "$vnc_png_libs" ; then - vnc_png=yes - libs_softmmu="$vnc_png_libs $libs_softmmu" - QEMU_CFLAGS="$QEMU_CFLAGS $vnc_png_cflags" - else - if test "$vnc_png" = "yes" ; then - feature_not_found "vnc-png" "Install libpng devel" - fi - vnc_png=no - fi -fi - ########################################## # xkbcommon probe if test "$xkbcommon" != "no" ; then @@ -6884,24 +6805,6 @@ if test "$audio_win_int" = "yes" ; then fi echo "CONFIG_BDRV_RW_WHITELIST=$block_drv_rw_whitelist" >> $config_host_mak echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak -if test "$vnc" = "yes" ; then - echo "CONFIG_VNC=y" >> $config_host_mak -fi -if test "$vnc_sasl" = "yes" ; then - echo "CONFIG_VNC_SASL=y" >> $config_host_mak -fi -echo "SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak -echo "SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak -if test "$vnc_jpeg" = "yes" ; then - echo "CONFIG_VNC_JPEG=y" >> $config_host_mak -fi -echo "JPEG_CFLAGS=$vnc_jpeg_cflags" >> $config_host_mak -echo "JPEG_LIBS=$vnc_jpeg_libs" >> $config_host_mak -if test "$vnc_png" = "yes" ; then - echo "CONFIG_VNC_PNG=y" >> $config_host_mak -fi -echo "PNG_CFLAGS=$vnc_png_cflags" >> $config_host_mak -echo "PNG_LIBS=$vnc_png_libs" >> $config_host_mak if test "$xkbcommon" = "yes" ; then echo "CONFIG_XKBCOMMON=y" >> $config_host_mak echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak @@ -8323,6 +8226,7 @@ NINJA=$PWD/ninjatool $meson setup \ -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \ -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \ -Dsdl=$sdl -Dsdl_image=$sdl_image \ + -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ $cross_arg \ "$PWD" "$source_path" diff --git a/meson.build b/meson.build index f0374e8508..1ae9d42868 100644 --- a/meson.build +++ b/meson.build @@ -306,20 +306,24 @@ if 'CONFIG_GIO' in config_host gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), link_args: config_host['GIO_LIBS'].split()) endif +vnc = not_found png = not_found -if 'CONFIG_VNC_PNG' in config_host - png = declare_dependency(compile_args: config_host['PNG_CFLAGS'].split(), - link_args: config_host['PNG_LIBS'].split()) -endif jpeg = not_found -if 'CONFIG_VNC_JPEG' in config_host - jpeg = declare_dependency(compile_args: config_host['JPEG_CFLAGS'].split(), - link_args: config_host['JPEG_LIBS'].split()) -endif sasl = not_found -if 'CONFIG_VNC_SASL' in config_host - sasl = declare_dependency(compile_args: config_host['SASL_CFLAGS'].split(), - link_args: config_host['SASL_LIBS'].split()) +if get_option('vnc').enabled() + vnc = declare_dependency() # dummy dependency + png = dependency('libpng', required: get_option('vnc_png'), + static: enable_static) + jpeg = cc.find_library('jpeg', has_headers: ['jpeglib.h'], + required: get_option('vnc_jpeg'), + static: enable_static) + sasl = cc.find_library('sasl2', has_headers: ['sasl/sasl.h'], + required: get_option('vnc_sasl'), + static: enable_static) + if sasl.found() + sasl = declare_dependency(dependencies: sasl, + compile_args: '-DSTRUCT_IOVEC_DEFINED') + endif endif fdt = not_found if 'CONFIG_FDT' in config_host @@ -377,6 +381,10 @@ endif config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) +config_host_data.set('CONFIG_VNC', vnc.found()) +config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) +config_host_data.set('CONFIG_VNC_PNG', png.found()) +config_host_data.set('CONFIG_VNC_SASL', sasl.found()) config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version())) config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]) config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) @@ -1286,11 +1294,11 @@ summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST'] summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']} summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')} summary_info += {'Multipath support': config_host.has_key('CONFIG_MPATH')} -summary_info += {'VNC support': config_host.has_key('CONFIG_VNC')} -if config_host.has_key('CONFIG_VNC') - summary_info += {'VNC SASL support': config_host.has_key('CONFIG_VNC_SASL')} - summary_info += {'VNC JPEG support': config_host.has_key('CONFIG_VNC_JPEG')} - summary_info += {'VNC PNG support': config_host.has_key('CONFIG_VNC_PNG')} +summary_info += {'VNC support': vnc.found()} +if vnc.found() + summary_info += {'VNC SASL support': sasl.found()} + summary_info += {'VNC JPEG support': jpeg.found()} + summary_info += {'VNC PNG support': png.found()} endif summary_info += {'xen support': config_host.has_key('CONFIG_XEN_BACKEND')} if config_host.has_key('CONFIG_XEN_BACKEND') diff --git a/meson_options.txt b/meson_options.txt index e548211f34..67455c57bc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,6 @@ option('sdl', type : 'feature', value : 'auto') option('sdl_image', type : 'feature', value : 'auto') +option('vnc', type : 'feature', value : 'enabled') +option('vnc_jpeg', type : 'feature', value : 'auto') +option('vnc_png', type : 'feature', value : 'auto') +option('vnc_sasl', type : 'feature', value : 'auto') diff --git a/ui/meson.build b/ui/meson.build index daec6c405e..6f74d30ea0 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -27,14 +27,12 @@ vnc_ss.add(files( 'vnc-ws.c', 'vnc-jobs.c', )) -vnc_ss.add(zlib) -vnc_ss.add(when: 'CONFIG_VNC_SASL', if_true: [files('vnc-auth-sasl.c'), sasl]) -softmmu_ss.add_all(when: 'CONFIG_VNC', if_true: vnc_ss) -softmmu_ss.add(when: 'CONFIG_VNC', if_false: files('vnc-stubs.c')) +vnc_ss.add(zlib, png, jpeg) +vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) +softmmu_ss.add_all(when: vnc, if_true: vnc_ss) +softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c')) softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c')) softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL_DMABUF'], if_true: files('egl-headless.c')) -softmmu_ss.add(when: 'CONFIG_VNC_PNG', if_true: png) -softmmu_ss.add(when: 'CONFIG_VNC_JPEG', if_true: jpeg) ui_modules = {} From patchwork Fri Aug 21 10:23:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275890 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B420C433DF for ; Fri, 21 Aug 2020 11:27:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55E9B2054F for ; Fri, 21 Aug 2020 11:27:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Z6ICDrgx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55E9B2054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k95D2-0006rQ-Iz for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:27:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94F1-00049N-Kh for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:49 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48748 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Ei-0001ze-J1 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CJWEIHTzuCHJmTdlOPf+Ltdydt6EtuUf56CFI9vv1CY=; b=Z6ICDrgxXcZCuWA3fnhCr2wFb9lNncl57Y+KLTNLrCA3ClZPe4M6qVf6xUQdibGL0VAd+g IFNUfLj8I3wSbiFpJoKXhbMRFnkgwSWMyQYijqnAj3zsO9OSkMXjLU7XUvjsnWo2t6JaEu /gYTWkSo2NwNUz0eUxWhsAwxKzxjvh0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-366-7b1ypIpmOx6_PQ1Dh_7rWw-1; Fri, 21 Aug 2020 06:25:25 -0400 X-MC-Unique: 7b1ypIpmOx6_PQ1Dh_7rWw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 18ED556B2D for ; Fri, 21 Aug 2020 10:25:25 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id C7915101E247; Fri, 21 Aug 2020 10:25:24 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 149/152] meson: convert po/ Date: Fri, 21 Aug 2020 06:23:26 -0400 Message-Id: <20200821102329.29777-150-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Meson warns if xgettext is not found. In the future we may want to add a required argument to i18n.gettext(); in the meanwhile, I am adding a --enable-gettext/--disable-gettext option and feature detection in configure. This preserves QEMU's default behavior of detecting system features, without any warning, if neither --enable-* nor --disable-* is requested. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 5 +--- configure | 21 +++++++++++++- meson.build | 3 ++ meson_options.txt | 1 + po/LINGUAS | 8 +++++ po/Makefile | 52 --------------------------------- po/POTFILES | 1 + po/meson.build | 7 +++++ po/messages.po | 74 ----------------------------------------------- tests/vm/freebsd | 1 + tests/vm/netbsd | 1 + tests/vm/openbsd | 1 + 12 files changed, 44 insertions(+), 131 deletions(-) create mode 100644 po/LINGUAS delete mode 100644 po/Makefile create mode 100644 po/POTFILES create mode 100644 po/meson.build delete mode 100644 po/messages.po diff --git a/Makefile b/Makefile index aa582d6554..8373ddccc9 100644 --- a/Makefile +++ b/Makefile @@ -219,7 +219,7 @@ distclean: clean ninja-distclean rm -f config-host.mak config-host.h* rm -f tests/tcg/config-*.mak rm -f config-all-disas.mak config.status - rm -f po/*.mo tests/qemu-iotests/common.env + rm -f tests/qemu-iotests/common.env rm -f roms/seabios/config.mak roms/vgabios/config.mak rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols rm -f *-config-target.h *-config-devices.mak *-config-devices.h @@ -297,9 +297,6 @@ endif mkdir -p "$(DESTDIR)$(qemu_desktopdir)" $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \ "$(DESTDIR)$(qemu_desktopdir)/qemu.desktop" -ifdef CONFIG_GTK - $(MAKE) -C po $@ -endif $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" set -e; for x in $(KEYMAPS); do \ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ diff --git a/configure b/configure index 56b2432f47..cdffe221c7 100755 --- a/configure +++ b/configure @@ -565,6 +565,7 @@ secret_keyring="" libdaxctl="" meson="" skip_meson=no +gettext="" bogus_os="no" malloc_trim="" @@ -1157,6 +1158,10 @@ for opt do ;; --enable-vnc) vnc="enabled" ;; + --disable-gettext) gettext="false" + ;; + --enable-gettext) gettext="true" + ;; --oss-lib=*) oss_lib="$optarg" ;; --audio-drv-list=*) audio_drv_list="$optarg" @@ -3028,6 +3033,19 @@ if test "$whpx" != "no" ; then fi fi +########################################## +# gettext probe +if test "$gettext" != "false" ; then + if has xgettext; then + gettext=true + else + if test "$gettext" = "true" ; then + feature_not_found "gettext" "Install xgettext binary" + fi + gettext=false + fi +fi + ########################################## # Sparse probe if test "$sparse" != "no" ; then @@ -8095,7 +8113,7 @@ DIRS="$DIRS docs docs/interop fsdev scsi" DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw" DIRS="$DIRS roms/seabios" LINKS="Makefile" -LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile" +LINKS="$LINKS tests/tcg/lm32/Makefile" LINKS="$LINKS tests/tcg/Makefile.target" LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps" LINKS="$LINKS pc-bios/s390-ccw/Makefile" @@ -8227,6 +8245,7 @@ NINJA=$PWD/ninjatool $meson setup \ -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \ -Dsdl=$sdl -Dsdl_image=$sdl_image \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ + -Dgettext=$gettext \ $cross_arg \ "$PWD" "$source_path" diff --git a/meson.build b/meson.build index 1ae9d42868..62bf8a51c2 100644 --- a/meson.build +++ b/meson.build @@ -1115,6 +1115,9 @@ subdir('tools') subdir('pc-bios') subdir('tests') subdir('docs') +if 'CONFIG_GTK' in config_host + subdir('po') +endif if build_docs makeinfo = find_program('makeinfo', required: build_docs) diff --git a/meson_options.txt b/meson_options.txt index 67455c57bc..e5f45243ce 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ +option('gettext', type : 'boolean', value : true) option('sdl', type : 'feature', value : 'auto') option('sdl_image', type : 'feature', value : 'auto') option('vnc', type : 'feature', value : 'enabled') diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000000..cc4b5c3b36 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,8 @@ +bg +de_DE +fr_FR +hu +it +sv +tr +zh_CN diff --git a/po/Makefile b/po/Makefile deleted file mode 100644 index c041f4c858..0000000000 --- a/po/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# This makefile is very special as it's meant to build as part of the build -# process and also within the source tree to update the translation files. - -# Set SRC_PATH for in-tree builds without configuration. -SRC_PATH=.. - -# The default target must come before any include statements. -all: - -.PHONY: all build clean install update - -%.mo: %.po - $(call quiet-command, msgfmt -o $@ $<,"GEN","$@") - --include ../config-host.mak -include $(SRC_PATH)/rules.mak - -PO_PATH=$(SRC_PATH)/po - -VERSION=$(shell cat $(SRC_PATH)/VERSION) -SRCS=$(filter-out $(PO_PATH)/messages.po,$(wildcard $(PO_PATH)/*.po)) -OBJS=$(patsubst $(PO_PATH)/%.po,%.mo,$(SRCS)) - -vpath %.po $(PO_PATH) - -all: - @echo "Use 'make update' to update translation files or use 'make build'" - @echo "or 'make install' to build and install the translation files." - -update: $(SRCS) - -build: $(OBJS) - -clean: - rm -f $(OBJS) - -install: $(OBJS) - for obj in $(OBJS); do \ - base=$$(basename $$obj .mo); \ - $(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES; \ - $(INSTALL) -m644 $$obj $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES/qemu.mo; \ - done - -$(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c - $(call quiet-command, ( cd $(SRC_PATH) && \ - xgettext -o - --from-code=UTF-8 --foreign-user --no-location \ - --package-name=QEMU --package-version=$(VERSION) \ - --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C ui/gtk.c | \ - sed -e s/CHARSET/UTF-8/) >$@,"GEN","$@") - -$(PO_PATH)/%.po: $(PO_PATH)/messages.po - $(call quiet-command, msgmerge -q $@ $< > $@.bak && mv $@.bak $@,"GEN","$@") diff --git a/po/POTFILES b/po/POTFILES new file mode 100644 index 0000000000..d34d5ed9aa --- /dev/null +++ b/po/POTFILES @@ -0,0 +1 @@ +ui/gtk.c diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000000..1387fd979a --- /dev/null +++ b/po/meson.build @@ -0,0 +1,7 @@ +i18n = import('i18n') + +if get_option('gettext') + i18n.gettext(meson.project_name(), + args: '--msgid-bugs-address=qemu-devel@nongnu.org', + preset: 'glib') +endif diff --git a/po/messages.po b/po/messages.po deleted file mode 100644 index 065bd459a0..0000000000 --- a/po/messages.po +++ /dev/null @@ -1,74 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# This file is put in the public domain. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: QEMU 2.12.91\n" -"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n" -"POT-Creation-Date: 2018-07-18 07:56+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid " - Press Ctrl+Alt+G to release grab" -msgstr "" - -msgid " [Paused]" -msgstr "" - -msgid "_Pause" -msgstr "" - -msgid "_Reset" -msgstr "" - -msgid "Power _Down" -msgstr "" - -msgid "_Quit" -msgstr "" - -msgid "_Fullscreen" -msgstr "" - -msgid "_Copy" -msgstr "" - -msgid "Zoom _In" -msgstr "" - -msgid "Zoom _Out" -msgstr "" - -msgid "Best _Fit" -msgstr "" - -msgid "Zoom To _Fit" -msgstr "" - -msgid "Grab On _Hover" -msgstr "" - -msgid "_Grab Input" -msgstr "" - -msgid "Show _Tabs" -msgstr "" - -msgid "Detach Tab" -msgstr "" - -msgid "Show Menubar" -msgstr "" - -msgid "_Machine" -msgstr "" - -msgid "_View" -msgstr "" diff --git a/tests/vm/freebsd b/tests/vm/freebsd index b34b14fc53..5f866e09c4 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -39,6 +39,7 @@ class FreeBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", + "gettext", # libs: crypto "gnutls", diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 93d48b6fdd..ffb65a89be 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -37,6 +37,7 @@ class NetBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", + "gettext", # libs: crypto "gnutls", diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 7e27fda642..8356646f21 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -36,6 +36,7 @@ class OpenBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", + "gettext", # libs: usb "libusb1", From patchwork Fri Aug 21 10:23:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275888 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92825C433E1 for ; Fri, 21 Aug 2020 11:30:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E57220656 for ; Fri, 21 Aug 2020 11:30:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eTxOY6YQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E57220656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:32926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k95FZ-0005DV-JN for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:30:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94F4-0004CY-BQ for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:50 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46108 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Ej-000206-PL for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zLEGI0Pc2+VviirpEb13pI07/x5FH7EtQpf+MKxLR/A=; b=eTxOY6YQEBRHQ9F7Wnfz+7IbH4XKY14UIhODtlPFBrkuPNb2xVEvSp9gBJ9U7r5epAa1aS TiYbwFd/HDcYV7K49in5L8thTVtWxtr2+58w8YeK2wi3r55+ExRQMYEfbDzREN26hySUZ3 VzbX3AEvR6Om6wXhZCa1i3mBKbHNBZM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-18-QYWg83uQNqmYiSYSRIG3_Q-1; Fri, 21 Aug 2020 06:25:26 -0400 X-MC-Unique: QYWg83uQNqmYiSYSRIG3_Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 20D461009442 for ; Fri, 21 Aug 2020 10:25:26 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id E20DD60BF1 for ; Fri, 21 Aug 2020 10:25:25 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 150/152] meson: avoid unstable module warning with Meson 0.56.0 or newer Date: Fri, 21 Aug 2020 06:23:27 -0400 Message-Id: <20200821102329.29777-151-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 23:41:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 62bf8a51c2..808f50b07e 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,11 @@ project('qemu', ['c'], meson_version: '>=0.55.0', version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) not_found = dependency('', required: false) -keyval = import('unstable-keyval') +if meson.version().version_compare('>=0.56.0') + keyval = import('keyval') +else + keyval = import('unstable-keyval') +endif ss = import('sourceset') sh = find_program('sh') From patchwork Fri Aug 21 10:23:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E30EAC433DF for ; Fri, 21 Aug 2020 11:22:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DAD72054F for ; Fri, 21 Aug 2020 11:22:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GkKk5jwv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DAD72054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k958F-0003hu-Sf for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:22:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94F7-0004KS-Ig for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:53 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:24729 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Em-00021M-Qj for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NhC3WN+7P3oYu/I5W9ozmdGow63gLRM3tv8jbIWeG3g=; b=GkKk5jwve9izEn9w3izm6mWWkhmSSEw0AytYOpKImUJylz5aNiJsrsW/8Vpz5+5Vz+OabW KD47Fvx/9UrKsp2mRMvt9ernzR1BZ+oIbJetETrcLsb1l1VLAZn+XF/L6VbUwQOmp7q656 oQg+7TL3siugb1PcZluJFu6Chp3l5wU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-TM9YB5SQOCO8F3VZws-shQ-1; Fri, 21 Aug 2020 06:25:27 -0400 X-MC-Unique: TM9YB5SQOCO8F3VZws-shQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 815A1801AEF for ; Fri, 21 Aug 2020 10:25:26 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E388756D7 for ; Fri, 21 Aug 2020 10:25:26 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 151/152] meson: update build-system documentation Date: Fri, 21 Aug 2020 06:23:28 -0400 Message-Id: <20200821102329.29777-152-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 05:15:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- docs/devel/build-system.txt | 468 ++++++++++++++++++------------------ 1 file changed, 240 insertions(+), 228 deletions(-) diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt index fea67b207c..2ced8ca474 100644 --- a/docs/devel/build-system.txt +++ b/docs/devel/build-system.txt @@ -22,15 +22,34 @@ silent while it is checking for features. It will only display output when an error occurs, or to show the final feature enablement summary on completion. -Adding new checks to the configure script usually comprises the -following tasks: +Because QEMU uses the Meson build system under the hood, only VPATH +builds are supported. There are two general ways to invoke configure & +perform a build: + + - VPATH, build artifacts outside of QEMU source tree entirely + + cd ../ + mkdir build + cd build + ../qemu/configure + make + + - VPATH, build artifacts in a subdir of QEMU source tree + + mkdir build + cd build + ../configure + make + +For now, checks on the compilation environment are found in configure +rather than meson.build, though this is expected to change. The command +line is parsed in the configure script and, whenever needed, converted +into the appropriate options to Meson. - - Initialize one or more variables with the default feature state. +New checks should be added to Meson, which usually comprises the +following tasks: - Ideally features should auto-detect whether they are present, - so try to avoid hardcoding the initial state to either enabled - or disabled, as that forces the user to pass a --enable-XXX - / --disable-XXX flag on every invocation of configure. + - Add a Meson build option to meson_options.txt. - Add support to the command line arg parser to handle any new --enable-XXX / --disable-XXX flags required by the feature XXX. @@ -38,63 +57,55 @@ following tasks: - Add information to the help output message to report on the new feature flag. - - Add code to perform the actual feature check. As noted above, try to - be fully dynamic in checking enablement/disablement. + - Add code to perform the actual feature check. + + - Add code to include the feature status in config-host.h - Add code to print out the feature status in the configure summary upon completion. - - Add any new makefile variables to $config_host_mak on completion. - -Taking (a simplified version of) the probe for gnutls from configure, -we have the following pieces: +Taking the probe for SDL as an example, we have the following pieces +in configure: # Initial variable state - gnutls="" + sdl=auto ..snip.. # Configure flag processing - --disable-gnutls) gnutls="no" + --disable-gnutls) sdl=disabled ;; - --enable-gnutls) gnutls="yes" + --enable-gnutls) sdl=enabled ;; ..snip.. # Help output feature message - gnutls GNUTLS cryptography support + sdl SDL UI ..snip.. - # Test for gnutls - if test "$gnutls" != "no"; then - if ! $pkg_config --exists "gnutls"; then - gnutls_cflags=`$pkg_config --cflags gnutls` - gnutls_libs=`$pkg_config --libs gnutls` - libs_softmmu="$gnutls_libs $libs_softmmu" - libs_tools="$gnutls_libs $libs_tools" - QEMU_CFLAGS="$QEMU_CFLAGS $gnutls_cflags" - gnutls="yes" - elif test "$gnutls" = "yes"; then - feature_not_found "gnutls" "Install gnutls devel" - else - gnutls="no" - fi - fi + # Meson invocation + -Dsdl=$sdl - ..snip.. +In meson_options.txt: - # Completion feature summary - echo "GNUTLS support $gnutls" + option('sdl', type : 'feature', value : 'auto') - ..snip.. +In meson.build: + + # Detect dependency + sdl = dependency('sdl2', + required: get_option('sdl'), + static: enable_static) + + # Create config-host.h + config_host_data.set('CONFIG_SDL', sdl.found()) + + # Summary + summary_info += {'SDL support': sdl.found()} - # Define make variables - if test "$gnutls" = "yes" ; then - echo "CONFIG_GNUTLS=y" >> $config_host_mak - fi Helper functions @@ -164,145 +175,189 @@ developers in checking for system features: then --static will be automatically added to $ARGS -Stage 2: makefiles -================== +Stage 2: Meson +============== -The use of GNU make is required with the QEMU build system. +The Meson build system is currently used to describe the build +process for: -Although the source code is spread across multiple subdirectories, the -build system should be considered largely non-recursive in nature, in -contrast to common practices seen with automake. There is some recursive -invocation of make, but this is related to the things being built, -rather than the source directory structure. +1) executables, which include: + - Tools - qemu-img, qemu-nbd, qga (guest agent), etc + - System emulators - qemu-system-$ARCH + - Userspace emulators - qemu-$ARCH + - Some (but not all) unit tests -QEMU currently supports both VPATH and non-VPATH builds, so there are -three general ways to invoke configure & perform a build. +2) documentation - - VPATH, build artifacts outside of QEMU source tree entirely +3) ROMs, which can be either installed as binary blobs or compiled - cd ../ - mkdir build - cd build - ../qemu/configure - make +4) other data files, such as icons or desktop files - - VPATH, build artifacts in a subdir of QEMU source tree - - mkdir build - cd build - ../configure - make - - - non-VPATH, build artifacts everywhere - - ./configure - make - -The QEMU maintainers generally recommend that a VPATH build is used by -developers. Patches to QEMU are expected to ensure VPATH build still -works. +The source code is highly modularized, split across many files to +facilitate building of all of these components with as little duplicated +compilation as possible. The Meson "sourceset" functionality is used +to list the files and their dependency on various configuration +symbols. +Various subsystems that are common to both tools and emulators have +their own sourceset, for example block_ss for the block device subsystem, +chardev_ss for the character device subsystem, etc. These sourcesets +are then turned into static libraries as follows: -Module structure ----------------- + libchardev = static_library('chardev', chardev_ss.sources(), + name_suffix: 'fa', + build_by_default: false) -There are a number of key outputs of the QEMU build system: + chardev = declare_dependency(link_whole: libchardev) - - Tools - qemu-img, qemu-nbd, qga (guest agent), etc - - System emulators - qemu-system-$ARCH - - Userspace emulators - qemu-$ARCH - - Unit tests +The special ".fa" suffix is needed as long as unit tests are built with +the older Makefile infrastructure, and will go away later. -The source code is highly modularized, split across many files to -facilitate building of all of these components with as little duplicated -compilation as possible. There can be considered to be two distinct -groups of files, those which are independent of the QEMU emulation -target and those which are dependent on the QEMU emulation target. +Files linked into emulator targets there can be split into two distinct groups +of files, those which are independent of the QEMU emulation target and +those which are dependent on the QEMU emulation target. In the target-independent set lives various general purpose helper code, such as error handling infrastructure, standard data structures, platform portability wrapper functions, etc. This code can be compiled once only and the .o files linked into all output binaries. +Target-independent code lives in the common_ss, softmmu_ss and user_ss +sourcesets. common_ss is linked into all emulators, softmmu_ss only +in system emulators, user_ss only in user-mode emulators. In the target-dependent set lives CPU emulation, device emulation and much glue code. This sometimes also has to be compiled multiple times, once for each target being built. -The utility code that is used by all binaries is built into a -static archive called libqemuutil.a, which is then linked to all the -binaries. In order to provide hooks that are only needed by some of the -binaries, code in libqemuutil.a may depend on other functions that are -not fully implemented by all QEMU binaries. Dummy stubs for all these -functions are also provided by this library, and will only be linked +All binaries link with a static library libqemuutil.a, which is then +linked to all the binaries. libqemuutil.a is built from several +sourcesets; most of them however host generated code, and the only two +of general interest are util_ss and stub_ss. + +The separation between these two is purely for documentation purposes. +util_ss contains generic utility files. Even though this code is only +linked in some binaries, sometimes it requires hooks only in some of +these and depend on other functions that are not fully implemented by +all QEMU binaries. stub_ss links dummy stubs that will only be linked into the binary if the real implementation is not present. In a way, the stubs can be thought of as a portable implementation of the weak symbols concept. -All binaries should link to libqemuutil.a, e.g.: +The following files concur in the definition of which files are linked +into each emulator: - qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a +- default-configs/*.mak +The files under default-configs/ control what emulated hardware is built +into each QEMU system and userspace emulator targets. They merely contain +a list of config variable definitions like the machines that should be +included. For example, default-configs/aarch64-softmmu.mak has: -Windows platform portability ----------------------------- + include arm-softmmu.mak + CONFIG_XLNX_ZYNQMP_ARM=y + CONFIG_XLNX_VERSAL=y -On Windows, all binaries have the suffix '.exe', so all Makefile rules -which create binaries must include the $(EXESUF) variable on the binary -name. e.g. +These files rarely need changing unless new devices / hardware need to +be enabled for a particular system/userspace emulation target - qemu-img$(EXESUF): qemu-img.o ..snip.. +- */Kconfig -This expands to '.exe' on Windows, or '' on other platforms. +These files are processed together with default-configs/*.mak and +describe the dependencies between various features, subsystems and +device models. They are described in kconfig.rst. + + +Support scripts +--------------- + +Meson has a special convention for invoking Python scripts: if their +first line is "#! /usr/bin/env python3" and the file is *not* executable, +find_program() arranges to invoke the script under the same Python +interpreter that was used to invoke Meson. This is the most common +and preferred way to invoke support scripts from Meson build files, +because it automatically uses the value of configure's --python= option. -A further complication for the system emulator binaries is that -two separate binaries need to be generated. +In case the script is not written in Python, use a "#! /usr/bin/env ..." +line and make the script executable. -The main binary (e.g. qemu-system-x86_64.exe) is linked against the -Windows console runtime subsystem. These are expected to be run from a -command prompt window, and so will print stderr to the console that -launched them. +Scripts written in Python, where it is desirable to make the script +executable (for example for test scripts that developers may want to +invoke from the command line, such as tests/qapi-schema/test-qapi.py), +should be invoked through the "python" variable in meson.build. For +example: -The second binary generated has a 'w' on the end of its name (e.g. -qemu-system-x86_64w.exe) and is linked against the Windows graphical -runtime subsystem. These are expected to be run directly from the -desktop and will open up a dedicated console window for stderr output. + test('QAPI schema regression tests', python, + args: files('test-qapi.py'), + env: test_env, suite: ['qapi-schema', 'qapi-frontend']) -The Makefile.target will generate the binary for the graphical subsystem -first, and then use objcopy to relink it against the console subsystem -to generate the second binary. +This is needed to obey the --python= option passed to the configure +script, which may point to something other than the first python3 +binary on the path. -Object variable naming ----------------------- +Stage 3: makefiles +================== + +The use of GNU make is required with the QEMU build system. + +The output of Meson is a build.ninja file, which is used with the Ninja +build system. QEMU uses a different approach, where Makefile rules are +synthesized from the build.ninja file. The main Makefile includes these +rules and wraps them so that e.g. submodules are built before QEMU. +The resulting build system is largely non-recursive in nature, in +contrast to common practices seen with automake. + +Tests are also ran by the Makefile with the traditional "make check" +phony target. Meson test suites such as "unit" can be ran with "make +check-unit" too. It is also possible to run tests defined in meson.build +with "meson test". + +The following text is only relevant for unit tests which still have to +be converted to Meson. + +All binaries should link to libqemuutil.a, e.g.: + + qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a + +On Windows, all binaries have the suffix '.exe', so all Makefile rules +which create binaries must include the $(EXESUF) variable on the binary +name. e.g. + + qemu-img$(EXESUF): qemu-img.o ..snip.. + +This expands to '.exe' on Windows, or '' on other platforms. + +Variable naming +--------------- The QEMU convention is to define variables to list different groups of -object files. These are named with the convention $PREFIX-obj-y. For -example the libqemuutil.a file will be linked with all objects listed -in a variable 'util-obj-y'. So, for example, util/Makefile.obj will -contain a set of definitions looking like +object files. These are named with the convention $PREFIX-obj-y. The +Meson "chardev" variable in the previous example corresponds to a +variable 'chardev-obj-y'. - util-obj-y += bitmap.o bitops.o hbitmap.o - util-obj-y += fifo8.o - util-obj-y += acl.o - util-obj-y += error.o qemu-error.o +Likewise, tests that are executed by "make check-unit" are grouped into +a variable check-unit-y, like this: -When there is an object file which needs to be conditionally built based + check-unit-y += tests/test-visitor-serialization$(EXESUF) + check-unit-y += tests/test-iov$(EXESUF) + check-unit-y += tests/test-bitmap$(EXESUF) + +When a test or object file which needs to be conditionally built based on some characteristic of the host system, the configure script will define a variable for the conditional. For example, on Windows it will define $(CONFIG_POSIX) with a value of 'n' and $(CONFIG_WIN32) with a value of 'y'. It is now possible to use the config variables when listing object files. For example, - util-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o - util-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o + check-unit-$(CONFIG_POSIX) += tests/test-vmstate$(EXESUF) On Windows this expands to - util-obj-y += oslib-win32.o qemu-thread-win32.o - util-obj-n += oslib-posix.o qemu-thread-posix.o + check-unit-n += tests/vmstate.exe -Since libqemutil.a links in $(util-obj-y), the POSIX specific files -listed against $(util-obj-n) are ignored on the Windows platform builds. +Since the "check-unit" target only runs tests included in "$(check-unit-y)", +POSIX specific tests listed in $(util-obj-n) are ignored on the Windows +platform builds. CFLAGS / LDFLAGS / LIBS handling @@ -316,27 +371,25 @@ avoided in QEMU, since it would apply to too many build targets. Flags that are needed by any QEMU code (i.e. everything *except* GIT submodule projects) are put in $(QEMU_CFLAGS) variable. For linker flags the $(LIBS) variable is sometimes used, but a couple of more -targeted variables are preferred. $(libs_softmmu) is used for -libraries that must be linked to system emulator targets, $(LIBS_TOOLS) -is used for tools like qemu-img, qemu-nbd, etc and $(LIBS_QGA) is used -for the QEMU guest agent. There is currently no specific variable for -the userspace emulator targets as the global $(LIBS), or more targeted -variables shown below, are sufficient. +targeted variables are preferred. In addition to these variables, it is possible to provide cflags and libs against individual source code files, by defining variables of the -form $FILENAME-cflags and $FILENAME-libs. For example, the curl block -driver needs to link to the libcurl library, so block/Makefile defines -some variables: +form $FILENAME-cflags and $FILENAME-libs. For example, the test +test-crypto-tlscredsx509 needs to link to the libtasn1 library, +so tests/Makefile.include defines some variables: - curl.o-cflags := $(CURL_CFLAGS) - curl.o-libs := $(CURL_LIBS) + tests/crypto-tls-x509-helpers.o-cflags := $(TASN1_CFLAGS) + tests/crypto-tls-x509-helpers.o-libs := $(TASN1_LIBS) The scope is a little different between the two variables. The libs get used when linking any target binary that includes the curl.o object file, while the cflags get used when compiling the curl.c file only. +Important files for the build system +==================================== + Statically defined files ------------------------ @@ -348,81 +401,26 @@ number of dynamically created files listed later. The main entry point used when invoking make to build all the components of QEMU. The default 'all' target will naturally result in the build of -every component. The various tools and helper binaries are built +every component. Makefile takes care of recursively building submodules directly via a non-recursive set of rules. -Each system/userspace emulation target needs to have a slightly -different set of make rules / variables. Thus, make will be recursively -invoked for each of the emulation targets. - -The recursive invocation will end up processing the toplevel -Makefile.target file (more on that later). - - -- */Makefile.objs - -Since the source code is spread across multiple directories, the rules -for each file are similarly modularized. Thus each subdirectory -containing .c files will usually also contain a Makefile.objs file. -These files are not directly invoked by a recursive make, but instead -they are imported by the top level Makefile and/or Makefile.target - -Each Makefile.objs usually just declares a set of variables listing the -.o files that need building from the source files in the directory. They -will also define any custom linker or compiler flags. For example in -block/Makefile.objs - - block-obj-$(CONFIG_LIBISCSI) += iscsi.o - block-obj-$(CONFIG_CURL) += curl.o - - ..snip... +- Makefile.objs - iscsi.o-cflags := $(LIBISCSI_CFLAGS) - iscsi.o-libs := $(LIBISCSI_LIBS) - curl.o-cflags := $(CURL_CFLAGS) - curl.o-libs := $(CURL_LIBS) +Defines *-obj-y files corresponding to -If there are any rules defined in the Makefile.objs file, they should -all use $(obj) as a prefix to the target, e.g. - - $(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp - - -- Makefile.target - -This file provides the entry point used to build each individual system -or userspace emulator target. Each enabled target has its own -subdirectory. For example if configure is run with the argument -'--target-list=x86_64-softmmu', then a sub-directory 'x86_64-softmmu' -will be created, containing a 'Makefile' which symlinks back to -Makefile.target - -So when the recursive '$(MAKE) -C x86_64-softmmu' is invoked, it ends up -using Makefile.target for the build rules. +- */meson.build +The meson.build file in the root directory is the main entry point for the +Meson build system, and it coordinates the configuration and build of all +executables. Build rules for various subdirectories are included in +other meson.build files spread throughout the QEMU source tree. - rules.mak This file provides the generic helper rules for invoking build tools, in particular the compiler and linker. - -- default-configs/*.mak - -The files under default-configs/ control what emulated hardware is built -into each QEMU system and userspace emulator targets. They merely contain -a list of config variable definitions like the machines that should be -included. For example, default-configs/aarch64-softmmu.mak has: - - include arm-softmmu.mak - CONFIG_XLNX_ZYNQMP_ARM=y - CONFIG_XLNX_VERSAL=y - -These files rarely need changing unless new devices / hardware need to -be enabled for a particular system/userspace emulation target - - -- tests/Makefile +- tests/Makefile.include Rules for building the unit tests. This file is included directly by the top level Makefile, so anything defined in this file will influence the @@ -435,11 +433,11 @@ Rules for Docker tests. Like tests/Makefile, this file is included directly by the top level Makefile, anything defined in this file will influence the entire build system. -- po/Makefile - -Rules for building and installing the binary message catalogs from the -text .po file sources. This almost never needs changing for any reason. +- tests/vm/Makefile.include +Rules for VM-based tests. Like tests/Makefile, this file is included +directly by the top level Makefile, anything defined in this file will +influence the entire build system. Dynamically created files ------------------------- @@ -450,6 +448,7 @@ the need for QEMU makefiles to go through any pre-processing as seen with autotools, where Makefile.am generates Makefile.in which generates Makefile. +Built by configure: - config-host.mak @@ -457,27 +456,17 @@ When configure has determined the characteristics of the build host it will write a long list of variables to config-host.mak file. This provides the various install directories, compiler / linker flags and a variety of CONFIG_* variables related to optionally enabled features. -This is imported by the top level Makefile in order to tailor the build -output. +This is imported by the top level Makefile and meson.build in order to +tailor the build output. + +config-host.mak is also used as a dependency checking mechanism. If make +sees that the modification timestamp on configure is newer than that on +config-host.mak, then configure will be re-run. The variables defined here are those which are applicable to all QEMU build outputs. Variables which are potentially different for each emulator target are defined by the next file... -It is also used as a dependency checking mechanism. If make sees that -the modification timestamp on configure is newer than that on -config-host.mak, then configure will be re-run. - - -- config-host.h - -The config-host.h file is used by source code to determine what features -are enabled. It is generated from the contents of config-host.mak using -the scripts/create_config program. This extracts all the CONFIG_* variables, -most of the HOST_* variables and a few other misc variables from -config-host.mak, formatting them as C preprocessor macros. - - - $TARGET-NAME/config-target.mak TARGET-NAME is the name of a system or userspace emulator, for example, @@ -488,19 +477,42 @@ the target and any other potential custom libraries needed for linking the target. -- $TARGET-NAME/config-devices.mak +Built by Meson: + +- ${TARGET-NAME}-config-devices.mak TARGET-NAME is again the name of a system or userspace emulator. The config-devices.mak file is automatically generated by make using the scripts/make_device_config.sh program, feeding it the default-configs/$TARGET-NAME file as input. +- config-host.h +- $TARGET-NAME/config-target.h +- $TARGET-NAME/config-devices.h + +These files are used by source code to determine what features +are enabled. They are generated from the contents of the corresponding +*.h files using the scripts/create_config program. This extracts +relevant variables and formats them as C preprocessor macros. + +- build.ninja + + +Built by Makefile: + +- Makefile.ninja: + +A Makefile conversion of the build rules in build.ninja. The conversion +is straightforward and, were it necessary to debug the rules produced +by Meson, it should be enough to look at build.ninja. The conversion +is performed by scripts/ninjatool.py. -- $TARGET-NAME/Makefile +- Makefile.mtest: -This is the entrypoint used when make recurses to build a single system -or userspace emulator target. It is merely a symlink back to the -Makefile.target in the top level. +The Makefile definitions that let "make check" run tests defined in +meson.build. The rules are produced from Meson's JSON description of +tests (obtained with "meson introspect --tests") through the script +scripts/mtest2make.py. Useful make targets From patchwork Fri Aug 21 10:23:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 275893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89113C433DF for ; Fri, 21 Aug 2020 11:24:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4384B2054F for ; Fri, 21 Aug 2020 11:24:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GEYNdx0q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4384B2054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k959k-0007C6-Fb for qemu-devel@archiver.kernel.org; Fri, 21 Aug 2020 07:24:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k94F9-0004OX-4V for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:55 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59293 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k94Em-00021K-L9 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 06:25:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598005531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4tZIRfs6tAqf83MlwkM87wDXpTQiCMWVriP0/p+NLWs=; b=GEYNdx0q+Bd9m5fFvtIx094fyxoMsjAbBWkn9HpvRDTcy9c7+KbzLa0OlPerUOLObqZ3R8 aRJh6VMgU35iDri3+ApfqdSr3GK6VebQrdv7NV1w6gJQ0L7GE/yQTIdvgNfZxLjmpGHsHj ZSgRfWQUM22K+9Yj3c+3pQT3JhainPs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-oNYmAa-JMayvKFCOlTp9YA-1; Fri, 21 Aug 2020 06:25:27 -0400 X-MC-Unique: oNYmAa-JMayvKFCOlTp9YA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D2F29100CF73 for ; Fri, 21 Aug 2020 10:25:26 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E90260BF1 for ; Fri, 21 Aug 2020 10:25:26 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL v8 152/152] docs: convert build system documentation to rST Date: Fri, 21 Aug 2020 06:23:29 -0400 Message-Id: <20200821102329.29777-153-pbonzini@redhat.com> In-Reply-To: <20200821102329.29777-1-pbonzini@redhat.com> References: <20200821102329.29777-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=pbonzini@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/21 04:55:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini --- .../{build-system.txt => build-system.rst} | 310 ++++++++---------- docs/devel/index.rst | 1 + 2 files changed, 142 insertions(+), 169 deletions(-) rename docs/devel/{build-system.txt => build-system.rst} (62%) diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.rst similarity index 62% rename from docs/devel/build-system.txt rename to docs/devel/build-system.rst index 2ced8ca474..58bf392430 100644 --- a/docs/devel/build-system.txt +++ b/docs/devel/build-system.rst @@ -1,5 +1,6 @@ - The QEMU build system architecture - ================================== +================================== +The QEMU build system architecture +================================== This document aims to help developers understand the architecture of the QEMU build system. As with projects using GNU autotools, the QEMU build @@ -26,7 +27,7 @@ Because QEMU uses the Meson build system under the hood, only VPATH builds are supported. There are two general ways to invoke configure & perform a build: - - VPATH, build artifacts outside of QEMU source tree entirely + - VPATH, build artifacts outside of QEMU source tree entirely:: cd ../ mkdir build @@ -34,7 +35,7 @@ perform a build: ../qemu/configure make - - VPATH, build artifacts in a subdir of QEMU source tree + - VPATH, build artifacts in a subdir of QEMU source tree:: mkdir build cd build @@ -52,21 +53,21 @@ following tasks: - Add a Meson build option to meson_options.txt. - Add support to the command line arg parser to handle any new - --enable-XXX / --disable-XXX flags required by the feature XXX. + `--enable-XXX`/`--disable-XXX` flags required by the feature. - Add information to the help output message to report on the new feature flag. - Add code to perform the actual feature check. - - Add code to include the feature status in config-host.h + - Add code to include the feature status in `config-host.h` - Add code to print out the feature status in the configure summary upon completion. Taking the probe for SDL as an example, we have the following pieces -in configure: +in configure:: # Initial variable state sdl=auto @@ -89,11 +90,11 @@ in configure: # Meson invocation -Dsdl=$sdl -In meson_options.txt: +In meson_options.txt:: option('sdl', type : 'feature', value : 'auto') -In meson.build: +In meson.build:: # Detect dependency sdl = dependency('sdl2', @@ -114,63 +115,51 @@ Helper functions The configure script provides a variety of helper functions to assist developers in checking for system features: - - do_cc $ARGS... - +`do_cc $ARGS...` Attempt to run the system C compiler passing it $ARGS... - - do_cxx $ARGS... - +`do_cxx $ARGS...` Attempt to run the system C++ compiler passing it $ARGS... - - compile_object $CFLAGS - +`compile_object $CFLAGS` Attempt to compile a test program with the system C compiler using $CFLAGS. The test program must have been previously written to a file called $TMPC. - - compile_prog $CFLAGS $LDFLAGS - +`compile_prog $CFLAGS $LDFLAGS` Attempt to compile a test program with the system C compiler using $CFLAGS and link it with the system linker using $LDFLAGS. The test program must have been previously written to a file called $TMPC. - - has $COMMAND - +`has $COMMAND` Determine if $COMMAND exists in the current environment, either as a shell builtin, or executable binary, returning 0 on success. - - path_of $COMMAND - +`path_of $COMMAND` Return the fully qualified path of $COMMAND, printing it to stdout, and returning 0 on success. - - check_define $NAME - +`check_define $NAME` Determine if the macro $NAME is defined by the system C compiler - - check_include $NAME - +`check_include $NAME` Determine if the include $NAME file is available to the system C compiler - - write_c_skeleton - +`write_c_skeleton` Write a minimal C program main() function to the temporary file indicated by $TMPC - - feature_not_found $NAME $REMEDY - +`feature_not_found $NAME $REMEDY` Print a message to stderr that the feature $NAME was not available on the system, suggesting the user try $REMEDY to address the problem. - - error_exit $MESSAGE $MORE... - +`error_exit $MESSAGE $MORE...` Print $MESSAGE to stderr, followed by $MORE... and then exit from the configure script with non-zero status - - query_pkg_config $ARGS... - +`query_pkg_config $ARGS...` Run pkg-config passing it $ARGS. If QEMU is doing a static build, then --static will be automatically added to $ARGS @@ -182,9 +171,13 @@ The Meson build system is currently used to describe the build process for: 1) executables, which include: + - Tools - qemu-img, qemu-nbd, qga (guest agent), etc + - System emulators - qemu-system-$ARCH + - Userspace emulators - qemu-$ARCH + - Some (but not all) unit tests 2) documentation @@ -200,9 +193,9 @@ to list the files and their dependency on various configuration symbols. Various subsystems that are common to both tools and emulators have -their own sourceset, for example block_ss for the block device subsystem, -chardev_ss for the character device subsystem, etc. These sourcesets -are then turned into static libraries as follows: +their own sourceset, for example `block_ss` for the block device subsystem, +`chardev_ss` for the character device subsystem, etc. These sourcesets +are then turned into static libraries as follows:: libchardev = static_library('chardev', chardev_ss.sources(), name_suffix: 'fa', @@ -210,7 +203,7 @@ are then turned into static libraries as follows: chardev = declare_dependency(link_whole: libchardev) -The special ".fa" suffix is needed as long as unit tests are built with +The special `.fa` suffix is needed as long as unit tests are built with the older Makefile infrastructure, and will go away later. Files linked into emulator targets there can be split into two distinct groups @@ -221,24 +214,24 @@ In the target-independent set lives various general purpose helper code, such as error handling infrastructure, standard data structures, platform portability wrapper functions, etc. This code can be compiled once only and the .o files linked into all output binaries. -Target-independent code lives in the common_ss, softmmu_ss and user_ss -sourcesets. common_ss is linked into all emulators, softmmu_ss only -in system emulators, user_ss only in user-mode emulators. +Target-independent code lives in the `common_ss`, `softmmu_ss` and +`user_ss` sourcesets. `common_ss` is linked into all emulators, `softmmu_ss` +only in system emulators, `user_ss` only in user-mode emulators. In the target-dependent set lives CPU emulation, device emulation and much glue code. This sometimes also has to be compiled multiple times, once for each target being built. -All binaries link with a static library libqemuutil.a, which is then -linked to all the binaries. libqemuutil.a is built from several +All binaries link with a static library `libqemuutil.a`, which is then +linked to all the binaries. `libqemuutil.a` is built from several sourcesets; most of them however host generated code, and the only two -of general interest are util_ss and stub_ss. +of general interest are `util_ss` and `stub_ss`. The separation between these two is purely for documentation purposes. -util_ss contains generic utility files. Even though this code is only +`util_ss` contains generic utility files. Even though this code is only linked in some binaries, sometimes it requires hooks only in some of these and depend on other functions that are not fully implemented by -all QEMU binaries. stub_ss links dummy stubs that will only be linked +all QEMU binaries. `stub_ss` links dummy stubs that will only be linked into the binary if the real implementation is not present. In a way, the stubs can be thought of as a portable implementation of the weak symbols concept. @@ -246,45 +239,43 @@ symbols concept. The following files concur in the definition of which files are linked into each emulator: -- default-configs/*.mak +`default-configs/*.mak` + The files under default-configs/ control what emulated hardware is built + into each QEMU system and userspace emulator targets. They merely contain + a list of config variable definitions like the machines that should be + included. For example, default-configs/aarch64-softmmu.mak has:: -The files under default-configs/ control what emulated hardware is built -into each QEMU system and userspace emulator targets. They merely contain -a list of config variable definitions like the machines that should be -included. For example, default-configs/aarch64-softmmu.mak has: + include arm-softmmu.mak + CONFIG_XLNX_ZYNQMP_ARM=y + CONFIG_XLNX_VERSAL=y - include arm-softmmu.mak - CONFIG_XLNX_ZYNQMP_ARM=y - CONFIG_XLNX_VERSAL=y +`*/Kconfig` + These files are processed together with `default-configs/*.mak` and + describe the dependencies between various features, subsystems and + device models. They are described in kconfig.rst. These files rarely need changing unless new devices / hardware need to be enabled for a particular system/userspace emulation target -- */Kconfig - -These files are processed together with default-configs/*.mak and -describe the dependencies between various features, subsystems and -device models. They are described in kconfig.rst. - Support scripts --------------- Meson has a special convention for invoking Python scripts: if their -first line is "#! /usr/bin/env python3" and the file is *not* executable, +first line is `#! /usr/bin/env python3` and the file is *not* executable, find_program() arranges to invoke the script under the same Python interpreter that was used to invoke Meson. This is the most common and preferred way to invoke support scripts from Meson build files, because it automatically uses the value of configure's --python= option. -In case the script is not written in Python, use a "#! /usr/bin/env ..." +In case the script is not written in Python, use a `#! /usr/bin/env ...` line and make the script executable. Scripts written in Python, where it is desirable to make the script executable (for example for test scripts that developers may want to invoke from the command line, such as tests/qapi-schema/test-qapi.py), -should be invoked through the "python" variable in meson.build. For -example: +should be invoked through the `python` variable in meson.build. For +example:: test('QAPI schema regression tests', python, args: files('test-qapi.py'), @@ -307,35 +298,35 @@ rules and wraps them so that e.g. submodules are built before QEMU. The resulting build system is largely non-recursive in nature, in contrast to common practices seen with automake. -Tests are also ran by the Makefile with the traditional "make check" -phony target. Meson test suites such as "unit" can be ran with "make -check-unit" too. It is also possible to run tests defined in meson.build -with "meson test". +Tests are also ran by the Makefile with the traditional `make check` +phony target. Meson test suites such as `unit` can be ran with `make +check-unit` too. It is also possible to run tests defined in meson.build +with `meson test`. The following text is only relevant for unit tests which still have to be converted to Meson. -All binaries should link to libqemuutil.a, e.g.: +All binaries should link to `libqemuutil.a`, e.g.: qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a -On Windows, all binaries have the suffix '.exe', so all Makefile rules +On Windows, all binaries have the suffix `.exe`, so all Makefile rules which create binaries must include the $(EXESUF) variable on the binary name. e.g. qemu-img$(EXESUF): qemu-img.o ..snip.. -This expands to '.exe' on Windows, or '' on other platforms. +This expands to `.exe` on Windows, or an empty string on other platforms. Variable naming --------------- The QEMU convention is to define variables to list different groups of object files. These are named with the convention $PREFIX-obj-y. The -Meson "chardev" variable in the previous example corresponds to a +Meson `chardev` variable in the previous example corresponds to a variable 'chardev-obj-y'. -Likewise, tests that are executed by "make check-unit" are grouped into +Likewise, tests that are executed by `make check-unit` are grouped into a variable check-unit-y, like this: check-unit-y += tests/test-visitor-serialization$(EXESUF) @@ -355,8 +346,8 @@ On Windows this expands to check-unit-n += tests/vmstate.exe -Since the "check-unit" target only runs tests included in "$(check-unit-y)", -POSIX specific tests listed in $(util-obj-n) are ignored on the Windows +Since the `check-unit` target only runs tests included in `$(check-unit-y)`, +POSIX specific tests listed in `$(util-obj-n)` are ignored on the Windows platform builds. @@ -397,47 +388,37 @@ The following key files are statically defined in the source tree, with the rules needed to build QEMU. Their behaviour is influenced by a number of dynamically created files listed later. -- Makefile - -The main entry point used when invoking make to build all the components -of QEMU. The default 'all' target will naturally result in the build of -every component. Makefile takes care of recursively building submodules -directly via a non-recursive set of rules. - -- Makefile.objs - -Defines *-obj-y files corresponding to - -- */meson.build - -The meson.build file in the root directory is the main entry point for the -Meson build system, and it coordinates the configuration and build of all -executables. Build rules for various subdirectories are included in -other meson.build files spread throughout the QEMU source tree. - -- rules.mak - -This file provides the generic helper rules for invoking build tools, in -particular the compiler and linker. - -- tests/Makefile.include - -Rules for building the unit tests. This file is included directly by the -top level Makefile, so anything defined in this file will influence the -entire build system. Care needs to be taken when writing rules for tests -to ensure they only apply to the unit test execution / build. - -- tests/docker/Makefile.include - -Rules for Docker tests. Like tests/Makefile, this file is included -directly by the top level Makefile, anything defined in this file will -influence the entire build system. - -- tests/vm/Makefile.include - -Rules for VM-based tests. Like tests/Makefile, this file is included -directly by the top level Makefile, anything defined in this file will -influence the entire build system. +`Makefile` + The main entry point used when invoking make to build all the components + of QEMU. The default 'all' target will naturally result in the build of + every component. Makefile takes care of recursively building submodules + directly via a non-recursive set of rules. + +`*/meson.build` + The meson.build file in the root directory is the main entry point for the + Meson build system, and it coordinates the configuration and build of all + executables. Build rules for various subdirectories are included in + other meson.build files spread throughout the QEMU source tree. + +`rules.mak` + This file provides the generic helper rules for invoking build tools, in + particular the compiler and linker. + +`tests/Makefile.include` + Rules for building the unit tests. This file is included directly by the + top level Makefile, so anything defined in this file will influence the + entire build system. Care needs to be taken when writing rules for tests + to ensure they only apply to the unit test execution / build. + +`tests/docker/Makefile.include` + Rules for Docker tests. Like tests/Makefile, this file is included + directly by the top level Makefile, anything defined in this file will + influence the entire build system. + +`tests/vm/Makefile.include` + Rules for VM-based tests. Like tests/Makefile, this file is included + directly by the top level Makefile, anything defined in this file will + influence the entire build system. Dynamically created files ------------------------- @@ -450,79 +431,70 @@ Makefile. Built by configure: -- config-host.mak - -When configure has determined the characteristics of the build host it -will write a long list of variables to config-host.mak file. This -provides the various install directories, compiler / linker flags and a -variety of CONFIG_* variables related to optionally enabled features. -This is imported by the top level Makefile and meson.build in order to -tailor the build output. - -config-host.mak is also used as a dependency checking mechanism. If make -sees that the modification timestamp on configure is newer than that on -config-host.mak, then configure will be re-run. +`config-host.mak` + When configure has determined the characteristics of the build host it + will write a long list of variables to config-host.mak file. This + provides the various install directories, compiler / linker flags and a + variety of `CONFIG_*` variables related to optionally enabled features. + This is imported by the top level Makefile and meson.build in order to + tailor the build output. -The variables defined here are those which are applicable to all QEMU -build outputs. Variables which are potentially different for each -emulator target are defined by the next file... + config-host.mak is also used as a dependency checking mechanism. If make + sees that the modification timestamp on configure is newer than that on + config-host.mak, then configure will be re-run. -- $TARGET-NAME/config-target.mak + The variables defined here are those which are applicable to all QEMU + build outputs. Variables which are potentially different for each + emulator target are defined by the next file... -TARGET-NAME is the name of a system or userspace emulator, for example, -x86_64-softmmu denotes the system emulator for the x86_64 architecture. -This file contains the variables which need to vary on a per-target -basis. For example, it will indicate whether KVM or Xen are enabled for -the target and any other potential custom libraries needed for linking -the target. +`$TARGET-NAME/config-target.mak` + TARGET-NAME is the name of a system or userspace emulator, for example, + x86_64-softmmu denotes the system emulator for the x86_64 architecture. + This file contains the variables which need to vary on a per-target + basis. For example, it will indicate whether KVM or Xen are enabled for + the target and any other potential custom libraries needed for linking + the target. Built by Meson: -- ${TARGET-NAME}-config-devices.mak - -TARGET-NAME is again the name of a system or userspace emulator. The -config-devices.mak file is automatically generated by make using the -scripts/make_device_config.sh program, feeding it the -default-configs/$TARGET-NAME file as input. - -- config-host.h -- $TARGET-NAME/config-target.h -- $TARGET-NAME/config-devices.h +`${TARGET-NAME}-config-devices.mak` + TARGET-NAME is again the name of a system or userspace emulator. The + config-devices.mak file is automatically generated by make using the + scripts/make_device_config.sh program, feeding it the + default-configs/$TARGET-NAME file as input. -These files are used by source code to determine what features -are enabled. They are generated from the contents of the corresponding -*.h files using the scripts/create_config program. This extracts -relevant variables and formats them as C preprocessor macros. +`config-host.h`, `$TARGET-NAME/config-target.h`, `$TARGET-NAME/config-devices.h` + These files are used by source code to determine what features + are enabled. They are generated from the contents of the corresponding + `*.h` files using the scripts/create_config program. This extracts + relevant variables and formats them as C preprocessor macros. -- build.ninja +`build.ninja` + The build rules. Built by Makefile: -- Makefile.ninja: +`Makefile.ninja` + A Makefile conversion of the build rules in build.ninja. The conversion + is straightforward and, were it necessary to debug the rules produced + by Meson, it should be enough to look at build.ninja. The conversion + is performed by scripts/ninjatool.py. -A Makefile conversion of the build rules in build.ninja. The conversion -is straightforward and, were it necessary to debug the rules produced -by Meson, it should be enough to look at build.ninja. The conversion -is performed by scripts/ninjatool.py. - -- Makefile.mtest: - -The Makefile definitions that let "make check" run tests defined in -meson.build. The rules are produced from Meson's JSON description of -tests (obtained with "meson introspect --tests") through the script -scripts/mtest2make.py. +`Makefile.mtest` + The Makefile definitions that let "make check" run tests defined in + meson.build. The rules are produced from Meson's JSON description of + tests (obtained with "meson introspect --tests") through the script + scripts/mtest2make.py. Useful make targets -=================== - -- help +------------------- +`help` Print a help message for the most common build targets. -- print-VAR - +`print-VAR` Print the value of the variable VAR. Useful for debugging the build system. diff --git a/docs/devel/index.rst b/docs/devel/index.rst index ae6eac7c9c..04773ce076 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -13,6 +13,7 @@ Contents: .. toctree:: :maxdepth: 2 + build-system kconfig loads-stores memory