From patchwork Thu Aug 6 19:13:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276997 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.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, NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 5AE7BC433DF for ; Thu, 6 Aug 2020 19:18: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 72E772177B for ; Thu, 6 Aug 2020 19:18:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QqChSPCG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72E772177B 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]:59440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lOq-0005Ad-8u for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:18:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNa-0003Lj-B4 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:42 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:32118 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 1k3lNX-0006LX-ET for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741398; 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=7YfJeKoZjmp5EjXaiy91R897KhxVAZLBJndd9VXwKjc=; b=QqChSPCGZmNnEWjBfOq6rUKSOlrDGFR0RODcVNyAFJkjYyPW2rj6NsOLj04nBFFCcfT65m PqCHhy1mblWPyVrIujoxiqccLaK4i7kv1d7wiTRhd+CzNbAdXkbP6HQr6EqLy+P2q0AYGd hu4fQJlTpgDWzLy3qyP3JdZlf5qO2uo= 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-450-zKqls8rSPdyech_rx3xVsA-1; Thu, 06 Aug 2020 15:16:34 -0400 X-MC-Unique: zKqls8rSPdyech_rx3xVsA-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 BA3FB100AA21 for ; Thu, 6 Aug 2020 19:16:33 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 477675FC3B; Thu, 6 Aug 2020 19:16:29 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 002/143] optionrom: simplify Makefile Date: Thu, 6 Aug 2020 21:13:58 +0200 Message-Id: <1596741379-12902-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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 e33a24d..51cb6ca 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 Thu Aug 6 19:13:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276996 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.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, NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 06967C433DF for ; Thu, 6 Aug 2020 19:18:32 +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 1DF0A2177B for ; Thu, 6 Aug 2020 19:18:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="h0Vf30wj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DF0A2177B 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]:33938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lPK-0006K8-Tt for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:18:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNY-0003Hh-HJ for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:40 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:21411 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 1k3lNW-0006LQ-DU for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=XDkvMZnWn0eJwTIJasaXF44woETmBaZrfqZT2eBCLS8=; b=h0Vf30wjUSV26U3W1pG+wiBKEXs7BC+WAmZYB3oe1sPqjan70TNAXaD19+3yPqVUiOwZwC w43U+OKbGDGGUGOqpVigZwg1tKHwvdpuuxdxtGkyJo2yNAzjthBp1vt5QN7+y64RMhM6UJ 67pLHZJr7Ji8GJs1eF4zIn1KsEMqOIU= 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-365-2wS1djlvOD6p3UHtaguHNA-1; Thu, 06 Aug 2020 15:16:35 -0400 X-MC-Unique: 2wS1djlvOD6p3UHtaguHNA-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 DB9E1100AA23 for ; Thu, 6 Aug 2020 19:16:34 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 304FF1D3 for ; Thu, 6 Aug 2020 19:16:33 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 003/143] pc-bios/s390-ccw: simplify Makefile Date: Thu, 6 Aug 2020 21:13:59 +0200 Message-Id: <1596741379-12902-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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" Make it independent from the rules.mak, and clean up to use pattern rules. Signed-off-by: Paolo Bonzini --- pc-bios/s390-ccw/Makefile | 105 ++++++++++++++++++++++++++++++++++--------- pc-bios/s390-ccw/netboot.mak | 62 ------------------------- 2 files changed, 84 insertions(+), 83 deletions(-) delete mode 100644 pc-bios/s390-ccw/netboot.mak diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 50bc880..8c266ab 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -1,41 +1,102 @@ -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: # 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/s390-ccw) +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) -.PHONY : all clean build-all +override CFLAGS += $(filter -W%, $(QEMU_CFLAGS)) +override CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float +override CFLAGS += -march=z900 -fPIE -fno-strict-aliasing +override CFLAGS += -fno-asynchronous-unwind-tables +override CFLAGS += $(call cc-option, -fno-stack-protector) +LDFLAGS += -Wl,-pie -nostdlib OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \ virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o -QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) -QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float -QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing -QEMU_CFLAGS += -fno-asynchronous-unwind-tables -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) -LDFLAGS += -Wl,-pie -nostdlib +STRIP ?= strip -build-all: s390-ccw.img s390-netboot.img +$(OBJECTS): Makefile -s390-ccw.elf: $(OBJECTS) - $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@") +SLOF_DIR := $(SRC_PATH)/roms/SLOF -STRIP ?= strip +NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o \ -s390-ccw.img: s390-ccw.elf +LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include +LIBNET_INC := -I$(SLOF_DIR)/lib/libnet + +$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC) + +# libc files: + +LIBC_CFLAGS := $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ + -MMD -MP -MT $@ -MF $(@:%.o=%.d) + + +CTYPE_OBJS = isdigit.o isxdigit.o toupper.o +$(CTYPE_OBJS) : %.o : $(SLOF_DIR)/lib/libc/ctype/%.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +STRING_OBJS = strcat.o strchr.o strrchr.o strcpy.o strlen.o strncpy.o \ + strcmp.o strncmp.o strcasecmp.o strncasecmp.o strstr.o \ + memset.o memcpy.o memmove.o memcmp.o +$(STRING_OBJS) : %.o : $(SLOF_DIR)/lib/libc/string/%.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +STDLIB_OBJS = atoi.o atol.o strtoul.o strtol.o rand.o malloc.o free.o +$(STDLIB_OBJS) : %.o : $(SLOF_DIR)/lib/libc/stdlib/%.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +STDIO_OBJS = sprintf.o snprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \ + printf.o putc.o puts.o putchar.o stdchnls.o fileno.o +$(STDIO_OBJS) : %.o : $(SLOF_DIR)/lib/libc/stdio/%.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +sbrk.o: $(SLOF_DIR)/slof/sbrk.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +LIBCOBJS := $(STRING_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDIO_OBJS) sbrk.o + +libc.a: $(LIBCOBJS) + $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@") + +# libnet files: + +LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \ + dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o +LIBNETCFLAGS := $(CFLAGS) -DDHCPARCH=0x1F $(LIBC_INC) $(LIBNET_INC) \ + -DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d) + +$(LIBNETOBJS) : %.o : $(SLOF_DIR)/lib/libnet/%.c + $(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +libnet.a: $(LIBNETOBJS) + $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@") + +%.elf: + $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@") + +%.img: %.elf $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@") -$(OBJECTS): Makefile +s390-ccw.elf: $(OBJECTS) +s390-ccw.img: s390-ccw.elf +all: s390-ccw.img + +ifneq ($(wildcard $(SLOF_DIR)/lib/libnet),) +s390-netboot.elf: $(NETOBJS) libnet.a libc.a +s390-netboot.elf: LDFLAGS += -Ttext=0x7800000 -ifneq ($(wildcard $(SRC_PATH)/roms/SLOF/lib/libnet),) -include $(SRC_PATH)/pc-bios/s390-ccw/netboot.mak -else -s390-netboot.img: - @echo "s390-netboot.img not built since roms/SLOF/ is not available." +s390-netboot.img: s390-netboot.elf +all: s390-netboot.img endif ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS)) @@ -43,3 +104,5 @@ ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS)) clean: rm -f *.o *.d *.img *.elf *~ *.a + +.PHONY : all clean diff --git a/pc-bios/s390-ccw/netboot.mak b/pc-bios/s390-ccw/netboot.mak deleted file mode 100644 index 577c023..0000000 --- a/pc-bios/s390-ccw/netboot.mak +++ /dev/null @@ -1,62 +0,0 @@ - -SLOF_DIR := $(SRC_PATH)/roms/SLOF - -NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o - -LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include -LIBNET_INC := -I$(SLOF_DIR)/lib/libnet - -NETLDFLAGS := $(LDFLAGS) -Ttext=0x7800000 - -$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC) - -s390-netboot.elf: $(NETOBJS) libnet.a libc.a - $(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@") - -s390-netboot.img: s390-netboot.elf - $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@") - -# libc files: - -LIBC_CFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ - -MMD -MP -MT $@ -MF $(@:%.o=%.d) - -CTYPE_OBJS = isdigit.o isxdigit.o toupper.o -%.o : $(SLOF_DIR)/lib/libc/ctype/%.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -STRING_OBJS = strcat.o strchr.o strrchr.o strcpy.o strlen.o strncpy.o \ - strcmp.o strncmp.o strcasecmp.o strncasecmp.o strstr.o \ - memset.o memcpy.o memmove.o memcmp.o -%.o : $(SLOF_DIR)/lib/libc/string/%.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -STDLIB_OBJS = atoi.o atol.o strtoul.o strtol.o rand.o malloc.o free.o -%.o : $(SLOF_DIR)/lib/libc/stdlib/%.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -STDIO_OBJS = sprintf.o snprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \ - printf.o putc.o puts.o putchar.o stdchnls.o fileno.o -%.o : $(SLOF_DIR)/lib/libc/stdio/%.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -sbrk.o: $(SLOF_DIR)/slof/sbrk.c - $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -LIBCOBJS := $(STRING_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDIO_OBJS) sbrk.o - -libc.a: $(LIBCOBJS) - $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@") - -# libnet files: - -LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \ - dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o -LIBNETCFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ - -DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d) - -%.o : $(SLOF_DIR)/lib/libnet/%.c - $(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -libnet.a: $(LIBNETOBJS) - $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@") From patchwork Thu Aug 6 19:14:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276989 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=-10.1 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, URIBL_BLOCKED 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 26EB3C433E1 for ; Thu, 6 Aug 2020 19:24: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 0F3722177B for ; Thu, 6 Aug 2020 19:24:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MACkH2yo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F3722177B 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]:37142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lVB-0002j5-R2 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:24:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNh-0003ak-C3 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:49 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:34448 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 1k3lNc-0006MS-6l for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=ViL4M2SonYIKoTN7WHiYMCqMdkOIZTWXMAGQiPjVbWk=; b=MACkH2yoJc/kH90B+Voar5NVhhx5B3px5i3lg88oDxf7RUvF9DzkvJ+A1cc2oROBisQ4Nj sNqOYEX+m2++nn2mp89A19CdHZQkRFTZKkA3VEWFeQVXp9TXiOJIwCKEQjnuwUzKZltwMU pW3WUr8Y11uD1x5WIcJlCLkKerR2oU8= 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-hy2xYXCEOsaPu2zaCjkUAg-1; Thu, 06 Aug 2020 15:16:37 -0400 X-MC-Unique: hy2xYXCEOsaPu2zaCjkUAg-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 15B3E107B82D for ; Thu, 6 Aug 2020 19:16:37 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 620411D3 for ; Thu, 6 Aug 2020 19:16:36 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 005/143] meson: rename .inc.c files to .inc Date: Thu, 6 Aug 2020 21:14:01 +0200 Message-Id: <1596741379-12902-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 2 +- .../tcg/{atomic_common.inc.c => atomic_common.inc} | 0 accel/tcg/cputlb.c | 2 +- accel/tcg/user-exec.c | 2 +- contrib/gitdm/filetypes.txt | 2 +- exec.c | 4 +-- ...t-specialize.inc.c => softfloat-specialize.inc} | 0 fpu/softfloat.c | 2 +- include/tcg/tcg.h | 2 +- memory_ldst.inc.c => memory_ldst.inc | 0 scripts/clean-includes | 2 +- target/arm/Makefile.objs | 40 +++++++++++----------- .../{translate-neon.inc.c => translate-neon.inc} | 6 ++-- target/arm/translate-sve.c | 2 +- .../arm/{translate-vfp.inc.c => translate-vfp.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 +- .../{translate_v10.inc.c => translate_v10.inc} | 0 target/hppa/Makefile.objs | 4 +-- target/hppa/translate.c | 2 +- target/mips/translate.c | 2 +- .../{translate_init.inc.c => translate_init.inc} | 0 target/openrisc/Makefile.objs | 6 ++-- target/openrisc/disas.c | 2 +- target/openrisc/translate.c | 2 +- target/ppc/int_helper.c | 2 +- target/ppc/{mfrom_table.inc.c => mfrom_table.inc} | 0 target/ppc/translate.c | 22 ++++++------ .../ppc/translate/{dfp-impl.inc.c => dfp-impl.inc} | 0 .../ppc/translate/{dfp-ops.inc.c => dfp-ops.inc} | 0 .../ppc/translate/{fp-impl.inc.c => fp-impl.inc} | 0 target/ppc/translate/{fp-ops.inc.c => fp-ops.inc} | 0 .../ppc/translate/{spe-impl.inc.c => spe-impl.inc} | 0 .../ppc/translate/{spe-ops.inc.c => spe-ops.inc} | 0 .../ppc/translate/{vmx-impl.inc.c => vmx-impl.inc} | 0 .../ppc/translate/{vmx-ops.inc.c => vmx-ops.inc} | 0 .../ppc/translate/{vsx-impl.inc.c => vsx-impl.inc} | 0 .../ppc/translate/{vsx-ops.inc.c => vsx-ops.inc} | 0 .../{translate_init.inc.c => translate_init.inc} | 0 target/riscv/Makefile.objs | 8 ++--- ...trans_privileged.inc.c => trans_privileged.inc} | 0 .../insn_trans/{trans_rva.inc.c => trans_rva.inc} | 0 .../insn_trans/{trans_rvd.inc.c => trans_rvd.inc} | 0 .../insn_trans/{trans_rvf.inc.c => trans_rvf.inc} | 0 .../insn_trans/{trans_rvh.inc.c => trans_rvh.inc} | 0 .../insn_trans/{trans_rvi.inc.c => trans_rvi.inc} | 0 .../insn_trans/{trans_rvm.inc.c => trans_rvm.inc} | 0 .../insn_trans/{trans_rvv.inc.c => trans_rvv.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 +- .../s390x/{translate_vx.inc.c => translate_vx.inc} | 0 target/xtensa/core-dc232b.c | 4 +-- .../{gdb-config.inc.c => gdb-config.inc} | 0 .../{xtensa-modules.inc.c => xtensa-modules.inc} | 0 target/xtensa/core-dc233c.c | 4 +-- .../{gdb-config.inc.c => gdb-config.inc} | 0 .../{xtensa-modules.inc.c => xtensa-modules.inc} | 0 target/xtensa/core-de212.c | 4 +-- .../{gdb-config.inc.c => gdb-config.inc} | 0 .../{xtensa-modules.inc.c => xtensa-modules.inc} | 0 target/xtensa/core-fsf.c | 2 +- .../{xtensa-modules.inc.c => xtensa-modules.inc} | 0 target/xtensa/core-sample_controller.c | 4 +-- .../{gdb-config.inc.c => gdb-config.inc} | 0 .../{xtensa-modules.inc.c => xtensa-modules.inc} | 0 target/xtensa/core-test_kc705_be.c | 4 +-- .../{gdb-config.inc.c => gdb-config.inc} | 0 .../{xtensa-modules.inc.c => xtensa-modules.inc} | 0 target/xtensa/core-test_mmuhifi_c3.c | 4 +-- .../{gdb-config.inc.c => gdb-config.inc} | 0 .../{xtensa-modules.inc.c => xtensa-modules.inc} | 0 target/xtensa/import_core.sh | 8 ++--- tcg/README | 2 +- tcg/aarch64/{tcg-target.inc.c => tcg-target.inc} | 4 +-- tcg/arm/{tcg-target.inc.c => tcg-target.inc} | 4 +-- tcg/i386/{tcg-target.inc.c => tcg-target.inc} | 4 +-- tcg/mips/{tcg-target.inc.c => tcg-target.inc} | 2 +- tcg/ppc/{tcg-target.inc.c => tcg-target.inc} | 4 +-- tcg/riscv/{tcg-target.inc.c => tcg-target.inc} | 4 +-- tcg/s390/{tcg-target.inc.c => tcg-target.inc} | 4 +-- tcg/sparc/{tcg-target.inc.c => tcg-target.inc} | 2 +- tcg/{tcg-ldst.inc.c => tcg-ldst.inc} | 0 tcg/{tcg-pool.inc.c => tcg-pool.inc} | 2 +- tcg/tcg.c | 6 ++-- tcg/tci/README | 4 +-- tcg/tci/{tcg-target.inc.c => tcg-target.inc} | 0 tests/fp/fp-test.c | 2 +- tests/fp/{wrap.inc.c => wrap.inc} | 0 ui/vnc-enc-zrle.c | 22 ++++++------ ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.inc} | 0 96 files changed, 137 insertions(+), 137 deletions(-) rename accel/tcg/{atomic_common.inc.c => atomic_common.inc} (100%) rename fpu/{softfloat-specialize.inc.c => softfloat-specialize.inc} (100%) rename memory_ldst.inc.c => memory_ldst.inc (100%) rename target/arm/{translate-neon.inc.c => translate-neon.inc} (99%) rename target/arm/{translate-vfp.inc.c => translate-vfp.inc} (99%) rename target/cris/{translate_v10.inc.c => translate_v10.inc} (100%) rename target/mips/{translate_init.inc.c => translate_init.inc} (100%) rename target/ppc/{mfrom_table.inc.c => mfrom_table.inc} (100%) rename target/ppc/translate/{dfp-impl.inc.c => dfp-impl.inc} (100%) rename target/ppc/translate/{dfp-ops.inc.c => dfp-ops.inc} (100%) rename target/ppc/translate/{fp-impl.inc.c => fp-impl.inc} (100%) rename target/ppc/translate/{fp-ops.inc.c => fp-ops.inc} (100%) rename target/ppc/translate/{spe-impl.inc.c => spe-impl.inc} (100%) rename target/ppc/translate/{spe-ops.inc.c => spe-ops.inc} (100%) rename target/ppc/translate/{vmx-impl.inc.c => vmx-impl.inc} (100%) rename target/ppc/translate/{vmx-ops.inc.c => vmx-ops.inc} (100%) rename target/ppc/translate/{vsx-impl.inc.c => vsx-impl.inc} (100%) rename target/ppc/translate/{vsx-ops.inc.c => vsx-ops.inc} (100%) rename target/ppc/{translate_init.inc.c => translate_init.inc} (100%) rename target/riscv/insn_trans/{trans_privileged.inc.c => trans_privileged.inc} (100%) rename target/riscv/insn_trans/{trans_rva.inc.c => trans_rva.inc} (100%) rename target/riscv/insn_trans/{trans_rvd.inc.c => trans_rvd.inc} (100%) rename target/riscv/insn_trans/{trans_rvf.inc.c => trans_rvf.inc} (100%) rename target/riscv/insn_trans/{trans_rvh.inc.c => trans_rvh.inc} (100%) rename target/riscv/insn_trans/{trans_rvi.inc.c => trans_rvi.inc} (100%) rename target/riscv/insn_trans/{trans_rvm.inc.c => trans_rvm.inc} (100%) rename target/riscv/insn_trans/{trans_rvv.inc.c => trans_rvv.inc} (100%) rename target/s390x/{translate_vx.inc.c => translate_vx.inc} (100%) rename target/xtensa/core-dc232b/{gdb-config.inc.c => gdb-config.inc} (100%) rename target/xtensa/core-dc232b/{xtensa-modules.inc.c => xtensa-modules.inc} (100%) rename target/xtensa/core-dc233c/{gdb-config.inc.c => gdb-config.inc} (100%) rename target/xtensa/core-dc233c/{xtensa-modules.inc.c => xtensa-modules.inc} (100%) rename target/xtensa/core-de212/{gdb-config.inc.c => gdb-config.inc} (100%) rename target/xtensa/core-de212/{xtensa-modules.inc.c => xtensa-modules.inc} (100%) rename target/xtensa/core-fsf/{xtensa-modules.inc.c => xtensa-modules.inc} (100%) rename target/xtensa/core-sample_controller/{gdb-config.inc.c => gdb-config.inc} (100%) rename target/xtensa/core-sample_controller/{xtensa-modules.inc.c => xtensa-modules.inc} (100%) rename target/xtensa/core-test_kc705_be/{gdb-config.inc.c => gdb-config.inc} (100%) rename target/xtensa/core-test_kc705_be/{xtensa-modules.inc.c => xtensa-modules.inc} (100%) rename target/xtensa/core-test_mmuhifi_c3/{gdb-config.inc.c => gdb-config.inc} (100%) rename target/xtensa/core-test_mmuhifi_c3/{xtensa-modules.inc.c => xtensa-modules.inc} (100%) rename tcg/aarch64/{tcg-target.inc.c => tcg-target.inc} (99%) rename tcg/arm/{tcg-target.inc.c => tcg-target.inc} (99%) rename tcg/i386/{tcg-target.inc.c => tcg-target.inc} (99%) rename tcg/mips/{tcg-target.inc.c => tcg-target.inc} (99%) rename tcg/ppc/{tcg-target.inc.c => tcg-target.inc} (99%) rename tcg/riscv/{tcg-target.inc.c => tcg-target.inc} (99%) rename tcg/s390/{tcg-target.inc.c => tcg-target.inc} (99%) rename tcg/sparc/{tcg-target.inc.c => tcg-target.inc} (99%) rename tcg/{tcg-ldst.inc.c => tcg-ldst.inc} (100%) rename tcg/{tcg-pool.inc.c => tcg-pool.inc} (99%) rename tcg/tci/{tcg-target.inc.c => tcg-target.inc} (100%) rename tests/fp/{wrap.inc.c => wrap.inc} (100%) rename ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.inc} (100%) diff --git a/.gitignore b/.gitignore index 656e390..de1f20e 100644 --- a/.gitignore +++ b/.gitignore @@ -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.inc diff --git a/accel/tcg/atomic_common.inc.c b/accel/tcg/atomic_common.inc similarity index 100% rename from accel/tcg/atomic_common.inc.c rename to accel/tcg/atomic_common.inc diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 5349ee6..ca4c982 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.inc" #define DATA_SIZE 1 #include "atomic_template.h" diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 1d34c57..e219ecc 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.inc" #define DATA_SIZE 1 #include "atomic_template.h" diff --git a/contrib/gitdm/filetypes.txt b/contrib/gitdm/filetypes.txt index 2d5002f..e8e2628 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 \.inc$ # C filetype code \.C$ # C++ filetype code \.cpp$ # C++ filetype code \.c\+\+$ # C++ diff --git a/exec.c b/exec.c index 8047bf2..f5915ce 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.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.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.inc similarity index 100% rename from fpu/softfloat-specialize.inc.c rename to fpu/softfloat-specialize.inc diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 79be4f5..7fb1f3b 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.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 e63450a..89fa9cf 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.inc. */ #ifdef TCG_TARGET_NEED_LDST_LABELS QSIMPLEQ_HEAD(, TCGLabelQemuLdst) ldst_labels; #endif diff --git a/memory_ldst.inc.c b/memory_ldst.inc similarity index 100% rename from memory_ldst.inc.c rename to memory_ldst.inc diff --git a/scripts/clean-includes b/scripts/clean-includes index 795b3be..ff2dbe8 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -113,7 +113,7 @@ EOT for f in "$@"; do case "$f" in - *.inc.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 fa39fd7..4a177ad 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.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.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.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.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.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.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.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.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.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.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.inc +target/arm/translate.o: target/arm/decode-neon-shared.inc +target/arm/translate.o: target/arm/decode-neon-dp.inc +target/arm/translate.o: target/arm/decode-neon-ls.inc +target/arm/translate.o: target/arm/decode-vfp.inc +target/arm/translate.o: target/arm/decode-vfp-uncond.inc +target/arm/translate.o: target/arm/decode-a32.inc +target/arm/translate.o: target/arm/decode-a32-uncond.inc +target/arm/translate.o: target/arm/decode-t32.inc +target/arm/translate.o: target/arm/decode-t16.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.inc similarity index 99% rename from target/arm/translate-neon.inc.c rename to target/arm/translate-neon.inc index f6cb921..ac0ddcc 100644 --- a/target/arm/translate-neon.inc.c +++ b/target/arm/translate-neon.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.inc" +#include "decode-neon-ls.inc" +#include "decode-neon-shared.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 88a2fb2..60c0716 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.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.inc similarity index 99% rename from target/arm/translate-vfp.inc.c rename to target/arm/translate-vfp.inc index afa8a5f..1f518b4 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc @@ -27,8 +27,8 @@ */ /* Include the generated VFP decoder */ -#include "decode-vfp.inc.c" -#include "decode-vfp-uncond.inc.c" +#include "decode-vfp.inc" +#include "decode-vfp-uncond.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 c39a929..3128fa6 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.inc" +#include "translate-neon.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.inc" +#include "decode-a32-uncond.inc" +#include "decode-t32.inc" +#include "decode-t16.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 6e35ba2..81d9bcd 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.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.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 8e1bac4..c45ab2c 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.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 648dcd5..8deb126 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.inc" /* * Arithmetic Instructions diff --git a/target/cris/translate.c b/target/cris/translate.c index aaa46b5..a0d4b1c 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.inc" /* * Delay slots on QEMU/CRIS. diff --git a/target/cris/translate_v10.inc.c b/target/cris/translate_v10.inc similarity index 100% rename from target/cris/translate_v10.inc.c rename to target/cris/translate_v10.inc diff --git a/target/hppa/Makefile.objs b/target/hppa/Makefile.objs index 174f50a..40dcb86 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.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.inc diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 4bd22d4..31e2926 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.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 9fad58e..221a42e 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.inc" void cpu_mips_realize_env(CPUMIPSState *env) { diff --git a/target/mips/translate_init.inc.c b/target/mips/translate_init.inc similarity index 100% rename from target/mips/translate_init.inc.c rename to target/mips/translate_init.inc diff --git a/target/openrisc/Makefile.objs b/target/openrisc/Makefile.objs index b5432f4..0f2fcff 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.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.inc +target/openrisc/disas.o: target/openrisc/decode.inc diff --git a/target/openrisc/disas.c b/target/openrisc/disas.c index ce11264..3f75316 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.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 52323a1..a119be2 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.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 d8bd3c2..eff3c0d 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.inc" return mfrom_ROM_table[arg]; } else { return 0; diff --git a/target/ppc/mfrom_table.inc.c b/target/ppc/mfrom_table.inc similarity index 100% rename from target/ppc/mfrom_table.inc.c rename to target/ppc/mfrom_table.inc diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 4ce3d66..95d9080 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.inc" -#include "translate/vmx-impl.inc.c" +#include "translate/vmx-impl.inc" -#include "translate/vsx-impl.inc.c" +#include "translate/vsx-impl.inc" -#include "translate/dfp-impl.inc.c" +#include "translate/dfp-impl.inc" -#include "translate/spe-impl.inc.c" +#include "translate/spe-impl.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.inc" -#include "translate/vmx-ops.inc.c" +#include "translate/vmx-ops.inc" -#include "translate/vsx-ops.inc.c" +#include "translate/vsx-ops.inc" -#include "translate/dfp-ops.inc.c" +#include "translate/dfp-ops.inc" -#include "translate/spe-ops.inc.c" +#include "translate/spe-ops.inc" }; #include "helper_regs.h" -#include "translate_init.inc.c" +#include "translate_init.inc" /*****************************************************************************/ /* Misc PowerPC helpers */ diff --git a/target/ppc/translate/dfp-impl.inc.c b/target/ppc/translate/dfp-impl.inc similarity index 100% rename from target/ppc/translate/dfp-impl.inc.c rename to target/ppc/translate/dfp-impl.inc diff --git a/target/ppc/translate/dfp-ops.inc.c b/target/ppc/translate/dfp-ops.inc similarity index 100% rename from target/ppc/translate/dfp-ops.inc.c rename to target/ppc/translate/dfp-ops.inc diff --git a/target/ppc/translate/fp-impl.inc.c b/target/ppc/translate/fp-impl.inc similarity index 100% rename from target/ppc/translate/fp-impl.inc.c rename to target/ppc/translate/fp-impl.inc diff --git a/target/ppc/translate/fp-ops.inc.c b/target/ppc/translate/fp-ops.inc similarity index 100% rename from target/ppc/translate/fp-ops.inc.c rename to target/ppc/translate/fp-ops.inc diff --git a/target/ppc/translate/spe-impl.inc.c b/target/ppc/translate/spe-impl.inc similarity index 100% rename from target/ppc/translate/spe-impl.inc.c rename to target/ppc/translate/spe-impl.inc diff --git a/target/ppc/translate/spe-ops.inc.c b/target/ppc/translate/spe-ops.inc similarity index 100% rename from target/ppc/translate/spe-ops.inc.c rename to target/ppc/translate/spe-ops.inc diff --git a/target/ppc/translate/vmx-impl.inc.c b/target/ppc/translate/vmx-impl.inc similarity index 100% rename from target/ppc/translate/vmx-impl.inc.c rename to target/ppc/translate/vmx-impl.inc diff --git a/target/ppc/translate/vmx-ops.inc.c b/target/ppc/translate/vmx-ops.inc similarity index 100% rename from target/ppc/translate/vmx-ops.inc.c rename to target/ppc/translate/vmx-ops.inc diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc similarity index 100% rename from target/ppc/translate/vsx-impl.inc.c rename to target/ppc/translate/vsx-impl.inc diff --git a/target/ppc/translate/vsx-ops.inc.c b/target/ppc/translate/vsx-ops.inc similarity index 100% rename from target/ppc/translate/vsx-ops.inc.c rename to target/ppc/translate/vsx-ops.inc diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc similarity index 100% rename from target/ppc/translate_init.inc.c rename to target/ppc/translate_init.inc diff --git a/target/riscv/Makefile.objs b/target/riscv/Makefile.objs index ff38df6..1a66d8a 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.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.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.inc \ + target/riscv/decode_insn16.inc diff --git a/target/riscv/insn_trans/trans_privileged.inc.c b/target/riscv/insn_trans/trans_privileged.inc similarity index 100% rename from target/riscv/insn_trans/trans_privileged.inc.c rename to target/riscv/insn_trans/trans_privileged.inc diff --git a/target/riscv/insn_trans/trans_rva.inc.c b/target/riscv/insn_trans/trans_rva.inc similarity index 100% rename from target/riscv/insn_trans/trans_rva.inc.c rename to target/riscv/insn_trans/trans_rva.inc diff --git a/target/riscv/insn_trans/trans_rvd.inc.c b/target/riscv/insn_trans/trans_rvd.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvd.inc.c rename to target/riscv/insn_trans/trans_rvd.inc diff --git a/target/riscv/insn_trans/trans_rvf.inc.c b/target/riscv/insn_trans/trans_rvf.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvf.inc.c rename to target/riscv/insn_trans/trans_rvf.inc diff --git a/target/riscv/insn_trans/trans_rvh.inc.c b/target/riscv/insn_trans/trans_rvh.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvh.inc.c rename to target/riscv/insn_trans/trans_rvh.inc diff --git a/target/riscv/insn_trans/trans_rvi.inc.c b/target/riscv/insn_trans/trans_rvi.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvi.inc.c rename to target/riscv/insn_trans/trans_rvi.inc diff --git a/target/riscv/insn_trans/trans_rvm.inc.c b/target/riscv/insn_trans/trans_rvm.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvm.inc.c rename to target/riscv/insn_trans/trans_rvm.inc diff --git a/target/riscv/insn_trans/trans_rvv.inc.c b/target/riscv/insn_trans/trans_rvv.inc similarity index 100% rename from target/riscv/insn_trans/trans_rvv.inc.c rename to target/riscv/insn_trans/trans_rvv.inc diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 9632e79..aa7f56d 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.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.inc" +#include "insn_trans/trans_rvm.inc" +#include "insn_trans/trans_rva.inc" +#include "insn_trans/trans_rvf.inc" +#include "insn_trans/trans_rvd.inc" +#include "insn_trans/trans_rvh.inc" +#include "insn_trans/trans_rvv.inc" +#include "insn_trans/trans_privileged.inc" /* Include the auto-generated decoder for 16 bit insn */ -#include "decode_insn16.inc.c" +#include "decode_insn16.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 a0018d5..eddc62a 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.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.inc +target/rx/disas.o: target/rx/decode.inc diff --git a/target/rx/disas.c b/target/rx/disas.c index 6dee7a0..6450892 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.inc" static void dump_bytes(DisasContext *ctx) { diff --git a/target/rx/translate.c b/target/rx/translate.c index 61e8665..272619c 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.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 4f6f1e3..4c6452f 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.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.inc similarity index 100% rename from target/s390x/translate_vx.inc.c rename to target/s390x/translate_vx.inc diff --git a/target/xtensa/core-dc232b.c b/target/xtensa/core-dc232b.c index 7851bcb..bc4c866 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.inc" static XtensaConfig dc232b __attribute__((unused)) = { .name = "dc232b", .gdb_regmap = { .reg = { -#include "core-dc232b/gdb-config.inc.c" +#include "core-dc232b/gdb-config.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-dc232b/gdb-config.inc.c b/target/xtensa/core-dc232b/gdb-config.inc similarity index 100% rename from target/xtensa/core-dc232b/gdb-config.inc.c rename to target/xtensa/core-dc232b/gdb-config.inc diff --git a/target/xtensa/core-dc232b/xtensa-modules.inc.c b/target/xtensa/core-dc232b/xtensa-modules.inc similarity index 100% rename from target/xtensa/core-dc232b/xtensa-modules.inc.c rename to target/xtensa/core-dc232b/xtensa-modules.inc diff --git a/target/xtensa/core-dc233c.c b/target/xtensa/core-dc233c.c index f8204f7..8341925 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.inc" static XtensaConfig dc233c __attribute__((unused)) = { .name = "dc233c", .gdb_regmap = { .reg = { -#include "core-dc233c/gdb-config.inc.c" +#include "core-dc233c/gdb-config.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-dc233c/gdb-config.inc.c b/target/xtensa/core-dc233c/gdb-config.inc similarity index 100% rename from target/xtensa/core-dc233c/gdb-config.inc.c rename to target/xtensa/core-dc233c/gdb-config.inc diff --git a/target/xtensa/core-dc233c/xtensa-modules.inc.c b/target/xtensa/core-dc233c/xtensa-modules.inc similarity index 100% rename from target/xtensa/core-dc233c/xtensa-modules.inc.c rename to target/xtensa/core-dc233c/xtensa-modules.inc diff --git a/target/xtensa/core-de212.c b/target/xtensa/core-de212.c index a061158..eda095d 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.inc" static XtensaConfig de212 __attribute__((unused)) = { .name = "de212", .gdb_regmap = { .reg = { -#include "core-de212/gdb-config.inc.c" +#include "core-de212/gdb-config.inc" } }, .isa_internal = &xtensa_modules, diff --git a/target/xtensa/core-de212/gdb-config.inc.c b/target/xtensa/core-de212/gdb-config.inc similarity index 100% rename from target/xtensa/core-de212/gdb-config.inc.c rename to target/xtensa/core-de212/gdb-config.inc diff --git a/target/xtensa/core-de212/xtensa-modules.inc.c b/target/xtensa/core-de212/xtensa-modules.inc similarity index 100% rename from target/xtensa/core-de212/xtensa-modules.inc.c rename to target/xtensa/core-de212/xtensa-modules.inc diff --git a/target/xtensa/core-fsf.c b/target/xtensa/core-fsf.c index 1221a29..3398f3b 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.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.inc similarity index 100% rename from target/xtensa/core-fsf/xtensa-modules.inc.c rename to target/xtensa/core-fsf/xtensa-modules.inc diff --git a/target/xtensa/core-sample_controller.c b/target/xtensa/core-sample_controller.c index a1d220b..1523ef5 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.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.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.inc similarity index 100% rename from target/xtensa/core-sample_controller/gdb-config.inc.c rename to target/xtensa/core-sample_controller/gdb-config.inc diff --git a/target/xtensa/core-sample_controller/xtensa-modules.inc.c b/target/xtensa/core-sample_controller/xtensa-modules.inc similarity index 100% rename from target/xtensa/core-sample_controller/xtensa-modules.inc.c rename to target/xtensa/core-sample_controller/xtensa-modules.inc diff --git a/target/xtensa/core-test_kc705_be.c b/target/xtensa/core-test_kc705_be.c index ab73c38..60e9a7d 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.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.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.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.inc diff --git a/target/xtensa/core-test_kc705_be/xtensa-modules.inc.c b/target/xtensa/core-test_kc705_be/xtensa-modules.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.inc diff --git a/target/xtensa/core-test_mmuhifi_c3.c b/target/xtensa/core-test_mmuhifi_c3.c index 089ed7d..0a297f5 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.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.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.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.inc diff --git a/target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c b/target/xtensa/core-test_mmuhifi_c3/xtensa-modules.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.inc diff --git a/target/xtensa/import_core.sh b/target/xtensa/import_core.sh index 8f844cf..a2e422b 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.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.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.inc" static XtensaConfig $NAME __attribute__((unused)) = { .name = "$NAME", .gdb_regmap = { .reg = { -#include "core-$NAME/gdb-config.inc.c" +#include "core-$NAME/gdb-config.inc" } }, .isa_internal = &xtensa_modules, diff --git a/tcg/README b/tcg/README index a64f678..fdf6ee5 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.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.inc similarity index 99% rename from tcg/aarch64/tcg-target.inc.c rename to tcg/aarch64/tcg-target.inc index 760b0e7..000f7e6 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc @@ -10,7 +10,7 @@ * See the COPYING file in the top-level directory for details. */ -#include "../tcg-pool.inc.c" +#include "../tcg-pool.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.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.inc similarity index 99% rename from tcg/arm/tcg-target.inc.c rename to tcg/arm/tcg-target.inc index 6aa7757..42c2601 100644 --- a/tcg/arm/tcg-target.inc.c +++ b/tcg/arm/tcg-target.inc @@ -23,7 +23,7 @@ */ #include "elf.h" -#include "../tcg-pool.inc.c" +#include "../tcg-pool.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.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.inc similarity index 99% rename from tcg/i386/tcg-target.inc.c rename to tcg/i386/tcg-target.inc index ae02282..c8d5ff7 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "../tcg-pool.inc.c" +#include "../tcg-pool.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.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.inc similarity index 99% rename from tcg/mips/tcg-target.inc.c rename to tcg/mips/tcg-target.inc index 4d32ebc..5459818 100644 --- a/tcg/mips/tcg-target.inc.c +++ b/tcg/mips/tcg-target.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.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.inc similarity index 99% rename from tcg/ppc/tcg-target.inc.c rename to tcg/ppc/tcg-target.inc index c8d1e76..7f13849 100644 --- a/tcg/ppc/tcg-target.inc.c +++ b/tcg/ppc/tcg-target.inc @@ -23,7 +23,7 @@ */ #include "elf.h" -#include "../tcg-pool.inc.c" +#include "../tcg-pool.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.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.inc similarity index 99% rename from tcg/riscv/tcg-target.inc.c rename to tcg/riscv/tcg-target.inc index 3c11ab8..d666c79 100644 --- a/tcg/riscv/tcg-target.inc.c +++ b/tcg/riscv/tcg-target.inc @@ -27,7 +27,7 @@ * THE SOFTWARE. */ -#include "../tcg-pool.inc.c" +#include "../tcg-pool.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.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.inc similarity index 99% rename from tcg/s390/tcg-target.inc.c rename to tcg/s390/tcg-target.inc index b07e9ff..c313a08 100644 --- a/tcg/s390/tcg-target.inc.c +++ b/tcg/s390/tcg-target.inc @@ -29,7 +29,7 @@ #error "unsupported code generation mode" #endif -#include "../tcg-pool.inc.c" +#include "../tcg-pool.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.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.inc similarity index 99% rename from tcg/sparc/tcg-target.inc.c rename to tcg/sparc/tcg-target.inc index 65fddb3..e6aecd9 100644 --- a/tcg/sparc/tcg-target.inc.c +++ b/tcg/sparc/tcg-target.inc @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "../tcg-pool.inc.c" +#include "../tcg-pool.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.inc similarity index 100% rename from tcg/tcg-ldst.inc.c rename to tcg/tcg-ldst.inc diff --git a/tcg/tcg-pool.inc.c b/tcg/tcg-pool.inc similarity index 99% rename from tcg/tcg-pool.inc.c rename to tcg/tcg-pool.inc index 4eaa84b..7390173 100644 --- a/tcg/tcg-pool.inc.c +++ b/tcg/tcg-pool.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.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 1362bc6..5af2ce4 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.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.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.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 386c3c7..63ce297 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.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.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.inc similarity index 100% rename from tcg/tci/tcg-target.inc.c rename to tcg/tci/tcg-target.inc diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c index 43ef962..6fe2402 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.inc" static void not_implemented(void) { diff --git a/tests/fp/wrap.inc.c b/tests/fp/wrap.inc similarity index 100% rename from tests/fp/wrap.inc.c rename to tests/fp/wrap.inc diff --git a/ui/vnc-enc-zrle.c b/ui/vnc-enc-zrle.c index b4f71e3..98d5002 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.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.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.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.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.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.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.inc" #define ZRLE_COMPACT_PIXEL 24a #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_LITTLE -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.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.inc" #undef ZYWRLE_ENDIAN #define ZYWRLE_ENDIAN ENDIAN_BIG -#include "vnc-enc-zrle.inc.c" +#include "vnc-enc-zrle.inc" #undef ZRLE_COMPACT_PIXEL #undef ZRLE_BPP diff --git a/ui/vnc-enc-zrle.inc.c b/ui/vnc-enc-zrle.inc similarity index 100% rename from ui/vnc-enc-zrle.inc.c rename to ui/vnc-enc-zrle.inc From patchwork Thu Aug 6 19:14: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: 276995 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=-10.1 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 01A8DC433DF for ; Thu, 6 Aug 2020 19:19:38 +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 059FB2177B for ; Thu, 6 Aug 2020 19:19:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QxsTdxkP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 059FB2177B 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]:40274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lQO-0000Zu-RH for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:19:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNb-0003O8-9e for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:43 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:52352 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 1k3lNZ-0006Lo-Ir for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741400; 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=1hAbhzSh3Of1OroaoMTOffSLnwzMbKxgc2GVyidkceo=; b=QxsTdxkPcR/YMOGqRVjNfyAfcbKR6v5/jy7sCXh+0w/6+YBOE+KyHhQEeOQSWJ1hur/dAP 5dJBdVpwIrUsEdluu+tmKPLgXlOdzJN2y5mAdYmF7ajBzqQWPbHRnxMK8U1oZD/70QicfU DlK8gCoI77Gfs4ZfE+ge06k6fHA0Bd8= 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-462-ee55DZlyNV2h6xWPCF2lqw-1; Thu, 06 Aug 2020 15:16:39 -0400 X-MC-Unique: ee55DZlyNV2h6xWPCF2lqw-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 657CE800685 for ; Thu, 6 Aug 2020 19:16:38 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 771315F9DC; Thu, 6 Aug 2020 19:16:37 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 006/143] build-sys hack: ensure target directory is there Date: Thu, 6 Aug 2020 21:14:02 +0200 Message-Id: <1596741379-12902-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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 694865b..56ba540 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 Thu Aug 6 19:14: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: 276987 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=-10.1 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 3F00DC433DF for ; Thu, 6 Aug 2020 19:26:06 +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 4BA37221E2 for ; Thu, 6 Aug 2020 19:26:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JBPhX3S6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BA37221E2 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]:45992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lWf-0006KP-43 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:26:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNi-0003cw-8W for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:50 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:43968 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 1k3lNe-0006N8-Ke for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741405; 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=6EYh1VwOFtefpbZysAsfDv7kNCI+3BEtJ+RUW3VlNc0=; b=JBPhX3S6mYNTQpzvegCsNi/+BI3kPq+3J9TmCbrpIXvgMzeWFfn54xZpoI4unTSZzbT8fD c0JeJRqUIxpQdfuplxEcyuXJWfFxzu6p7JLYX1vb7DF6NGu/zLdvXKboGT1+xan5LQ/huW CbWZN2eNqLpEFEfM8dxGjxuoxKj0zec= 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-315-Lnu4UIG1Meq_Kqrx50fYmQ-1; Thu, 06 Aug 2020 15:16:44 -0400 X-MC-Unique: Lnu4UIG1Meq_Kqrx50fYmQ-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 2F73919200C0 for ; Thu, 6 Aug 2020 19:16:43 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40AA41D3; Thu, 6 Aug 2020 19:16:42 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 010/143] configure: expand path variables for meson configure Date: Thu, 6 Aug 2020 21:14:06 +0200 Message-Id: <1596741379-12902-11-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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: , 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 | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/configure b/configure index c4843f9..29cde6a 100755 --- a/configure +++ b/configure @@ -415,16 +415,7 @@ LDFLAGS_SHARED="-shared" modules="no" module_upgrades="no" prefix="/usr/local" -mandir="\${prefix}/share/man" -datadir="\${prefix}/share" firmwarepath="\${prefix}/share/qemu-firmware" -qemu_docdir="\${prefix}/share/doc/qemu" -bindir="\${prefix}/bin" -libdir="\${prefix}/lib" -libexecdir="\${prefix}/libexec" -includedir="\${prefix}/include" -sysconfdir="\${prefix}/etc" -local_statedir="\${prefix}/var" confsuffix="/qemu" slirp="" oss_lib="" @@ -979,12 +970,6 @@ if test "$mingw32" = "yes" ; then LIBS="-liberty $LIBS" fi prefix="c:/Program Files/QEMU" - mandir="\${prefix}" - datadir="\${prefix}" - qemu_docdir="\${prefix}" - bindir="\${prefix}" - sysconfdir="\${prefix}" - local_statedir= confsuffix="" libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -lwininet -liphlpapi -lnetapi32 $libs_qga" fi @@ -1638,6 +1623,26 @@ for opt do esac done +libdir="${libdir:-$prefix/lib}" +libexecdir="${libexecdir:-$prefix/libexec}" +includedir="${includedir:-$prefix/include}" + +if test "$mingw32" = "yes" ; then + mandir="$prefix" + datadir="$prefix" + qemu_docdir="$prefix" + bindir="$prefix" + sysconfdir="$prefix" + local_statedir= +else + mandir="${mandir:-$prefix/share/man}" + datadir="${datadir:-$prefix/share}" + qemu_docdir="${qemu_docdir:-$prefix/share/doc/qemu}" + bindir="${bindir:-$prefix/bin}" + sysconfdir="${sysconfdir:-$prefix/etc}" + local_statedir="${local_statedir:-$prefix/var}" +fi + case "$cpu" in ppc) CPU_CFLAGS="-m32" From patchwork Thu Aug 6 19:14: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: 276993 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=-10.1 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 DEA69C433DF for ; Thu, 6 Aug 2020 19:21: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 EC3132177B for ; Thu, 6 Aug 2020 19:21:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fpVLblx1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC3132177B 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]:48800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lSD-0004S5-TO for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:21:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNi-0003dd-KB for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lNg-0006NQ-8G for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=9T8BV3Ch8O5NN7zcQ2QHgAj52r6qq14nCSvLvm+VZWA=; b=fpVLblx1dBy63mnk+S9NBvoBmognuFm0xlw2M/mAtrv6bqiCPAr85DnnodoyhTplYEnDCa 5tx4kpyT05tSNoxveIbXCxEefMvWZ0arSi0cPvBr+b6JDs54+vFTBUSr35l73V/tHHptrG kRFv88foOQsafR8WoUwH8A898o7Y5ZU= 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-359-St1_YbjYPEmt2W2fjr5e6Q-1; Thu, 06 Aug 2020 15:16:45 -0400 X-MC-Unique: St1_YbjYPEmt2W2fjr5e6Q-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 4FE3619200C2 for ; Thu, 6 Aug 2020 19:16:44 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98D5E5FC3B for ; Thu, 6 Aug 2020 19:16:43 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 011/143] configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson Date: Thu, 6 Aug 2020 21:14:07 +0200 Message-Id: <1596741379-12902-12-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 12:59:11 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, RCVD_IN_DNSWL_NONE=-0.0001, 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" Split between CFLAGS/QEMU_CFLAGS and CXXFLAGS/QEMU_CXXFLAGS so that we will use CFLAGS and CXXFLAGS for flags that we do not want to pass to add_project_arguments. Signed-off-by: Paolo Bonzini --- configure | 42 ++++++++++++++++++++++-------------------- rules.mak | 4 ++-- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/configure b/configure index 29cde6a..c65cf77 100755 --- a/configure +++ b/configure @@ -107,15 +107,12 @@ update_cxxflags() { # options which some versions of GCC's C++ compiler complain about # because they only make sense for C programs. QEMU_CXXFLAGS="$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" - + CXXFLAGS=$(echo "$CFLAGS" | sed s/-std=gnu99/-std=gnu++03/) for arg in $QEMU_CFLAGS; do case $arg in -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\ -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls) ;; - -std=gnu99) - QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }"-std=gnu++98" - ;; *) QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg ;; @@ -131,7 +128,7 @@ compile_object() { compile_prog() { local_cflags="$1" local_ldflags="$2" - do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $QEMU_LDFLAGS $local_ldflags + do_cc $CFLAGS $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $QEMU_LDFLAGS $local_ldflags } # symbolically link $1 to $2. Portable version of "ln -sf". @@ -597,15 +594,14 @@ ARFLAGS="${ARFLAGS-rv}" # left shift of signed integers is well defined and has the expected # 2s-complement style results. (Both clang and gcc agree that it # provides these semantics.) -QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv -std=gnu99 $QEMU_CFLAGS" +QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS" QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" QEMU_INCLUDES="-iquote . -iquote ${source_path} -iquote ${source_path}/accel/tcg -iquote ${source_path}/include" QEMU_INCLUDES="$QEMU_INCLUDES -iquote ${source_path}/disas/libvixl" -if test "$debug_info" = "yes"; then - CFLAGS="-g $CFLAGS" -fi +CFLAGS=-std=gnu99 + # running configure in the source tree? # we know that's the case if configure is there. @@ -886,7 +882,6 @@ SunOS) QEMU_CFLAGS="-D_XOPEN_SOURCE=600 $QEMU_CFLAGS" # needed for TIOCWIN* defines in termios.h QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS" - QEMU_CFLAGS="-std=gnu99 $QEMU_CFLAGS" solarisnetlibs="-lsocket -lnsl -lresolv" LIBS="$solarisnetlibs $LIBS" libs_qga="$solarisnetlibs $libs_qga" @@ -2184,21 +2179,21 @@ fi if test "$static" = "yes"; then if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then - QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" - QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS" + CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" + LDFLAGS="-static-pie $QEMU_LDFLAGS" pie="yes" elif test "$pie" = "yes"; then error_exit "-static-pie not available due to missing toolchain support" else - QEMU_LDFLAGS="-static $QEMU_LDFLAGS" + LDFLAGS="-static $QEMU_LDFLAGS" pie="no" fi elif test "$pie" = "no"; then - QEMU_CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS" - QEMU_LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS" + CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS" + LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS" elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then - QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" - QEMU_LDFLAGS="-pie $QEMU_LDFLAGS" + CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" + LDFLAGS="-pie $QEMU_LDFLAGS" pie="yes" elif test "$pie" = "yes"; then error_exit "PIE not available due to missing toolchain support" @@ -3981,7 +3976,7 @@ EOF if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then if cc_has_warning_flag "-Wno-unknown-attributes"; then glib_cflags="-Wno-unknown-attributes $glib_cflags" - CFLAGS="-Wno-unknown-attributes $CFLAGS" + QEMU_CFLAGS="-Wno-unknown-attributes $CFLAGS" fi fi @@ -6506,10 +6501,16 @@ 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 - CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" -elif test "$debug" = "no"; 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 "$have_asan" = "yes"; then QEMU_CFLAGS="-fsanitize=address $QEMU_CFLAGS" @@ -7961,6 +7962,7 @@ echo "NM=$nm" >> $config_host_mak echo "PKG_CONFIG=$pkg_config_exe" >> $config_host_mak echo "WINDRES=$windres" >> $config_host_mak echo "CFLAGS=$CFLAGS" >> $config_host_mak +echo "CXXFLAGS=$CXXFLAGS" >> $config_host_mak echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak diff --git a/rules.mak b/rules.mak index 56ba540..e79a400 100644 --- a/rules.mak +++ b/rules.mak @@ -88,12 +88,12 @@ LINK = $(call quiet-command, $(LINKPROG) $(CFLAGS) $(QEMU_LDFLAGS) -o $@ \ %.o: %.cc $(call quiet-command,$(CXX) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \ - $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) \ + $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CXXFLAGS) $($@-cflags) \ -c -o $@ $<,"CXX","$(TARGET_DIR)$@") %.o: %.cpp $(call quiet-command,$(CXX) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \ - $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) \ + $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CXXFLAGS) $($@-cflags) \ -c -o $@ $<,"CXX","$(TARGET_DIR)$@") %.o: %.m From patchwork Thu Aug 6 19:14:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276994 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=-10.1 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, URIBL_BLOCKED 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 00DCCC433E0 for ; Thu, 6 Aug 2020 19:19: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 DE9982177B for ; Thu, 6 Aug 2020 19:19:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Wv8+WR76" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE9982177B 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]:42290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lQj-0001RL-Of for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:19:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNr-0003xe-Ny for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:36745 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 1k3lNm-0006OS-GK for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=f4894QAYvVSJrDmy1magsfSE1L8XVzs8nrFKzFMuZsU=; b=Wv8+WR76UjZqIYQkLZ0NUzLqrRvIb1/eSlQz3Z9Z9mVa813Fi51CliUKFe65c9qcPTIGpQ O9rsuydHK31bfdMV61ebRNitqOaFhM2kcT0MnFivC621GJ9rpo1mGLlyjLkn1NmbeglPyz MW+JIRlophvPClH383sLfEXM4kaZfdU= 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-326-PzMw6KsIPAa4xNFmZ7OOjw-1; Thu, 06 Aug 2020 15:16:46 -0400 X-MC-Unique: PzMw6KsIPAa4xNFmZ7OOjw-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 6BA591DE2 for ; Thu, 6 Aug 2020 19:16:45 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA8221D3 for ; Thu, 6 Aug 2020 19:16:44 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 012/143] configure: integrate Meson in the build system Date: Thu, 6 Aug 2020 21:14:08 +0200 Message-Id: <1596741379-12902-13-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 00:24:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_H3=-0.01, 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" 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 | 28 +- configure | 38 +- meson.build | 20 + scripts/ninjatool.py | 1010 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1078 insertions(+), 18 deletions(-) create mode 100644 meson.build create mode 100755 scripts/ninjatool.py diff --git a/Makefile b/Makefile index 00cadeb..c0c3b8b 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,15 @@ git-submodule-update: endif endif +export NINJA=./ninjatool +Makefile.ninja: build.ninja ninjatool + ./ninjatool -t ninja2make --clean --omit dist uninstall < $< > $@ +-include Makefile.ninja + +ninjatool: ninjatool.stamp +ninjatool.stamp: $(SRC_PATH)/scripts/ninjatool.py config-host.mak + $(MESON) setup --reconfigure . $(SRC_PATH) && touch $@ + .git-submodule-status: git-submodule-update config-host.mak # Check that we're not trying to do an out-of-tree build from @@ -68,6 +77,8 @@ CONFIG_ALL=y -include config-all-devices.mak -include config-all-disas.mak +build.ninja: meson-private/coredata.dat +meson-private/coredata.dat: config-host.mak config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION @echo $@ is out-of-date, running configure @./config.status @@ -933,6 +944,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 +1019,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 c65cf77..f2822b7 100755 --- a/configure +++ b/configure @@ -506,6 +506,7 @@ fuzzing="no" rng_none="no" secret_keyring="" libdaxctl="" +meson=meson supported_cpu="no" supported_os="no" @@ -1002,6 +1003,8 @@ for opt do ;; --sphinx-build=*) sphinx_build="$optarg" ;; + --meson=*) meson="$optarg" + ;; --gcov=*) gcov_tool="$optarg" ;; --smbd=*) smbd="$optarg" @@ -1767,6 +1770,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] @@ -1961,6 +1965,12 @@ then error_exit "Python not found. Use --python=/path/to/python" fi +if ! has "$meson" +then + error_exit "Meson not found. Use --meson=/path/to/meson" +fi +meson=$(command -v $meson) + # Note that if the Python conditional here evaluates True we will exit # with status 1 which is a shell 'false' value. if ! $python -c 'import sys; sys.exit(sys.version_info < (3,5))'; then @@ -6504,13 +6514,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 if test "$have_asan" = "yes"; then QEMU_CFLAGS="-fsanitize=address $QEMU_CFLAGS" @@ -7943,6 +7953,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 @@ -8571,6 +8582,27 @@ echo "# Automatically generated by configure - do not modify" > "$iotests_common echo >> "$iotests_common_env" echo "export PYTHON='$python'" >> "$iotests_common_env" +rm -rf meson-private/ meson-logs/ meson-info/ +NINJA=$PWD/ninjatool $python $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 + # Save the configure command line for later reuse. cat <config.status #!/bin/sh diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..8499709 --- /dev/null +++ b/meson.build @@ -0,0 +1,20 @@ +project('qemu', ['c', 'cpp'], meson_version: '>=0.55.0', + default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++03', '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(), + language: ['c', 'objc']) +add_project_arguments(config_host['QEMU_CXXFLAGS'].split(), + language: 'cpp') +add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(), + language: ['c', 'cpp', 'objc']) +add_project_arguments(config_host['QEMU_INCLUDES'].split(), + language: ['c', 'cpp', 'objc']) + +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 0000000..e27413f --- /dev/null +++ b/scripts/ninjatool.py @@ -0,0 +1,1010 @@ +#! /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.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') + 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 ninja-clean-start ninja-distclean') + 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 mangle_vars_for_make(self, x): + matches = list(VAR_RE.finditer(x)) + + # Reverse the match so that expanding later matches does not + # invalidate m.span() for earlier ones. + matches.reverse() + for m in matches: + match = m.group(1) + if not match: + continue + value = '${.var.' + match + '}' + x = x[:m.start()] + value + x[m.end():] + return x + + 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]))) + for name, value in self.rule_vars[rule].items(): + self.print('$(ninja-targets-%s): .var.%s = %s' % (rule, name, self.mangle_vars_for_make(value))) + 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: .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] + if restat: + 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.build_vars[stamp] = self.scope.build_vars + else: + self.print('%s: %s | %s; ${ninja-command}' % (targets, inputs, orderonly)) + self.build_vars[targets] = self.scope.build_vars + + depfile = scope.expand('${depfile}') + if depfile: + self.depfiles.append(depfile) + + def end_rule(self, scope, name): + if self.emit_clean: + # 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. + self.print('ninja-%s:: ; $(if $V,,@)rm -rf ${ninja-targets-%s}' % ( + 'distclean' if scope.generator else 'clean', + 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 Thu Aug 6 19:14: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: 276985 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=-10.1 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 9D886C433E0 for ; Thu, 6 Aug 2020 19:27: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 AB2F52177B for ; Thu, 6 Aug 2020 19:27:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fHBsxSX9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB2F52177B 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]:54224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lYR-0001GZ-FY for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:27:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNj-0003gQ-Oe for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:30499 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 1k3lNh-0006Nn-Sn for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741409; 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=42kIn+t4aE6nimUaN8uzm0LmJCEfw5Lag5Ha2gDm/4I=; b=fHBsxSX99OYqBD2hSTj9YYvpeotxUknLJIOiGAY4NbzMBbFiosOyayVnT5ATK/SboPXbq5 iqV3PaT4L+RpwX0syp/sLSbWtsPPJKzAbCZ0jh4EILZJQ+IzMICL6oBgv8qYPCVTntrdUH BSN2fgO/1HOobpJYo1gPST8iSZp/oHg= 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-22-fpMznV_9MB-QcqNeBbjuQg-1; Thu, 06 Aug 2020 15:16:47 -0400 X-MC-Unique: fpMznV_9MB-QcqNeBbjuQg-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 B949A800404 for ; Thu, 6 Aug 2020 19:16:46 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA5FF1D3; Thu, 6 Aug 2020 19:16:45 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 013/143] configure: generate Meson cross file Date: Thu, 6 Aug 2020 21:14:09 +0200 Message-Id: <1596741379-12902-14-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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: , 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 | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/configure b/configure index f2822b7..13db149 100755 --- a/configure +++ b/configure @@ -8582,6 +8582,49 @@ echo "# Automatically generated by configure - do not modify" > "$iotests_common echo >> "$iotests_common_env" echo "export PYTHON='$python'" >> "$iotests_common_env" +cross="config-meson.cross" +cross_arg= + +if test -n "$cross_prefix"; then + echo "# Automatically generated by configure - do not modify" > $cross + echo "[binaries]" >> $cross + echo "c = '$cc'" >> $cross + echo "cpp = '$cxx'" >> $cross + echo "ar = '$ar'" >> $cross + echo "nm = '$nm'" >> $cross + echo "pkgconfig = '$pkg_config_exe'" >> $cross + echo "ranlib = '$ranlib'" >> $cross + echo "strip = '$strip'" >> $cross + echo "windres = '$windres'" >> $cross + + echo "[properties]" >> $cross + echo "root = '$prefix'" >> $cross + + echo "[host_machine]" >> $cross +if test "$mingw32" = "yes" ; then + echo "system = 'windows'" >> $cross +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 + + cross_arg="--cross-file=$cross" +fi + rm -rf meson-private/ meson-logs/ meson-info/ NINJA=$PWD/ninjatool $python $meson setup \ --prefix "$prefix" \ @@ -8597,11 +8640,13 @@ NINJA=$PWD/ninjatool $python $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) \ + $cross_arg \ "$PWD" "$source_path" if test "$?" -ne 0 ; then error_exit "meson setup failed" fi +touch ninjatool.stamp # Save the configure command line for later reuse. cat <config.status From patchwork Thu Aug 6 19:14:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276991 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=-10.1 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 CFA65C433DF for ; Thu, 6 Aug 2020 19:23: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 D8FF82177B for ; Thu, 6 Aug 2020 19:23:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EWmVHRbM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8FF82177B 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]:57202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lTi-0007s4-Mn for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:23:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNl-0003kU-Ce for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:53 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55140 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 1k3lNj-0006O4-G4 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741410; 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=sLitUbpbM6irG8a+7TtGiqB3QI3hJzEWoxne18gjXGA=; b=EWmVHRbMATk2oeRCNjXaDhf0UC4EYWy+5ignb3BZArQmoPXydqV8F00uou4l6OcRP2N2M+ q1aDX+OIBWCZU/1JF+celund+QjkJto9Ec4JREDJDE3RTyvVEwTi0n5BqvFPkESsXZ5xqk Y1WrPnjwgcUoF0zz4qSsWSa1s3f/qVQ= 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-443-G-Px03K8OwGJg4idPReV3A-1; Thu, 06 Aug 2020 15:16:49 -0400 X-MC-Unique: G-Px03K8OwGJg4idPReV3A-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 1D8091DE1 for ; Thu, 6 Aug 2020 19:16:48 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2EEE01D3; Thu, 6 Aug 2020 19:16:46 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 014/143] build-sys hack: link with whole .fa archives Date: Thu, 6 Aug 2020 21:14:10 +0200 Message-Id: <1596741379-12902-15-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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: , 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 In order to link the *-obj-y files into tests, we will make static libraries of them in Meson, and then link them as whole archives into the tests. To separate regular static libraries from link-whole libraries, give them a different file extension. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- rules.mak | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/rules.mak b/rules.mak index e79a400..5ab42de 100644 --- a/rules.mak +++ b/rules.mak @@ -39,6 +39,13 @@ 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 +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. # @@ -54,11 +61,12 @@ undefined-symbols = $(call find-symbols,$1,awk '$$2=="U"{print $$1}') # 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 %.mo,$1) \ +process-archive-undefs = $(filter-out %.a %.fa %.mo,$1) \ $(addprefix $(WL_U), \ - $(filter $(call defined-symbols,$(filter %.a, $1)), \ + $(filter $(call defined-symbols,$(filter %.a %.fa, $1)), \ $(call undefined-symbols,$(filter %.mo,$1)))) \ - $(filter %.a,$1) + $(foreach l,$(filter %.fa,$1),$(call whole-archive,$l)) \ + $(filter %.a,$1) extract-libs = $(strip $(foreach o,$(filter-out %.mo,$1),$($o-libs))) expand-objs = $(strip $(sort $(filter %.o,$1)) \ @@ -122,7 +130,7 @@ LD_REL := $(CC) -nostdlib $(LD_REL_FLAGS) modules: %$(EXESUF): %.o - $(call LINK,$(filter %.o %.a %.mo, $^)) + $(call LINK,$(filter %.o %.a %.mo %.fa, $^)) %.a: $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,"AR","$(TARGET_DIR)$@") @@ -378,7 +386,7 @@ define unnest-vars $(error $o added in $v but $o-objs is not set))) $(shell mkdir -p ./ $(sort $(dir $($v)))) # Include all the .d files - $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$($v)))) + $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$(filter %.o,$($v))))) $(eval $v := $(filter-out %/,$($v)))) endef From patchwork Thu Aug 6 19:14: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: 276983 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.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, 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 92B9AC433DF for ; Thu, 6 Aug 2020 19:29: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 8A48F2177B for ; Thu, 6 Aug 2020 19:29:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fuHNc5nL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A48F2177B 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]:34538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lZw-0004hQ-F4 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:29:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNp-0003tg-QR for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:24369 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 1k3lNm-0006OU-GM for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:16:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=jCui0oq58LPoblIuhvIbuqzVD1PE4imgJeGOSM4/hSs=; b=fuHNc5nLGtBz2aQlJGUDUsIVvDgFaGVgmGmaPQ+Eh4IL2GTuoZvrQgCTBadK4YRfnt5pq/ SH4ZVkCr0SxdL3Ie/eJVUHSGcaoUuJtUUr7IYpjPLdcYYseFVKDkw3Gkq48fd6KQGYoLMr yBzHKNwesxxLRukqpKcuPWlsU60vC9U= 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-433-MHI7kAl1PKyi0MP-oRkq_Q-1; Thu, 06 Aug 2020 15:16:51 -0400 X-MC-Unique: MHI7kAl1PKyi0MP-oRkq_Q-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 95C2919200C0 for ; Thu, 6 Aug 2020 19:16:50 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id E074E5F9DC for ; Thu, 6 Aug 2020 19:16:49 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 016/143] meson: move summary to meson.build Date: Thu, 6 Aug 2020 21:14:12 +0200 Message-Id: <1596741379-12902-17-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 --- configure | 235 --------------------------------------------------------- meson.build | 245 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 245 insertions(+), 235 deletions(-) diff --git a/configure b/configure index d87d544..3083187 100755 --- a/configure +++ b/configure @@ -527,8 +527,6 @@ secret_keyring="" libdaxctl="" meson=meson -supported_cpu="no" -supported_os="no" bogus_os="no" malloc_trim="" @@ -767,35 +765,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 @@ -823,7 +813,6 @@ MINGW32*) audio_drv_list="" fi supported_os="yes" - pie="no" ;; GNU/kFreeBSD) bsd="yes" @@ -841,7 +830,6 @@ FreeBSD) libs_qga="-lutil $libs_qga" netmap="" # enable netmap autodetect HOST_VARIANT_DIR="freebsd" - supported_os="yes" ;; DragonFly) bsd="yes" @@ -858,7 +846,6 @@ NetBSD) audio_possible_drivers="oss sdl" oss_lib="-lossaudio" HOST_VARIANT_DIR="netbsd" - supported_os="yes" ;; OpenBSD) bsd="yes" @@ -866,7 +853,6 @@ OpenBSD) audio_drv_list="try-sdl" audio_possible_drivers="sdl" HOST_VARIANT_DIR="openbsd" - supported_os="yes" ;; Darwin) bsd="yes" @@ -887,7 +873,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" @@ -918,7 +903,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 @@ -6855,225 +6839,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 8499709..48baf20 100644 --- a/meson.build +++ b/meson.build @@ -15,6 +15,251 @@ add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(), add_project_arguments(config_host['QEMU_INCLUDES'].split(), language: ['c', 'cpp', 'objc']) +python = import('python').find_installation(config_host['PYTHON'].split()[0]) + +if host_machine.system() == 'darwin' + add_languages('objc', required: false) +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]} +summary_info += {'C++ compiler': meson.get_compiler('cpp', native: true).cmd_array()[0]} +if host_machine.system() == 'darwin' + summary_info += {'Objective-C compiler': meson.get_compiler('objc', native: true).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': config_host['CONFIG_QEMU_PRIVATE_XTS'] != 'y'} +endif +# TODO: add back version +summary_info += {'nettle': config_host.has_key('CONFIG_NETTLE')} +if config_host.has_key('CONFIG_NETTLE') + summary_info += {' XTS': config_host['CONFIG_QEMU_PRIVATE_XTS'] != 'y'} +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['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' + summary_info += {'Windows SDK': config_host['WIN_SDK']} + 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 Thu Aug 6 19:14: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: 276992 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=-10.1 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 F3AFAC433E0 for ; Thu, 6 Aug 2020 19:21: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 13D7A2177B for ; Thu, 6 Aug 2020 19:21:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H8EgxpZ7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13D7A2177B 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]:51032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lSd-0005M4-Rm for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:21:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNu-00042k-0z for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:02 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:58990 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 1k3lNs-0006P1-AC for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741419; 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=LlLezuw5CnWDOBY0ux1WhnM0Gc72Xtig+8ieEscUTU0=; b=H8EgxpZ7+E6qc314OBLTPuzowMTmEoc38riactTJMzASG1OSrvriI+b1hUC0x7ZyfKxlyE NTkU+ZAh0Z/pITeS7zamvBSyglJ054RscpuBt+g2V8HMkTGiiJDZaJBN0Q5fpucYaE0sUp 0D3Om2e3tb25WaGg9d35eWoll57/rX4= 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-nMzkkKyFMRmPm_KnHL9_cw-1; Thu, 06 Aug 2020 15:16:56 -0400 X-MC-Unique: nMzkkKyFMRmPm_KnHL9_cw-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 A54201DE1 for ; Thu, 6 Aug 2020 19:16:55 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0CB1A5F9DC; Thu, 6 Aug 2020 19:16:50 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 017/143] meson: enable pie Date: Thu, 6 Aug 2020 21:14:13 +0200 Message-Id: <1596741379-12902-18-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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: , 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 3083187..23b990e 100755 --- a/configure +++ b/configure @@ -8443,6 +8443,7 @@ NINJA=$PWD/ninjatool $python $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 Thu Aug 6 19:14: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: 276990 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=-10.1 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 80C84C433DF for ; Thu, 6 Aug 2020 19:23: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 906242177B for ; Thu, 6 Aug 2020 19:23:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CaJKObr+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 906242177B 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]:59450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lUC-0000Kq-Hy for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:23:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lNz-00047R-40 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:07 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:49973 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 1k3lNv-0006PO-VW for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741423; 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=+7TUck7514fAQUs+9d+qwIGNj7sahshkHYcFDcaHUN8=; b=CaJKObr+bp04nmTW1A/TRa2u79pp1SBDvNYRTNNQqVhJUygbDQU/C0lvKXEI1tQSJ+g+uM 3KIPZVpA5QAfDADY4spBiB1SD/qnOTeL1tNG427uzU0G9KzSkyOBP4n0hhNjD8Z+gdPXsx CMiUgfETDGSxivqpFHYpHUXyk8Pb9qA= 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-277-kxx00iFpMsCpIF4aT5FQaA-1; Thu, 06 Aug 2020 15:17:01 -0400 X-MC-Unique: kxx00iFpMsCpIF4aT5FQaA-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 BBCCD800468 for ; Thu, 6 Aug 2020 19:17:00 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A3DC69315; Thu, 6 Aug 2020 19:16:55 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 018/143] meson: use coverage option Date: Thu, 6 Aug 2020 21:14:14 +0200 Message-Id: <1596741379-12902-19-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 c0c3b8b..18f6aa7 100644 --- a/Makefile +++ b/Makefile @@ -765,14 +765,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 # 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 @@ -1275,9 +1267,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 '' @@ -1288,9 +1277,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 ffa2657..d61a6a9 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 23b990e..bdd35d2 100755 --- a/configure +++ b/configure @@ -424,7 +424,6 @@ tcg_interpreter="no" bigendian="no" mingw32="no" gcov="no" -gcov_tool="gcov" EXESUF="" DSOSUF=".so" LDFLAGS_SHARED="-shared" @@ -1008,8 +1007,6 @@ for opt do ;; --meson=*) meson="$optarg" ;; - --gcov=*) gcov_tool="$optarg" - ;; --smbd=*) smbd="$optarg" ;; --extra-cflags=*) @@ -1816,7 +1813,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) @@ -6530,8 +6526,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 @@ -7804,7 +7799,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 @@ -8444,6 +8438,7 @@ NINJA=$PWD/ninjatool $python $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 c1ff243..a426469 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 48baf20..ed61853 100644 --- a/meson.build +++ b/meson.build @@ -197,7 +197,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 Thu Aug 6 19:14:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276988 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=-10.1 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 C4B63C433E1 for ; Thu, 6 Aug 2020 19:24: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 CB6302177B for ; Thu, 6 Aug 2020 19:24:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GDgT8YBX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB6302177B 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]:39428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lVa-0003e3-KR for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:24:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lO0-00048O-Lt for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:08 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:50383 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 1k3lNy-0006PU-HY for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=z3G/MI8928RPYx88f49ktkffkdJptjveZyHWfa3stAg=; b=GDgT8YBXo4dMR07NcrL+TihsB/QBxM776YnLQEDOpxfUcUlmsmWL9/6JSIMvlYmeq+7aDs bG3xjcHvj4CFzOaS9tAQ2+zFmA9Jeu909niRABoxRFBrbLpegOuTx5hhwvjYZ2LRtWPybO HRYyX8EXm+wPY5LH0wrPccN6twkkZko= 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-38-a5A1tEvNOrCTFJL7gZEOlw-1; Thu, 06 Aug 2020 15:17:02 -0400 X-MC-Unique: a5A1tEvNOrCTFJL7gZEOlw-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 DBC1719200C2 for ; Thu, 6 Aug 2020 19:17:01 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3069E5F9DC for ; Thu, 6 Aug 2020 19:17:00 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 019/143] meson: add sparse support Date: Thu, 6 Aug 2020 21:14:15 +0200 Message-Id: <1596741379-12902-20-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 00:07:42 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 18f6aa7..9a75047 100644 --- a/Makefile +++ b/Makefile @@ -1245,6 +1245,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 bdd35d2..6ee1359 100755 --- a/configure +++ b/configure @@ -2986,7 +2986,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 @@ -7777,11 +7777,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 ed61853..9749c3d 100644 --- a/meson.build +++ b/meson.build @@ -17,6 +17,13 @@ add_project_arguments(config_host['QEMU_INCLUDES'].split(), python = import('python').find_installation(config_host['PYTHON'].split()[0]) +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 + if host_machine.system() == 'darwin' add_languages('objc', required: false) endif diff --git a/scripts/check_sparse.py b/scripts/check_sparse.py new file mode 100644 index 0000000..0de7aa5 --- /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 Thu Aug 6 19:14:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276986 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.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, NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 96240C433E0 for ; Thu, 6 Aug 2020 19:26:40 +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 72C232177B for ; Thu, 6 Aug 2020 19:26:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="S0PhP1BS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72C232177B 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]:48120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lXD-0007AY-97 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:26:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lO5-0004Ck-5b for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:13 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:21531 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 1k3lO0-0006Pl-IT for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=KJrXiVxwgOFdnHjlx8XTr3cuY+T2h47hzwcITrd1n4M=; b=S0PhP1BSnUm/ZqftlT647zyM5j6PTT0QwO7q5dsU0JRT4OO7cpACCj2Js9pYaMUJPih6yL 9Cn7U+IE+LKnxO/Q2b4wFM9sEsWaMvZslF4aV1eDYayOw1fciY9NsQxCKTzkLsEUKmNUO2 urhrrc+BP/o4Q5031NfZ9iBmh9CEi5o= 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-370-0N_fvUj7OeaJn0xUyWQNig-1; Thu, 06 Aug 2020 15:17:05 -0400 X-MC-Unique: 0N_fvUj7OeaJn0xUyWQNig-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 56BF7100AA26 for ; Thu, 6 Aug 2020 19:17:04 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73F7D5F9DC for ; Thu, 6 Aug 2020 19:17:03 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 021/143] libqemuutil, qapi, trace: convert to meson Date: Thu, 6 Aug 2020 21:14:17 +0200 Message-Id: <1596741379-12902-22-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 00:07:42 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. 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 | 178 ++++++++++++++++++++++++++++ qapi/Makefile.objs | 23 ---- qapi/meson.build | 120 +++++++++++++++++++ qobject/Makefile.objs | 3 - qobject/meson.build | 3 + rules.mak | 2 +- 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 | 82 +++++++++++++ util/Makefile.objs | 83 ------------- util/meson.build | 68 +++++++++++ 25 files changed, 576 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 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 6248fd0..5209d17 100644 --- a/Makefile +++ b/Makefile @@ -121,184 +121,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 @@ -469,10 +345,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 \ @@ -493,14 +367,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 @@ -614,8 +481,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) ###################################################################### @@ -678,27 +544,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) @@ -736,9 +581,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" @@ -751,12 +596,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 @@ -784,9 +629,6 @@ clean: recurse-clean 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 @@ -1013,7 +855,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 @@ -1224,10 +1068,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 3823463..e5c9077 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/ ####################################################################### @@ -95,10 +93,6 @@ common-obj-y += disas/ version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o ###################################################################### -# tracing -util-obj-y += trace/ - -###################################################################### # guest agent # FIXME: a few definitions from qapi/qapi-types.o and @@ -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 d61a6a9..0b32364 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 6ee1359..e3a7e71 100755 --- a/configure +++ b/configure @@ -7165,6 +7165,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 @@ -7175,6 +7177,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 @@ -7551,6 +7555,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 @@ -7776,6 +7782,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 f1965b1..a988591 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 0000000..1b24431 --- /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 cb5f685..6144d99 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 9749c3d..ec742fe 100644 --- a/meson.build +++ b/meson.build @@ -4,6 +4,9 @@ project('qemu', ['c', 'cpp'], 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(), @@ -39,6 +42,181 @@ 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 host_machine.system() == '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/events.py', + meson.source_root() / 'scripts/qapi/introspect.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' ] + +# 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 4673ab7..c0a31be 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 0000000..51d11ce --- /dev/null +++ b/qapi/meson.build @@ -0,0 +1,120 @@ +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', +] + +# First build all sources +qapi_util_outputs = [ + 'qapi-builtin-types.c', 'qapi-builtin-visit.c', + 'qapi-emit-events.c', +] + +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 7b12c9c..0000000 --- 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 0000000..bb63c06 --- /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 5ab42de..7aefd37 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/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py index fc0c8fc..e17edc9 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 6c0a5f8..c857516 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 cfe6bee..41c0d02 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 0000000..35f8949 --- /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 8a4b220..0000000 --- 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 0000000..a4e24f3 --- /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, + 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 d42046a..0000000 --- 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 0000000..019bd79 --- /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 c544509..a429474 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 0000000..d0e5d17 --- /dev/null +++ b/trace/meson.build @@ -0,0 +1,82 @@ +# common options +tracetool = [ + find_program('scripts/tracetool.py'), + '--backend=' + config_host['TRACE_BACKENDS'] +] + +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 cc5e371..0000000 --- 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 0000000..62113ba --- /dev/null +++ b/util/meson.build @@ -0,0 +1,68 @@ +util_ss.add(files('osdep.c', 'cutils.c', 'unicode.c', 'qemu-timer-common.c')) +util_ss.add(files('bufferiszero.c')) +util_ss.add(files('lockcnt.c')) +util_ss.add(files('aiocb.c', 'async.c', 'aio-wait.c', 'thread-pool.c', 'qemu-timer.c')) +util_ss.add(files('main-loop.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', 'hbitmap.c')) +util_ss.add(files('fifo8.c')) +util_ss.add(files('nvdimm-utils.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('iov.c', 'qemu-config.c', 'qemu-sockets.c', 'uri.c', 'notify.c')) +util_ss.add(files('qemu-option.c', 'qemu-progress.c')) +util_ss.add(files('keyval.c')) +util_ss.add(files('hexdump.c')) +util_ss.add(files('crc32c.c')) +util_ss.add(files('uuid.c')) +util_ss.add(files('throttle.c')) +util_ss.add(files('getauxval.c')) +util_ss.add(files('readline.c')) +util_ss.add(files('rcu.c')) +util_ss.add(when: 'CONFIG_MEMBARRIER', if_true: files('sys_membarrier.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('coroutine-@0@.c'.format(config_host['CONFIG_COROUTINE_BACKEND']))) +util_ss.add(files('buffer.c')) +util_ss.add(files('timed-average.c')) +util_ss.add(files('base64.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(files('iova-tree.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')) +util_ss.add(when: 'CONFIG_POSIX', if_true: files('drm.c')) +util_ss.add(files('guest-random.c')) +util_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus.c'), gio]) + +if have_user then + util_ss.add(files('selfmap.c')) +endif From patchwork Thu Aug 6 19:14:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276984 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=-10.1 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, URIBL_BLOCKED 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 991A9C433DF for ; Thu, 6 Aug 2020 19:28: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 9B7262177B for ; Thu, 6 Aug 2020 19:28:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="h7poCE4B" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B7262177B 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]:59180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lZI-0003FY-Jv for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:28:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOM-0004Wh-19 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:30 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43695 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 1k3lOJ-0006SZ-61 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741446; 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=A9EalWruB0XXfdHoY9b3qLGS+6bikzKNemtBy8PRrvg=; b=h7poCE4BqKPnpgd1TMUpnWzWxXUdkPTVlH+WCcocKQTAmaZJmiaObtyiRprydT8AgjnO1g xOi9QIHuY9vvzvBgF0O4n8LZiTGTTe3gO74DytzKUQQsrduh2LNSd0ZCGJMm+Xv0fI4RF3 /20U1CpGu9Q1x1JThAQUSKtDfXPP4I0= 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-262-ZboJwsoZPAC1ZJ0dhlk9iA-1; Thu, 06 Aug 2020 15:17:22 -0400 X-MC-Unique: ZboJwsoZPAC1ZJ0dhlk9iA-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 1DFB0107BEF6 for ; Thu, 6 Aug 2020 19:17:22 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F1925F9DC; Thu, 6 Aug 2020 19:17:20 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 031/143] contrib/ivshmem: convert to meson Date: Thu, 6 Aug 2020 21:14:27 +0200 Message-Id: <1596741379-12902-32-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 9 --------- Makefile.objs | 2 -- configure | 3 --- contrib/ivshmem-client/Makefile.objs | 1 - contrib/ivshmem-client/meson.build | 3 +++ contrib/ivshmem-server/Makefile.objs | 1 - contrib/ivshmem-server/meson.build | 3 +++ meson.build | 6 ++++++ 8 files changed, 12 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 128bebe..e3d54c0 100644 --- a/Makefile +++ b/Makefile @@ -287,8 +287,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 \ @@ -501,13 +499,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 2f2d4b2..336a684 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 bb44d39..473173d 100755 --- a/configure +++ b/configure @@ -6647,9 +6647,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 bfab2d2..0000000 --- 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 0000000..92ad844 --- /dev/null +++ b/contrib/ivshmem-client/meson.build @@ -0,0 +1,3 @@ +executable('ivshmem-client', files('ivshmem-client.c', 'main.c'), + dependencies: glib, + install: true) diff --git a/contrib/ivshmem-server/Makefile.objs b/contrib/ivshmem-server/Makefile.objs deleted file mode 100644 index c060dd3..0000000 --- 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 0000000..6dbe240 --- /dev/null +++ b/contrib/ivshmem-server/meson.build @@ -0,0 +1,3 @@ +executable('ivshmem-server', files('ivshmem-server.c', 'main.c'), + dependencies: [qemuutil, rt], + install: true) diff --git a/meson.build b/meson.build index 894584a..aa6fffa 100644 --- a/meson.build +++ b/meson.build @@ -90,6 +90,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(), @@ -263,6 +264,11 @@ 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 Thu Aug 6 19:14: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: 276982 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=-10.1 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 8977BC433E0 for ; Thu, 6 Aug 2020 19:30: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 88A032173E for ; Thu, 6 Aug 2020 19:30:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ih0gxIUH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88A032173E 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]:39300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lb8-0006fz-BC for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:30:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOQ-0004gJ-9O for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:34 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:53080 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 1k3lOO-0006TI-4w for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741451; 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=/nygjzFAWrBE2g18NJNO7roesr7Z9xR2ejDhLuREhLw=; b=ih0gxIUH44BPKAgmDhWrPFNyg5sWTCsvkoW9QnkfnBhD19XihJSnsyRb2JoMsTQm3KaZoM wuz0+64dHc+4lQ+WjlAOY+aWP/g2C9TGKPKKKt1XL+/HNdLA/2qHk3GXvkMjltiwu+P5rt WAg/ii8EYQ2ueHmeB9+WdJHvVuD++KQ= 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-sqv826byMBGo0Qvzdd3AAw-1; Thu, 06 Aug 2020 15:17:28 -0400 X-MC-Unique: sqv826byMBGo0Qvzdd3AAw-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 8E808107BEF6 for ; Thu, 6 Aug 2020 19:17:27 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9FB0B1D3; Thu, 6 Aug 2020 19:17:26 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 035/143] meson: add msi generation Date: Thu, 6 Aug 2020 21:14:31 +0200 Message-Id: <1596741379-12902-36-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 3451981..7c4a34a 100644 --- a/Makefile +++ b/Makefile @@ -434,23 +434,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) @@ -465,7 +448,6 @@ clean: recurse-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 - 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 7dc031f..9246575 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -47,5 +47,30 @@ qga = executable('qemu-ga', qga_ss.sources(), if host_machine.system() == '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 '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 42c8d31..1f39e05 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 Thu Aug 6 19:14:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276981 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=-10.1 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, URIBL_BLOCKED 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 4D225C433E0 for ; Thu, 6 Aug 2020 19:31: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 44D6A2173E for ; Thu, 6 Aug 2020 19:31:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GmVZa9rk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44D6A2173E 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]:45312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lcI-0000mu-7e for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:31:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOR-0004iI-2n for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:35 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:35153 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 1k3lOP-0006TR-72 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=kYrpOvd1utmNpI/vIn83yutW8O2ih0OuNAwrqnYBgbg=; b=GmVZa9rknNGyxFgTiEsXRPqj4CHD8kEjhnjNlt1Ee+TiwYdGU1maOcAgupeH+hDS2ofLK6 stfxX0tiBmr+nsMexRRtnhhdSwxW13X9W4X1iak6xCmMttX/yLb7eY2GIEpWhnUmw/r6WT W3WAVLpWr4UXWepATD0hcj0z9M5rFto= 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-234-Pq_EXsVUPZKi88viyTnCVg-1; Thu, 06 Aug 2020 15:17:29 -0400 X-MC-Unique: Pq_EXsVUPZKi88viyTnCVg-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 AF2631DE1 for ; Thu, 6 Aug 2020 19:17:28 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0436D5F9DC for ; Thu, 6 Aug 2020 19:17:27 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 036/143] meson: convert dummy Windows qga/qemu-ga target Date: Thu, 6 Aug 2020 21:14:32 +0200 Message-Id: <1596741379-12902-37-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 --- Makefile | 5 ----- qga/meson.build | 4 ++++ qga/vss-win32/meson.build | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7c4a34a..5df772b 100644 --- a/Makefile +++ b/Makefile @@ -434,11 +434,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) -ifneq ($(EXESUF),) -.PHONY: qga/qemu-ga -qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI) -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/qga/meson.build b/qga/meson.build index 9246575..dcd4772 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -43,6 +43,7 @@ qga_ss = qga_ss.apply(config_host, strict: false) qga = executable('qemu-ga', qga_ss.sources(), link_args: config_host['LIBS_QGA'].split(), dependencies: [qemuutil, libudev]) +all_qga = [qga] if host_machine.system() == 'windows' if 'CONFIG_QGA_VSS' in config_host @@ -71,6 +72,9 @@ if host_machine.system() == 'windows' config_host['QEMU_GA_MSI_WITH_VSS'].split(), config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(), ]) + all_qga += [qga-msi] alias_target('msi', qga_msi) endif + + alias_target('qga/qemu-ga', all_qga) endif diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 1f39e05..780c461 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -14,6 +14,8 @@ if add_languages('cpp', required: false) cc.find_library('shlwapi'), cc.find_library('uuid'), cc.find_library('intl')]) + + all_qga += qga_vss endif # rules to build qga-vss.tlb From patchwork Thu Aug 6 19:14: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: 276979 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=-10.1 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, URIBL_BLOCKED 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 51743C433DF for ; Thu, 6 Aug 2020 19:33:32 +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 4B6922173E for ; Thu, 6 Aug 2020 19:33:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GJm+Q3u9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B6922173E 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]:53722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3ldr-000497-74 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:33:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOS-0004mq-Tt for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:36 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:32137 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 1k3lOQ-0006Tl-U3 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741454; 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=XOh75rxoAsjfb0+xHElNRGVkMvHGWPBEvwHjztXDd4I=; b=GJm+Q3u90qHIaITR8Fny4VAlNCGE9wqEBdvtNvqbANVlMZXvYlwdnskzVjP28zjl79jwxx 90e78+L/HoHXzka7utPdAwuc+/kXcZqDflOSFWMAREkf52nxIo0PabJVsqkQ6YzRiYgvFM 6FEqMOYbabqrSCsEvdCDeDxyspOW+lE= 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-16-6zeWcuw6PZu6s0YmC0Xc2w-1; Thu, 06 Aug 2020 15:17:32 -0400 X-MC-Unique: 6zeWcuw6PZu6s0YmC0Xc2w-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 7133B80183C for ; Thu, 6 Aug 2020 19:17:31 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 80E135F9DC; Thu, 6 Aug 2020 19:17:30 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 038/143] meson: add qemu-keymap Date: Thu, 6 Aug 2020 21:14:34 +0200 Message-Id: <1596741379-12902-39-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 0a2bbd5..bffe932 100644 --- a/Makefile +++ b/Makefile @@ -413,8 +413,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) @@ -427,9 +425,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 e0ef3f7..f84c5cd 100755 --- a/configure +++ b/configure @@ -6675,9 +6675,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 @@ -6994,6 +6991,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 9eb1204..a4909f1 100644 --- a/meson.build +++ b/meson.build @@ -90,6 +90,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 @@ -278,6 +283,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 Thu Aug 6 19:14:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276980 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=-10.1 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 BCDF7C433E0 for ; Thu, 6 Aug 2020 19:32: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 B99CB2173E for ; Thu, 6 Aug 2020 19:32:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SbVJ16vD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B99CB2173E 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]:47682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lch-0001jF-Lv for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:32:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOV-0004uv-I6 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:39 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:34507 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 1k3lOT-0006UE-Jl for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741456; 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=piegL1b9aUoksg/1K94HZvB1gVYOFmXv7I3AAoBNxR0=; b=SbVJ16vDnhfaar3YqbJD5VE29igvzl21Op4ktn0khnqDDdRSSfhZEcLmMDGuUnnnYPXHU6 mpefMGZ+EgtkVlS2rh1ReMEWMNiW9+iAGtFXiXAP+fXpkHg6VszDjRVQkQa67rnz/B1Jus 8SMcnSzPnOODBWXxRPB8DKRw2C0R9xs= 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-175-_4D2xr76NdWJYDaWNjHEUA-1; Thu, 06 Aug 2020 15:17:35 -0400 X-MC-Unique: _4D2xr76NdWJYDaWNjHEUA-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 2DA741800D42 for ; Thu, 6 Aug 2020 19:17:34 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EE825FC3B; Thu, 6 Aug 2020 19:17:33 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 040/143] meson: add virtfs-proxy-helper Date: Thu, 6 Aug 2020 21:14:36 +0200 Message-Id: <1596741379-12902-41-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 2 -- configure | 7 +++++-- fsdev/meson.build | 5 +++++ meson.build | 6 ++++++ 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 fsdev/meson.build diff --git a/Makefile b/Makefile index a961bc3..2fbbc0a 100644 --- a/Makefile +++ b/Makefile @@ -413,8 +413,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) -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) ifdef CONFIG_MPATH scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist diff --git a/configure b/configure index d123733..8026778 100755 --- a/configure +++ b/configure @@ -4320,6 +4320,7 @@ fi ########################################## # attr probe +libattr_libs= if test "$attr" != "no" ; then cat > $TMPC < @@ -4336,7 +4337,8 @@ EOF # Older distros have , and need -lattr: elif compile_prog "-DCONFIG_LIBATTR" "-lattr" ; then attr=yes - LIBS="-lattr $LIBS" + libattr_libs="-lattr" + LIBS="$libattr_libs $LIBS" libattr=yes else if test "$attr" = "yes" ; then @@ -6639,6 +6641,7 @@ if [ "$eventfd" = "yes" ]; then 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 @@ -6649,7 +6652,6 @@ if test "$softmmu" = yes ; then if test "$linux" = yes; then if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then virtfs=yes - helpers="$helpers fsdev/virtfs-proxy-helper\$(EXESUF)" else if test "$virtfs" = yes; then error_exit "VirtFS requires libcap-ng devel and libattr devel" @@ -7231,6 +7233,7 @@ if test "$linux_io_uring" = "yes" ; then fi if test "$attr" = "yes" ; then echo "CONFIG_ATTR=y" >> $config_host_mak + echo "LIBATTR_LIBS=$libattr_libs" >> $config_host_mak fi if test "$libattr" = "yes" ; then echo "CONFIG_LIBATTR=y" >> $config_host_mak diff --git a/fsdev/meson.build b/fsdev/meson.build new file mode 100644 index 0000000..d0daa2a --- /dev/null +++ b/fsdev/meson.build @@ -0,0 +1,5 @@ +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', files('virtfs-proxy-helper.c', '9p-marshal.c', '9p-iov-marshal.c'), + dependencies: [qemuutil, libattr, libcap_ng]) +endif diff --git a/meson.build b/meson.build index c62f99f..eec72f5 100644 --- a/meson.build +++ b/meson.build @@ -81,6 +81,10 @@ if 'CONFIG_GNUTLS' in config_host endif pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(), link_args: config_host['PIXMAN_LIBS'].split()) +libattr = not_found +if 'CONFIG_ATTR' in config_host + libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split()) +endif seccomp = not_found if 'CONFIG_SECCOMP' in config_host seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(), @@ -274,6 +278,8 @@ libqemuutil = static_library('qemuutil', qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) +subdir('fsdev') + # Other build targets if 'CONFIG_GUEST_AGENT' in config_host subdir('qga') From patchwork Thu Aug 6 19:14: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: 276978 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=-10.1 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 53164C433DF for ; Thu, 6 Aug 2020 19:33: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 5854322D73 for ; Thu, 6 Aug 2020 19:33:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eiRNwBdq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5854322D73 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]:56050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3leF-00055C-90 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:33:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOa-00056y-Ho for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59165 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 1k3lOY-0006Ug-J2 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741461; 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=l7dlmo4CUP9fRAb0wYf5v1xWP+Vmo9+ilKkdaCF/7YY=; b=eiRNwBdqhfGNTdGPGofSxz374UgLA9ddwLp4i9sRHxvvfbiYgsiutaibANlGftZUxsNd44 K/j8DZpWgRRDd8FrcYRaXqJXe8l0OZmPxkLaxzxK1HnXmaKNrrFhiMUKie05mO0vWHQHeR i3mLgzX16JlFOeMjKJUJnc/4USAhRHY= 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-333-gCvCmL45PTmqD4D2HA65iA-1; Thu, 06 Aug 2020 15:17:40 -0400 X-MC-Unique: gCvCmL45PTmqD4D2HA65iA-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 1DEC41DE1 for ; Thu, 6 Aug 2020 19:17:39 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 977EE5F9DC; Thu, 6 Aug 2020 19:17:34 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 041/143] meson: keymap-gen Date: Thu, 6 Aug 2020 21:14:37 +0200 Message-Id: <1596741379-12902-42-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 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 2fbbc0a..3837f80 100644 --- a/Makefile +++ b/Makefile @@ -125,44 +125,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 \ - 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 \ - $(NULL) - -generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES) - -ui/input-keymap-%.c: $(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 eec72f5..4448bfe 100644 --- a/meson.build +++ b/meson.build @@ -265,6 +265,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 0000000..cad9763 --- /dev/null +++ b/ui/meson.build @@ -0,0 +1,34 @@ +keymap_gen = find_program('keycodemapdb/tools/keymap-gen') + +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'], +] + +foreach e : keymaps + output = 'input-keymap-@0@-to-@1@.c'.format(e[0], e[1]) + 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: [keymap_gen, + '--lang', 'glib2', + '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]), + 'code-map', '@INPUT0@', e[0], e[1]]) +endforeach From patchwork Thu Aug 6 19:14:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276971 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=-10.1 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, URIBL_BLOCKED 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 B39C1C433E0 for ; Thu, 6 Aug 2020 19:39: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 B21B82173E for ; Thu, 6 Aug 2020 19:39:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Jop9rQOE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B21B82173E 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]:60122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lk6-0001ND-GB for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:39:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOb-0005A4-VR for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:46 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:34599 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 1k3lOZ-0006Uo-Uh for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741463; 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=o7k/OC0i7r4vbxe3Sk4vtVKcmtpjqIWJmdLQavsE+ro=; b=Jop9rQOEReR4JKbSmPSQBEFdzRBlx8lJdwgEMurAAHje+AW9d3NHHsT/c8zkB3aeWuKhnr qPNHH8kAvItIPMi8W2d0wRlSExqfzgrorqqK+d+rj64Yk8wL+7HZ/B5aDExMfATaXc1STR vaPDaHhOHAYLpEgGUWGThM+yIWcTSl0= 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-425-YTssgmHWMYmbXWTb3533HQ-1; Thu, 06 Aug 2020 15:17:41 -0400 X-MC-Unique: YTssgmHWMYmbXWTb3533HQ-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 7978519200C1 for ; Thu, 6 Aug 2020 19:17:40 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A2FC5F9DC; Thu, 6 Aug 2020 19:17:39 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 042/143] meson: generate qemu-version.h Date: Thu, 6 Aug 2020 21:14:38 +0200 Message-Id: <1596741379-12902-43-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 3837f80..d9a8633 100644 --- a/Makefile +++ b/Makefile @@ -105,21 +105,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 @@ -259,17 +245,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 4448bfe..f90bc23 100644 --- a/meson.build +++ b/meson.build @@ -137,6 +137,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', @@ -156,6 +157,17 @@ qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py', meson.source_root() / 'scripts/qapi/doc.py', ] +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() @@ -256,8 +268,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 0000000..4847385 --- /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: 276969 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=-10.1 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, URIBL_BLOCKED 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 40201C433DF for ; Thu, 6 Aug 2020 19:41: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 3BC602177B for ; Thu, 6 Aug 2020 19:41:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IZSs09pL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BC602177B 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]:40086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3llZ-0004mq-8y for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:41:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOc-0005Ca-Uw for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:46 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:48580 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 1k3lOb-0006Uw-0c for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741464; 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=6wO8raEgHBnlFflJAwvU3qxSsZ5hDYhpF9l/u5QiqSg=; b=IZSs09pL00F0Wt+lRiBPd95UlueSjOhFN1REUfAJ3H0q7R7RgeEN8O5tYCuzeI4xPiOid5 soiu+2ouvRX459QT87DHzqQGOP9kCf9hltJLxwO1Hcm/xGd/MIDi5n+HzeFwgDKDs+0BqN Yr3E6tfdpJfz7a3GWVnn7O8T8AcE7k0= 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-ZqZaqlBeMou2BQoQd1AmRw-1; Thu, 06 Aug 2020 15:17:42 -0400 X-MC-Unique: ZqZaqlBeMou2BQoQd1AmRw-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 D0C60107BEF5 for ; Thu, 6 Aug 2020 19:17:41 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id E21D16179B; Thu, 6 Aug 2020 19:17:40 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 043/143] meson: generate shader headers Date: Thu, 6 Aug 2020 21:14:39 +0200 Message-Id: <1596741379-12902-44-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 19 ------------------- meson.build | 1 + ui/meson.build | 2 ++ ui/shader/meson.build | 15 +++++++++++++++ 4 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 ui/shader/meson.build diff --git a/Makefile b/Makefile index d9a8633..3fafc89 100644 --- a/Makefile +++ b/Makefile @@ -376,7 +376,6 @@ clean: recurse-clean rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~ rm -f fsdev/*.pod scsi/*.pod rm -f qemu-img-cmds.h - rm -f ui/shader/*-vert.h ui/shader/*-frag.h rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) rm -f config-all-devices.mak rm -f $(SUBDIR_DEVICES_MAK) @@ -598,24 +597,6 @@ endif $(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 - @mkdir -p $(dir $@) - $(call quiet-command,\ - perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\ - "VERT","$@") - -ui/shader/%-frag.h: $(SRC_PATH)/ui/shader/%.frag $(SRC_PATH)/scripts/shaderinclude.pl - @mkdir -p $(dir $@) - $(call quiet-command,\ - perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\ - "FRAG","$@") - -ui/shader.o: $(SRC_PATH)/ui/shader.c \ - ui/shader/texture-blit-vert.h \ - ui/shader/texture-blit-flip-vert.h \ - ui/shader/texture-blit-frag.h - # documentation MAKEINFO=makeinfo MAKEINFOINCLUDES= -I docs -I $( X-Patchwork-Id: 276976 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=-10.1 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 337C1C433E0 for ; Thu, 6 Aug 2020 19:35: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 1550A2173E for ; Thu, 6 Aug 2020 19:35:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WGe/sACc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1550A2173E 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]:36134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lfa-0008PW-R7 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:35:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOf-0005JY-Ja for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:49 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43059 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 1k3lOd-0006VG-PJ for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741467; 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=8YqaMLtGfOgB3dU4xVatVkX2maMcVKw80//hZqF7h2U=; b=WGe/sACc/O/3cZAN3NHExnu6lxDJtsQvOGMMy5l+brriuEV9OopoN3b2DdjgzgMwEny5AD 5VPOOluVLOCUX9JlTLpYOe4QNCA3Wj2Io7Et7gWIvvlmEJXoiRyHkxB13htARwK1zj+L/Z 3mFq4bKApBsY7BWrd6VV0b0bhVySJW8= 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-394-FNHCbfCiOpyNHES5A8Ni_g-1; Thu, 06 Aug 2020 15:17:45 -0400 X-MC-Unique: FNHCbfCiOpyNHES5A8Ni_g-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 8E567100AA21 for ; Thu, 6 Aug 2020 19:17:44 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id A03CB5FC3B; Thu, 6 Aug 2020 19:17:43 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 045/143] meson: uncompress edk2 bios Date: Thu, 6 Aug 2020 21:14:41 +0200 Message-Id: <1596741379-12902-46-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 7 ------- meson.build | 1 + pc-bios/meson.build | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 pc-bios/meson.build diff --git a/Makefile b/Makefile index 984f784..d277681 100644 --- a/Makefile +++ b/Makefile @@ -112,9 +112,6 @@ generated-files-y += module_block.h generated-files-y += .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",$<) - # Don't try to regenerate Makefile or configure # We don't generate any of them Makefile: ; @@ -258,9 +255,6 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y) $(SOFTMMU_ALL_RULES): $(crypto-obj-y) $(SOFTMMU_ALL_RULES): $(io-obj-y) $(SOFTMMU_ALL_RULES): config-all-devices.mak -ifdef DECOMPRESS_EDK2_BLOBS -$(SOFTMMU_ALL_RULES): $(edk2-decompressed) -endif SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES)) $(SOFTMMU_FUZZ_RULES): $(authz-obj-y) @@ -367,7 +361,6 @@ clean: recurse-clean ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ -exec rm {} + - rm -f $(edk2-decompressed) 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) diff --git a/meson.build b/meson.build index 892bb62..d287e06 100644 --- a/meson.build +++ b/meson.build @@ -354,6 +354,7 @@ if have_tools endif subdir('tools') +subdir('pc-bios') summary_info = {} summary_info += {'Install prefix': config_host['prefix']} diff --git a/pc-bios/meson.build b/pc-bios/meson.build new file mode 100644 index 0000000..8a3d335 --- /dev/null +++ b/pc-bios/meson.build @@ -0,0 +1,23 @@ +bzip2 = find_program('bzip2') + +if 'DECOMPRESS_EDK2_BLOBS' in config_host + fds = [ + 'edk2-aarch64-code.fd', + 'edk2-arm-code.fd', + 'edk2-arm-vars.fd', + 'edk2-i386-code.fd', + 'edk2-i386-secure-code.fd', + 'edk2-i386-vars.fd', + 'edk2-x86_64-code.fd', + 'edk2-x86_64-secure-code.fd', + ] + + foreach f : fds + custom_target(f, + output: f, + input: '@0@.bz2'.format(f), + capture: true, + build_by_default: true, + command: [ bzip2, '-dc', '@INPUT0@' ]) + endforeach +endif From patchwork Thu Aug 6 19:14:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276967 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=-10.1 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, URIBL_BLOCKED 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 EEEF4C433E0 for ; Thu, 6 Aug 2020 19:43: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 E26DE2177B for ; Thu, 6 Aug 2020 19:43:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fJ2pA4FV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E26DE2177B 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]:48478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3ln2-00089P-T3 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:43:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOi-0005Q7-Bu for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:52 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:39678 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 1k3lOg-0006VS-Dw for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=akipxLwblj+fd1bmAQ2wu/glvgeZezIS3234Bw91NnI=; b=fJ2pA4FVY0fC9EVO3IszYFqC0+QygaINNaCraee1qk9T48QKrOBksAx/hdkyH0aC+aNVLF noSKnmtj8xhQzX0tAYOsHmPXCDky7Yr1MuSeafEcqvgP6ASrqa7GrIHapXBd/HhrCAIPs8 KP2ZI0GhmPBEmvymC8UzXPojSzxyS28= 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-243-uRE_5XBRPWyF7PHOX6Wilg-1; Thu, 06 Aug 2020 15:17:46 -0400 X-MC-Unique: uRE_5XBRPWyF7PHOX6Wilg-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 B150119200CC for ; Thu, 6 Aug 2020 19:17:45 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 060675F9DC for ; Thu, 6 Aug 2020 19:17:44 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 046/143] meson: convert check-decodetree Date: Thu, 6 Aug 2020 21:14:42 +0200 Message-Id: <1596741379-12902-47-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 2 ++ tests/Makefile.include | 8 +------- tests/meson.build | 4 ++++ 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 tests/meson.build diff --git a/meson.build b/meson.build index d287e06..fbf27a7 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') @@ -355,6 +356,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 1a20657..3ae7f88 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -896,13 +896,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 @@ -964,6 +957,7 @@ check-block: $(patsubst %,check-%, $(check-block-y)) endif check-build: build-unit build-softfloat build-qtest +check: check-block check-qapi-schema check-unit check-softfloat check-qtest 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))) diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000..5c52021 --- /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 Thu Aug 6 19:14:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276977 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=-10.1 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 150DEC433DF for ; Thu, 6 Aug 2020 19:35: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 E597C2177B for ; Thu, 6 Aug 2020 19:35:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BcURd9P0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E597C2177B 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]:34164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lfH-0007cF-Rz for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:34:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOo-0005du-C2 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54420 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 1k3lOg-0006VW-Sy for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=ASUwD4PPSshZ+ytJnGEbUPUWwaQJtI8u2AJ9N0Hi9M0=; b=BcURd9P0wFDwjwASwqR8z25T63TWrBFnqykV1Qo4ey5CWF1KjWUGnqwGsNoB31BOmVrQli zpcMx5D1Js1/fTy+bH10EKXwWFPWpqpnXGdj6NAWZaTmtXpOMQdpgzaLiLXZiDnoNER3iW L0viFnSHPlj+gaOe5HU2RM5AarJJGnc= 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-NdZATha4NiCRXwYax9v30A-1; Thu, 06 Aug 2020 15:17:47 -0400 X-MC-Unique: NdZATha4NiCRXwYax9v30A-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 0430D1DE1 for ; Thu, 6 Aug 2020 19:17:47 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 281061D3 for ; Thu, 6 Aug 2020 19:17:45 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 047/143] meson: convert tests/fp and check-softfloat Date: Thu, 6 Aug 2020 21:14:43 +0200 Message-Id: <1596741379-12902-48-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 --- configure | 2 +- tests/Makefile.include | 160 +------------ tests/fp/Makefile | 600 ---------------------------------------------- tests/fp/meson.build | 628 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 4 + 5 files changed, 636 insertions(+), 758 deletions(-) delete mode 100644 tests/fp/Makefile create mode 100644 tests/fp/meson.build diff --git a/configure b/configure index 8026778..3c54abf 100755 --- a/configure +++ b/configure @@ -8319,7 +8319,7 @@ 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/Makefile.target tests/fp/Makefile" +LINKS="$LINKS tests/tcg/Makefile.target" LINKS="$LINKS tests/plugin/Makefile" LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps" LINKS="$LINKS pc-bios/s390-ccw/Makefile" diff --git a/tests/Makefile.include b/tests/Makefile.include index 3ae7f88..f7ffecc 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -437,9 +437,6 @@ 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/fp/%: - $(MAKE) -C $(dir $@) $(notdir $@) - 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 \ @@ -675,157 +672,6 @@ check-report-unit.tap: $(check-unit-y) check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) check-report-unit.tap -# FPU Emulation tests (aka softfloat) -# -# As we still have some places that need fixing the rules are a little -# more complex than they need to be and have to override some of the -# generic Makefile expansions. Once we are cleanly passing all -# the tests we can simplify the make syntax. - -FP_TEST_BIN=$(BUILD_DIR)/tests/fp/fp-test - -# the build dir is created by configure -$(FP_TEST_BIN): config-host.h $(test-util-obj-y) - $(call quiet-command, \ - $(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" $(notdir $@), \ - "BUILD", "$(notdir $@)") - -# The full test suite can take a bit of time, default to a quick run -# "-l 2 -r all" can take more than a day for some operations and is best -# run manually -FP_TL=-l 1 -r all - -# $1 = tests, $2 = description, $3 = test flags -test-softfloat = $(call quiet-command, \ - cd $(BUILD_DIR)/tests/fp && \ - ./fp-test -s $(if $3,$3,$(FP_TL)) $1 > $2.out 2>&1 || \ - (cat $2.out && exit 1;), \ - "FLOAT TEST", $2) - -# Conversion Routines: Float to Float -# FIXME: f32_to_f128 (broken), f64_to_f128 (broken) -# FIXME: f128_to_f32(broken), f128_to_f64 (broken) -# FIXME: f128_to_extF80 (broken) -check-softfloat-conv-f2f: $(FP_TEST_BIN) - $(call test-softfloat, \ - f16_to_f32 f16_to_f64 \ - f16_to_extF80 f16_to_f128 \ - f32_to_f16 f32_to_f64 \ - f32_to_extF80 \ - f64_to_f16 f64_to_f32 \ - extF80_to_f16 extF80_to_f32 \ - extF80_to_f64 extF80_to_f128 \ - f128_to_f16, \ - float-to-float) - -# Conversion Routines: Int and Uint to Float -# FIXME: i32_to_extF80 (broken), i64_to_extF80 (broken) -# ui32_to_f128 (not implemented) -check-softfloat-conv-to-float: $(FP_TEST_BIN) - $(call test-softfloat, \ - i32_to_f16 i64_to_f16 \ - i32_to_f32 i64_to_f32 \ - i32_to_f64 i64_to_f64 \ - i32_to_f128 i64_to_f128, int-to-float) - $(call test-softfloat, \ - ui32_to_f16 ui64_to_f16 \ - ui32_to_f32 ui64_to_f32 \ - ui32_to_f64 ui64_to_f64 \ - ui32_to_extF80 ui64_to_extF80 \ - ui64_to_f128, uint-to-float) - -# Conversion Routines: Float to integers -# FIXME: extF80_roundToInt (broken) -check-softfloat-conv-to-int: $(FP_TEST_BIN) - $(call test-softfloat, \ - f16_to_i32 f16_to_i32_r_minMag \ - f32_to_i32 f32_to_i32_r_minMag \ - f64_to_i32 f64_to_i32_r_minMag \ - extF80_to_i32 extF80_to_i32_r_minMag \ - f128_to_i32 f128_to_i32_r_minMag \ - f16_to_i64 f16_to_i64_r_minMag \ - f32_to_i64 f32_to_i64_r_minMag \ - f64_to_i64 f64_to_i64_r_minMag \ - extF80_to_i64 extF80_to_i64_r_minMag \ - f128_to_i64 f128_to_i64_r_minMag, \ - float-to-int) - $(call test-softfloat, \ - f16_to_ui32 f16_to_ui32_r_minMag \ - f32_to_ui32 f32_to_ui32_r_minMag \ - f64_to_ui32 f64_to_ui32_r_minMag \ - extF80_to_ui32 extF80_to_ui32_r_minMag \ - f128_to_ui32 f128_to_ui32_r_minMag \ - f16_to_ui64 f16_to_ui64_r_minMag \ - f32_to_ui64 f32_to_ui64_r_minMag \ - f64_to_ui64 f64_to_ui64_r_minMag \ - extF80_to_ui64 extF80_to_ui64_r_minMag \ - f128_to_ui64 f128_to_ui64_r_minMag, \ - float-to-uint) - $(call test-softfloat, \ - f16_roundToInt f32_roundToInt \ - f64_roundToInt f128_roundToInt, \ - round-to-integer) - -.PHONY: check-softfloat-conv -check-softfloat-conv: check-softfloat-conv-f2f -check-softfloat-conv: check-softfloat-conv-to-float -check-softfloat-conv: check-softfloat-conv-to-int - -# Generic rule for all float operations -# -# Some patterns are overridden due to broken or missing tests. -# Hopefully these can be removed over time. - -check-softfloat-%: $(FP_TEST_BIN) - $(call test-softfloat, f16_$* f32_$* f64_$* extF80_$* f128_$*, $*) - -# Float Compare routines -SF_COMPARE_OPS=eq eq_signaling le le_quiet lt_quiet -SF_COMPARE_RULES=$(patsubst %,check-softfloat-%, $(SF_COMPARE_OPS)) - -# FIXME: extF80_lt_quiet (broken) -check-softfloat-lt_quiet: $(FP_TEST_BIN) - $(call test-softfloat, \ - f16_lt_quiet f32_lt_quiet f64_lt_quiet \ - f128_lt_quiet, \ - lt_quiet) - -.PHONY: check-softfloat-compare -check-softfloat-compare: $(SF_COMPARE_RULES) - -# Math Operations - -# FIXME: extF80_mulAdd (missing) -check-softfloat-mulAdd: $(FP_TEST_BIN) - $(call test-softfloat, \ - f16_mulAdd f32_mulAdd f64_mulAdd f128_mulAdd, \ - mulAdd,-l 1) - -# FIXME: extF80_rem (broken) -check-softfloat-rem: $(FP_TEST_BIN) - $(call test-softfloat, \ - f16_rem f32_rem f64_rem f128_rem, \ - rem) - -SF_MATH_OPS=add sub mul mulAdd div rem sqrt -SF_MATH_RULES=$(patsubst %,check-softfloat-%, $(SF_MATH_OPS)) - -.PHONY: check-softfloat-ops -check-softfloat-ops: $(SF_MATH_RULES) - -# Finally a generic rule to test all of softfoat. If TCG isnt't -# enabled we define a null operation which skips the tests. - -.PHONY: check-softfloat -ifeq ($(CONFIG_TCG),y) -build-softfloat: $(FP_TEST_BIN) -check-softfloat: build-softfloat check-softfloat-conv check-softfloat-compare check-softfloat-ops -else -build-softfloat check-softfloat: - $(call quiet-command, /bin/true, "FLOAT TEST", \ - "SKIPPED for non-TCG builds") -endif - # Plugins ifeq ($(CONFIG_PLUGIN),y) .PHONY: plugins @@ -955,9 +801,9 @@ check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) ifeq ($(CONFIG_TOOLS),y) check-block: $(patsubst %,check-%, $(check-block-y)) endif -check-build: build-unit build-softfloat build-qtest +check-build: build-unit build-qtest -check: check-block check-qapi-schema check-unit check-softfloat check-qtest +check: check-block check-qapi-schema check-unit check-qtest 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))) @@ -965,7 +811,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-qtest check-decodetree clean: check-clean diff --git a/tests/fp/Makefile b/tests/fp/Makefile deleted file mode 100644 index 56768ec..0000000 --- a/tests/fp/Makefile +++ /dev/null @@ -1,600 +0,0 @@ -BUILD_DIR := $(CURDIR)/../.. - -include $(BUILD_DIR)/config-host.mak -include $(SRC_PATH)/rules.mak - -SOFTFLOAT_DIR := $(SRC_PATH)/tests/fp/berkeley-softfloat-3 -TESTFLOAT_DIR := $(SRC_PATH)/tests/fp/berkeley-testfloat-3 - -SF_SOURCE_DIR := $(SOFTFLOAT_DIR)/source -SF_INCLUDE_DIR := $(SOFTFLOAT_DIR)/source/include -# we could use any specialize here, it doesn't matter -SF_SPECIALIZE := 8086-SSE -SF_SPECIALIZE_DIR := $(SF_SOURCE_DIR)/$(SF_SPECIALIZE) - -TF_SOURCE_DIR := $(TESTFLOAT_DIR)/source - -$(call set-vpath, $(SRC_PATH)/fpu $(SRC_PATH)/tests/fp) - -LIBQEMUUTIL := $(BUILD_DIR)/libqemuutil.a - -# Use this variable to be clear when we pull in our own implementation -# We build the object with a default rule thanks to the vpath above -QEMU_SOFTFLOAT_OBJ := softfloat.o - -QEMU_INCLUDES += -I$(SRC_PATH)/tests/fp -QEMU_INCLUDES += -I$(SF_INCLUDE_DIR) -QEMU_INCLUDES += -I$(SF_SPECIALIZE_DIR) -QEMU_INCLUDES += -I$(TF_SOURCE_DIR) - -# work around TARGET_* poisoning -QEMU_CFLAGS += -DHW_POISON_H -# define a target to match testfloat's implementation-defined choices, such as -# whether to raise the invalid flag when dealing with NaNs in muladd. -QEMU_CFLAGS += -DTARGET_ARM - -# capstone has a platform.h file that clashes with softfloat's -QEMU_CFLAGS := $(filter-out %capstone, $(QEMU_CFLAGS)) - -# softfloat defines -SF_OPTS := -SF_OPTS += -DSOFTFLOAT_ROUND_ODD -SF_OPTS += -DINLINE_LEVEL=5 -SF_OPTS += -DSOFTFLOAT_FAST_DIV32TO16 -SF_OPTS += -DSOFTFLOAT_FAST_DIV64TO32 -SF_OPTS += -DSOFTFLOAT_FAST_INT64 -QEMU_CFLAGS += $(SF_OPTS) - -# silence the build of softfloat objects -SF_CFLAGS += -Wno-missing-prototypes -SF_CFLAGS += -Wno-redundant-decls -SF_CFLAGS += -Wno-return-type -SF_CFLAGS += -Wno-error - -# testfloat defines -TF_OPTS := -TF_OPTS += -DFLOAT16 -TF_OPTS += -DFLOAT64 -TF_OPTS += -DEXTFLOAT80 -TF_OPTS += -DFLOAT128 -TF_OPTS += -DFLOAT_ROUND_ODD -TF_OPTS += -DLONG_DOUBLE_IS_EXTFLOAT80 -QEMU_CFLAGS += $(TF_OPTS) - -# silence the build of testfloat objects -TF_CFLAGS := -TF_CFLAGS += -Wno-strict-prototypes -TF_CFLAGS += -Wno-unknown-pragmas -TF_CFLAGS += -Wno-uninitialized -TF_CFLAGS += -Wno-missing-prototypes -TF_CFLAGS += -Wno-return-type -TF_CFLAGS += -Wno-unused-function -TF_CFLAGS += -Wno-error - -# softfloat objects -SF_OBJS_PRIMITIVES := -SF_OBJS_PRIMITIVES += s_eq128.o -SF_OBJS_PRIMITIVES += s_le128.o -SF_OBJS_PRIMITIVES += s_lt128.o -SF_OBJS_PRIMITIVES += s_shortShiftLeft128.o -SF_OBJS_PRIMITIVES += s_shortShiftRight128.o -SF_OBJS_PRIMITIVES += s_shortShiftRightJam64.o -SF_OBJS_PRIMITIVES += s_shortShiftRightJam64Extra.o -SF_OBJS_PRIMITIVES += s_shortShiftRightJam128.o -SF_OBJS_PRIMITIVES += s_shortShiftRightJam128Extra.o -SF_OBJS_PRIMITIVES += s_shiftRightJam32.o -SF_OBJS_PRIMITIVES += s_shiftRightJam64.o -SF_OBJS_PRIMITIVES += s_shiftRightJam64Extra.o -SF_OBJS_PRIMITIVES += s_shiftRightJam128.o -SF_OBJS_PRIMITIVES += s_shiftRightJam128Extra.o -SF_OBJS_PRIMITIVES += s_shiftRightJam256M.o -SF_OBJS_PRIMITIVES += s_countLeadingZeros8.o -SF_OBJS_PRIMITIVES += s_countLeadingZeros16.o -SF_OBJS_PRIMITIVES += s_countLeadingZeros32.o -SF_OBJS_PRIMITIVES += s_countLeadingZeros64.o -SF_OBJS_PRIMITIVES += s_add128.o -SF_OBJS_PRIMITIVES += s_add256M.o -SF_OBJS_PRIMITIVES += s_sub128.o -SF_OBJS_PRIMITIVES += s_sub256M.o -SF_OBJS_PRIMITIVES += s_mul64ByShifted32To128.o -SF_OBJS_PRIMITIVES += s_mul64To128.o -SF_OBJS_PRIMITIVES += s_mul128By32.o -SF_OBJS_PRIMITIVES += s_mul128To256M.o -SF_OBJS_PRIMITIVES += s_approxRecip_1Ks.o -SF_OBJS_PRIMITIVES += s_approxRecip32_1.o -SF_OBJS_PRIMITIVES += s_approxRecipSqrt_1Ks.o -SF_OBJS_PRIMITIVES += s_approxRecipSqrt32_1.o - -SF_OBJS_SPECIALIZE := -SF_OBJS_SPECIALIZE += softfloat_raiseFlags.o -SF_OBJS_SPECIALIZE += s_f16UIToCommonNaN.o -SF_OBJS_SPECIALIZE += s_commonNaNToF16UI.o -SF_OBJS_SPECIALIZE += s_propagateNaNF16UI.o -SF_OBJS_SPECIALIZE += s_f32UIToCommonNaN.o -SF_OBJS_SPECIALIZE += s_commonNaNToF32UI.o -SF_OBJS_SPECIALIZE += s_propagateNaNF32UI.o -SF_OBJS_SPECIALIZE += s_f64UIToCommonNaN.o -SF_OBJS_SPECIALIZE += s_commonNaNToF64UI.o -SF_OBJS_SPECIALIZE += s_propagateNaNF64UI.o -SF_OBJS_SPECIALIZE += extF80M_isSignalingNaN.o -SF_OBJS_SPECIALIZE += s_extF80UIToCommonNaN.o -SF_OBJS_SPECIALIZE += s_commonNaNToExtF80UI.o -SF_OBJS_SPECIALIZE += s_propagateNaNExtF80UI.o -SF_OBJS_SPECIALIZE += f128M_isSignalingNaN.o -SF_OBJS_SPECIALIZE += s_f128UIToCommonNaN.o -SF_OBJS_SPECIALIZE += s_commonNaNToF128UI.o -SF_OBJS_SPECIALIZE += s_propagateNaNF128UI.o - -SF_OBJS_OTHERS := -SF_OBJS_OTHERS += s_roundToUI32.o -SF_OBJS_OTHERS += s_roundToUI64.o -SF_OBJS_OTHERS += s_roundToI32.o -SF_OBJS_OTHERS += s_roundToI64.o -SF_OBJS_OTHERS += s_normSubnormalF16Sig.o -SF_OBJS_OTHERS += s_roundPackToF16.o -SF_OBJS_OTHERS += s_normRoundPackToF16.o -SF_OBJS_OTHERS += s_addMagsF16.o -SF_OBJS_OTHERS += s_subMagsF16.o -SF_OBJS_OTHERS += s_mulAddF16.o -SF_OBJS_OTHERS += s_normSubnormalF32Sig.o -SF_OBJS_OTHERS += s_roundPackToF32.o -SF_OBJS_OTHERS += s_normRoundPackToF32.o -SF_OBJS_OTHERS += s_addMagsF32.o -SF_OBJS_OTHERS += s_subMagsF32.o -SF_OBJS_OTHERS += s_mulAddF32.o -SF_OBJS_OTHERS += s_normSubnormalF64Sig.o -SF_OBJS_OTHERS += s_roundPackToF64.o -SF_OBJS_OTHERS += s_normRoundPackToF64.o -SF_OBJS_OTHERS += s_addMagsF64.o -SF_OBJS_OTHERS += s_subMagsF64.o -SF_OBJS_OTHERS += s_mulAddF64.o -SF_OBJS_OTHERS += s_normSubnormalExtF80Sig.o -SF_OBJS_OTHERS += s_roundPackToExtF80.o -SF_OBJS_OTHERS += s_normRoundPackToExtF80.o -SF_OBJS_OTHERS += s_addMagsExtF80.o -SF_OBJS_OTHERS += s_subMagsExtF80.o -SF_OBJS_OTHERS += s_normSubnormalF128Sig.o -SF_OBJS_OTHERS += s_roundPackToF128.o -SF_OBJS_OTHERS += s_normRoundPackToF128.o -SF_OBJS_OTHERS += s_addMagsF128.o -SF_OBJS_OTHERS += s_subMagsF128.o -SF_OBJS_OTHERS += s_mulAddF128.o -SF_OBJS_OTHERS += softfloat_state.o -SF_OBJS_OTHERS += ui32_to_f16.o -SF_OBJS_OTHERS += ui32_to_f32.o -SF_OBJS_OTHERS += ui32_to_f64.o -SF_OBJS_OTHERS += ui32_to_extF80.o -SF_OBJS_OTHERS += ui32_to_extF80M.o -SF_OBJS_OTHERS += ui32_to_f128.o -SF_OBJS_OTHERS += ui32_to_f128M.o -SF_OBJS_OTHERS += ui64_to_f16.o -SF_OBJS_OTHERS += ui64_to_f32.o -SF_OBJS_OTHERS += ui64_to_f64.o -SF_OBJS_OTHERS += ui64_to_extF80.o -SF_OBJS_OTHERS += ui64_to_extF80M.o -SF_OBJS_OTHERS += ui64_to_f128.o -SF_OBJS_OTHERS += ui64_to_f128M.o -SF_OBJS_OTHERS += i32_to_f16.o -SF_OBJS_OTHERS += i32_to_f32.o -SF_OBJS_OTHERS += i32_to_f64.o -SF_OBJS_OTHERS += i32_to_extF80.o -SF_OBJS_OTHERS += i32_to_extF80M.o -SF_OBJS_OTHERS += i32_to_f128.o -SF_OBJS_OTHERS += i32_to_f128M.o -SF_OBJS_OTHERS += i64_to_f16.o -SF_OBJS_OTHERS += i64_to_f32.o -SF_OBJS_OTHERS += i64_to_f64.o -SF_OBJS_OTHERS += i64_to_extF80.o -SF_OBJS_OTHERS += i64_to_extF80M.o -SF_OBJS_OTHERS += i64_to_f128.o -SF_OBJS_OTHERS += i64_to_f128M.o -SF_OBJS_OTHERS += f16_to_ui32.o -SF_OBJS_OTHERS += f16_to_ui64.o -SF_OBJS_OTHERS += f16_to_i32.o -SF_OBJS_OTHERS += f16_to_i64.o -SF_OBJS_OTHERS += f16_to_ui32_r_minMag.o -SF_OBJS_OTHERS += f16_to_ui64_r_minMag.o -SF_OBJS_OTHERS += f16_to_i32_r_minMag.o -SF_OBJS_OTHERS += f16_to_i64_r_minMag.o -SF_OBJS_OTHERS += f16_to_f32.o -SF_OBJS_OTHERS += f16_to_f64.o -SF_OBJS_OTHERS += f16_to_extF80.o -SF_OBJS_OTHERS += f16_to_extF80M.o -SF_OBJS_OTHERS += f16_to_f128.o -SF_OBJS_OTHERS += f16_to_f128M.o -SF_OBJS_OTHERS += f16_roundToInt.o -SF_OBJS_OTHERS += f16_add.o -SF_OBJS_OTHERS += f16_sub.o -SF_OBJS_OTHERS += f16_mul.o -SF_OBJS_OTHERS += f16_mulAdd.o -SF_OBJS_OTHERS += f16_div.o -SF_OBJS_OTHERS += f16_rem.o -SF_OBJS_OTHERS += f16_sqrt.o -SF_OBJS_OTHERS += f16_eq.o -SF_OBJS_OTHERS += f16_le.o -SF_OBJS_OTHERS += f16_lt.o -SF_OBJS_OTHERS += f16_eq_signaling.o -SF_OBJS_OTHERS += f16_le_quiet.o -SF_OBJS_OTHERS += f16_lt_quiet.o -SF_OBJS_OTHERS += f16_isSignalingNaN.o -SF_OBJS_OTHERS += f32_to_ui32.o -SF_OBJS_OTHERS += f32_to_ui64.o -SF_OBJS_OTHERS += f32_to_i32.o -SF_OBJS_OTHERS += f32_to_i64.o -SF_OBJS_OTHERS += f32_to_ui32_r_minMag.o -SF_OBJS_OTHERS += f32_to_ui64_r_minMag.o -SF_OBJS_OTHERS += f32_to_i32_r_minMag.o -SF_OBJS_OTHERS += f32_to_i64_r_minMag.o -SF_OBJS_OTHERS += f32_to_f16.o -SF_OBJS_OTHERS += f32_to_f64.o -SF_OBJS_OTHERS += f32_to_extF80.o -SF_OBJS_OTHERS += f32_to_extF80M.o -SF_OBJS_OTHERS += f32_to_f128.o -SF_OBJS_OTHERS += f32_to_f128M.o -SF_OBJS_OTHERS += f32_roundToInt.o -SF_OBJS_OTHERS += f32_add.o -SF_OBJS_OTHERS += f32_sub.o -SF_OBJS_OTHERS += f32_mul.o -SF_OBJS_OTHERS += f32_mulAdd.o -SF_OBJS_OTHERS += f32_div.o -SF_OBJS_OTHERS += f32_rem.o -SF_OBJS_OTHERS += f32_sqrt.o -SF_OBJS_OTHERS += f32_eq.o -SF_OBJS_OTHERS += f32_le.o -SF_OBJS_OTHERS += f32_lt.o -SF_OBJS_OTHERS += f32_eq_signaling.o -SF_OBJS_OTHERS += f32_le_quiet.o -SF_OBJS_OTHERS += f32_lt_quiet.o -SF_OBJS_OTHERS += f32_isSignalingNaN.o -SF_OBJS_OTHERS += f64_to_ui32.o -SF_OBJS_OTHERS += f64_to_ui64.o -SF_OBJS_OTHERS += f64_to_i32.o -SF_OBJS_OTHERS += f64_to_i64.o -SF_OBJS_OTHERS += f64_to_ui32_r_minMag.o -SF_OBJS_OTHERS += f64_to_ui64_r_minMag.o -SF_OBJS_OTHERS += f64_to_i32_r_minMag.o -SF_OBJS_OTHERS += f64_to_i64_r_minMag.o -SF_OBJS_OTHERS += f64_to_f16.o -SF_OBJS_OTHERS += f64_to_f32.o -SF_OBJS_OTHERS += f64_to_extF80.o -SF_OBJS_OTHERS += f64_to_extF80M.o -SF_OBJS_OTHERS += f64_to_f128.o -SF_OBJS_OTHERS += f64_to_f128M.o -SF_OBJS_OTHERS += f64_roundToInt.o -SF_OBJS_OTHERS += f64_add.o -SF_OBJS_OTHERS += f64_sub.o -SF_OBJS_OTHERS += f64_mul.o -SF_OBJS_OTHERS += f64_mulAdd.o -SF_OBJS_OTHERS += f64_div.o -SF_OBJS_OTHERS += f64_rem.o -SF_OBJS_OTHERS += f64_sqrt.o -SF_OBJS_OTHERS += f64_eq.o -SF_OBJS_OTHERS += f64_le.o -SF_OBJS_OTHERS += f64_lt.o -SF_OBJS_OTHERS += f64_eq_signaling.o -SF_OBJS_OTHERS += f64_le_quiet.o -SF_OBJS_OTHERS += f64_lt_quiet.o -SF_OBJS_OTHERS += f64_isSignalingNaN.o -SF_OBJS_OTHERS += extF80_to_ui32.o -SF_OBJS_OTHERS += extF80_to_ui64.o -SF_OBJS_OTHERS += extF80_to_i32.o -SF_OBJS_OTHERS += extF80_to_i64.o -SF_OBJS_OTHERS += extF80_to_ui32_r_minMag.o -SF_OBJS_OTHERS += extF80_to_ui64_r_minMag.o -SF_OBJS_OTHERS += extF80_to_i32_r_minMag.o -SF_OBJS_OTHERS += extF80_to_i64_r_minMag.o -SF_OBJS_OTHERS += extF80_to_f16.o -SF_OBJS_OTHERS += extF80_to_f32.o -SF_OBJS_OTHERS += extF80_to_f64.o -SF_OBJS_OTHERS += extF80_to_f128.o -SF_OBJS_OTHERS += extF80_roundToInt.o -SF_OBJS_OTHERS += extF80_add.o -SF_OBJS_OTHERS += extF80_sub.o -SF_OBJS_OTHERS += extF80_mul.o -SF_OBJS_OTHERS += extF80_div.o -SF_OBJS_OTHERS += extF80_rem.o -SF_OBJS_OTHERS += extF80_sqrt.o -SF_OBJS_OTHERS += extF80_eq.o -SF_OBJS_OTHERS += extF80_le.o -SF_OBJS_OTHERS += extF80_lt.o -SF_OBJS_OTHERS += extF80_eq_signaling.o -SF_OBJS_OTHERS += extF80_le_quiet.o -SF_OBJS_OTHERS += extF80_lt_quiet.o -SF_OBJS_OTHERS += extF80_isSignalingNaN.o -SF_OBJS_OTHERS += extF80M_to_ui32.o -SF_OBJS_OTHERS += extF80M_to_ui64.o -SF_OBJS_OTHERS += extF80M_to_i32.o -SF_OBJS_OTHERS += extF80M_to_i64.o -SF_OBJS_OTHERS += extF80M_to_ui32_r_minMag.o -SF_OBJS_OTHERS += extF80M_to_ui64_r_minMag.o -SF_OBJS_OTHERS += extF80M_to_i32_r_minMag.o -SF_OBJS_OTHERS += extF80M_to_i64_r_minMag.o -SF_OBJS_OTHERS += extF80M_to_f16.o -SF_OBJS_OTHERS += extF80M_to_f32.o -SF_OBJS_OTHERS += extF80M_to_f64.o -SF_OBJS_OTHERS += extF80M_to_f128M.o -SF_OBJS_OTHERS += extF80M_roundToInt.o -SF_OBJS_OTHERS += extF80M_add.o -SF_OBJS_OTHERS += extF80M_sub.o -SF_OBJS_OTHERS += extF80M_mul.o -SF_OBJS_OTHERS += extF80M_div.o -SF_OBJS_OTHERS += extF80M_rem.o -SF_OBJS_OTHERS += extF80M_sqrt.o -SF_OBJS_OTHERS += extF80M_eq.o -SF_OBJS_OTHERS += extF80M_le.o -SF_OBJS_OTHERS += extF80M_lt.o -SF_OBJS_OTHERS += extF80M_eq_signaling.o -SF_OBJS_OTHERS += extF80M_le_quiet.o -SF_OBJS_OTHERS += extF80M_lt_quiet.o -SF_OBJS_OTHERS += f128_to_ui32.o -SF_OBJS_OTHERS += f128_to_ui64.o -SF_OBJS_OTHERS += f128_to_i32.o -SF_OBJS_OTHERS += f128_to_i64.o -SF_OBJS_OTHERS += f128_to_ui32_r_minMag.o -SF_OBJS_OTHERS += f128_to_ui64_r_minMag.o -SF_OBJS_OTHERS += f128_to_i32_r_minMag.o -SF_OBJS_OTHERS += f128_to_i64_r_minMag.o -SF_OBJS_OTHERS += f128_to_f16.o -SF_OBJS_OTHERS += f128_to_f32.o -SF_OBJS_OTHERS += f128_to_extF80.o -SF_OBJS_OTHERS += f128_to_f64.o -SF_OBJS_OTHERS += f128_roundToInt.o -SF_OBJS_OTHERS += f128_add.o -SF_OBJS_OTHERS += f128_sub.o -SF_OBJS_OTHERS += f128_mul.o -SF_OBJS_OTHERS += f128_mulAdd.o -SF_OBJS_OTHERS += f128_div.o -SF_OBJS_OTHERS += f128_rem.o -SF_OBJS_OTHERS += f128_sqrt.o -SF_OBJS_OTHERS += f128_eq.o -SF_OBJS_OTHERS += f128_le.o -SF_OBJS_OTHERS += f128_lt.o -SF_OBJS_OTHERS += f128_eq_signaling.o -SF_OBJS_OTHERS += f128_le_quiet.o -SF_OBJS_OTHERS += f128_lt_quiet.o -SF_OBJS_OTHERS += f128_isSignalingNaN.o -SF_OBJS_OTHERS += f128M_to_ui32.o -SF_OBJS_OTHERS += f128M_to_ui64.o -SF_OBJS_OTHERS += f128M_to_i32.o -SF_OBJS_OTHERS += f128M_to_i64.o -SF_OBJS_OTHERS += f128M_to_ui32_r_minMag.o -SF_OBJS_OTHERS += f128M_to_ui64_r_minMag.o -SF_OBJS_OTHERS += f128M_to_i32_r_minMag.o -SF_OBJS_OTHERS += f128M_to_i64_r_minMag.o -SF_OBJS_OTHERS += f128M_to_f16.o -SF_OBJS_OTHERS += f128M_to_f32.o -SF_OBJS_OTHERS += f128M_to_extF80M.o -SF_OBJS_OTHERS += f128M_to_f64.o -SF_OBJS_OTHERS += f128M_roundToInt.o -SF_OBJS_OTHERS += f128M_add.o -SF_OBJS_OTHERS += f128M_sub.o -SF_OBJS_OTHERS += f128M_mul.o -SF_OBJS_OTHERS += f128M_mulAdd.o -SF_OBJS_OTHERS += f128M_div.o -SF_OBJS_OTHERS += f128M_rem.o -SF_OBJS_OTHERS += f128M_sqrt.o -SF_OBJS_OTHERS += f128M_eq.o -SF_OBJS_OTHERS += f128M_le.o -SF_OBJS_OTHERS += f128M_lt.o -SF_OBJS_OTHERS += f128M_eq_signaling.o -SF_OBJS_OTHERS += f128M_le_quiet.o -SF_OBJS_OTHERS += f128M_lt_quiet.o - -SF_OBJS_ALL_NOSPEC := -SF_OBJS_ALL_NOSPEC += $(SF_OBJS_PRIMITIVES) -SF_OBJS_ALL_NOSPEC += $(SF_OBJS_OTHERS) - -SF_OBJS_ALL := -SF_OBJS_ALL += $(SF_OBJS_ALL_NOSPEC) -SF_OBJS_ALL += $(SF_OBJS_SPECIALIZE) - -# testfloat objects -TF_OBJS_GENCASES := -TF_OBJS_GENCASES += genCases_ui32.o -TF_OBJS_GENCASES += genCases_ui64.o -TF_OBJS_GENCASES += genCases_i32.o -TF_OBJS_GENCASES += genCases_i64.o -TF_OBJS_GENCASES += genCases_f16.o -TF_OBJS_GENCASES += genCases_f32.o -TF_OBJS_GENCASES += genCases_f64.o -TF_OBJS_GENCASES += genCases_extF80.o -TF_OBJS_GENCASES += genCases_f128.o - -TF_OBJS_WRITECASE := -TF_OBJS_WRITECASE += writeCase_a_ui32.o -TF_OBJS_WRITECASE += writeCase_a_ui64.o -TF_OBJS_WRITECASE += writeCase_a_f16.o -TF_OBJS_WRITECASE += writeCase_ab_f16.o -TF_OBJS_WRITECASE += writeCase_abc_f16.o -TF_OBJS_WRITECASE += writeCase_a_f32.o -TF_OBJS_WRITECASE += writeCase_ab_f32.o -TF_OBJS_WRITECASE += writeCase_abc_f32.o -TF_OBJS_WRITECASE += writeCase_a_f64.o -TF_OBJS_WRITECASE += writeCase_ab_f64.o -TF_OBJS_WRITECASE += writeCase_abc_f64.o -TF_OBJS_WRITECASE += writeCase_a_extF80M.o -TF_OBJS_WRITECASE += writeCase_ab_extF80M.o -TF_OBJS_WRITECASE += writeCase_a_f128M.o -TF_OBJS_WRITECASE += writeCase_ab_f128M.o -TF_OBJS_WRITECASE += writeCase_abc_f128M.o -TF_OBJS_WRITECASE += writeCase_z_bool.o -TF_OBJS_WRITECASE += writeCase_z_ui32.o -TF_OBJS_WRITECASE += writeCase_z_ui64.o -TF_OBJS_WRITECASE += writeCase_z_f16.o -TF_OBJS_WRITECASE += writeCase_z_f32.o -TF_OBJS_WRITECASE += writeCase_z_f64.o -TF_OBJS_WRITECASE += writeCase_z_extF80M.o -TF_OBJS_WRITECASE += writeCase_z_f128M.o - -TF_OBJS_TEST := -TF_OBJS_TEST += test_a_ui32_z_f16.o -TF_OBJS_TEST += test_a_ui32_z_f32.o -TF_OBJS_TEST += test_a_ui32_z_f64.o -TF_OBJS_TEST += test_a_ui32_z_extF80.o -TF_OBJS_TEST += test_a_ui32_z_f128.o -TF_OBJS_TEST += test_a_ui64_z_f16.o -TF_OBJS_TEST += test_a_ui64_z_f32.o -TF_OBJS_TEST += test_a_ui64_z_f64.o -TF_OBJS_TEST += test_a_ui64_z_extF80.o -TF_OBJS_TEST += test_a_ui64_z_f128.o -TF_OBJS_TEST += test_a_i32_z_f16.o -TF_OBJS_TEST += test_a_i32_z_f32.o -TF_OBJS_TEST += test_a_i32_z_f64.o -TF_OBJS_TEST += test_a_i32_z_extF80.o -TF_OBJS_TEST += test_a_i32_z_f128.o -TF_OBJS_TEST += test_a_i64_z_f16.o -TF_OBJS_TEST += test_a_i64_z_f32.o -TF_OBJS_TEST += test_a_i64_z_f64.o -TF_OBJS_TEST += test_a_i64_z_extF80.o -TF_OBJS_TEST += test_a_i64_z_f128.o -TF_OBJS_TEST += test_a_f16_z_ui32_rx.o -TF_OBJS_TEST += test_a_f16_z_ui64_rx.o -TF_OBJS_TEST += test_a_f16_z_i32_rx.o -TF_OBJS_TEST += test_a_f16_z_i64_rx.o -TF_OBJS_TEST += test_a_f16_z_ui32_x.o -TF_OBJS_TEST += test_a_f16_z_ui64_x.o -TF_OBJS_TEST += test_a_f16_z_i32_x.o -TF_OBJS_TEST += test_a_f16_z_i64_x.o -TF_OBJS_TEST += test_a_f16_z_f32.o -TF_OBJS_TEST += test_a_f16_z_f64.o -TF_OBJS_TEST += test_a_f16_z_extF80.o -TF_OBJS_TEST += test_a_f16_z_f128.o -TF_OBJS_TEST += test_az_f16.o -TF_OBJS_TEST += test_az_f16_rx.o -TF_OBJS_TEST += test_abz_f16.o -TF_OBJS_TEST += test_abcz_f16.o -TF_OBJS_TEST += test_ab_f16_z_bool.o -TF_OBJS_TEST += test_a_f32_z_ui32_rx.o -TF_OBJS_TEST += test_a_f32_z_ui64_rx.o -TF_OBJS_TEST += test_a_f32_z_i32_rx.o -TF_OBJS_TEST += test_a_f32_z_i64_rx.o -TF_OBJS_TEST += test_a_f32_z_ui32_x.o -TF_OBJS_TEST += test_a_f32_z_ui64_x.o -TF_OBJS_TEST += test_a_f32_z_i32_x.o -TF_OBJS_TEST += test_a_f32_z_i64_x.o -TF_OBJS_TEST += test_a_f32_z_f16.o -TF_OBJS_TEST += test_a_f32_z_f64.o -TF_OBJS_TEST += test_a_f32_z_extF80.o -TF_OBJS_TEST += test_a_f32_z_f128.o -TF_OBJS_TEST += test_az_f32.o -TF_OBJS_TEST += test_az_f32_rx.o -TF_OBJS_TEST += test_abz_f32.o -TF_OBJS_TEST += test_abcz_f32.o -TF_OBJS_TEST += test_ab_f32_z_bool.o -TF_OBJS_TEST += test_a_f64_z_ui32_rx.o -TF_OBJS_TEST += test_a_f64_z_ui64_rx.o -TF_OBJS_TEST += test_a_f64_z_i32_rx.o -TF_OBJS_TEST += test_a_f64_z_i64_rx.o -TF_OBJS_TEST += test_a_f64_z_ui32_x.o -TF_OBJS_TEST += test_a_f64_z_ui64_x.o -TF_OBJS_TEST += test_a_f64_z_i32_x.o -TF_OBJS_TEST += test_a_f64_z_i64_x.o -TF_OBJS_TEST += test_a_f64_z_f16.o -TF_OBJS_TEST += test_a_f64_z_f32.o -TF_OBJS_TEST += test_a_f64_z_extF80.o -TF_OBJS_TEST += test_a_f64_z_f128.o -TF_OBJS_TEST += test_az_f64.o -TF_OBJS_TEST += test_az_f64_rx.o -TF_OBJS_TEST += test_abz_f64.o -TF_OBJS_TEST += test_abcz_f64.o -TF_OBJS_TEST += test_ab_f64_z_bool.o -TF_OBJS_TEST += test_a_extF80_z_ui32_rx.o -TF_OBJS_TEST += test_a_extF80_z_ui64_rx.o -TF_OBJS_TEST += test_a_extF80_z_i32_rx.o -TF_OBJS_TEST += test_a_extF80_z_i64_rx.o -TF_OBJS_TEST += test_a_extF80_z_ui32_x.o -TF_OBJS_TEST += test_a_extF80_z_ui64_x.o -TF_OBJS_TEST += test_a_extF80_z_i32_x.o -TF_OBJS_TEST += test_a_extF80_z_i64_x.o -TF_OBJS_TEST += test_a_extF80_z_f16.o -TF_OBJS_TEST += test_a_extF80_z_f32.o -TF_OBJS_TEST += test_a_extF80_z_f64.o -TF_OBJS_TEST += test_a_extF80_z_f128.o -TF_OBJS_TEST += test_az_extF80.o -TF_OBJS_TEST += test_az_extF80_rx.o -TF_OBJS_TEST += test_abz_extF80.o -TF_OBJS_TEST += test_ab_extF80_z_bool.o -TF_OBJS_TEST += test_a_f128_z_ui32_rx.o -TF_OBJS_TEST += test_a_f128_z_ui64_rx.o -TF_OBJS_TEST += test_a_f128_z_i32_rx.o -TF_OBJS_TEST += test_a_f128_z_i64_rx.o -TF_OBJS_TEST += test_a_f128_z_ui32_x.o -TF_OBJS_TEST += test_a_f128_z_ui64_x.o -TF_OBJS_TEST += test_a_f128_z_i32_x.o -TF_OBJS_TEST += test_a_f128_z_i64_x.o -TF_OBJS_TEST += test_a_f128_z_f16.o -TF_OBJS_TEST += test_a_f128_z_f32.o -TF_OBJS_TEST += test_a_f128_z_f64.o -TF_OBJS_TEST += test_a_f128_z_extF80.o -TF_OBJS_TEST += test_az_f128.o -TF_OBJS_TEST += test_az_f128_rx.o -TF_OBJS_TEST += test_abz_f128.o -TF_OBJS_TEST += test_abcz_f128.o -TF_OBJS_TEST += test_ab_f128_z_bool.o - -TF_OBJS_LIB := -TF_OBJS_LIB += uint128_inline.o -TF_OBJS_LIB += uint128.o -TF_OBJS_LIB += fail.o -TF_OBJS_LIB += functions_common.o -TF_OBJS_LIB += functionInfos.o -TF_OBJS_LIB += standardFunctionInfos.o -TF_OBJS_LIB += random.o -TF_OBJS_LIB += genCases_common.o -TF_OBJS_LIB += $(TF_OBJS_GENCASES) -TF_OBJS_LIB += genCases_writeTestsTotal.o -TF_OBJS_LIB += verCases_inline.o -TF_OBJS_LIB += verCases_common.o -TF_OBJS_LIB += verCases_writeFunctionName.o -TF_OBJS_LIB += readHex.o -TF_OBJS_LIB += writeHex.o -TF_OBJS_LIB += $(TF_OBJS_WRITECASE) -TF_OBJS_LIB += testLoops_common.o -TF_OBJS_LIB += $(TF_OBJS_TEST) - -BINARIES := fp-test$(EXESUF) fp-bench$(EXESUF) - -# We require artefacts from the main build including config-host.h -# because platform.h includes it. Rather than re-invoking the main -# build we just error out if things aren't there. -$(LIBQEMUUTIL) $(BUILD_DIR)/config-host.h: - $(error $@ missing, re-run parent build) - -all: $(BUILD_DIR)/config-host.h $(BINARIES) - -# libtestfloat.a depends on libsoftfloat.a, so specify it first -FP_TEST_LIBS := libtestfloat.a libsoftfloat.a $(LIBQEMUUTIL) - -fp-test$(EXESUF): fp-test.o slowfloat.o $(QEMU_SOFTFLOAT_OBJ) $(FP_TEST_LIBS) - -# Custom rule to build with SF_CFLAGS -SF_BUILD = $(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \ - $(QEMU_CFLAGS) $(SF_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ - $($@-cflags) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -$(SF_OBJS_ALL_NOSPEC): %.o: $(SF_SOURCE_DIR)/%.c - $(SF_BUILD) -$(SF_OBJS_SPECIALIZE): %.o: $(SF_SPECIALIZE_DIR)/%.c - $(SF_BUILD) - -libsoftfloat.a: $(SF_OBJS_ALL) - -# Custom rule to build with TF_CFLAGS -$(TF_OBJS_LIB) slowfloat.o: %.o: $(TF_SOURCE_DIR)/%.c - $(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \ - $(QEMU_CFLAGS) $(TF_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ - $($@-cflags) -c -o $@ $<,"CC","$(TARGET_DIR)$@") - -libtestfloat.a: $(TF_OBJS_LIB) - -fp-bench$(EXESUF): fp-bench.o $(QEMU_SOFTFLOAT_OBJ) $(LIBQEMUUTIL) - -clean: - rm -f *.o *.d $(BINARIES) - rm -f *.gcno *.gcda *.gcov - rm -f fp-test$(EXESUF) - rm -f fp-bench$(EXESUF) - rm -f libsoftfloat.a - rm -f libtestfloat.a - --include $(wildcard *.d) diff --git a/tests/fp/meson.build b/tests/fp/meson.build new file mode 100644 index 0000000..eed9780 --- /dev/null +++ b/tests/fp/meson.build @@ -0,0 +1,628 @@ +fpcflags = [ + # softfloat defines + '-DSOFTFLOAT_ROUND_ODD', + '-DINLINE_LEVEL=5', + '-DSOFTFLOAT_FAST_DIV32TO16', + '-DSOFTFLOAT_FAST_DIV64TO32', + '-DSOFTFLOAT_FAST_INT64', + # testfloat defines + '-DFLOAT16', + '-DFLOAT64', + '-DEXTFLOAT80', + '-DFLOAT128', + '-DFLOAT_ROUND_ODD', + '-DLONG_DOUBLE_IS_EXTFLOAT80', +] + +sfdir = 'berkeley-softfloat-3/source' +sfspedir = sfdir / '8086-SSE' +tfdir = 'berkeley-testfloat-3/source' + +sfinc = include_directories(sfdir / 'include', sfspedir) + +tfcflags = [ + '-Wno-strict-prototypes', + '-Wno-unknown-pragmas', + '-Wno-uninitialized', + '-Wno-missing-prototypes', + '-Wno-return-type', + '-Wno-unused-function', + '-Wno-error', +] + +tfgencases = [ + tfdir / 'genCases_ui32.c', + tfdir / 'genCases_ui64.c', + tfdir / 'genCases_i32.c', + tfdir / 'genCases_i64.c', + tfdir / 'genCases_f16.c', + tfdir / 'genCases_f32.c', + tfdir / 'genCases_f64.c', + tfdir / 'genCases_extF80.c', + tfdir / 'genCases_f128.c', +] + +tfwritecase = [ + tfdir / 'writeCase_a_ui32.c', + tfdir / 'writeCase_a_ui64.c', + tfdir / 'writeCase_a_f16.c', + tfdir / 'writeCase_ab_f16.c', + tfdir / 'writeCase_abc_f16.c', + tfdir / 'writeCase_a_f32.c', + tfdir / 'writeCase_ab_f32.c', + tfdir / 'writeCase_abc_f32.c', + tfdir / 'writeCase_a_f64.c', + tfdir / 'writeCase_ab_f64.c', + tfdir / 'writeCase_abc_f64.c', + tfdir / 'writeCase_a_extF80M.c', + tfdir / 'writeCase_ab_extF80M.c', + tfdir / 'writeCase_a_f128M.c', + tfdir / 'writeCase_ab_f128M.c', + tfdir / 'writeCase_abc_f128M.c', + tfdir / 'writeCase_z_bool.c', + tfdir / 'writeCase_z_ui32.c', + tfdir / 'writeCase_z_ui64.c', + tfdir / 'writeCase_z_f16.c', + tfdir / 'writeCase_z_f32.c', + tfdir / 'writeCase_z_f64.c', + tfdir / 'writeCase_z_extF80M.c', + tfdir / 'writeCase_z_f128M.c', +] + +tftest = [ + tfdir / 'test_a_ui32_z_f16.c', + tfdir / 'test_a_ui32_z_f32.c', + tfdir / 'test_a_ui32_z_f64.c', + tfdir / 'test_a_ui32_z_extF80.c', + tfdir / 'test_a_ui32_z_f128.c', + tfdir / 'test_a_ui64_z_f16.c', + tfdir / 'test_a_ui64_z_f32.c', + tfdir / 'test_a_ui64_z_f64.c', + tfdir / 'test_a_ui64_z_extF80.c', + tfdir / 'test_a_ui64_z_f128.c', + tfdir / 'test_a_i32_z_f16.c', + tfdir / 'test_a_i32_z_f32.c', + tfdir / 'test_a_i32_z_f64.c', + tfdir / 'test_a_i32_z_extF80.c', + tfdir / 'test_a_i32_z_f128.c', + tfdir / 'test_a_i64_z_f16.c', + tfdir / 'test_a_i64_z_f32.c', + tfdir / 'test_a_i64_z_f64.c', + tfdir / 'test_a_i64_z_extF80.c', + tfdir / 'test_a_i64_z_f128.c', + tfdir / 'test_a_f16_z_ui32_rx.c', + tfdir / 'test_a_f16_z_ui64_rx.c', + tfdir / 'test_a_f16_z_i32_rx.c', + tfdir / 'test_a_f16_z_i64_rx.c', + tfdir / 'test_a_f16_z_ui32_x.c', + tfdir / 'test_a_f16_z_ui64_x.c', + tfdir / 'test_a_f16_z_i32_x.c', + tfdir / 'test_a_f16_z_i64_x.c', + tfdir / 'test_a_f16_z_f32.c', + tfdir / 'test_a_f16_z_f64.c', + tfdir / 'test_a_f16_z_extF80.c', + tfdir / 'test_a_f16_z_f128.c', + tfdir / 'test_az_f16.c', + tfdir / 'test_az_f16_rx.c', + tfdir / 'test_abz_f16.c', + tfdir / 'test_abcz_f16.c', + tfdir / 'test_ab_f16_z_bool.c', + tfdir / 'test_a_f32_z_ui32_rx.c', + tfdir / 'test_a_f32_z_ui64_rx.c', + tfdir / 'test_a_f32_z_i32_rx.c', + tfdir / 'test_a_f32_z_i64_rx.c', + tfdir / 'test_a_f32_z_ui32_x.c', + tfdir / 'test_a_f32_z_ui64_x.c', + tfdir / 'test_a_f32_z_i32_x.c', + tfdir / 'test_a_f32_z_i64_x.c', + tfdir / 'test_a_f32_z_f16.c', + tfdir / 'test_a_f32_z_f64.c', + tfdir / 'test_a_f32_z_extF80.c', + tfdir / 'test_a_f32_z_f128.c', + tfdir / 'test_az_f32.c', + tfdir / 'test_az_f32_rx.c', + tfdir / 'test_abz_f32.c', + tfdir / 'test_abcz_f32.c', + tfdir / 'test_ab_f32_z_bool.c', + tfdir / 'test_a_f64_z_ui32_rx.c', + tfdir / 'test_a_f64_z_ui64_rx.c', + tfdir / 'test_a_f64_z_i32_rx.c', + tfdir / 'test_a_f64_z_i64_rx.c', + tfdir / 'test_a_f64_z_ui32_x.c', + tfdir / 'test_a_f64_z_ui64_x.c', + tfdir / 'test_a_f64_z_i32_x.c', + tfdir / 'test_a_f64_z_i64_x.c', + tfdir / 'test_a_f64_z_f16.c', + tfdir / 'test_a_f64_z_f32.c', + tfdir / 'test_a_f64_z_extF80.c', + tfdir / 'test_a_f64_z_f128.c', + tfdir / 'test_az_f64.c', + tfdir / 'test_az_f64_rx.c', + tfdir / 'test_abz_f64.c', + tfdir / 'test_abcz_f64.c', + tfdir / 'test_ab_f64_z_bool.c', + tfdir / 'test_a_extF80_z_ui32_rx.c', + tfdir / 'test_a_extF80_z_ui64_rx.c', + tfdir / 'test_a_extF80_z_i32_rx.c', + tfdir / 'test_a_extF80_z_i64_rx.c', + tfdir / 'test_a_extF80_z_ui32_x.c', + tfdir / 'test_a_extF80_z_ui64_x.c', + tfdir / 'test_a_extF80_z_i32_x.c', + tfdir / 'test_a_extF80_z_i64_x.c', + tfdir / 'test_a_extF80_z_f16.c', + tfdir / 'test_a_extF80_z_f32.c', + tfdir / 'test_a_extF80_z_f64.c', + tfdir / 'test_a_extF80_z_f128.c', + tfdir / 'test_az_extF80.c', + tfdir / 'test_az_extF80_rx.c', + tfdir / 'test_abz_extF80.c', + tfdir / 'test_ab_extF80_z_bool.c', + tfdir / 'test_a_f128_z_ui32_rx.c', + tfdir / 'test_a_f128_z_ui64_rx.c', + tfdir / 'test_a_f128_z_i32_rx.c', + tfdir / 'test_a_f128_z_i64_rx.c', + tfdir / 'test_a_f128_z_ui32_x.c', + tfdir / 'test_a_f128_z_ui64_x.c', + tfdir / 'test_a_f128_z_i32_x.c', + tfdir / 'test_a_f128_z_i64_x.c', + tfdir / 'test_a_f128_z_f16.c', + tfdir / 'test_a_f128_z_f32.c', + tfdir / 'test_a_f128_z_f64.c', + tfdir / 'test_a_f128_z_extF80.c', + tfdir / 'test_az_f128.c', + tfdir / 'test_az_f128_rx.c', + tfdir / 'test_abz_f128.c', + tfdir / 'test_abcz_f128.c', + tfdir / 'test_ab_f128_z_bool.c', +] + +libtestfloat = static_library( + 'testfloat', + files( + tfdir / 'uint128_inline.c', + tfdir / 'uint128.c', + tfdir / 'fail.c', + tfdir / 'functions_common.c', + tfdir / 'functionInfos.c', + tfdir / 'standardFunctionInfos.c', + tfdir / 'random.c', + tfdir / 'genCases_common.c', + tfgencases, + tfdir / 'genCases_writeTestsTotal.c', + tfdir / 'verCases_inline.c', + tfdir / 'verCases_common.c', + tfdir / 'verCases_writeFunctionName.c', + tfdir / 'readHex.c', + tfdir / 'writeHex.c', + tfwritecase, + tfdir / 'testLoops_common.c', + tftest, + ), + include_directories: sfinc, + c_args: tfcflags + fpcflags, +) + +sfcflags = [ + '-Wno-missing-prototypes', + '-Wno-redundant-decls', + '-Wno-return-type', + '-Wno-error', +] + +libsoftfloat = static_library( + 'softfloat', + files( + # primitives + sfdir / 's_eq128.c', + sfdir / 's_le128.c', + sfdir / 's_lt128.c', + sfdir / 's_shortShiftLeft128.c', + sfdir / 's_shortShiftRight128.c', + sfdir / 's_shortShiftRightJam64.c', + sfdir / 's_shortShiftRightJam64Extra.c', + sfdir / 's_shortShiftRightJam128.c', + sfdir / 's_shortShiftRightJam128Extra.c', + sfdir / 's_shiftRightJam32.c', + sfdir / 's_shiftRightJam64.c', + sfdir / 's_shiftRightJam64Extra.c', + sfdir / 's_shiftRightJam128.c', + sfdir / 's_shiftRightJam128Extra.c', + sfdir / 's_shiftRightJam256M.c', + sfdir / 's_countLeadingZeros8.c', + sfdir / 's_countLeadingZeros16.c', + sfdir / 's_countLeadingZeros32.c', + sfdir / 's_countLeadingZeros64.c', + sfdir / 's_add128.c', + sfdir / 's_add256M.c', + sfdir / 's_sub128.c', + sfdir / 's_sub256M.c', + sfdir / 's_mul64ByShifted32To128.c', + sfdir / 's_mul64To128.c', + sfdir / 's_mul128By32.c', + sfdir / 's_mul128To256M.c', + sfdir / 's_approxRecip_1Ks.c', + sfdir / 's_approxRecip32_1.c', + sfdir / 's_approxRecipSqrt_1Ks.c', + sfdir / 's_approxRecipSqrt32_1.c', + # others + sfdir / 's_roundToUI32.c', + sfdir / 's_roundToUI64.c', + sfdir / 's_roundToI32.c', + sfdir / 's_roundToI64.c', + sfdir / 's_normSubnormalF16Sig.c', + sfdir / 's_roundPackToF16.c', + sfdir / 's_normRoundPackToF16.c', + sfdir / 's_addMagsF16.c', + sfdir / 's_subMagsF16.c', + sfdir / 's_mulAddF16.c', + sfdir / 's_normSubnormalF32Sig.c', + sfdir / 's_roundPackToF32.c', + sfdir / 's_normRoundPackToF32.c', + sfdir / 's_addMagsF32.c', + sfdir / 's_subMagsF32.c', + sfdir / 's_mulAddF32.c', + sfdir / 's_normSubnormalF64Sig.c', + sfdir / 's_roundPackToF64.c', + sfdir / 's_normRoundPackToF64.c', + sfdir / 's_addMagsF64.c', + sfdir / 's_subMagsF64.c', + sfdir / 's_mulAddF64.c', + sfdir / 's_normSubnormalExtF80Sig.c', + sfdir / 's_roundPackToExtF80.c', + sfdir / 's_normRoundPackToExtF80.c', + sfdir / 's_addMagsExtF80.c', + sfdir / 's_subMagsExtF80.c', + sfdir / 's_normSubnormalF128Sig.c', + sfdir / 's_roundPackToF128.c', + sfdir / 's_normRoundPackToF128.c', + sfdir / 's_addMagsF128.c', + sfdir / 's_subMagsF128.c', + sfdir / 's_mulAddF128.c', + sfdir / 'softfloat_state.c', + sfdir / 'ui32_to_f16.c', + sfdir / 'ui32_to_f32.c', + sfdir / 'ui32_to_f64.c', + sfdir / 'ui32_to_extF80.c', + sfdir / 'ui32_to_extF80M.c', + sfdir / 'ui32_to_f128.c', + sfdir / 'ui32_to_f128M.c', + sfdir / 'ui64_to_f16.c', + sfdir / 'ui64_to_f32.c', + sfdir / 'ui64_to_f64.c', + sfdir / 'ui64_to_extF80.c', + sfdir / 'ui64_to_extF80M.c', + sfdir / 'ui64_to_f128.c', + sfdir / 'ui64_to_f128M.c', + sfdir / 'i32_to_f16.c', + sfdir / 'i32_to_f32.c', + sfdir / 'i32_to_f64.c', + sfdir / 'i32_to_extF80.c', + sfdir / 'i32_to_extF80M.c', + sfdir / 'i32_to_f128.c', + sfdir / 'i32_to_f128M.c', + sfdir / 'i64_to_f16.c', + sfdir / 'i64_to_f32.c', + sfdir / 'i64_to_f64.c', + sfdir / 'i64_to_extF80.c', + sfdir / 'i64_to_extF80M.c', + sfdir / 'i64_to_f128.c', + sfdir / 'i64_to_f128M.c', + sfdir / 'f16_to_ui32.c', + sfdir / 'f16_to_ui64.c', + sfdir / 'f16_to_i32.c', + sfdir / 'f16_to_i64.c', + sfdir / 'f16_to_ui32_r_minMag.c', + sfdir / 'f16_to_ui64_r_minMag.c', + sfdir / 'f16_to_i32_r_minMag.c', + sfdir / 'f16_to_i64_r_minMag.c', + sfdir / 'f16_to_f32.c', + sfdir / 'f16_to_f64.c', + sfdir / 'f16_to_extF80.c', + sfdir / 'f16_to_extF80M.c', + sfdir / 'f16_to_f128.c', + sfdir / 'f16_to_f128M.c', + sfdir / 'f16_roundToInt.c', + sfdir / 'f16_add.c', + sfdir / 'f16_sub.c', + sfdir / 'f16_mul.c', + sfdir / 'f16_mulAdd.c', + sfdir / 'f16_div.c', + sfdir / 'f16_rem.c', + sfdir / 'f16_sqrt.c', + sfdir / 'f16_eq.c', + sfdir / 'f16_le.c', + sfdir / 'f16_lt.c', + sfdir / 'f16_eq_signaling.c', + sfdir / 'f16_le_quiet.c', + sfdir / 'f16_lt_quiet.c', + sfdir / 'f16_isSignalingNaN.c', + sfdir / 'f32_to_ui32.c', + sfdir / 'f32_to_ui64.c', + sfdir / 'f32_to_i32.c', + sfdir / 'f32_to_i64.c', + sfdir / 'f32_to_ui32_r_minMag.c', + sfdir / 'f32_to_ui64_r_minMag.c', + sfdir / 'f32_to_i32_r_minMag.c', + sfdir / 'f32_to_i64_r_minMag.c', + sfdir / 'f32_to_f16.c', + sfdir / 'f32_to_f64.c', + sfdir / 'f32_to_extF80.c', + sfdir / 'f32_to_extF80M.c', + sfdir / 'f32_to_f128.c', + sfdir / 'f32_to_f128M.c', + sfdir / 'f32_roundToInt.c', + sfdir / 'f32_add.c', + sfdir / 'f32_sub.c', + sfdir / 'f32_mul.c', + sfdir / 'f32_mulAdd.c', + sfdir / 'f32_div.c', + sfdir / 'f32_rem.c', + sfdir / 'f32_sqrt.c', + sfdir / 'f32_eq.c', + sfdir / 'f32_le.c', + sfdir / 'f32_lt.c', + sfdir / 'f32_eq_signaling.c', + sfdir / 'f32_le_quiet.c', + sfdir / 'f32_lt_quiet.c', + sfdir / 'f32_isSignalingNaN.c', + sfdir / 'f64_to_ui32.c', + sfdir / 'f64_to_ui64.c', + sfdir / 'f64_to_i32.c', + sfdir / 'f64_to_i64.c', + sfdir / 'f64_to_ui32_r_minMag.c', + sfdir / 'f64_to_ui64_r_minMag.c', + sfdir / 'f64_to_i32_r_minMag.c', + sfdir / 'f64_to_i64_r_minMag.c', + sfdir / 'f64_to_f16.c', + sfdir / 'f64_to_f32.c', + sfdir / 'f64_to_extF80.c', + sfdir / 'f64_to_extF80M.c', + sfdir / 'f64_to_f128.c', + sfdir / 'f64_to_f128M.c', + sfdir / 'f64_roundToInt.c', + sfdir / 'f64_add.c', + sfdir / 'f64_sub.c', + sfdir / 'f64_mul.c', + sfdir / 'f64_mulAdd.c', + sfdir / 'f64_div.c', + sfdir / 'f64_rem.c', + sfdir / 'f64_sqrt.c', + sfdir / 'f64_eq.c', + sfdir / 'f64_le.c', + sfdir / 'f64_lt.c', + sfdir / 'f64_eq_signaling.c', + sfdir / 'f64_le_quiet.c', + sfdir / 'f64_lt_quiet.c', + sfdir / 'f64_isSignalingNaN.c', + sfdir / 'extF80_to_ui32.c', + sfdir / 'extF80_to_ui64.c', + sfdir / 'extF80_to_i32.c', + sfdir / 'extF80_to_i64.c', + sfdir / 'extF80_to_ui32_r_minMag.c', + sfdir / 'extF80_to_ui64_r_minMag.c', + sfdir / 'extF80_to_i32_r_minMag.c', + sfdir / 'extF80_to_i64_r_minMag.c', + sfdir / 'extF80_to_f16.c', + sfdir / 'extF80_to_f32.c', + sfdir / 'extF80_to_f64.c', + sfdir / 'extF80_to_f128.c', + sfdir / 'extF80_roundToInt.c', + sfdir / 'extF80_add.c', + sfdir / 'extF80_sub.c', + sfdir / 'extF80_mul.c', + sfdir / 'extF80_div.c', + sfdir / 'extF80_rem.c', + sfdir / 'extF80_sqrt.c', + sfdir / 'extF80_eq.c', + sfdir / 'extF80_le.c', + sfdir / 'extF80_lt.c', + sfdir / 'extF80_eq_signaling.c', + sfdir / 'extF80_le_quiet.c', + sfdir / 'extF80_lt_quiet.c', + sfdir / 'extF80_isSignalingNaN.c', + sfdir / 'extF80M_to_ui32.c', + sfdir / 'extF80M_to_ui64.c', + sfdir / 'extF80M_to_i32.c', + sfdir / 'extF80M_to_i64.c', + sfdir / 'extF80M_to_ui32_r_minMag.c', + sfdir / 'extF80M_to_ui64_r_minMag.c', + sfdir / 'extF80M_to_i32_r_minMag.c', + sfdir / 'extF80M_to_i64_r_minMag.c', + sfdir / 'extF80M_to_f16.c', + sfdir / 'extF80M_to_f32.c', + sfdir / 'extF80M_to_f64.c', + sfdir / 'extF80M_to_f128M.c', + sfdir / 'extF80M_roundToInt.c', + sfdir / 'extF80M_add.c', + sfdir / 'extF80M_sub.c', + sfdir / 'extF80M_mul.c', + sfdir / 'extF80M_div.c', + sfdir / 'extF80M_rem.c', + sfdir / 'extF80M_sqrt.c', + sfdir / 'extF80M_eq.c', + sfdir / 'extF80M_le.c', + sfdir / 'extF80M_lt.c', + sfdir / 'extF80M_eq_signaling.c', + sfdir / 'extF80M_le_quiet.c', + sfdir / 'extF80M_lt_quiet.c', + sfdir / 'f128_to_ui32.c', + sfdir / 'f128_to_ui64.c', + sfdir / 'f128_to_i32.c', + sfdir / 'f128_to_i64.c', + sfdir / 'f128_to_ui32_r_minMag.c', + sfdir / 'f128_to_ui64_r_minMag.c', + sfdir / 'f128_to_i32_r_minMag.c', + sfdir / 'f128_to_i64_r_minMag.c', + sfdir / 'f128_to_f16.c', + sfdir / 'f128_to_f32.c', + sfdir / 'f128_to_extF80.c', + sfdir / 'f128_to_f64.c', + sfdir / 'f128_roundToInt.c', + sfdir / 'f128_add.c', + sfdir / 'f128_sub.c', + sfdir / 'f128_mul.c', + sfdir / 'f128_mulAdd.c', + sfdir / 'f128_div.c', + sfdir / 'f128_rem.c', + sfdir / 'f128_sqrt.c', + sfdir / 'f128_eq.c', + sfdir / 'f128_le.c', + sfdir / 'f128_lt.c', + sfdir / 'f128_eq_signaling.c', + sfdir / 'f128_le_quiet.c', + sfdir / 'f128_lt_quiet.c', + sfdir / 'f128_isSignalingNaN.c', + sfdir / 'f128M_to_ui32.c', + sfdir / 'f128M_to_ui64.c', + sfdir / 'f128M_to_i32.c', + sfdir / 'f128M_to_i64.c', + sfdir / 'f128M_to_ui32_r_minMag.c', + sfdir / 'f128M_to_ui64_r_minMag.c', + sfdir / 'f128M_to_i32_r_minMag.c', + sfdir / 'f128M_to_i64_r_minMag.c', + sfdir / 'f128M_to_f16.c', + sfdir / 'f128M_to_f32.c', + sfdir / 'f128M_to_extF80M.c', + sfdir / 'f128M_to_f64.c', + sfdir / 'f128M_roundToInt.c', + sfdir / 'f128M_add.c', + sfdir / 'f128M_sub.c', + sfdir / 'f128M_mul.c', + sfdir / 'f128M_mulAdd.c', + sfdir / 'f128M_div.c', + sfdir / 'f128M_rem.c', + sfdir / 'f128M_sqrt.c', + sfdir / 'f128M_eq.c', + sfdir / 'f128M_le.c', + sfdir / 'f128M_lt.c', + sfdir / 'f128M_eq_signaling.c', + sfdir / 'f128M_le_quiet.c', + sfdir / 'f128M_lt_quiet.c', + # spe + sfspedir / 'softfloat_raiseFlags.c', + sfspedir / 's_f16UIToCommonNaN.c', + sfspedir / 's_commonNaNToF16UI.c', + sfspedir / 's_propagateNaNF16UI.c', + sfspedir / 's_f32UIToCommonNaN.c', + sfspedir / 's_commonNaNToF32UI.c', + sfspedir / 's_propagateNaNF32UI.c', + sfspedir / 's_f64UIToCommonNaN.c', + sfspedir / 's_commonNaNToF64UI.c', + sfspedir / 's_propagateNaNF64UI.c', + sfspedir / 'extF80M_isSignalingNaN.c', + sfspedir / 's_extF80UIToCommonNaN.c', + sfspedir / 's_commonNaNToExtF80UI.c', + sfspedir / 's_propagateNaNExtF80UI.c', + sfspedir / 'f128M_isSignalingNaN.c', + sfspedir / 's_f128UIToCommonNaN.c', + sfspedir / 's_commonNaNToF128UI.c', + sfspedir / 's_propagateNaNF128UI.c', + ), + include_directories: sfinc, + c_args: sfcflags + fpcflags, +) + +fpcflags += [ + # work around TARGET_* poisoning + '-DHW_POISON_H', + # define a target to match testfloat's implementation-defined choices, such as + # whether to raise the invalid flag when dealing with NaNs in muladd. + '-DTARGET_ARM', + # FIXME: uiZ may be used uninitialized in this function + '-Wno-uninitialized', +] + +fptest = executable( + 'fp-test', + ['fp-test.c', tfdir / 'slowfloat.c', '../../fpu/softfloat.c'], + link_with: [libtestfloat, libsoftfloat], + dependencies: [qemuutil], + include_directories: [sfinc, include_directories(tfdir)], + c_args: fpcflags, +) +softfloat_conv_tests = { + 'float-to-float': 'f16_to_f32 f16_to_f64 f16_to_extF80 f16_to_f128 ' + + 'f32_to_f16 f32_to_f64 f32_to_extF80 ' + + 'f64_to_f16 f64_to_f32 ' + + 'extF80_to_f16 extF80_to_f32 ' + + 'extF80_to_f64 extF80_to_f128 ' + + 'f128_to_f16', + 'int-to-float': 'i32_to_f16 i64_to_f16 i32_to_f32 i64_to_f32 ' + + 'i32_to_f64 i64_to_f64 i32_to_f128 i64_to_f128', + 'uint-to-float': 'ui32_to_f16 ui64_to_f16 ui32_to_f32 ui64_to_f32 ' + + 'ui32_to_f64 ui64_to_f64 ui64_to_f128 ' + + 'ui32_to_extF80 ui64_to_extF80', + 'float-to-int': 'f16_to_i32 f16_to_i32_r_minMag ' + + 'f32_to_i32 f32_to_i32_r_minMag ' + + 'f64_to_i32 f64_to_i32_r_minMag ' + + 'extF80_to_i32 extF80_to_i32_r_minMag ' + + 'f128_to_i32 f128_to_i32_r_minMag ' + + 'f16_to_i64 f16_to_i64_r_minMag ' + + 'f32_to_i64 f32_to_i64_r_minMag ' + + 'f64_to_i64 f64_to_i64_r_minMag ' + + 'extF80_to_i64 extF80_to_i64_r_minMag ' + + 'f128_to_i64 f128_to_i64_r_minMag', + 'float-to-uint': 'f16_to_ui32 f16_to_ui32_r_minMag ' + + 'f32_to_ui32 f32_to_ui32_r_minMag ' + + 'f64_to_ui32 f64_to_ui32_r_minMag ' + + 'extF80_to_ui32 extF80_to_ui32_r_minMag ' + + 'f128_to_ui32 f128_to_ui32_r_minMag ' + + 'f16_to_ui64 f16_to_ui64_r_minMag ' + + 'f32_to_ui64 f32_to_ui64_r_minMag ' + + 'f64_to_ui64 f64_to_ui64_r_minMag ' + + 'extF80_to_ui64 extF80_to_ui64_r_minMag ' + + 'f128_to_ui64 f128_to_ui64_r_minMag', + 'round-to-integer': 'f16_roundToInt f32_roundToInt ' + + 'f64_roundToInt f128_roundToInt' +} +softfloat_tests = { + 'eq_signaling' : 'compare', + 'le' : 'compare', + 'le_quiet' : 'compare', + 'lt_quiet' : 'compare', + 'add': 'ops', + 'sub': 'ops', + 'mul': 'ops', + 'div': 'ops', + 'rem': 'ops', + 'sqrt': 'ops' +} +# The full test suite can take a bit of time, default to a quick run +# "-l 2 -r all" can take more than a day for some operations and is best +# run manually +fptest_args = ['-s', '-l', '1'] +fptest_rounding_args = ['-r', 'all'] + +# Conversion Routines: +# FIXME: i32_to_extF80 (broken), i64_to_extF80 (broken) +# extF80_roundToInt (broken) +foreach k, v : softfloat_conv_tests + test('fp-test:' + k, fptest, + args: fptest_args + fptest_rounding_args + v.split(), + suite: ['softfloat', 'softfloat-conv']) +endforeach + +# FIXME: extF80_{lt_quiet, rem} (broken), +# extF80_{mulAdd} (missing) +foreach k, v : softfloat_tests + extF80_broken = ['lt_quiet', 'rem'].contains(k) + test('fp-test:' + k, fptest, + args: fptest_args + fptest_rounding_args + + ['f16_' + k, 'f32_' + k, 'f64_' + k, 'f128_' + k] + + (extF80_broken ? [] : ['extF80_' + k]), + suite: ['softfloat', 'softfloat-' + v]) +endforeach +test('fp-test:mulAdd', fptest, + # no fptest_rounding_args + args: fptest_args + + ['f16_mulAdd', 'f32_mulAdd', 'f64_mulAdd', 'f128_mulAdd'], + suite: ['softfloat-slow', 'softfloat-ops-slow'], timeout: 60) + +fpbench = executable( + 'fp-bench', + ['fp-bench.c', '../../fpu/softfloat.c'], + link_with: [libtestfloat, libsoftfloat], + dependencies: [qemuutil], + include_directories: [sfinc, include_directories(tfdir)], + c_args: fpcflags, +) diff --git a/tests/meson.build b/tests/meson.build index 5c52021..ec26f92 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -2,3 +2,7 @@ test('decodetree', sh, args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ], workdir: meson.current_source_dir() / 'decode', suite: 'decodetree') + +if 'CONFIG_TCG' in config_host + subdir('fp') +endif From patchwork Thu Aug 6 19:14: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: 276965 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=-10.1 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 5D325C433E0 for ; Thu, 6 Aug 2020 19:44: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 573002177B for ; Thu, 6 Aug 2020 19:44:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Bu7rlcPL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 573002177B 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]:56860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3loR-00036V-BP for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:44:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOl-0005XP-DM for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:55 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:41420 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 1k3lOj-0006Vh-CX for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741472; 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=0Hgz26lLspDRlfLbFP+kB4XdVpPCpfVJFfNl3yzttTY=; b=Bu7rlcPLzfuFS1cD/2EB8rck3ekmdXtfxvrQaS3dlIH6JMPcXdBOXbj3iQ/FEYqfuZKQou IH09qXZFVJMoDYsgTSlqrj9/xKcMAh3FvRm5gbBbyp2R8qXbId57FVm0ZEG8aohtb2k74a CTDz0/k7Zwo0RT1XxtjLQ7ouFcnVojo= 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-372-G3JVCA7tNauZcfdtg8c5eg-1; Thu, 06 Aug 2020 15:17:50 -0400 X-MC-Unique: G3JVCA7tNauZcfdtg8c5eg-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 75656100AA21 for ; Thu, 6 Aug 2020 19:17:49 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 861D01D3; Thu, 6 Aug 2020 19:17:48 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 049/143] meson: convert qom directory to Meson (tools part) Date: Thu, 6 Aug 2020 21:14:45 +0200 Message-Id: <1596741379-12902-50-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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 d277681..36f74aa 100644 --- a/Makefile +++ b/Makefile @@ -233,7 +233,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) @@ -254,6 +253,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 baf1565..84bfa2a 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 257afc2..1e04551 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 fbf27a7..57475c8 100644 --- a/meson.build +++ b/meson.build @@ -312,6 +312,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 1b45d10..b962904 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 0000000..3c41ed3 --- /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(), + dependencies: [qom_ss.dependencies()], + link_with: [libqemuutil], + name_suffix: 'fa') + +qom = declare_dependency(link_whole: libqom) From patchwork Thu Aug 6 19:14: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: 276975 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=-10.1 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 BDC76C433DF for ; Thu, 6 Aug 2020 19:36:32 +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 BF19A2173E for ; Thu, 6 Aug 2020 19:36:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HPtW/Yoq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF19A2173E 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]:42892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lgl-0002rz-Nx for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:36:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOo-0005fE-Rf for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52057 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 1k3lOl-0006WE-KM for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:17:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741474; 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=JOmvDjeL+bFLQ0yQuGlOSZGU8CjxcAd5ihoNW0k9T/A=; b=HPtW/Yoqe/UWYp2pxi/V60aiit4wxlygjiydw7UdG3rKyXg/B30HcogBolmK7YzRF1GEef aYTi0RsrKgxXG5tE6D/XdKQcRv8WXIZQHomlBGeocgOgIKfl6QZ5FNn+ZeJMLm3J9gDlAO jPZq9wmIhi8Ib7XiD2mvnzcA5OM7qQw= 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-215-nIEw7EisMJ6IXXdDRQxWQA-1; Thu, 06 Aug 2020 15:17:53 -0400 X-MC-Unique: nIEw7EisMJ6IXXdDRQxWQA-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 33563100AA21 for ; Thu, 6 Aug 2020 19:17:52 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 431825F9DC; Thu, 6 Aug 2020 19:17:51 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 051/143] meson: convert crypto directory to Meson Date: Thu, 6 Aug 2020 21:14:47 +0200 Message-Id: <1596741379-12902-52-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 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 123b857..67e932e 100644 --- a/Makefile +++ b/Makefile @@ -231,7 +231,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 0bc361d..018338d 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 79b6e02..b213955 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 a988591..0000000 --- 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 1b24431..7aab8db 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(), + 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 81bd0d7..0864d07 100644 --- a/meson.build +++ b/meson.build @@ -300,6 +300,8 @@ subdir('qobject') subdir('stubs') subdir('trace') subdir('util') +subdir('qom') +subdir('authz') subdir('crypto') subdir('storage-daemon') subdir('ui') @@ -316,8 +318,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 3c41ed3..4af044d 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(), dependencies: [qom_ss.dependencies()], - link_with: [libqemuutil], name_suffix: 'fa') qom = declare_dependency(link_whole: libqom) From patchwork Thu Aug 6 19:14: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: 276974 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=-10.1 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 C51DCC433DF for ; Thu, 6 Aug 2020 19:36: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 C71982173E for ; Thu, 6 Aug 2020 19:36:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FtJ7CqyY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C71982173E 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]:44440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lgz-0003V3-Ri for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOu-0005tR-W5 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:05 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29157 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 1k3lOt-0006Xw-0A for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741482; 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=U2dPMwKaBtepL5+Kyam0PcxLp6Q7tOaG8q3dyTUI9ck=; b=FtJ7CqyYm3vYUH83xlggSO+95yA1YDL1QZkHYRWuUoK2srsPbl6GlvpMirmb4GgaAwqx78 /4O6xOGrShgEVweeeRZX73eT3xHdzgBzXB5IumrR5fhIWFR8vYEkKVzfe9N7wF8QbaT9IJ 6OGeNnBdmI+lD64ey6+El1j5nBz4PJQ= 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-H0xtAe9uM4SQ0uJ5KoDLhA-1; Thu, 06 Aug 2020 15:17:59 -0400 X-MC-Unique: H0xtAe9uM4SQ0uJ5KoDLhA-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 C909C107BEF5 for ; Thu, 6 Aug 2020 19:17:58 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 013EF1D3; Thu, 6 Aug 2020 19:17:53 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 053/143] meson: convert target/s390x/gen-features.h Date: Thu, 6 Aug 2020 21:14:49 +0200 Message-Id: <1596741379-12902-54-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 Needed by linux-user/s390x/cpu_loop.c. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 2 ++ meson.build | 1 + target/meson.build | 1 + target/s390x/Makefile.objs | 20 -------------------- target/s390x/cpu_features.h | 2 +- target/s390x/cpu_models.h | 2 +- target/s390x/meson.build | 8 ++++++++ 7 files changed, 14 insertions(+), 22 deletions(-) create mode 100644 target/meson.build create mode 100644 target/s390x/meson.build diff --git a/Makefile b/Makefile index d775df4..1d4dfe8 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,8 @@ 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 generated-files-y += .git-submodule-status diff --git a/meson.build b/meson.build index 7dbfc0b..2c617ef 100644 --- a/meson.build +++ b/meson.build @@ -320,6 +320,7 @@ qemuutil = declare_dependency(link_with: libqemuutil, subdir('io') subdir('fsdev') +subdir('target') # Other build targets if 'CONFIG_GUEST_AGENT' in config_host diff --git a/target/meson.build b/target/meson.build new file mode 100644 index 0000000..e29dd3e --- /dev/null +++ b/target/meson.build @@ -0,0 +1 @@ +subdir('s390x') diff --git a/target/s390x/Makefile.objs b/target/s390x/Makefile.objs index 3e27455..9b9accc 100644 --- a/target/s390x/Makefile.objs +++ b/target/s390x/Makefile.objs @@ -8,23 +8,3 @@ 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 - -# build and run feature list generator -feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/ -feat-dst = $(BUILD_DIR)/$(TARGET_DIR) -ifneq ($(MAKECMDGOALS),clean) -generated-files-y += $(feat-dst)gen-features.h -endif - -$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(feat-dst)gen-features.h-timestamp: $(feat-dst)gen-features - $(call quiet-command,$< >$@,"GEN","$(TARGET_DIR)gen-features.h") - -$(feat-dst)gen-features: $(feat-src)gen-features.c - $(call quiet-command,$(HOST_CC) $(QEMU_INCLUDES) -o $@ $<,"CC","$(TARGET_DIR)gen-features") - -clean-target: - rm -f gen-features.h-timestamp - rm -f gen-features.h - rm -f gen-features diff --git a/target/s390x/cpu_features.h b/target/s390x/cpu_features.h index da695a8..2a29475 100644 --- a/target/s390x/cpu_features.h +++ b/target/s390x/cpu_features.h @@ -16,7 +16,7 @@ #include "qemu/bitmap.h" #include "cpu_features_def.h" -#include "gen-features.h" +#include "target/s390x/gen-features.h" /* CPU features are announced via different ways */ typedef enum { diff --git a/target/s390x/cpu_models.h b/target/s390x/cpu_models.h index 88bd01a6..74d1f87 100644 --- a/target/s390x/cpu_models.h +++ b/target/s390x/cpu_models.h @@ -14,7 +14,7 @@ #define TARGET_S390X_CPU_MODELS_H #include "cpu_features.h" -#include "gen-features.h" +#include "target/s390x/gen-features.h" #include "hw/core/cpu.h" /* static CPU definition */ diff --git a/target/s390x/meson.build b/target/s390x/meson.build new file mode 100644 index 0000000..980f67c --- /dev/null +++ b/target/s390x/meson.build @@ -0,0 +1,8 @@ +gen_features = executable('gen-features', 'gen-features.c', native: true) + +gen_features_h = custom_target('gen-features.h', + output: 'gen-features.h', + capture: true, + command: gen_features) + +specific_ss.add(gen_features_h) From patchwork Thu Aug 6 19:14: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: 276970 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=-10.1 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, URIBL_BLOCKED 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 2D52BC433E1 for ; Thu, 6 Aug 2020 19:40:14 +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 19ACC2173E for ; Thu, 6 Aug 2020 19:40:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FVKaO+J8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19ACC2173E 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]:32930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lkL-0001oF-2S for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:40:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOy-0005zs-6D for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:08 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46247 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 1k3lOv-0006Y3-2l for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741484; 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=Kd6LcSxh1RbBx010AxbTjf/5Taer1LiZE3/2yM9hNuw=; b=FVKaO+J8tNx/DhwV1vYaViCUxzDsK+4Yn2o151Uyym7VGjG23TJqhPhys7wSD8BpWdeJm5 Y48lfHbRKyvHLIaq/PRZCVo+kOoFM0ekqnpn1Pu7bQ6tBeL9WSWN3nXmDEO+cBq75fd9E3 NtNdBPkE0ayMw6cqgvxB2CEVFDFhTOU= 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-250-VUqs4333MOeAkxhth06kjA-1; Thu, 06 Aug 2020 15:18:01 -0400 X-MC-Unique: VUqs4333MOeAkxhth06kjA-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 28D6A100AA21 for ; Thu, 6 Aug 2020 19:18:00 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D96569315; Thu, 6 Aug 2020 19:17:59 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 054/143] meson: infrastructure for building emulators Date: Thu, 6 Aug 2020 21:14:50 +0200 Message-Id: <1596741379-12902-55-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 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 + softmmu/qtest.c | 2 +- util/meson.build | 5 +- 16 files changed, 193 insertions(+), 106 deletions(-) create mode 100755 scripts/grepy.sh diff --git a/Makefile b/Makefile index 1d4dfe8..e5f68e0 100644 --- a/Makefile +++ b/Makefile @@ -105,8 +105,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 @@ -163,65 +161,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 @@ -264,10 +203,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 @@ -354,7 +298,6 @@ module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak clean: recurse-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 \ @@ -363,8 +306,6 @@ clean: recurse-clean 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) @@ -381,8 +322,7 @@ endef distclean: clean 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 f6b7a86..43d2f97 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 3c54abf..bbb5cf3 100755 --- a/configure +++ b/configure @@ -8093,18 +8093,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 c55abfb..33441ad 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 47c5ca3..cc616e4 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 b789e83..456e336 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 67bee1b..cf384b9 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 3a14b7c..5715091 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 7740fc6..8fbec77 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 20872e7..412962d 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 2c617ef..f582de6 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(), language: ['c', 'objc']) @@ -130,16 +131,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) + config_all = config_all_devices +else + config_all = {} +endif +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 = [] @@ -175,6 +256,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'], @@ -200,6 +288,16 @@ endforeach 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 # @@ -308,10 +406,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]) @@ -322,6 +420,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 host_machine.system() == '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 1aa6394..d8d35f7 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 6d8f08b..bc82661 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 0000000..33c74c6 --- /dev/null +++ b/scripts/grepy.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +grep --no-filename '=y$' "$@" | sort -u diff --git a/softmmu/qtest.c b/softmmu/qtest.c index 5672b75..4e439ca 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 diff --git a/util/meson.build b/util/meson.build index 62113ba..9ee7425 100644 --- a/util/meson.build +++ b/util/meson.build @@ -62,7 +62,4 @@ util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('drm.c')) util_ss.add(files('guest-random.c')) util_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus.c'), gio]) - -if have_user then - util_ss.add(files('selfmap.c')) -endif +util_ss.add(when: 'CONFIG_USER_ONLY', if_true: [files('selfmap.c')]) From patchwork Thu Aug 6 19:14:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276972 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=-10.1 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 888A5C433DF for ; Thu, 6 Aug 2020 19:38: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 882722173E for ; Thu, 6 Aug 2020 19:38:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QSayMBHN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 882722173E 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]:52846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lia-0006s1-JH for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:38:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lOw-0005wx-U6 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:06 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:44057 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 1k3lOv-0006Y5-6Y for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741484; 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=tEOEEzOApXEFkeXIErOZOha5f+W/oL44Sye+lX6YBUA=; b=QSayMBHNOPeXWuAaEMl46R8kwlhkc2wKHLIVEFz5joZGiw5Gj4951Ajjgi9fjq/ctXhHAx IicuviiOuon5du7RUtsb9rVVOVlKkxi64PAG9zVSwwt1gNIrEnTt2Nkg1yxOpy8Jzn3whs 5Xq8tUNW8ukDLy7hIinC0+B1OG1XvX4= 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-480-tHgnxhukMl2yxVyv-rl4-g-1; Thu, 06 Aug 2020 15:18:02 -0400 X-MC-Unique: tHgnxhukMl2yxVyv-rl4-g-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 7415E19200C0 for ; Thu, 6 Aug 2020 19:18:01 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 867111D3; Thu, 6 Aug 2020 19:18:00 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 055/143] meson: add macos dependencies Date: Thu, 6 Aug 2020 21:14:51 +0200 Message-Id: <1596741379-12902-56-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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 There is no probing in configure, so no need to pass them as variables to meson. Do a regular meson dependency() instead. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meson.build b/meson.build index f582de6..fd2086e 100644 --- a/meson.build +++ b/meson.build @@ -48,6 +48,10 @@ m = cc.find_library('m', required: false) util = cc.find_library('util', required: false) socket = [] version_res = [] +coref = [] +iokit = [] +cocoa = [] +hvf = [] if host_machine.system() == 'windows' socket = cc.find_library('ws2_32') @@ -55,6 +59,11 @@ if host_machine.system() == 'windows' version_res = win.compile_resources('version.rc', depend_files: files('pc-bios/qemu-nsis.ico'), include_directories: include_directories('.')) +elif host_machine.system() == 'darwin' + coref = dependency('appleframeworks', modules: 'CoreFoundation') + iokit = dependency('appleframeworks', modules: 'IOKit') + cocoa = dependency('appleframeworks', modules: 'Cocoa') + hvf = dependency('appleframeworks', modules: 'Hypervisor') endif glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(), link_args: config_host['GLIB_LIBS'].split()) From patchwork Thu Aug 6 19:14:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276968 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=-10.1 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 EC481C433DF for ; Thu, 6 Aug 2020 19:41: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 EAFEF2177B for ; Thu, 6 Aug 2020 19:41:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bDRO+xZa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAFEF2177B 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]:41242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lll-0005FC-1Z for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:41:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lP5-0006Ih-RJ for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lP2-0006ZJ-VH for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=pr4QTt/HZPr7zUdK92jy0446eeaM5JTvvBfGRq/mcyo=; b=bDRO+xZaL+YZ6WxiTpCdAkurXmxk0U7diauNkHfE3b11IejaEmRoGU2gGve+55ni11yUeE nMZIsR4q3NfuUaSDBDkQoWDJ2Cyqx7PchsWsUaApqldSXot/4N46ywAKVnvvEXjQTrfGJ8 oTMgVNf6mV9NqyahmSk0537I3mGvotE= 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-q2e8piDGOGuv0iml4cyoTw-1; Thu, 06 Aug 2020 15:18:10 -0400 X-MC-Unique: q2e8piDGOGuv0iml4cyoTw-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 69FFC100AA21 for ; Thu, 6 Aug 2020 19:18:09 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2FCC5F9DC for ; Thu, 6 Aug 2020 19:18:08 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 061/143] configure, Makefile; remove TOOLS and HELPERS-y variable Date: Thu, 6 Aug 2020 21:14:57 +0200 Message-Id: <1596741379-12902-62-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 12:59:11 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, RCVD_IN_DNSWL_NONE=-0.0001, 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" Everything involving tools is now done by meson. Signed-off-by: Paolo Bonzini --- Makefile | 22 ++-------------------- configure | 7 ------- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 50e02c0..6e8e541 100644 --- a/Makefile +++ b/Makefile @@ -123,8 +123,6 @@ $(call set-vpath, $(SRC_PATH)) LIBS+=-lz $(LIBS_TOOLS) -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 # build the manuals into a subdirectory (and then install them from @@ -173,7 +171,7 @@ dummy := $(call unnest-vars,, \ include $(SRC_PATH)/tests/Makefile.include -all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules +all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules config-host.h: config-host.h-timestamp config-host.h-timestamp: config-host.mak @@ -284,7 +282,7 @@ clean: recurse-clean ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ -exec rm {} + - rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~ + rm -f TAGS cscope.* *.pod *~ */*~ rm -f fsdev/*.pod scsi/*.pod rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) @@ -439,12 +437,6 @@ install: all $(if $(BUILD_DOCS),install-doc) \ install-datadir install-localstatedir install-includedir \ $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \ recurse-install -ifneq ($(TOOLS),) - $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir)) -endif -ifneq ($(HELPERS-y),) - $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir)) -endif ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) endif @@ -719,16 +711,6 @@ endif $(call print-help-run,$(t)/fuzz,Build fuzzer for $(t)); \ ))) \ echo '') - @$(if $(HELPERS-y), \ - echo 'Helper targets:'; \ - $(foreach t, $(HELPERS-y), \ - $(call print-help-run,$(t),Build $(shell basename $(t)));) \ - echo '') - @$(if $(TOOLS), \ - echo 'Tools targets:'; \ - $(foreach t, $(TOOLS), \ - $(call print-help-run,$(t),Build $(shell basename $(t)) tool);) \ - echo '') @echo 'Cleaning targets:' $(call print-help,clean,Remove most generated files but keep the config) $(call print-help,distclean,Remove all generated files) diff --git a/configure b/configure index 962e314..f99b7ee 100755 --- a/configure +++ b/configure @@ -6641,12 +6641,6 @@ if [ "$eventfd" = "yes" ]; then ivshmem=yes fi -tools="" -if test "$want_tools" = "yes" ; then - if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then - tools="qemu-storage-daemon\$(EXESUF) $tools" - fi -fi if test "$softmmu" = yes ; then if test "$linux" = yes; then if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then @@ -7740,7 +7734,6 @@ else QEMU_INCLUDES="-iquote ${source_path}/tcg/\$(ARCH) $QEMU_INCLUDES" fi -echo "TOOLS=$tools" >> $config_host_mak echo "ROMS=$roms" >> $config_host_mak echo "MAKE=$make" >> $config_host_mak echo "INSTALL=$install" >> $config_host_mak From patchwork Thu Aug 6 19:14:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276973 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=-10.1 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 7E6D6C433DF for ; Thu, 6 Aug 2020 19:38:11 +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 7D84A2173E for ; Thu, 6 Aug 2020 19:38:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XTs3j3oI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D84A2173E 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]:51324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3liM-0006Ge-IO for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:38:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lP6-0006Kk-L7 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29144) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lP4-0006ZU-KH for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741493; 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=1agVZ10nKnAFLupkOl55CR0y1TkkENVqGmxO7cE97hg=; b=XTs3j3oI7yoFS3eGacQ3NDBQ0R/UmA+axCliXQYSozEnIoYWCITQOOyLiCpnsgUaDJUkb8 8TwgUSw7bqHmzBsWVuI/rqGlIq4LjNqm+idTdNCRp9BFbqkPYo9tz1slGgZrhusHeFBpQz hNSK4e1Mc0d6R+uAWo33cWBf9RhTCcM= 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-20-t1y-23hZOa6cMQqAKfl1Fg-1; Thu, 06 Aug 2020 15:18:11 -0400 X-MC-Unique: t1y-23hZOa6cMQqAKfl1Fg-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 C4790100AA22 for ; Thu, 6 Aug 2020 19:18:10 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id D459B1D3; Thu, 6 Aug 2020 19:18:09 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 062/143] meson: convert chardev directory to Meson (emulator part) Date: Thu, 6 Aug 2020 21:14:58 +0200 Message-Id: <1596741379-12902-63-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 13:48:01 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 | 2 -- Makefile.target | 2 ++ chardev/Makefile.objs | 10 ---------- chardev/meson.build | 11 +++++++++++ configure | 2 ++ meson.build | 14 ++++++++++++++ 6 files changed, 29 insertions(+), 12 deletions(-) delete mode 100644 chardev/Makefile.objs diff --git a/Makefile.objs b/Makefile.objs index f79ff89..4c6631a 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -86,8 +86,6 @@ common-obj-y += dma-helpers.o common-obj-$(CONFIG_TPM) += tpm.o common-obj-y += backends/ -common-obj-y += chardev/ -common-obj-m += chardev/ common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS) diff --git a/Makefile.target b/Makefile.target index c0575da..c8c4b70 100644 --- a/Makefile.target +++ b/Makefile.target @@ -104,6 +104,7 @@ all: $(PROGS) stap @true obj-y += $(LIBQEMU) + obj-y += trace/ ######################################################### @@ -167,6 +168,7 @@ LIBS := $(LIBS) @../block.syms @../qemu.syms ifneq ($(CONFIG_MODULES),y) LIBS := $(LIBS) endif +LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) # Hardware support ifeq ($(TARGET_NAME), sparc64) diff --git a/chardev/Makefile.objs b/chardev/Makefile.objs deleted file mode 100644 index 6662d0d..0000000 --- a/chardev/Makefile.objs +++ /dev/null @@ -1,10 +0,0 @@ -chardev-obj-$(CONFIG_SOFTMMU) += chardev-sysemu.o -common-obj-$(CONFIG_SOFTMMU) += msmouse.o wctablet.o testdev.o - -ifeq ($(CONFIG_BRLAPI),y) -common-obj-m += baum.o -baum.o-cflags := $(SDL_CFLAGS) -baum.o-libs := $(BRLAPI_LIBS) -endif - -common-obj-$(CONFIG_SPICE) += spice.o diff --git a/chardev/meson.build b/chardev/meson.build index a2e671d..2122505 100644 --- a/chardev/meson.build +++ b/chardev/meson.build @@ -30,3 +30,14 @@ libchardev = static_library('chardev', chardev_ss.sources(), build_by_default: false) chardev = declare_dependency(link_whole: libchardev) + +softmmu_ss.add(files('chardev-sysemu.c', 'msmouse.c', 'wctablet.c', 'testdev.c')) +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') + chardev_modules += [['baum', files('baum.c'), [sdl, brlapi]]] +endif + +modules += { 'chardev': chardev_modules } diff --git a/configure b/configure index f99b7ee..1b62959 100755 --- a/configure +++ b/configure @@ -7318,6 +7318,8 @@ if test "$zlib" != "no" ; then fi if test "$spice" = "yes" ; then echo "CONFIG_SPICE=y" >> $config_host_mak + echo "SPICE_CFLAGS=$spice_cflags" >> $config_host_mak + echo "SPICE_LIBS=$spice_libs" >> $config_host_mak fi if test "$smartcard" = "yes" ; then diff --git a/meson.build b/meson.build index 1743ae7..3daa82e 100644 --- a/meson.build +++ b/meson.build @@ -135,6 +135,11 @@ if 'CONFIG_XKBCOMMON' in config_host xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(), link_args: config_host['XKBCOMMON_LIBS'].split()) endif +spice = not_found +if 'CONFIG_SPICE' in config_host + spice = declare_dependency(compile_args: config_host['SPICE_CFLAGS'].split(), + link_args: config_host['SPICE_LIBS'].split()) +endif rt = cc.find_library('rt', required: false) libmpathpersist = not_found if config_host.has_key('CONFIG_MPATH') @@ -164,6 +169,15 @@ libudev = not_found if 'CONFIG_LIBUDEV' in config_host libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split()) endif +brlapi = not_found +if 'CONFIG_BRLAPI' in config_host + brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split()) +endif +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()) +endif rbd = not_found if 'CONFIG_RBD' in config_host rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split()) From patchwork Thu Aug 6 19:15: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: 276962 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=-10.1 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, URIBL_BLOCKED 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 AF209C433DF for ; Thu, 6 Aug 2020 19:46: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 A55A2206B5 for ; Thu, 6 Aug 2020 19:46:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hEfMhB6n" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A55A2206B5 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]:40264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lqg-0007xf-MH for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:46:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPE-0006d1-PA for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:24 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:55911 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 1k3lPA-0006b1-Qq for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741500; 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=Sa5Ywt67kOj9i1EhYpi9+HakBNQK0ZvwWsDmQwSYoAs=; b=hEfMhB6ngofsoOHSRmyszcy8Hnt/qAqoVDU5Q8km9pMP8BHkR/1pBG0p/nv+9ItmjVBT6/ lxI9YvdZrtxarRorvgO0RYnm09OxIYqMTYXdA3QKd5bQdhqvLlu+Glm2fLprSr9LC35XSI N7kMnlua7CzguBByxh0jSJyNlOIqOw4= 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-GGDCMNsEOAep6xrHwm8ylQ-1; Thu, 06 Aug 2020 15:18:14 -0400 X-MC-Unique: GGDCMNsEOAep6xrHwm8ylQ-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 762FC80183C for ; Thu, 6 Aug 2020 19:18:13 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 875661D3; Thu, 6 Aug 2020 19:18:12 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 064/143] meson: convert audio directory to Meson Date: Thu, 6 Aug 2020 21:15:00 +0200 Message-Id: <1596741379-12902-65-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 3 ++- audio/Makefile.objs | 35 ----------------------------------- audio/meson.build | 32 ++++++++++++++++++++++++++++++++ configure | 16 ++++++++++++++++ meson.build | 29 ++++++++++++++++++++++++++++- 6 files changed, 84 insertions(+), 39 deletions(-) delete mode 100644 audio/Makefile.objs create mode 100644 audio/meson.build diff --git a/Makefile.objs b/Makefile.objs index 4c6631a..cd916a9 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -48,6 +48,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o ifeq ($(CONFIG_SOFTMMU),y) common-obj-y = blockdev.o blockdev-nbd.o block/ + common-obj-y += bootdevice.o iothread.o common-obj-y += dump/ common-obj-y += job-qmp.o @@ -62,6 +63,11 @@ common-obj-$(CONFIG_LINUX) += fsdev/ common-obj-y += accel/ common-obj-y += migration/ +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_CURL),m) += block-curl$(DSOSUF) common-obj-$(if $(CONFIG_GLUSTERFS),m) += block-gluster$(DSOSUF) common-obj-$(if $(CONFIG_LIBISCSI),m) += block-iscsi$(DSOSUF) @@ -72,8 +78,6 @@ 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/ common-obj-m += hw/ diff --git a/Makefile.target b/Makefile.target index c8c4b70..ff0e1b2 100644 --- a/Makefile.target +++ b/Makefile.target @@ -166,9 +166,10 @@ LIBS := $(libs_softmmu) $(LIBS) # Temporary until emulators are linked by Meson LIBS := $(LIBS) @../block.syms @../qemu.syms ifneq ($(CONFIG_MODULES),y) -LIBS := $(LIBS) +LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS) endif LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) +LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS) # Hardware support ifeq ($(TARGET_NAME), sparc64) diff --git a/audio/Makefile.objs b/audio/Makefile.objs deleted file mode 100644 index b4a4c11..0000000 --- a/audio/Makefile.objs +++ /dev/null @@ -1,35 +0,0 @@ -common-obj-y = audio.o audio_legacy.o noaudio.o wavaudio.o mixeng.o -common-obj-$(CONFIG_SPICE) += spiceaudio.o -common-obj-$(CONFIG_AUDIO_COREAUDIO) += coreaudio.o -common-obj-$(CONFIG_AUDIO_DSOUND) += dsoundaudio.o -common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o -common-obj-y += wavcapture.o - -coreaudio.o-libs := $(COREAUDIO_LIBS) -dsoundaudio.o-libs := $(DSOUND_LIBS) - -# alsa module -common-obj-$(CONFIG_AUDIO_ALSA) += alsa.mo -alsa.mo-objs = alsaaudio.o -alsa.mo-libs := $(ALSA_LIBS) - -# oss module -common-obj-$(CONFIG_AUDIO_OSS) += oss.mo -oss.mo-objs = ossaudio.o -oss.mo-libs := $(OSS_LIBS) - -# pulseaudio module -common-obj-$(CONFIG_AUDIO_PA) += pa.mo -pa.mo-objs = paaudio.o -pa.mo-libs := $(PULSE_LIBS) - -# sdl module -common-obj-$(CONFIG_AUDIO_SDL) += sdl.mo -sdl.mo-objs = sdlaudio.o -sdl.mo-cflags := $(SDL_CFLAGS) -sdl.mo-libs := $(SDL_LIBS) - -# jack module -common-obj-$(CONFIG_AUDIO_JACK) += jack.mo -jack.mo-objs = jackaudio.o -jack.mo-libs := $(JACK_LIBS) diff --git a/audio/meson.build b/audio/meson.build new file mode 100644 index 0000000..0813722 --- /dev/null +++ b/audio/meson.build @@ -0,0 +1,32 @@ +softmmu_ss.add(files( + 'audio.c', + 'audio_legacy.c', + 'mixeng.c', + 'noaudio.c', + 'wavaudio.c', + 'wavcapture.c', +)) + +softmmu_ss.add(when: [spice, 'CONFIG_SPICE'], if_true: files('spiceaudio.c')) +softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files('coreaudio.c')) +softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], if_true: files('dsoundaudio.c')) +softmmu_ss.add(when: ['CONFIG_AUDIO_WIN_INT'], if_true: files('audio_win_int.c')) + +audio_modules = [] +if 'CONFIG_AUDIO_ALSA' in config_host + audio_modules += [['alsa', files('alsaaudio.c'), alsa]] +endif +if 'CONFIG_AUDIO_OSS' in config_host + audio_modules += [['oss', files('ossaudio.c'), oss]] +endif +if 'CONFIG_AUDIO_PA' in config_host + audio_modules += [['pa', files('paaudio.c'), pulse]] +endif +if 'CONFIG_AUDIO_SDL' in config_host + audio_modules += [['sdl', files('sdlaudio.c'), sdl]] +endif +if 'CONFIG_AUDIO_JACK' in config_host + audio_modules += [['jack', files('jackaudio.c'), jack]] +endif + +modules += {'audio': audio_modules} diff --git a/configure b/configure index 1b62959..653f55b 100755 --- a/configure +++ b/configure @@ -3700,6 +3700,8 @@ for drv in $audio_drv_list; do alsa | try-alsa) if $pkg_config alsa --exists; then alsa_libs=$($pkg_config alsa --libs) + alsa_cflags=$($pkg_config alsa --cflags) + alsa=yes if test "$drv" = "try-alsa"; then audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa/alsa/') fi @@ -3715,7 +3717,9 @@ for drv in $audio_drv_list; do pa | try-pa) if $pkg_config libpulse --exists; then + libpulse=yes pulse_libs=$($pkg_config libpulse --libs) + pulse_cflags=$($pkg_config libpulse --cflags) if test "$drv" = "try-pa"; then audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/') fi @@ -3758,6 +3762,7 @@ for drv in $audio_drv_list; do jack | try-jack) if $pkg_config jack --exists; then + libjack=yes jack_libs=$($pkg_config jack --libs) if test "$drv" = "try-jack"; then audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-jack/jack/') @@ -6961,11 +6966,22 @@ for drv in $audio_drv_list; do echo "$def=y" >> $config_host_mak ;; esac done +if test "$alsa" = "yes" ; then + echo "CONFIG_ALSA=y" >> $config_host_mak +fi echo "ALSA_LIBS=$alsa_libs" >> $config_host_mak +echo "ALSA_CFLAGS=$alsa_cflags" >> $config_host_mak +if test "$libpulse" = "yes" ; then + echo "CONFIG_LIBPULSE=y" >> $config_host_mak +fi echo "PULSE_LIBS=$pulse_libs" >> $config_host_mak +echo "PULSE_CFLAGS=$pulse_cflags" >> $config_host_mak echo "COREAUDIO_LIBS=$coreaudio_libs" >> $config_host_mak echo "DSOUND_LIBS=$dsound_libs" >> $config_host_mak echo "OSS_LIBS=$oss_libs" >> $config_host_mak +if test "$libjack" = "yes" ; then + echo "CONFIG_LIBJACK=y" >> $config_host_mak +fi echo "JACK_LIBS=$jack_libs" >> $config_host_mak if test "$audio_win_int" = "yes" ; then echo "CONFIG_AUDIO_WIN_INT=y" >> $config_host_mak diff --git a/meson.build b/meson.build index a81516a..6fd88bb 100644 --- a/meson.build +++ b/meson.build @@ -135,6 +135,20 @@ if 'CONFIG_XKBCOMMON' in config_host xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(), link_args: config_host['XKBCOMMON_LIBS'].split()) endif +pulse = not_found +if 'CONFIG_LIBPULSE' in config_host + pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(), + link_args: config_host['PULSE_LIBS'].split()) +endif +alsa = not_found +if 'CONFIG_ALSA' in config_host + alsa = declare_dependency(compile_args: config_host['ALSA_CFLAGS'].split(), + link_args: config_host['ALSA_LIBS'].split()) +endif +jack = not_found +if 'CONFIG_LIBJACK' in config_host + jack = declare_dependency(link_args: config_host['JACK_LIBS'].split()) +endif spice = not_found if 'CONFIG_SPICE' in config_host spice = declare_dependency(compile_args: config_host['SPICE_CFLAGS'].split(), @@ -200,6 +214,18 @@ liblzfse = not_found if 'CONFIG_LZFSE' in config_host liblzfse = declare_dependency(link_args: config_host['LZFSE_LIBS'].split()) endif +oss = not_found +if 'CONFIG_AUDIO_OSS' in config_host + oss = declare_dependency(link_args: config_host['OSS_LIBS'].split()) +endif +dsound = not_found +if 'CONFIG_AUDIO_DSOUND' in config_host + dsound = declare_dependency(link_args: config_host['DSOUND_LIBS'].split()) +endif +coreaudio = not_found +if 'CONFIG_AUDIO_COREAUDIO' in config_host + coreaudio = declare_dependency(link_args: config_host['COREAUDIO_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') @@ -494,6 +520,7 @@ libqemuutil = static_library('qemuutil', qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) +subdir('audio') subdir('io') subdir('chardev') subdir('fsdev') @@ -526,7 +553,7 @@ foreach d, list : modules else softmmu_mods += sl endif - mods += {'dir': d, 'name': m[0], 'lib': sl, 'deps': m[2]} + mods += {'dir': d, 'name': m[0], 'lib': [sl, libmodulecommon], 'deps': m[2]} else if d == 'block' block_ss.add(when: [m.get(3, []), m[2]], if_true: m[1]) From patchwork Thu Aug 6 19:15: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: 276964 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=-10.1 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, URIBL_BLOCKED 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 CB755C433DF for ; Thu, 6 Aug 2020 19:44: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 B9E242224D for ; Thu, 6 Aug 2020 19:44:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bkPepaK8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9E242224D 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]:58298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3log-0003fz-L4 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:44:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPJ-0006oV-Hg for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:29 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:56757 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 1k3lPG-0006dE-Lo for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741505; 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=nvK8GWCEM45AcqFjSGvaDrjq5UikN+YNqiTTQ2dubFg=; b=bkPepaK8rkEMwR3kLfU/6zaYMedMwL9Tt0yCO02zHQwPoME81OCQICEwRfK76sMhjnFB/w TShOo+03v38Hn49TP21tbnTGXk6BRkys0itvydA6qWhbzZ/ZrC/fxapYFv1AsCf55TzMKl iuyENSMWl2NInRJiL14nXH+oCCPnIYM= 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-289-gqtwxE-mN3OjAPfvvmFFaQ-1; Thu, 06 Aug 2020 15:18:19 -0400 X-MC-Unique: gqtwxE-mN3OjAPfvvmFFaQ-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 896FF1DE1 for ; Thu, 6 Aug 2020 19:18:18 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id E07335F9DC; Thu, 6 Aug 2020 19:18:13 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 065/143] meson: convert ui directory to Meson Date: Thu, 6 Aug 2020 21:15:01 +0200 Message-Id: <1596741379-12902-66-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ui/shader.c | 6 ++--- 7 files changed, 148 insertions(+), 83 deletions(-) delete mode 100644 ui/Makefile.objs diff --git a/Makefile.objs b/Makefile.objs index cd916a9..2463df8 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 ff0e1b2..16f1e78 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 653f55b..c1bc16b 100755 --- a/configure +++ b/configure @@ -6994,12 +6994,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 6fd88bb..9b0aa18 100644 --- a/meson.build +++ b/meson.build @@ -226,6 +226,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 504b196..0000000 --- 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 8157754..36a70c3 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -1,3 +1,81 @@ +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') + ui_modules += [['curses', files('curses.c'), [curses, iconv]]] +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')) + gtk_ss = gtk_ss.apply(config_host, strict: false) + ui_modules += [['gtk', gtk_ss.sources(), gtk_ss.dependencies()]] +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')) + sdl_ss = sdl_ss.apply(config_host, strict: false) + ui_modules += [['sdl', sdl_ss.sources(), sdl_ss.dependencies()]] +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')) + spice_ss = spice_ss.apply(config_host, strict: false) + ui_modules += [['spice-app', spice_ss.sources(), spice_ss.dependencies()]] +endif + keymap_gen = find_program('keycodemapdb/tools/keymap-gen') keymaps = [ @@ -34,3 +112,5 @@ foreach e : keymaps endforeach subdir('shader') + +modules += {'ui': ui_modules} diff --git a/ui/shader.c b/ui/shader.c index d78829f..e8b8d32 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 Thu Aug 6 19:15:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276966 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=-10.1 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 2C043C433E0 for ; Thu, 6 Aug 2020 19:43: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 2A6A32177B for ; Thu, 6 Aug 2020 19:43:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SXrlxkeC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A6A32177B 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]:49774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lnG-0000EC-4T for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:43:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPI-0006lq-J8 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lPG-0006dJ-O5 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741506; 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=zrj12kzZYHHcNsSb3AF6uL1m7skqEn/bAUdsElV/8tw=; b=SXrlxkeC8kBYldL5Kl/dCN52p7A64JQRKi6r6AAaq7dYzbwzVazmd9pXaDtK1xqgDM+qNS k7JYTgX60TiwPorQvLn1S+B6cp5WwX0IrjrFDEiKJXxnK66Gz31EiJ5JHpk80QrjASHHqA vh+4pPo5AmAiiF+KoZjhNQDXl/KedRY= 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-373-yvfDgsiWO_uZqsHOCUKvxw-1; Thu, 06 Aug 2020 15:18:24 -0400 X-MC-Unique: yvfDgsiWO_uZqsHOCUKvxw-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 761F2100AA21 for ; Thu, 6 Aug 2020 19:18:23 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87EE55FC3B; Thu, 6 Aug 2020 19:18:22 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 069/143] meson: convert trace/ Date: Thu, 6 Aug 2020 21:15:05 +0200 Message-Id: <1596741379-12902-70-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 12:59:11 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 --- trace/Makefile.objs | 8 -------- trace/meson.build | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 trace/Makefile.objs diff --git a/trace/Makefile.objs b/trace/Makefile.objs deleted file mode 100644 index a429474..0000000 --- a/trace/Makefile.objs +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: makefile -*- - - -################################################## -# Translation level - -obj-y += generated-helpers.o -obj-y += control-target.o diff --git a/trace/meson.build b/trace/meson.build index 8ea8db7..b113425 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -1,3 +1,5 @@ +specific_ss.add(files('control-target.c')) + # common options tracetool = [ find_program('scripts/tracetool.py'), @@ -67,12 +69,13 @@ foreach d : [ ['generated-helpers.h', 'tcg-helper-h'], ['generated-helpers-wrappers.h', 'tcg-helper-wrapper-h'], ] - custom_target(d[0], + gen = 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) + specific_ss.add(gen) endforeach if 'CONFIG_TRACE_UST' in config_host From patchwork Thu Aug 6 19:15:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276963 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=-10.1 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 05155C433DF for ; Thu, 6 Aug 2020 19:46: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 E23BF206B5 for ; Thu, 6 Aug 2020 19:46:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="X7VuHdv/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E23BF206B5 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]:38034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lqJ-00074E-UL for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:46:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPN-0006yD-IC for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:33 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:58023 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 1k3lPL-0006eH-Fl for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741510; 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=9dML5eCovLgLX7NmYqgD15Mx8pEcIi5cjKd7b0sYFUU=; b=X7VuHdv/cJD8s7pY8QkNrmnSisYU1Dr/uE9lzqDMzVwyQkHMivPdrg+a8Z1gNi6phi4L0H hidGCaXYXmduA9omD9s+NVP7mDK3aQYUEqD9PnpFwqmlgRwA4vxX61dH+defpm+iwFDp5X tn1R9fuvgsrgsy481+tr5Fhz/g4QxZ4= 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-502-3Y-OfsmoOOSHeW_91DzExg-1; Thu, 06 Aug 2020 15:18:28 -0400 X-MC-Unique: 3Y-OfsmoOOSHeW_91DzExg-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 7C4A3100AA22 for ; Thu, 6 Aug 2020 19:18:27 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D8D95F9DC; Thu, 6 Aug 2020 19:18:26 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 072/143] meson: convert common QMP bits for qemu and qemu-storage-daemon Date: Thu, 6 Aug 2020 21:15:08 +0200 Message-Id: <1596741379-12902-73-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 11ca458..9b9bb40 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -36,10 +36,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 @@ -47,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 = monitor/ -common-obj-y += net/ +common-obj-y = net/ common-obj-$(CONFIG_LINUX) += fsdev/ common-obj-y += accel/ @@ -82,6 +82,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 c8f7a6c..54a9ef1 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 f025ac5..cfc57f8 100644 --- a/meson.build +++ b/meson.build @@ -451,6 +451,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() @@ -628,6 +629,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') @@ -677,6 +679,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(), + dependencies: qmp_ss.dependencies(), + name_suffix: 'fa', + build_by_default: false) + +qmp = declare_dependency(link_whole: [libqmp]) + foreach m : mods shared_module(m['dir'] + '-' + m['name'], name_prefix: '', diff --git a/monitor/Makefile.objs b/monitor/Makefile.objs deleted file mode 100644 index a8533c9..0000000 --- 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 0000000..0484a64 --- /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 b962904..0000000 --- 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 4af044d..35815f6 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(), dependencies: [qom_ss.dependencies()], From patchwork Thu Aug 6 19:15:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276960 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=-10.1 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 DD85DC433E0 for ; Thu, 6 Aug 2020 19:48:40 +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 D334E22C9F for ; Thu, 6 Aug 2020 19:48:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hvstUa71" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D334E22C9F 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]:48548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lsV-0002vy-Tw for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:48:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPP-00073F-H8 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:35 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:32183 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 1k3lPN-0006ea-OM for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741513; 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=t/BkKF3IuFX7t+/khBwbH7uKOv0bkDuacFqnSU2zWCQ=; b=hvstUa71CHtYN+WUjU/8rSua6xdrXECYB1399kXZW+8cOAGxq142lIqvKXLy06Tu+QKFr7 8TJj7ibucFshmfDyRRg7yPpcUh3StcykuDbZ6vb2VnZZVu1TvExauCebstdtp9i1v/x+RT 6k3QGRuWtoPiVM4iT7uZEdgIiBGspEQ= 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-235-trL8VVIiNtCDXnOrVzggCA-1; Thu, 06 Aug 2020 15:18:30 -0400 X-MC-Unique: trL8VVIiNtCDXnOrVzggCA-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 00FBC107BEF5 for ; Thu, 6 Aug 2020 19:18:30 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 127CC5F9DC; Thu, 6 Aug 2020 19:18:28 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 074/143] meson: convert replay directory to Meson Date: Thu, 6 Aug 2020 21:15:10 +0200 Message-Id: <1596741379-12902-75-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 1 - meson.build | 1 + replay/Makefile.objs | 10 ---------- replay/meson.build | 12 ++++++++++++ 4 files changed, 13 insertions(+), 11 deletions(-) delete mode 100644 replay/Makefile.objs create mode 100644 replay/meson.build diff --git a/Makefile.objs b/Makefile.objs index bbb6f8c..544877a 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -67,7 +67,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 += replay/ common-obj-y += backends/ common-obj-y += qapi/ diff --git a/meson.build b/meson.build index 2071686..c592241 100644 --- a/meson.build +++ b/meson.build @@ -629,6 +629,7 @@ common_ss.add(files('cpus-common.c')) subdir('softmmu') subdir('monitor') +subdir('replay') # needed for fuzzing binaries subdir('tests/qtest/libqos') diff --git a/replay/Makefile.objs b/replay/Makefile.objs deleted file mode 100644 index 939be96..0000000 --- a/replay/Makefile.objs +++ /dev/null @@ -1,10 +0,0 @@ -common-obj-y += replay.o -common-obj-y += replay-internal.o -common-obj-y += replay-events.o -common-obj-y += replay-time.o -common-obj-y += replay-input.o -common-obj-y += replay-char.o -common-obj-y += replay-snapshot.o -common-obj-y += replay-net.o -common-obj-y += replay-audio.o -common-obj-y += replay-random.o diff --git a/replay/meson.build b/replay/meson.build new file mode 100644 index 0000000..8783aea --- /dev/null +++ b/replay/meson.build @@ -0,0 +1,12 @@ +softmmu_ss.add(files( + 'replay.c', + 'replay-internal.c', + 'replay-events.c', + 'replay-time.c', + 'replay-input.c', + 'replay-char.c', + 'replay-snapshot.c', + 'replay-net.c', + 'replay-audio.c', + 'replay-random.c', +)) From patchwork Thu Aug 6 19:15:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276961 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=-10.1 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 15F68C433DF for ; Thu, 6 Aug 2020 19:48: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 11EA22086A for ; Thu, 6 Aug 2020 19:48:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KrmLRueE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11EA22086A 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]:46786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3ls0-0002EN-3d for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPR-00077r-F4 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lPO-0006en-Ub for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741514; 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=vj2wqYxMQOwvyhwWO2LqIwrgRniIYHgXgAT6Vo3UcsA=; b=KrmLRueEkXArWhQrd9IuHQyNLhrukr3rREQi0M23hHTU9SuBrCohdThhkqPDcakYIZKsd2 yDMfVkN4NnTMsWhYdSRN6S1tOr/okvZo9psa1zr9ncN4MCiJ0V+LIZpGT/6ckL8Jw4wm9i vgDe4jzZJQTXB/gOGXUVg37RtgA23ck= 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-8y7a_oPrNjWxl0BtoR141A-1; Thu, 06 Aug 2020 15:18:32 -0400 X-MC-Unique: 8y7a_oPrNjWxl0BtoR141A-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 593D7800404 for ; Thu, 6 Aug 2020 19:18:31 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AB9D5F9DC; Thu, 6 Aug 2020 19:18:30 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 075/143] meson: convert migration directory to Meson Date: Thu, 6 Aug 2020 21:15:11 +0200 Message-Id: <1596741379-12902-76-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 12:59:11 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 | 1 - Makefile.target | 1 - meson.build | 5 +++++ migration/Makefile.objs | 18 ------------------ migration/meson.build | 29 +++++++++++++++++++++++++++++ 5 files changed, 34 insertions(+), 20 deletions(-) delete mode 100644 migration/Makefile.objs create mode 100644 migration/meson.build diff --git a/Makefile.objs b/Makefile.objs index 544877a..aabf709 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -42,7 +42,6 @@ common-obj-y = net/ common-obj-$(CONFIG_LINUX) += fsdev/ common-obj-y += accel/ -common-obj-y += migration/ common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF) common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF) diff --git a/Makefile.target b/Makefile.target index 54a9ef1..4d912df 100644 --- a/Makefile.target +++ b/Makefile.target @@ -158,7 +158,6 @@ obj-y += softmmu/ obj-y += gdbstub.o obj-y += hw/ obj-y += qapi/ -obj-y += migration/ram.o LIBS := $(libs_softmmu) $(LIBS) # Temporary until emulators are linked by Meson diff --git a/meson.build b/meson.build index c592241..f0af36f 100644 --- a/meson.build +++ b/meson.build @@ -291,6 +291,10 @@ lzo = not_found if 'CONFIG_LZO' in config_host lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split()) endif +rdma = not_found +if 'CONFIG_RDMA' in config_host + rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') @@ -628,6 +632,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true: [files('device_tree.c')]) common_ss.add(files('cpus-common.c')) subdir('softmmu') +subdir('migration') subdir('monitor') subdir('replay') diff --git a/migration/Makefile.objs b/migration/Makefile.objs deleted file mode 100644 index 0fc619e..0000000 --- a/migration/Makefile.objs +++ /dev/null @@ -1,18 +0,0 @@ -common-obj-y += migration.o socket.o fd.o exec.o -common-obj-y += tls.o channel.o savevm.o -common-obj-y += colo.o colo-failover.o -common-obj-y += vmstate.o vmstate-types.o page_cache.o -common-obj-y += qemu-file.o global_state.o -common-obj-y += qemu-file-channel.o -common-obj-y += xbzrle.o postcopy-ram.o -common-obj-y += qjson.o -common-obj-y += block-dirty-bitmap.o -common-obj-y += multifd.o -common-obj-y += multifd-zlib.o -common-obj-$(CONFIG_ZSTD) += multifd-zstd.o - -common-obj-$(CONFIG_RDMA) += rdma.o - -common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o - -rdma.o-libs := $(RDMA_LIBS) diff --git a/migration/meson.build b/migration/meson.build new file mode 100644 index 0000000..99afbac --- /dev/null +++ b/migration/meson.build @@ -0,0 +1,29 @@ +softmmu_ss.add(files( + 'block-dirty-bitmap.c', + 'channel.c', + 'colo-failover.c', + 'colo.c', + 'exec.c', + 'fd.c', + 'global_state.c', + 'migration.c', + 'multifd.c', + 'multifd-zlib.c', + 'page_cache.c', + 'postcopy-ram.c', + 'qemu-file-channel.c', + 'qemu-file.c', + 'qjson.c', + 'savevm.c', + 'socket.c', + 'tls.c', + 'vmstate-types.c', + 'vmstate.c', + 'xbzrle.c', +)) + +softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c')) +softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c')) +softmmu_ss.add(when: 'CONFIG_ZSTD', if_true: files('multifd-zstd.c')) + +specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('ram.c')]) From patchwork Thu Aug 6 19:15: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: 276959 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=-10.1 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 83D1FC433E0 for ; Thu, 6 Aug 2020 19:50: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 76A832086A for ; Thu, 6 Aug 2020 19:50:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MuGcFPNa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76A832086A 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]:55186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lu6-0005fb-DQ for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:50:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPX-0007MY-1P for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:43 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:45269 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 1k3lPU-0006fn-UK for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741520; 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=oZ085/aeR2z1+BOPKTwsEhaR2W9Xh3eyDTl1aE3nrYQ=; b=MuGcFPNaYvztCB2EdDn5M5dwcTOtJ59znM6RhieDmoAOn0BJwMBW6acdEs9VFwhBig1u7c pTVhx2eUGiCH2Qd4ipjPFAnQF3yy0KEVsWdNEx47GtKZ9PtCGMmsRyai1SM4exs5I9/1+n mPqLCn8raNf5Q/jC2Ik1OTO7x7Z5G9Y= 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-336-Mbnr7loXOe6v6PoJSGyPuQ-1; Thu, 06 Aug 2020 15:18:38 -0400 X-MC-Unique: Mbnr7loXOe6v6PoJSGyPuQ-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 A234B1DE1 for ; Thu, 6 Aug 2020 19:18:37 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 283DF5F9DC; Thu, 6 Aug 2020 19:18:32 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 077/143] meson: convert backends directory to Meson Date: Thu, 6 Aug 2020 21:15:13 +0200 Message-Id: <1596741379-12902-78-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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 | 2 -- backends/Makefile.objs | 23 ----------------------- backends/meson.build | 19 +++++++++++++++++++ backends/tpm/Makefile.objs | 4 ---- backends/tpm/meson.build | 8 ++++++++ configure | 2 ++ meson.build | 5 +++++ 7 files changed, 34 insertions(+), 29 deletions(-) delete mode 100644 backends/Makefile.objs create mode 100644 backends/meson.build delete mode 100644 backends/tpm/Makefile.objs create mode 100644 backends/tpm/meson.build diff --git a/Makefile.objs b/Makefile.objs index 8e73682..65b0ae6 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -65,8 +65,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 += backends/ - common-obj-y += qapi/ common-obj-y += libqmp.fa diff --git a/backends/Makefile.objs b/backends/Makefile.objs deleted file mode 100644 index 22d204c..0000000 --- a/backends/Makefile.objs +++ /dev/null @@ -1,23 +0,0 @@ -common-obj-y += rng.o rng-egd.o rng-builtin.o -common-obj-$(CONFIG_POSIX) += rng-random.o - -common-obj-$(CONFIG_TPM) += tpm/ - -common-obj-y += hostmem.o hostmem-ram.o -common-obj-$(CONFIG_POSIX) += hostmem-file.o - -common-obj-y += cryptodev.o -common-obj-y += cryptodev-builtin.o - -ifeq ($(CONFIG_VIRTIO_CRYPTO),y) -common-obj-y += cryptodev-vhost.o -common-obj-$(CONFIG_VHOST_CRYPTO) += cryptodev-vhost-user.o -endif - -common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o - -common-obj-$(CONFIG_LINUX) += hostmem-memfd.o - -common-obj-$(CONFIG_GIO) += dbus-vmstate.o -dbus-vmstate.o-cflags = $(GIO_CFLAGS) -dbus-vmstate.o-libs = $(GIO_LIBS) diff --git a/backends/meson.build b/backends/meson.build new file mode 100644 index 0000000..484456e --- /dev/null +++ b/backends/meson.build @@ -0,0 +1,19 @@ +softmmu_ss.add([files( + 'cryptodev-builtin.c', + 'cryptodev.c', + 'hostmem-ram.c', + 'hostmem.c', + 'rng-builtin.c', + 'rng-egd.c', + 'rng.c', +), numa]) + +softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c')) +softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c')) +softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c')) +softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true: files('vhost-user.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c')) +softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_true: files('cryptodev-vhost-user.c')) +softmmu_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus-vmstate.c'), gio]) + +subdir('tpm') diff --git a/backends/tpm/Makefile.objs b/backends/tpm/Makefile.objs deleted file mode 100644 index db2731f..0000000 --- a/backends/tpm/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -common-obj-y += tpm_backend.o -common-obj-y += tpm_util.o -common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o -common-obj-$(CONFIG_TPM_EMULATOR) += tpm_emulator.o diff --git a/backends/tpm/meson.build b/backends/tpm/meson.build new file mode 100644 index 0000000..8579290 --- /dev/null +++ b/backends/tpm/meson.build @@ -0,0 +1,8 @@ +tpm_ss = ss.source_set() + +tpm_ss.add(files('tpm_backend.c')) +tpm_ss.add(files('tpm_util.c')) +tpm_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c')) +tpm_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c')) + +softmmu_ss.add_all(when: 'CONFIG_TPM', if_true: tpm_ss) diff --git a/configure b/configure index e99af16..96ba99f 100755 --- a/configure +++ b/configure @@ -4675,6 +4675,7 @@ EOF if compile_prog "" "-lnuma" ; then numa=yes libs_softmmu="-lnuma $libs_softmmu" + numa_libs="-lnuma" else if test "$numa" = "yes" ; then feature_not_found "numa" "install numactl devel" @@ -8309,6 +8310,7 @@ fi if test "$numa" = "yes"; then echo "CONFIG_NUMA=y" >> $config_host_mak + echo "NUMA_LIBS=$numa_libs" >> $config_host_mak fi if test "$ccache_cpp2" = "yes"; then diff --git a/meson.build b/meson.build index 73ad78d..77c0df6 100644 --- a/meson.build +++ b/meson.build @@ -304,6 +304,10 @@ rdma = not_found if 'CONFIG_RDMA' in config_host rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split()) endif +numa = not_found +if 'CONFIG_NUMA' in config_host + numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') @@ -641,6 +645,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true: [files('device_tree.c')]) common_ss.add(files('cpus-common.c')) subdir('softmmu') +subdir('backends') subdir('migration') subdir('monitor') subdir('net') From patchwork Thu Aug 6 19:15:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276957 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=-10.1 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 4A672C433E0 for ; Thu, 6 Aug 2020 19:52: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 3FDAF2173E for ; Thu, 6 Aug 2020 19:52:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fC7C+FXt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FDAF2173E 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]:35456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lvj-0000tW-6o for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:51:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPa-0007WU-P0 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:46 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:27128 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 1k3lPY-0006g5-S0 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741524; 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=0UaVS/O2UMjZawLBSRCIvq5m68pmtVNluuu280xtuVY=; b=fC7C+FXtIGxlFIGwqFV1I/Dx4tzEWLT26qWePINvbxHljxbJoBxi67xhZk086SGs9axWnq N+QIM3uW9swRcPSWNZw90f06rOdCKw0fBsep0JjXTFATJIgD75dFzmwKjv3cJhO04RZu7+ FQFyK52AKxC4SgrnCsIjqgHBG91Hpx8= 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-71-z4uI4Aa0MfWGYVNcl9lKCA-1; Thu, 06 Aug 2020 15:18:42 -0400 X-MC-Unique: z4uI4Aa0MfWGYVNcl9lKCA-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 BB9E41800D42 for ; Thu, 6 Aug 2020 19:18:41 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id CBF0C5F9DC; Thu, 6 Aug 2020 19:18:40 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 080/143] meson: convert qapi-specific to meson Date: Thu, 6 Aug 2020 21:15:16 +0200 Message-Id: <1596741379-12902-81-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 4959d62..965f64c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -63,8 +63,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 bf3fda9..386378b 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 c0a31be..0000000 --- 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 51d11ce..de5b16f 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -113,8 +113,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 Thu Aug 6 19:15: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: 276958 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=-10.1 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 17D70C433DF for ; Thu, 6 Aug 2020 19:51: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 11A2E2173E for ; Thu, 6 Aug 2020 19:51:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gCs5BLbx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11A2E2173E 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]:60064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lv6-0007lu-VS for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:51:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPc-0007ap-FB for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:48 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:42836 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 1k3lPa-0006gF-Eg for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741525; 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=XmeJl4pa426eNDvtwNlw3eVZ54FFoZL67T6F72LUplA=; b=gCs5BLbxMNjxOLhtDMLHbbGBzn91Ahk3j0A3XJiRR1ezATjuFD/lABscb+P8+qECfqhsPP mfYL1swLVOdbk2RyyNwJMzTo/MXZ02678V4sgYKPWyRYqphAjoWXpdxnNVkZVE7VobHT92 zCo7c8Qngtzhni2DELYBhnU2guZZ2Gs= 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-38-jLPPLoTiOaaLS_dXOtt-rw-1; Thu, 06 Aug 2020 15:18:43 -0400 X-MC-Unique: jLPPLoTiOaaLS_dXOtt-rw-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 20C6619200C2 for ; Thu, 6 Aug 2020 19:18:43 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30E1A5F9DC; Thu, 6 Aug 2020 19:18:41 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 081/143] meson: convert hw/xen Date: Thu, 6 Aug 2020 21:15:17 +0200 Message-Id: <1596741379-12902-82-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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 | 4 ++++ hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/xen/Makefile.objs | 7 ------- hw/xen/meson.build | 20 ++++++++++++++++++++ meson.build | 6 ++++++ 6 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 hw/meson.build delete mode 100644 hw/xen/Makefile.objs create mode 100644 hw/xen/meson.build diff --git a/configure b/configure index 96ba99f..3483d6c 100755 --- a/configure +++ b/configure @@ -2673,6 +2673,8 @@ if test "$xen" != "no" ; then fi QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)" libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu" + xen_cflags="$($pkg_config --cflags $xen_pc)" + xen_libs="$($pkg_config --libs $xen_pc)" else xen_libs="-lxenstore -lxenctrl -lxenguest" @@ -7239,6 +7241,8 @@ fi if test "$xen" = "yes" ; then echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak + echo "XEN_CFLAGS=$xen_cflags" >> $config_host_mak + echo "XEN_LIBS=$xen_libs" >> $config_host_mak fi if test "$linux_aio" = "yes" ; then echo "CONFIG_LINUX_AIO=y" >> $config_host_mak diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 14b7ea4..d204a90 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -35,7 +35,6 @@ devices-dirs-y += usb/ devices-dirs-$(CONFIG_VFIO) += vfio/ devices-dirs-y += virtio/ devices-dirs-y += watchdog/ -devices-dirs-$(CONFIG_XEN) += xen/ devices-dirs-$(CONFIG_MEM_DEVICE) += mem/ devices-dirs-$(CONFIG_NUBUS) += nubus/ devices-dirs-y += semihosting/ diff --git a/hw/meson.build b/hw/meson.build new file mode 100644 index 0000000..08112a5 --- /dev/null +++ b/hw/meson.build @@ -0,0 +1 @@ +subdir('xen') diff --git a/hw/xen/Makefile.objs b/hw/xen/Makefile.objs deleted file mode 100644 index 502b32d..0000000 --- a/hw/xen/Makefile.objs +++ /dev/null @@ -1,7 +0,0 @@ -# xen backend driver support -common-obj-y += xen-legacy-backend.o xen_devconfig.o xen_pvdev.o xen-bus.o xen-bus-helper.o xen-backend.o - -obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o -obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_graphics.o xen_pt_msi.o -obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt_load_rom.o -obj-$(call lnot,$(CONFIG_XEN_PCI_PASSTHROUGH)) += xen_pt_stub.o diff --git a/hw/xen/meson.build b/hw/xen/meson.build new file mode 100644 index 0000000..076954b --- /dev/null +++ b/hw/xen/meson.build @@ -0,0 +1,20 @@ +softmmu_ss.add(when: ['CONFIG_XEN', xen], if_true: files( + 'xen-backend.c', + 'xen-bus-helper.c', + 'xen-bus.c', + 'xen-legacy-backend.c', + 'xen_devconfig.c', + 'xen_pvdev.c', +)) + +xen_specific_ss = ss.source_set() +xen_specific_ss.add(when: 'CONFIG_XEN_PCI_PASSTHROUGH', if_true: files( + 'xen-host-pci-device.c', + 'xen_pt.c', + 'xen_pt_config_init.c', + 'xen_pt_graphics.c', + 'xen_pt_load_rom.c', + 'xen_pt_msi.c', +), if_false: files('xen_pt_stub.c')) + +specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss) diff --git a/meson.build b/meson.build index fb444ad..550e454 100644 --- a/meson.build +++ b/meson.build @@ -308,6 +308,11 @@ numa = not_found if 'CONFIG_NUMA' in config_host numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split()) endif +xen = not_found +if 'CONFIG_XEN_BACKEND' in config_host + xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(), + link_args: config_host['XEN_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') @@ -651,6 +656,7 @@ subdir('migration') subdir('monitor') subdir('net') subdir('replay') +subdir('hw') # needed for fuzzing binaries subdir('tests/qtest/libqos') From patchwork Thu Aug 6 19:15: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: 276956 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=-10.1 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 BA344C433DF for ; Thu, 6 Aug 2020 19:53:14 +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 43F3C2173E for ; Thu, 6 Aug 2020 19:53:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="APvAxMew" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43F3C2173E 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]:40294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lwu-0003Ba-QB for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:53:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPg-0007kU-Ii for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:52 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:38643 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 1k3lPe-0006gl-PU for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741530; 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=XJ9OVokfJnGAhtD/lxsDsJtm9yPBxnkQ0IWINN8PfuI=; b=APvAxMewVqJkmFu+9CdQcaC4mGSigtqA8YXsXZ8mnh1nyIg4LC3giMXq+QM8MqHwyBBEYb AppHAkC6jlNH/sjuNl/L3QPysRnBuOQJyuMV/3LnJZLmm8oTRaTy78byKrvrMVbT1oopmk f00+tA758r8vaK7XbB5+JDaWj6Ef+b4= 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-166-v_5Q0BRqPamrTBbpNP3L2w-1; Thu, 06 Aug 2020 15:18:46 -0400 X-MC-Unique: v_5Q0BRqPamrTBbpNP3L2w-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 D2F7B100AA21 for ; Thu, 6 Aug 2020 19:18:45 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3C745FC3B; Thu, 6 Aug 2020 19:18:44 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 083/143] meson: convert hw/semihosting Date: Thu, 6 Aug 2020 21:15:19 +0200 Message-Id: <1596741379-12902-84-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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/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 bdf8bdf..6a7ca0f 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 fe7c466..66a2f6c 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 4ad47c0..0000000 --- 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 0000000..f40ac57 --- /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 Thu Aug 6 19:15: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: 276955 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=-10.1 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 54464C433DF for ; Thu, 6 Aug 2020 19:53: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 45C032173E for ; Thu, 6 Aug 2020 19:53:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="V9RlGvwM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45C032173E 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]:43896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lxa-0004fD-7U for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:53:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPi-0007pU-IL for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lPg-0006h0-Mt for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:18:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741532; 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=2o3z543BwQNJiqsu8SJSUCnvV9TS/KTwSbMD9xcgwOc=; b=V9RlGvwMLB2VnMqTk2qiIpQOA81Cuxs9ONkVx8FpAu9+LFh5E/v5YhMPGwEBNpkhjfeBSh B1/awmpZoS5n3jcgYdcn07Th/hTfJSCbtVLz4O7ADZEu3Zqlk5xTC+SALUQmIWKT5nPf3E mCagmEtCxYgHrE5QMpeBSo8zTZ3TsSM= 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-72-0mtMv3YpPLSiLfS2fYhrOA-1; Thu, 06 Aug 2020 15:18:50 -0400 X-MC-Unique: 0mtMv3YpPLSiLfS2fYhrOA-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 B01B280183C for ; Thu, 6 Aug 2020 19:18:49 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id C12C25F9DC; Thu, 6 Aug 2020 19:18:48 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 086/143] meson: convert hw/mem Date: Thu, 6 Aug 2020 21:15:22 +0200 Message-Id: <1596741379-12902-87-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 13:48:01 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 73c49dd..df72b25 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 c278449..a0ef2cf 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 56345be..0000000 --- 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 0000000..ba42462 --- /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 dccc2d1..542d675 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 Thu Aug 6 19:15: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: 276953 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=-10.1 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, URIBL_BLOCKED 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 4FC55C433E0 for ; Thu, 6 Aug 2020 19:55:23 +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 42248221E2 for ; Thu, 6 Aug 2020 19:55:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PfSo44x/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42248221E2 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]:52364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lz0-00084a-8k for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:55:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPv-0008M0-Cn for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lPs-0006hm-SI for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741544; 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=f7SvPDSXu/XWWYJ5NEdhWvXE2wztSL+oZQ4rAwm2gy0=; b=PfSo44x/8b/7cjq1JvdRXUQR/1UhLp3FqyeRZP9NzjRI9MWHsQTp7PbwHfEpwzE1M5IwQp N7eMWpgWotEA1jg3T/FmcMd/HdRNVyT9IK+jOflUrLCs/RUNGojVJ17ZO7plxi6rpvhhYj +FCgYTwkgmDFhHizgp7zy2aRMkWdzC0= 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-27-ZNvGxQoqO-iRJ8NbA857qQ-1; Thu, 06 Aug 2020 15:18:59 -0400 X-MC-Unique: ZNvGxQoqO-iRJ8NbA857qQ-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 D298B100AA21 for ; Thu, 6 Aug 2020 19:18:58 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id E41CB5FC3B; Thu, 6 Aug 2020 19:18:57 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 090/143] meson: convert hw/usb Date: Thu, 6 Aug 2020 21:15:26 +0200 Message-Id: <1596741379-12902-91-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 12:59:11 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, RCVD_IN_DNSWL_NONE=-0.0001, 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.target | 1 + hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/usb/Makefile.objs | 71 ---------------------------------------------------- hw/usb/meson.build | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ meson.build | 15 +++++++++++ 6 files changed, 86 insertions(+), 72 deletions(-) delete mode 100644 hw/usb/Makefile.objs create mode 100644 hw/usb/meson.build diff --git a/Makefile.target b/Makefile.target index 386378b..3d5a2af 100644 --- a/Makefile.target +++ b/Makefile.target @@ -168,6 +168,7 @@ 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) # Hardware support ifeq ($(TARGET_NAME), sparc64) diff --git a/hw/Makefile.objs b/hw/Makefile.objs index f6e08f6..c2619bb 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -30,7 +30,6 @@ devices-dirs-y += sd/ devices-dirs-y += ssi/ devices-dirs-y += timer/ devices-dirs-$(CONFIG_TPM) += tpm/ -devices-dirs-y += usb/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 4dafc8a..89bd6ad 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -3,6 +3,7 @@ subdir('mem') subdir('nubus') subdir('semihosting') subdir('smbios') +subdir('usb') subdir('vfio') subdir('virtio') subdir('watchdog') diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs deleted file mode 100644 index e342ff5..0000000 --- a/hw/usb/Makefile.objs +++ /dev/null @@ -1,71 +0,0 @@ -# usb subsystem core -common-obj-y += core.o combined-packet.o bus.o libhw.o -common-obj-$(CONFIG_USB) += desc.o desc-msos.o - -# usb host adapters -common-obj-$(CONFIG_USB_UHCI) += hcd-uhci.o -common-obj-$(CONFIG_USB_OHCI) += hcd-ohci.o -common-obj-$(CONFIG_USB_OHCI_PCI) += hcd-ohci-pci.o -common-obj-$(CONFIG_USB_EHCI) += hcd-ehci.o -common-obj-$(CONFIG_USB_EHCI_PCI) += hcd-ehci-pci.o -common-obj-$(CONFIG_USB_EHCI_SYSBUS) += hcd-ehci-sysbus.o -common-obj-$(CONFIG_USB_XHCI) += hcd-xhci.o -common-obj-$(CONFIG_USB_XHCI_NEC) += hcd-xhci-nec.o -common-obj-$(CONFIG_USB_MUSB) += hcd-musb.o -common-obj-$(CONFIG_USB_DWC2) += hcd-dwc2.o - -common-obj-$(CONFIG_TUSB6010) += tusb6010.o -common-obj-$(CONFIG_IMX) += chipidea.o - -# emulated usb devices -common-obj-$(CONFIG_USB) += dev-hub.o -common-obj-$(CONFIG_USB) += dev-hid.o -common-obj-$(CONFIG_USB_TABLET_WACOM) += dev-wacom.o -common-obj-$(CONFIG_USB_STORAGE_BOT) += dev-storage.o -common-obj-$(CONFIG_USB_STORAGE_UAS) += dev-uas.o -common-obj-$(CONFIG_USB_AUDIO) += dev-audio.o -common-obj-$(CONFIG_USB_SERIAL) += dev-serial.o -common-obj-$(CONFIG_USB_NETWORK) += dev-network.o - -ifeq ($(CONFIG_USB_SMARTCARD),y) -common-obj-y += dev-smartcard-reader.o -ifeq ($(CONFIG_SMARTCARD),y) -common-obj-m += smartcard.mo -smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o -smartcard.mo-cflags := $(SMARTCARD_CFLAGS) -smartcard.mo-libs := $(SMARTCARD_LIBS) -endif -endif - -ifeq ($(CONFIG_POSIX),y) -common-obj-$(CONFIG_USB_STORAGE_MTP) += dev-mtp.o -endif - -# usb redirection -ifeq ($(CONFIG_USB),y) -ifeq ($(CONFIG_USB_REDIR),y) -common-obj-m += redirect.mo -redirect.mo-objs = redirect.o quirks.o -redirect.mo-cflags = $(USB_REDIR_CFLAGS) -redirect.mo-libs = $(USB_REDIR_LIBS) -endif -endif - -# usb pass-through -ifeq ($(CONFIG_USB_LIBUSB)$(CONFIG_USB),yy) -common-obj-y += host-libusb.o -else -common-obj-y += host-stub.o -endif -common-obj-$(CONFIG_ALL) += host-stub.o - -host-libusb.o-cflags := $(LIBUSB_CFLAGS) -host-libusb.o-libs := $(LIBUSB_LIBS) - -ifeq ($(CONFIG_USB_LIBUSB),y) -common-obj-$(CONFIG_XEN) += xen-usb.o -xen-usb.o-cflags := $(LIBUSB_CFLAGS) -xen-usb.o-libs := $(LIBUSB_LIBS) -endif - -common-obj-$(CONFIG_IMX_USBPHY) += imx-usb-phy.o diff --git a/hw/usb/meson.build b/hw/usb/meson.build new file mode 100644 index 0000000..f40d158 --- /dev/null +++ b/hw/usb/meson.build @@ -0,0 +1,69 @@ +hw_usb_modules = [] + +# usb subsystem core +softmmu_ss.add(files( + 'bus.c', + 'combined-packet.c', + 'core.c', + 'libhw.c' +)) + +softmmu_ss.add(when: 'CONFIG_USB', if_true: files( + 'desc.c', + 'desc-msos.c', +)) + +# usb host adapters +softmmu_ss.add(when: 'CONFIG_USB_UHCI', if_true: files('hcd-uhci.c')) +softmmu_ss.add(when: 'CONFIG_USB_OHCI', if_true: files('hcd-ohci.c')) +softmmu_ss.add(when: 'CONFIG_USB_OHCI_PCI', if_true: files('hcd-ohci-pci.c')) +softmmu_ss.add(when: 'CONFIG_USB_EHCI', if_true: files('hcd-ehci.c')) +softmmu_ss.add(when: 'CONFIG_USB_EHCI_PCI', if_true: files('hcd-ehci-pci.c')) +softmmu_ss.add(when: 'CONFIG_USB_EHCI_SYSBUS', if_true: files('hcd-ehci.c', 'hcd-ehci-sysbus.c')) +softmmu_ss.add(when: 'CONFIG_USB_XHCI', if_true: files('hcd-xhci.c')) +softmmu_ss.add(when: 'CONFIG_USB_XHCI_NEC', if_true: files('hcd-xhci-nec.c')) +softmmu_ss.add(when: 'CONFIG_USB_MUSB', if_true: files('hcd-musb.c')) +softmmu_ss.add(when: 'CONFIG_USB_DWC2', if_true: files('hcd-dwc2.c')) + +softmmu_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c')) +softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c')) +softmmu_ss.add(when: 'CONFIG_IMX_USBPHY', if_true: files('imx-usb-phy.c')) + +# emulated usb devices +softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c')) +softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c')) +softmmu_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c')) +softmmu_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage.c')) +softmmu_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: files('dev-uas.c')) +softmmu_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c')) +softmmu_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c')) +softmmu_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c')) +softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_USB_STORAGE_MTP'], if_true: files('dev-mtp.c')) + +# smartcard +softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader.c')) + +if config_host.has_key('CONFIG_SMARTCARD') + hw_usb_modules += [['smartcard', files( + 'ccid-card-emulated.c', + 'ccid-card-passthru.c', + ), [cacard], ['CONFIG_USB_SMARTCARD']]] +endif + +# usb redirect +if config_host.has_key('CONFIG_USB_REDIR') + hw_usb_modules += [['redirect', files( + 'redirect.c', + 'quirks.c', + ), [usbredir], ['CONFIG_USB']]] +endif + +# usb pass-through +softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_USB_LIBUSB', libusb], + if_true: files('host-libusb.c'), + if_false: files('host-stub.c')) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('host-stub.c')) + +softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true: files('xen-usb.c')) + +modules += { 'hw-usb': hw_usb_modules } diff --git a/meson.build b/meson.build index 550e454..e2a80b8 100644 --- a/meson.build +++ b/meson.build @@ -313,6 +313,21 @@ if 'CONFIG_XEN_BACKEND' in config_host xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(), link_args: config_host['XEN_LIBS'].split()) endif +cacard = not_found +if 'CONFIG_SMARTCARD' in config_host + cacard = declare_dependency(compile_args: config_host['SMARTCARD_CFLAGS'].split(), + link_args: config_host['SMARTCARD_LIBS'].split()) +endif +usbredir = not_found +if 'CONFIG_USB_REDIR' in config_host + usbredir = declare_dependency(compile_args: config_host['USB_REDIR_CFLAGS'].split(), + link_args: config_host['USB_REDIR_LIBS'].split()) +endif +libusb = not_found +if 'CONFIG_USB_LIBUSB' in config_host + libusb = declare_dependency(compile_args: config_host['LIBUSB_CFLAGS'].split(), + link_args: config_host['LIBUSB_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') From patchwork Thu Aug 6 19:15: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: 276951 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=-10.1 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 55A89C433DF for ; Thu, 6 Aug 2020 19:57: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 4665B2173E for ; Thu, 6 Aug 2020 19:57:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FPKzrJgR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4665B2173E 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]:60774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m0p-0003B4-2N for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:57:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPw-0008O7-10 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:08 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:28905 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 1k3lPu-0006hu-4L for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=lMOKj2JUkDjiKQzhyDxdSKswLl4CNUMxR1j4M1JHaXA=; b=FPKzrJgR9+BA18bzNs6u03VVXFNZ39waYB4qx2unzvKlP/fbRmjz0lXUBNZ6e4yhfR2j9a XQjGFv/ZchZFdiw7sIHYBunnTFRjwahgbujtOtW+sy2LBZSorX6gYEwlzUtJk9AEj3UPx2 BNiag7LM9skMtqsZGM+pikX6Xabps5Q= 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-393-V2w65rgkPmmbtSSSZiKsUQ-1; Thu, 06 Aug 2020 15:19:03 -0400 X-MC-Unique: V2w65rgkPmmbtSSSZiKsUQ-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 B12171DE2 for ; Thu, 6 Aug 2020 19:19:02 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 05F345F9DC for ; Thu, 6 Aug 2020 19:19:01 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 093/143] meson: convert hw/rtc Date: Thu, 6 Aug 2020 21:15:29 +0200 Message-Id: <1596741379-12902-94-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 --- hw/Makefile.objs | 1 - hw/meson.build | 1 + hw/rtc/Makefile.objs | 15 --------------- hw/rtc/meson.build | 16 ++++++++++++++++ 4 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 hw/rtc/Makefile.objs create mode 100644 hw/rtc/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 70ecaa8..f60fd01 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -24,7 +24,6 @@ devices-dirs-y += nvram/ devices-dirs-y += pci/ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ devices-dirs-y += pcmcia/ -devices-dirs-y += rtc/ devices-dirs-$(CONFIG_SCSI) += scsi/ devices-dirs-y += sd/ devices-dirs-y += ssi/ diff --git a/hw/meson.build b/hw/meson.build index 50b26db..1fb1687 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,6 +1,7 @@ subdir('core') subdir('mem') subdir('nubus') +subdir('rtc') subdir('semihosting') subdir('smbios') subdir('timer') diff --git a/hw/rtc/Makefile.objs b/hw/rtc/Makefile.objs deleted file mode 100644 index e4c1b86..0000000 --- a/hw/rtc/Makefile.objs +++ /dev/null @@ -1,15 +0,0 @@ -common-obj-$(CONFIG_DS1338) += ds1338.o -common-obj-$(CONFIG_M41T80) += m41t80.o -common-obj-$(CONFIG_M48T59) += m48t59.o -ifeq ($(CONFIG_ISA_BUS),y) -common-obj-$(CONFIG_M48T59) += m48t59-isa.o -endif -common-obj-$(CONFIG_PL031) += pl031.o -common-obj-$(CONFIG_TWL92230) += twl92230.o -common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o -common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o -obj-$(CONFIG_MC146818RTC) += mc146818rtc.o -common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_rtc.o -common-obj-$(CONFIG_GOLDFISH_RTC) += goldfish_rtc.o -common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-rtc.o diff --git a/hw/rtc/meson.build b/hw/rtc/meson.build new file mode 100644 index 0000000..7cecdee --- /dev/null +++ b/hw/rtc/meson.build @@ -0,0 +1,16 @@ + +softmmu_ss.add(when: 'CONFIG_DS1338', if_true: files('ds1338.c')) +softmmu_ss.add(when: 'CONFIG_M41T80', if_true: files('m41t80.c')) +softmmu_ss.add(when: 'CONFIG_M48T59', if_true: files('m48t59.c')) +softmmu_ss.add(when: 'CONFIG_PL031', if_true: files('pl031.c')) +softmmu_ss.add(when: 'CONFIG_TWL92230', if_true: files('twl92230.c')) +softmmu_ss.add(when: ['CONFIG_ISA_BUS', 'CONFIG_M48T59'], if_true: files('m48t59-isa.c')) +softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-rtc.c')) + +softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_rtc.c')) +softmmu_ss.add(when: 'CONFIG_SUN4V_RTC', if_true: files('sun4v-rtc.c')) +softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_rtc.c')) +softmmu_ss.add(when: 'CONFIG_GOLDFISH_RTC', if_true: files('goldfish_rtc.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-rtc.c')) + +specific_ss.add(when: 'CONFIG_MC146818RTC', if_true: files('mc146818rtc.c')) From patchwork Thu Aug 6 19:15:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276949 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=-10.1 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 7DA13C433DF for ; Thu, 6 Aug 2020 19:59: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 6E1252173E for ; Thu, 6 Aug 2020 19:59:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="W0Y2hQ/0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E1252173E 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]:40900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m2U-0006Y1-U9 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:59:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lPx-0008Rl-JX for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:09 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:35554 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 1k3lPv-0006i2-9x for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741546; 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=Yb4SZnldMsHJs48ssbsPr5n2+3G0FQv6iEnjmcqKyLY=; b=W0Y2hQ/0Zl287uLSciaqICGmb4RvcQaLgG+ymVtVUxmvGqPbXVQNCsnt0saZyl1MgY77Ge rYwUf7/WEXxEWDtQy3l8RqEyHtzPrL7MHv7aDPB8XPmwSaiCTr3qz16LT/9+tNa+keurwE ZYV7WGB9gEjUZ8mQ2JwByBZPs/JDSzQ= 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-310-yPJKi5OSOzmH9T2Zb_NrJw-1; Thu, 06 Aug 2020 15:19:04 -0400 X-MC-Unique: yPJKi5OSOzmH9T2Zb_NrJw-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 1656B8015F3 for ; Thu, 6 Aug 2020 19:19:04 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27E2F69315; Thu, 6 Aug 2020 19:19:02 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 094/143] meson: convert hw/ssi Date: Thu, 6 Aug 2020 21:15:30 +0200 Message-Id: <1596741379-12902-95-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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/ssi/Makefile.objs | 10 ---------- hw/ssi/meson.build | 9 +++++++++ 4 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 hw/ssi/Makefile.objs create mode 100644 hw/ssi/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index f60fd01..e50eb04 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -26,7 +26,6 @@ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ devices-dirs-y += pcmcia/ devices-dirs-$(CONFIG_SCSI) += scsi/ devices-dirs-y += sd/ -devices-dirs-y += ssi/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 1fb1687..7564426 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -4,6 +4,7 @@ subdir('nubus') subdir('rtc') subdir('semihosting') subdir('smbios') +subdir('ssi') subdir('timer') subdir('tpm') subdir('usb') diff --git a/hw/ssi/Makefile.objs b/hw/ssi/Makefile.objs deleted file mode 100644 index 07a85f1..0000000 --- a/hw/ssi/Makefile.objs +++ /dev/null @@ -1,10 +0,0 @@ -common-obj-$(CONFIG_PL022) += pl022.o -common-obj-$(CONFIG_SSI) += ssi.o -common-obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o -common-obj-$(CONFIG_XILINX_SPIPS) += xilinx_spips.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_smc.o -common-obj-$(CONFIG_STM32F2XX_SPI) += stm32f2xx_spi.o -common-obj-$(CONFIG_MSF2) += mss-spi.o - -common-obj-$(CONFIG_OMAP) += omap_spi.o -common-obj-$(CONFIG_IMX) += imx_spi.o diff --git a/hw/ssi/meson.build b/hw/ssi/meson.build new file mode 100644 index 0000000..f1f5c28 --- /dev/null +++ b/hw/ssi/meson.build @@ -0,0 +1,9 @@ +softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_smc.c')) +softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-spi.c')) +softmmu_ss.add(when: 'CONFIG_PL022', if_true: files('pl022.c')) +softmmu_ss.add(when: 'CONFIG_SSI', if_true: files('ssi.c')) +softmmu_ss.add(when: 'CONFIG_STM32F2XX_SPI', if_true: files('stm32f2xx_spi.c')) +softmmu_ss.add(when: 'CONFIG_XILINX_SPI', if_true: files('xilinx_spi.c')) +softmmu_ss.add(when: 'CONFIG_XILINX_SPIPS', if_true: files('xilinx_spips.c')) +softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_spi.c')) +softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_spi.c')) From patchwork Thu Aug 6 19:15: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: 276954 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=-10.1 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 3789EC433E0 for ; Thu, 6 Aug 2020 19:54: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 29B472173E for ; Thu, 6 Aug 2020 19:54:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PZIi7uMd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29B472173E 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]:48670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3lyN-0006Zw-68 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:54:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQ5-0000Jd-33 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:17 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28280 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 1k3lQ3-0006jF-4j for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741554; 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=MKUdEtXoOIHCExExgKPWM+HSR8BfpiMf+x7IkfErHGk=; b=PZIi7uMdVWwrUaplhJE09qqLJDynVX1InzQkRCDSz+oJtbcD2JqavwAx0WglS3731KIvRU OGyO05lJA3rhUJfEnpPzfSz/bg6hFXOI6w305psiaVGsG7uY5zpK65xiJiqrbQ2GkaxAsq nY6mKJXNzKR61R/bGSsMiTWYLcZPmg8= 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-xWomm71hOkOpWVKRedsepw-1; Thu, 06 Aug 2020 15:19:12 -0400 X-MC-Unique: xWomm71hOkOpWVKRedsepw-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 E88721DE1 for ; Thu, 6 Aug 2020 19:19:11 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 97C3B69319; Thu, 6 Aug 2020 19:19:08 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 098/143] meson: convert hw/pci-host Date: Thu, 6 Aug 2020 21:15:34 +0200 Message-Id: <1596741379-12902-99-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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 | 2 +- hw/meson.build | 1 + hw/pci-host/Makefile.objs | 24 ------------------------ hw/pci-host/meson.build | 30 ++++++++++++++++++++++++++++++ 4 files changed, 32 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 f28da58..0038cf8 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 ed25644..ca36e48 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 e422e0a..0000000 --- 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 0000000..a84380d --- /dev/null +++ b/hw/pci-host/meson.build @@ -0,0 +1,30 @@ +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', +)) From patchwork Thu Aug 6 19:15:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276947 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=-10.1 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 F018BC433E0 for ; Thu, 6 Aug 2020 20:00: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 DF767221E2 for ; Thu, 6 Aug 2020 20:00:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ETdOR0My" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF767221E2 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]:49278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m49-0001Xa-TB for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:00:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQ9-0000V7-L0 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:21 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:41551 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 1k3lQ7-0006jW-Pz for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741559; 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=IMJJsIc+cf5gyLxdIWccdwznh3sTxnUR7ZqHdvZWrNo=; b=ETdOR0MySHStLs2fN93O0y2rEr/Vh3Jz4oWp7kexJDpEPLu/ALN+ClRZiqsy2KPsUXH5wh YZpouh/yzWLp5WqCW2uXEjnwEVVRaammMuqhOC1l5QG6d5FQ+tj0UeWvKS0iJMZ9lRsAuS 4p7hDY/beUFwtS9ApFNoq9nLwi9tims= 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-382-_DcRyg0NPrOEpxTaVJ9Oiw-1; Thu, 06 Aug 2020 15:19:17 -0400 X-MC-Unique: _DcRyg0NPrOEpxTaVJ9Oiw-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 C52681DE2 for ; Thu, 6 Aug 2020 19:19:16 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E0715F9DC; Thu, 6 Aug 2020 19:19:12 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 099/143] meson: convert hw/pci-bridge Date: Thu, 6 Aug 2020 21:15:35 +0200 Message-Id: <1596741379-12902-100-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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/pci-bridge/Makefile.objs | 10 ---------- hw/pci-bridge/meson.build | 14 ++++++++++++++ 4 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 hw/pci-bridge/Makefile.objs create mode 100644 hw/pci-bridge/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 0038cf8..3513040 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -22,7 +22,6 @@ devices-dirs-y += net/ devices-dirs-y += rdma/ devices-dirs-y += nvram/ devices-dirs-y += pci/ -devices-dirs-$(CONFIG_PCI) += pci-bridge/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index ca36e48..a7301f2 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,6 +1,7 @@ subdir('core') subdir('mem') subdir('nubus') +subdir('pci-bridge') subdir('pci-host') subdir('pcmcia') subdir('rtc') diff --git a/hw/pci-bridge/Makefile.objs b/hw/pci-bridge/Makefile.objs deleted file mode 100644 index 47065f8..0000000 --- a/hw/pci-bridge/Makefile.objs +++ /dev/null @@ -1,10 +0,0 @@ -common-obj-y += pci_bridge_dev.o -common-obj-$(CONFIG_PCIE_PORT) += pcie_root_port.o gen_pcie_root_port.o pcie_pci_bridge.o -common-obj-$(CONFIG_PXB) += pci_expander_bridge.o -common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o -common-obj-$(CONFIG_IOH3420) += ioh3420.o -common-obj-$(CONFIG_I82801B11) += i82801b11.o -# NewWorld PowerMac -common-obj-$(CONFIG_DEC_PCI) += dec.o -# Sun4u -common-obj-$(CONFIG_SIMBA) += simba.o diff --git a/hw/pci-bridge/meson.build b/hw/pci-bridge/meson.build new file mode 100644 index 0000000..daab8ac --- /dev/null +++ b/hw/pci-bridge/meson.build @@ -0,0 +1,14 @@ +pci_ss = ss.source_set() +pci_ss.add(files('pci_bridge_dev.c')) +pci_ss.add(when: 'CONFIG_I82801B11', if_true: files('i82801b11.c')) +pci_ss.add(when: 'CONFIG_IOH3420', if_true: files('ioh3420.c')) +pci_ss.add(when: 'CONFIG_PCIE_PORT', if_true: files('pcie_root_port.c', 'gen_pcie_root_port.c', 'pcie_pci_bridge.c')) +pci_ss.add(when: 'CONFIG_PXB', if_true: files('pci_expander_bridge.c')) +pci_ss.add(when: 'CONFIG_XIO3130', if_true: files('xio3130_upstream.c', 'xio3130_downstream.c')) + +# NewWorld PowerMac +pci_ss.add(when: 'CONFIG_DEC_PCI', if_true: files('dec.c')) +# Sun4u +pci_ss.add(when: 'CONFIG_SIMBA', if_true: files('simba.c')) + +softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss) From patchwork Thu Aug 6 19:15:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276945 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=-10.1 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 059C7C433E1 for ; Thu, 6 Aug 2020 20:02: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 E81E7221E2 for ; Thu, 6 Aug 2020 20:02:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="K6fsQ0QQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E81E7221E2 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]:57822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m69-000557-UA for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:02:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQB-0000Z0-6Y for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:23 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:52494 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 1k3lQ9-0006jn-B9 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741560; 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=b44MIC5J2BiGWng14IMIOdBGRSyZNO44AYRS8hN5N9A=; b=K6fsQ0QQIwnfk8AU//JZ8hkRTzV11MKsWBR3TKyBOpGdPHsoOhmNR+d13mMBGVU+Tii4g5 uYkL4ETTv+AUKXtSEYUlxDv0o7yCIN6jh2Oh08FKa20VQ4eXc9zqCqlDg/QIS64ick6L3V ey2NyJjSuiAH7T9KiOr6+YxWmh8PEMM= 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-47-jXdC_TcuPZqH_i1TQkvirg-1; Thu, 06 Aug 2020 15:19:19 -0400 X-MC-Unique: jXdC_TcuPZqH_i1TQkvirg-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 34424107BF00 for ; Thu, 6 Aug 2020 19:19:18 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42E625F9DC; Thu, 6 Aug 2020 19:19:17 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 100/143] meson: convert hw/pci Date: Thu, 6 Aug 2020 21:15:36 +0200 Message-Id: <1596741379-12902-101-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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/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 3513040..2083284 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 a7301f2..53c347c 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 c78f2fb..0000000 --- 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 0000000..5c4bbac --- /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 Thu Aug 6 19:15:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276952 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=-10.1 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 CF663C433E0 for ; Thu, 6 Aug 2020 19:57:11 +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 BED2F221E2 for ; Thu, 6 Aug 2020 19:57:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dooq0zpd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BED2F221E2 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]:60330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m0k-000305-QN for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:57:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQG-0000oL-J5 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:28 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:58559 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 1k3lQE-0006lW-NH for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741566; 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=fDOD9pY4H4z+pzypGKM2Fu9H3SMyzg1wdFQ1al2nrOc=; b=dooq0zpdw6ojvmd2ielOU8eTQ1CLP9ZcOwtHfrVTaXZcKcmovImz2CpezHXpWaSt4HURoH VZCGhFj9Wa6p0acEK/iLoGpe1UJxuz1PXbb2zFnLDcN5ziDsEhg5L2ne8vu0ydBy+2N//4 EQvtChYYBXZnPbzZLTbVxYDHRFTlDbs= 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-214-hlFZqe3qM82vx2Ary-LIDA-1; Thu, 06 Aug 2020 15:19:24 -0400 X-MC-Unique: hlFZqe3qM82vx2Ary-LIDA-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 9269C107BEF6 for ; Thu, 6 Aug 2020 19:19:23 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 003F35F9DC; Thu, 6 Aug 2020 19:19:19 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 102/143] meson: convert hw/rdma Date: Thu, 6 Aug 2020 21:15:38 +0200 Message-Id: <1596741379-12902-103-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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/rdma/Makefile.objs | 3 --- hw/rdma/meson.build | 10 ++++++++++ 4 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 hw/rdma/Makefile.objs create mode 100644 hw/rdma/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 78860ae..748a718 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -19,7 +19,6 @@ devices-dirs-$(CONFIG_IPMI) += ipmi/ devices-dirs-y += isa/ devices-dirs-y += misc/ devices-dirs-y += net/ -devices-dirs-y += rdma/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/meson.build b/hw/meson.build index 0bdd6a2..f704e51 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -6,6 +6,7 @@ subdir('pci') subdir('pci-bridge') subdir('pci-host') subdir('pcmcia') +subdir('rdma') subdir('rtc') subdir('scsi') subdir('sd') diff --git a/hw/rdma/Makefile.objs b/hw/rdma/Makefile.objs deleted file mode 100644 index 819bb12..0000000 --- a/hw/rdma/Makefile.objs +++ /dev/null @@ -1,3 +0,0 @@ -obj-$(CONFIG_VMW_PVRDMA) += rdma_utils.o rdma_backend.o rdma_rm.o rdma.o -obj-$(CONFIG_VMW_PVRDMA) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ - vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o diff --git a/hw/rdma/meson.build b/hw/rdma/meson.build new file mode 100644 index 0000000..7325f40 --- /dev/null +++ b/hw/rdma/meson.build @@ -0,0 +1,10 @@ +specific_ss.add(when: 'CONFIG_VMW_PVRDMA', if_true: files( + 'rdma.c', + 'rdma_backend.c', + 'rdma_rm.c', + 'rdma_utils.c', + 'vmw/pvrdma_cmd.c', + 'vmw/pvrdma_dev_ring.c', + 'vmw/pvrdma_main.c', + 'vmw/pvrdma_qp_ops.c', +)) From patchwork Thu Aug 6 19:15: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: 276942 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=-10.1 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 66DF2C433DF for ; Thu, 6 Aug 2020 20:06: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 52272221E2 for ; Thu, 6 Aug 2020 20:06:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZUhE422Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52272221E2 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]:46426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m9i-0003cb-Ce for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:06:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQO-00019o-Ub for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:36 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:49865 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 1k3lQN-0006mQ-35 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741574; 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=3ONsx2fEkn/tziNLZD2HyUOZzTpMXOXStj2Sp1OmPPc=; b=ZUhE422Y9H8880H1a5ZeGGKK32ffn7EAA4+Z263t04l21Na6f+R2Xblq7mXiFT9uTvzDMP Sg9rBBLdi7cwHl4FkCmfiNwa6PwsOCi9TZ7qmMwK3XTsR/iMqjiFZKuess6n0mEh02zWDV qQOgwlmIoqdAN9v8nHWz9Gx3uKxtbKo= 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-500-rT8PHbH2Ob6ar9q9yHyFKw-1; Thu, 06 Aug 2020 15:19:32 -0400 X-MC-Unique: rT8PHbH2Ob6ar9q9yHyFKw-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 95876107BEFF for ; Thu, 6 Aug 2020 19:19:31 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id A789E5F9DC; Thu, 6 Aug 2020 19:19:30 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 106/143] meson: convert hw/ipmi Date: Thu, 6 Aug 2020 21:15:42 +0200 Message-Id: <1596741379-12902-107-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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/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 a28e211..f136377 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 3cca10b..0000000 --- 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 0000000..9622ea2 --- /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 8659854..9796f95 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 Thu Aug 6 19:15: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: 276950 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=-10.1 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 5B142C433DF for ; Thu, 6 Aug 2020 19:58:48 +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 4B3AA2173E for ; Thu, 6 Aug 2020 19:58:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QL8TDeua" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B3AA2173E 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]:40478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m2J-0006Nk-C2 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 15:58:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQT-0001NL-Oq for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lQS-0006mi-1C for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741579; 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=/Ws839GXkHo0pgCx+WvKMCFqme1u/aoxjR4dtBjX32A=; b=QL8TDeuaPFDyPEnhcOb5DMktN0KyhBGbsWA9YiV3BrbJJ7a54vR9KRM9IjsVxV7JyL6W2b ZoCfhWSRbhU3U1ZwNrSjeLRYWnPlxT3S37WfnsTRSJiBcWTBWW9GXDU+2ZzFDxFoPQO98b VQljpjqFZbtf2WxqwUMRhFgOlqtclSI= 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-190-e2Kt9YLKNvK8wJdyYMe4lw-1; Thu, 06 Aug 2020 15:19:37 -0400 X-MC-Unique: e2Kt9YLKNvK8wJdyYMe4lw-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 A2CF0800468 for ; Thu, 6 Aug 2020 19:19:36 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B40F5FC3B; Thu, 6 Aug 2020 19:19:31 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 107/143] meson: convert hw/ipack Date: Thu, 6 Aug 2020 21:15:43 +0200 Message-Id: <1596741379-12902-108-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 13:48:01 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 f136377..76d9305 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 8b9bdcb..0000000 --- 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 0000000..3f8138b --- /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 9796f95..ec4bb48 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 Thu Aug 6 19:15: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: 276943 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=-10.1 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 BEB85C433DF for ; Thu, 6 Aug 2020 20:04: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 A6678221E2 for ; Thu, 6 Aug 2020 20:04:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ap8/kQtG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6678221E2 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]:38910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m88-0000Uo-MR for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:04:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQW-0001Un-LC for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:44 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:27664 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 1k3lQU-0006n0-KV for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741582; 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=pD/znTM3VWdZ2i9Ib+TwtJhrv1ezxOo5dCi6gP7yJxw=; b=ap8/kQtG23E2OBEdAcmgurjDlPKdacJW8sRpQok3HP2pv36ZIZlZYsk6Qkp0iAI/dX4UP+ VpcoylU5xa0LZbJ3VU9LeTYeAqf2Dccn5K65irjmbWWI5foZNPqD0wm1X0ySoQIeqbcbg0 qYj+0G2DfefuUeI+ZO1p0bfNtUELF0Y= 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-483-TR3QNa7RPDKtyV8UuzfASw-1; Thu, 06 Aug 2020 15:19:40 -0400 X-MC-Unique: TR3QNa7RPDKtyV8UuzfASw-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 604538015F3 for ; Thu, 6 Aug 2020 19:19:39 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 707785F9DC; Thu, 6 Aug 2020 19:19:38 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 109/143] meson: convert hw/input Date: Thu, 6 Aug 2020 21:15:45 +0200 Message-Id: <1596741379-12902-110-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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/input/Makefile.objs | 18 ------------------ hw/input/meson.build | 18 ++++++++++++++++++ hw/meson.build | 1 + 4 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 hw/input/Makefile.objs create mode 100644 hw/input/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 80b1041..3feccd8 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -12,7 +12,6 @@ devices-dirs-y += gpio/ devices-dirs-$(CONFIG_HYPERV) += hyperv/ devices-dirs-$(CONFIG_I2C) += i2c/ devices-dirs-y += ide/ -devices-dirs-y += input/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/input/Makefile.objs b/hw/input/Makefile.objs deleted file mode 100644 index abc1ff0..0000000 --- a/hw/input/Makefile.objs +++ /dev/null @@ -1,18 +0,0 @@ -common-obj-$(CONFIG_ADB) += adb.o adb-mouse.o adb-kbd.o -common-obj-y += hid.o -common-obj-$(CONFIG_LM832X) += lm832x.o -common-obj-$(CONFIG_PCKBD) += pckbd.o -common-obj-$(CONFIG_PL050) += pl050.o -common-obj-$(CONFIG_PS2) += ps2.o -common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o -common-obj-$(CONFIG_TSC2005) += tsc2005.o - -common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input.o -common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o -common-obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host.o -common-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input.o - -common-obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o -common-obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o -common-obj-$(CONFIG_TSC210X) += tsc210x.o -common-obj-$(CONFIG_LASIPS2) += lasips2.o diff --git a/hw/input/meson.build b/hw/input/meson.build new file mode 100644 index 0000000..e7285b1 --- /dev/null +++ b/hw/input/meson.build @@ -0,0 +1,18 @@ +softmmu_ss.add(files('hid.c')) +softmmu_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c')) +softmmu_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c')) +softmmu_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c')) +softmmu_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c')) +softmmu_ss.add(when: 'CONFIG_PS2', if_true: files('ps2.c')) +softmmu_ss.add(when: 'CONFIG_STELLARIS_INPUT', if_true: files('stellaris_input.c')) +softmmu_ss.add(when: 'CONFIG_TSC2005', if_true: files('tsc2005.c')) + +softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-hid.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host.c')) +softmmu_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input.c')) + +softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-softusb.c')) +softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_keypad.c')) +softmmu_ss.add(when: 'CONFIG_TSC210X', if_true: files('tsc210x.c')) +softmmu_ss.add(when: 'CONFIG_LASIPS2', if_true: files('lasips2.c')) diff --git a/hw/meson.build b/hw/meson.build index 986e710..b15c8d0 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('input') subdir('intc') subdir('ipack') subdir('ipmi') From patchwork Thu Aug 6 19:15: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: 276944 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=-10.1 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 7DEAEC433E0 for ; Thu, 6 Aug 2020 20:04: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 68586221E2 for ; Thu, 6 Aug 2020 20:04:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HViKJHqG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68586221E2 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]:37896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m7y-0008WG-FF for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:04:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQX-0001Xx-S5 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:45 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:23605 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 1k3lQV-0006n5-Tb for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741583; 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=S6T2YffQWdjYoVOqXU1E3+XqicDKVBnQ5DL2bFHz2ZU=; b=HViKJHqGKUQJatTcIELl8OzD0y5c8bGKHEq5QNDrNh3KCoEJrQlakK7ota769u14Sf7hK+ 1FK2BKVZm4ocEh/F3T8FGH8QSENGpUB6mQ0Wxysnnt+QkCy9aaZ0wfb4ZighlytmdJNpO5 7YhOBb7zLM3cOxi97S8QzZUjPpHyoQ8= 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-370-5exTMzD-Oae5352eg3G_Kw-1; Thu, 06 Aug 2020 15:19:41 -0400 X-MC-Unique: 5exTMzD-Oae5352eg3G_Kw-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 B7AEE100AA21 for ; Thu, 6 Aug 2020 19:19:40 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id C968E5F9DC; Thu, 6 Aug 2020 19:19:39 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 110/143] meson: convert hw/ide Date: Thu, 6 Aug 2020 21:15:46 +0200 Message-Id: <1596741379-12902-111-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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/ide/Makefile.objs | 14 -------------- hw/ide/meson.build | 14 ++++++++++++++ hw/meson.build | 1 + 4 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 hw/ide/Makefile.objs create mode 100644 hw/ide/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 3feccd8..02c5c0d 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -11,7 +11,6 @@ devices-dirs-y += dma/ devices-dirs-y += gpio/ devices-dirs-$(CONFIG_HYPERV) += hyperv/ devices-dirs-$(CONFIG_I2C) += i2c/ -devices-dirs-y += ide/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/ide/Makefile.objs b/hw/ide/Makefile.objs deleted file mode 100644 index faf04e0..0000000 --- a/hw/ide/Makefile.objs +++ /dev/null @@ -1,14 +0,0 @@ -common-obj-$(CONFIG_IDE_CORE) += core.o atapi.o -common-obj-$(CONFIG_IDE_QDEV) += qdev.o -common-obj-$(CONFIG_IDE_PCI) += pci.o -common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o -common-obj-$(CONFIG_IDE_PIIX) += piix.o ioport.o -common-obj-$(CONFIG_IDE_CMD646) += cmd646.o -common-obj-$(CONFIG_IDE_MACIO) += macio.o -common-obj-$(CONFIG_IDE_MMIO) += mmio.o -common-obj-$(CONFIG_IDE_VIA) += via.o -common-obj-$(CONFIG_MICRODRIVE) += microdrive.o -common-obj-$(CONFIG_AHCI) += ahci.o -common-obj-$(CONFIG_AHCI_ICH9) += ich.o -common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o -common-obj-$(CONFIG_IDE_SII3112) += sii3112.o diff --git a/hw/ide/meson.build b/hw/ide/meson.build new file mode 100644 index 0000000..ddcb3b2 --- /dev/null +++ b/hw/ide/meson.build @@ -0,0 +1,14 @@ +softmmu_ss.add(when: 'CONFIG_AHCI', if_true: files('ahci.c')) +softmmu_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich.c')) +softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('ahci-allwinner.c')) +softmmu_ss.add(when: 'CONFIG_IDE_CMD646', if_true: files('cmd646.c')) +softmmu_ss.add(when: 'CONFIG_IDE_CORE', if_true: files('core.c', 'atapi.c')) +softmmu_ss.add(when: 'CONFIG_IDE_ISA', if_true: files('isa.c', 'ioport.c')) +softmmu_ss.add(when: 'CONFIG_IDE_MACIO', if_true: files('macio.c')) +softmmu_ss.add(when: 'CONFIG_IDE_MMIO', if_true: files('mmio.c')) +softmmu_ss.add(when: 'CONFIG_IDE_PCI', if_true: files('pci.c')) +softmmu_ss.add(when: 'CONFIG_IDE_PIIX', if_true: files('piix.c', 'ioport.c')) +softmmu_ss.add(when: 'CONFIG_IDE_QDEV', if_true: files('qdev.c')) +softmmu_ss.add(when: 'CONFIG_IDE_SII3112', if_true: files('sii3112.c')) +softmmu_ss.add(when: 'CONFIG_IDE_VIA', if_true: files('via.c')) +softmmu_ss.add(when: 'CONFIG_MICRODRIVE', if_true: files('microdrive.c')) diff --git a/hw/meson.build b/hw/meson.build index b15c8d0..4d7c31c6 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('ide') subdir('input') subdir('intc') subdir('ipack') From patchwork Thu Aug 6 19:15: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: 276948 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=-10.1 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 184B5C433DF for ; Thu, 6 Aug 2020 20:00: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 05EA8221E2 for ; Thu, 6 Aug 2020 20:00:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PD28hI4t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05EA8221E2 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]:48908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m44-0001OW-0d for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:00:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQd-0001lm-9h for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:51 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:23204 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 1k3lQa-0006nO-Hg for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741587; 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=I2L0wBpJ/xI0jpJnj72FGAFzXv2h5Ph/QJFjP0USP5Q=; b=PD28hI4tM3GBY9qMdAKOeXifyilhrG2pVSF6znIKmy1z4y9RTWFCJvwX0rWdz777UJ9sG9 ZfrrMje8s/fEJG919SyExgQNwJ0lDpl19NJ+R82zcpXMp+vfo4Vz/QgxnJsJEnl+ruBgJD j7pXUu7W13cuuaZTicdprBSbKQIV/wk= 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-104-aStBUaEgNyKJx2tBqjITCw-1; Thu, 06 Aug 2020 15:19:46 -0400 X-MC-Unique: aStBUaEgNyKJx2tBqjITCw-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 65A841DE2 for ; Thu, 6 Aug 2020 19:19:45 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D48D5F9DC; Thu, 6 Aug 2020 19:19:40 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 111/143] meson: convert hw/i2c Date: Thu, 6 Aug 2020 21:15:47 +0200 Message-Id: <1596741379-12902-112-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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/i2c/Makefile.objs | 14 -------------- hw/i2c/meson.build | 16 ++++++++++++++++ hw/meson.build | 1 + 4 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 hw/i2c/Makefile.objs create mode 100644 hw/i2c/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 02c5c0d..22eb804 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -10,7 +10,6 @@ devices-dirs-y += display/ devices-dirs-y += dma/ devices-dirs-y += gpio/ devices-dirs-$(CONFIG_HYPERV) += hyperv/ -devices-dirs-$(CONFIG_I2C) += i2c/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/i2c/Makefile.objs b/hw/i2c/Makefile.objs deleted file mode 100644 index f2c61ea..0000000 --- a/hw/i2c/Makefile.objs +++ /dev/null @@ -1,14 +0,0 @@ -common-obj-$(CONFIG_I2C) += core.o -common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o -common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o -common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o -common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o -common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o -common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o -common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o -common-obj-$(CONFIG_IMX_I2C) += imx_i2c.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_i2c.o -common-obj-$(CONFIG_NRF51_SOC) += microbit_i2c.o -common-obj-$(CONFIG_MPC_I2C) += mpc_i2c.o -common-obj-$(CONFIG_OMAP) += omap_i2c.o -common-obj-$(CONFIG_PPC4XX) += ppc4xx_i2c.o diff --git a/hw/i2c/meson.build b/hw/i2c/meson.build new file mode 100644 index 0000000..3a51153 --- /dev/null +++ b/hw/i2c/meson.build @@ -0,0 +1,16 @@ +i2c_ss = ss.source_set() +i2c_ss.add(when: 'CONFIG_I2C', if_true: files('core.c')) +i2c_ss.add(when: 'CONFIG_SMBUS', if_true: files('smbus_slave.c', 'smbus_master.c')) +i2c_ss.add(when: 'CONFIG_ACPI_SMBUS', if_true: files('pm_smbus.c')) +i2c_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('smbus_ich9.c')) +i2c_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_i2c.c')) +i2c_ss.add(when: 'CONFIG_BITBANG_I2C', if_true: files('bitbang_i2c.c')) +i2c_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_i2c.c')) +i2c_ss.add(when: 'CONFIG_IMX_I2C', if_true: files('imx_i2c.c')) +i2c_ss.add(when: 'CONFIG_MPC_I2C', if_true: files('mpc_i2c.c')) +i2c_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('microbit_i2c.c')) +i2c_ss.add(when: 'CONFIG_SMBUS_EEPROM', if_true: files('smbus_eeprom.c')) +i2c_ss.add(when: 'CONFIG_VERSATILE_I2C', if_true: files('versatile_i2c.c')) +i2c_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_i2c.c')) +i2c_ss.add(when: 'CONFIG_PPC4XX', if_true: files('ppc4xx_i2c.c')) +softmmu_ss.add_all(when: 'CONFIG_I2C', if_true: i2c_ss) diff --git a/hw/meson.build b/hw/meson.build index 4d7c31c6..983edc1 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('i2c') subdir('ide') subdir('input') subdir('intc') From patchwork Thu Aug 6 19:15: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: 276946 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=-10.1 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 1F9CEC433E0 for ; Thu, 6 Aug 2020 20:02: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 0DBAA221E2 for ; Thu, 6 Aug 2020 20:02:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DrKMLv3Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DBAA221E2 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]:57294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m64-0004s0-2s for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:02:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQe-0001nx-Bv for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:52 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:20299 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 1k3lQc-0006nZ-9y for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741589; 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=4ljzT9uBW3oam26OBDL4h2fJTNj7LbFlqlVlhCS6FiY=; b=DrKMLv3ZRCM1tttUvmojHbtht8Tl9w8yYugFgPTSzXaShxqem7ku7DMaMHI3c/1MG1h5On SVAazKDxQqiBTZhEPmI1B79xcEn4igyWSkOf8zD5lP+RQR8VKzU0GpCC6uC8XOCaBCfW+M NC21xTIqqmdCKhznBr04vMHGWO0xhLM= 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-457-B2IgNitVOoKmvsrJ1EuWbQ-1; Thu, 06 Aug 2020 15:19:47 -0400 X-MC-Unique: B2IgNitVOoKmvsrJ1EuWbQ-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 BE2098014C1 for ; Thu, 6 Aug 2020 19:19:46 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id D028769315; Thu, 6 Aug 2020 19:19:45 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 112/143] meson: convert hw/hyperv Date: Thu, 6 Aug 2020 21:15:48 +0200 Message-Id: <1596741379-12902-113-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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/hyperv/Makefile.objs | 3 --- hw/hyperv/meson.build | 3 +++ hw/meson.build | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 hw/hyperv/Makefile.objs create mode 100644 hw/hyperv/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 22eb804..a2c2f6d 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -9,7 +9,6 @@ devices-dirs-y += cpu/ devices-dirs-y += display/ devices-dirs-y += dma/ devices-dirs-y += gpio/ -devices-dirs-$(CONFIG_HYPERV) += hyperv/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/hyperv/Makefile.objs b/hw/hyperv/Makefile.objs deleted file mode 100644 index 5b614e0..0000000 --- a/hw/hyperv/Makefile.objs +++ /dev/null @@ -1,3 +0,0 @@ -obj-y += hyperv.o -obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o -obj-$(CONFIG_VMBUS) += vmbus.o diff --git a/hw/hyperv/meson.build b/hw/hyperv/meson.build new file mode 100644 index 0000000..1367e29 --- /dev/null +++ b/hw/hyperv/meson.build @@ -0,0 +1,3 @@ +specific_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c')) +specific_ss.add(when: 'CONFIG_HYPERV_TESTDEV', if_true: files('hyperv_testdev.c')) +specific_ss.add(when: 'CONFIG_VMBUS', if_true: files('vmbus.c')) diff --git a/hw/meson.build b/hw/meson.build index 983edc1..f9e5adf 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('hyperv') subdir('i2c') subdir('ide') subdir('input') From patchwork Thu Aug 6 19:15: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: 276936 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=-10.1 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 C59D6C433E0 for ; Thu, 6 Aug 2020 20:11: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 B040D221E2 for ; Thu, 6 Aug 2020 20:11:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="R7Uvjyqo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B040D221E2 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]:43054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mEb-0005Gs-QH for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:11:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQf-0001qS-An for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:53 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:59854 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 1k3lQd-0006ng-C3 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741590; 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=XhQB4ICFW6AJbBPIjPKbDMY18H8bit53HVqzaUS2BM0=; b=R7UvjyqoIwM4iQWmmUWagPbm6Xws4xaZwJF+gnXFt1tGg+wSafgeGbMZMJKLlnpVKYry9Y zRrOhGn0C5se0vEffAUh2fugPmUrTNjrhNF4AKVR7JvahMaZ/tVJKjr6iIK66cDqpe0nd8 IbuLqTy9OzlCNX0iJv9atkgXVhTzdgQ= 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-398-rcoLJU3EPvW8mF-SOdcF9Q-1; Thu, 06 Aug 2020 15:19:48 -0400 X-MC-Unique: rcoLJU3EPvW8mF-SOdcF9Q-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 22C4919200C2 for ; Thu, 6 Aug 2020 19:19:48 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3439A5FC30; Thu, 6 Aug 2020 19:19:46 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 113/143] meson: convert hw/gpio Date: Thu, 6 Aug 2020 21:15:49 +0200 Message-Id: <1596741379-12902-114-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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/gpio/Makefile.objs | 12 ------------ hw/gpio/meson.build | 12 ++++++++++++ hw/meson.build | 1 + 4 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 hw/gpio/Makefile.objs create mode 100644 hw/gpio/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index a2c2f6d..c04dfe5 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -8,7 +8,6 @@ devices-dirs-y += char/ devices-dirs-y += cpu/ devices-dirs-y += display/ devices-dirs-y += dma/ -devices-dirs-y += gpio/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/gpio/Makefile.objs b/hw/gpio/Makefile.objs deleted file mode 100644 index 3cfc261..0000000 --- a/hw/gpio/Makefile.objs +++ /dev/null @@ -1,12 +0,0 @@ -common-obj-$(CONFIG_MAX7310) += max7310.o -common-obj-$(CONFIG_PL061) += pl061.o -common-obj-$(CONFIG_PUV3) += puv3_gpio.o -common-obj-$(CONFIG_ZAURUS) += zaurus.o -common-obj-$(CONFIG_E500) += mpc8xxx.o -common-obj-$(CONFIG_GPIO_KEY) += gpio_key.o - -common-obj-$(CONFIG_OMAP) += omap_gpio.o -common-obj-$(CONFIG_IMX) += imx_gpio.o -common-obj-$(CONFIG_RASPI) += bcm2835_gpio.o -common-obj-$(CONFIG_NRF51_SOC) += nrf51_gpio.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_gpio.o diff --git a/hw/gpio/meson.build b/hw/gpio/meson.build new file mode 100644 index 0000000..6bcdfa6 --- /dev/null +++ b/hw/gpio/meson.build @@ -0,0 +1,12 @@ +softmmu_ss.add(when: 'CONFIG_E500', if_true: files('mpc8xxx.c')) +softmmu_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c')) +softmmu_ss.add(when: 'CONFIG_MAX7310', if_true: files('max7310.c')) +softmmu_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c')) +softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_gpio.c')) +softmmu_ss.add(when: 'CONFIG_ZAURUS', if_true: files('zaurus.c')) + +softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c')) +softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c')) +softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c')) +softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c')) +softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c')) diff --git a/hw/meson.build b/hw/meson.build index f9e5adf..52577c3 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('gpio') subdir('hyperv') subdir('i2c') subdir('ide') From patchwork Thu Aug 6 19:15:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276934 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=-10.1 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, URIBL_BLOCKED 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 15E64C433E0 for ; Thu, 6 Aug 2020 20:13: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 E52AA221E2 for ; Thu, 6 Aug 2020 20:13:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eU8W6JTn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E52AA221E2 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 1k3mGM-0000D4-1y for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:13:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQl-00026V-JE for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:59 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:52877 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 1k3lQi-0006ov-Gt for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741595; 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=W1midiUv62s3imM9zA2FWDTdL1phYhjWb4FwYPwkLGc=; b=eU8W6JTnA2OuqVRuF9UaW4VuVUD0U1cHs3m6ZOzcrRVfGwxUnEbeDj6SIDqJY+D6YSNo1H GTaIlEhf33/IzaJvcS6pvwn0YVrFxfz2Ca7azjMQbSUC2bkzkfCod/OlqTEFJXm0k1fwy2 28llwnZdEjmDw/kGdcj+vtVndNJi/kU= 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-123-0IFGjtJ2OmO25qE2zkHsVA-1; Thu, 06 Aug 2020 15:19:51 -0400 X-MC-Unique: 0IFGjtJ2OmO25qE2zkHsVA-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 D352F19200C0 for ; Thu, 6 Aug 2020 19:19:50 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id E51B75F9DC; Thu, 6 Aug 2020 19:19:49 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 115/143] meson: convert hw/display Date: Thu, 6 Aug 2020 21:15:51 +0200 Message-Id: <1596741379-12902-116-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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.target | 1 + hw/Makefile.objs | 1 - hw/display/Makefile.objs | 65 --------------------------------- hw/display/meson.build | 94 ++++++++++++++++++++++++++++++++++++++++++++++++ hw/meson.build | 1 + 5 files changed, 96 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 3d5a2af..3534ece 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 26917a4..6fce6a1 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 d619594..0000000 --- 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 0000000..efe18f2 --- /dev/null +++ b/hw/display/meson.build @@ -0,0 +1,94 @@ +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') + hw_display_modules += [[ 'qxl', + files('qxl.c', 'qxl-logger.c', 'qxl-render.c'), [], + ['CONFIG_QXL']]] +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(files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), virgl) + virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c')) + virtio_gpu_ss.add(when: '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. + + #virtio_gpu = virtio_gpu_ss.apply(config_all_devices, strict: false) + #hw_display_modules += [[ 'virtio-gpu', virtio_gpu.sources(), [pixman, virgl], + # ['CONFIG_VIRTIO_GPU']]] + + softmmu_ss.add_all(when: [pixman, virgl, 'CONFIG_VIRTIO_GPU'], + if_true: virtio_gpu_ss) +endif + +specific_ss.add(when: [pixman, 'CONFIG_VIRTIO_GPU'], if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), virgl]) +specific_ss.add(when: [pixman, 'CONFIG_VHOST_USER_GPU'], if_true: files('vhost-user-gpu.c')) +specific_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-gpu-pci.c')) +specific_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-gpu-pci.c')) +specific_ss.add(when: 'CONFIG_VIRTIO_VGA', if_true: files('virtio-vga.c')) +specific_ss.add(when: 'CONFIG_VHOST_USER_VGA', if_true: files('vhost-user-vga.c')) + +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 96da0bb..dacd26c 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 Thu Aug 6 19:15:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276940 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=-10.1 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 20A22C433E0 for ; Thu, 6 Aug 2020 20:08: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 03E3A221E2 for ; Thu, 6 Aug 2020 20:08:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Z7UQRCTz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03E3A221E2 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]:54630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mBF-0006vg-2u for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:08:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQj-000218-Dd for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31868 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 1k3lQh-0006oj-C5 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:19:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741594; 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=4zUtG2BrTOmP13fH7T0/kK5F7ny8mbMrnn7XYfvatdE=; b=Z7UQRCTzUR/aqfSKUzsNt8P5Dpr3KYsckEIRUzQ3x/LC5IfdEqxllZlSEaqtQSFvPFdqP7 MWGMEbP2lCY9LMkdJObPH6XTHZ1hZhYNxpvnbZO8PJzS9oS2+F11Ni7m70zJMp4stGvVdc aw8boAKLOS/NR1MA5kbrcZrKWnG0KYY= 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-p7-pUM16NpeC4bdsL1d20w-1; Thu, 06 Aug 2020 15:19:53 -0400 X-MC-Unique: p7-pUM16NpeC4bdsL1d20w-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 38C4580183C for ; Thu, 6 Aug 2020 19:19:52 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 490335F9DC; Thu, 6 Aug 2020 19:19:51 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 116/143] meson: convert hw/cpu Date: Thu, 6 Aug 2020 21:15:52 +0200 Message-Id: <1596741379-12902-117-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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/cpu/Makefile.objs | 5 ----- hw/cpu/meson.build | 6 ++++++ hw/meson.build | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 hw/cpu/Makefile.objs create mode 100644 hw/cpu/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 6fce6a1..97ad302 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -5,7 +5,6 @@ devices-dirs-y += adc/ devices-dirs-y += audio/ devices-dirs-y += block/ devices-dirs-y += char/ -devices-dirs-y += cpu/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/cpu/Makefile.objs b/hw/cpu/Makefile.objs deleted file mode 100644 index 8db9e8a..0000000 --- a/hw/cpu/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -obj-$(CONFIG_ARM11MPCORE) += arm11mpcore.o -obj-$(CONFIG_REALVIEW) += realview_mpcore.o -obj-$(CONFIG_A9MPCORE) += a9mpcore.o -obj-$(CONFIG_A15MPCORE) += a15mpcore.o -common-obj-y += core.o cluster.o diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build new file mode 100644 index 0000000..9e52fee --- /dev/null +++ b/hw/cpu/meson.build @@ -0,0 +1,6 @@ +softmmu_ss.add(files('core.c', 'cluster.c')) + +specific_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c')) +specific_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c')) +specific_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c')) +specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c')) diff --git a/hw/meson.build b/hw/meson.build index dacd26c..103da48 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,4 +1,5 @@ subdir('core') +subdir('cpu') subdir('display') subdir('dma') subdir('gpio') From patchwork Thu Aug 6 19:15:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276941 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=-10.1 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 8DD5AC433DF for ; Thu, 6 Aug 2020 20:06: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 7D332221E2 for ; Thu, 6 Aug 2020 20:06:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XE/xhsmB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D332221E2 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]:47400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3m9r-00040l-K8 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:06:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQq-0002C7-4n for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:04 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:42919 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 1k3lQn-0006qJ-Mi for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741600; 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=zO4e7K01MHJ7AGB+vRclaGY++76QE/unXSxoCHpUo6s=; b=XE/xhsmBZBdBNzzbTNKz5jHFXsC2oUplBIktJ0AvZuIoolG0k/SY1GLlP4EVXZr8WPxvMF 4sXaPOH/n/AXinPCCqsxcjJDYgT/+ns/qUew9Baufvdmk2TT+fsQEZMidJVi+inDSvyShz Rn8gmFnK3rqZXdHMHGciYAwL80QO7Ag= 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-M8sd7BP_NTGWG61CItNd_w-1; Thu, 06 Aug 2020 15:19:58 -0400 X-MC-Unique: M8sd7BP_NTGWG61CItNd_w-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 41FA08014C1 for ; Thu, 6 Aug 2020 19:19:57 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id A28D25FC3B; Thu, 6 Aug 2020 19:19:52 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 117/143] meson: convert hw/char Date: Thu, 6 Aug 2020 21:15:53 +0200 Message-Id: <1596741379-12902-118-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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/char/Makefile.objs | 39 --------------------------------------- hw/char/meson.build | 38 ++++++++++++++++++++++++++++++++++++++ hw/meson.build | 1 + 4 files changed, 39 insertions(+), 40 deletions(-) delete mode 100644 hw/char/Makefile.objs create mode 100644 hw/char/meson.build diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 97ad302..04cfb6c 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -4,7 +4,6 @@ devices-dirs-y += acpi/ devices-dirs-y += adc/ devices-dirs-y += audio/ devices-dirs-y += block/ -devices-dirs-y += char/ endif common-obj-y += $(devices-dirs-y) diff --git a/hw/char/Makefile.objs b/hw/char/Makefile.objs deleted file mode 100644 index bf177ac..0000000 --- a/hw/char/Makefile.objs +++ /dev/null @@ -1,39 +0,0 @@ -common-obj-$(CONFIG_IPACK) += ipoctal232.o -common-obj-$(CONFIG_ESCC) += escc.o -common-obj-$(CONFIG_NRF51_SOC) += nrf51_uart.o -common-obj-$(CONFIG_PARALLEL) += parallel.o -common-obj-$(CONFIG_ISA_BUS) += parallel-isa.o -common-obj-$(CONFIG_PL011) += pl011.o -common-obj-$(CONFIG_SERIAL) += serial.o -common-obj-$(CONFIG_SERIAL_ISA) += serial-isa.o -common-obj-$(CONFIG_SERIAL_PCI) += serial-pci.o -common-obj-$(CONFIG_SERIAL_PCI_MULTI) += serial-pci-multi.o -common-obj-$(CONFIG_VIRTIO_SERIAL) += virtio-console.o -common-obj-$(CONFIG_XILINX) += xilinx_uartlite.o -common-obj-$(CONFIG_XEN) += xen_console.o -common-obj-$(CONFIG_CADENCE) += cadence_uart.o -common-obj-$(CONFIG_IBEX) += ibex_uart.o - -common-obj-$(CONFIG_EXYNOS4) += exynos4210_uart.o -common-obj-$(CONFIG_COLDFIRE) += mcf_uart.o -common-obj-$(CONFIG_OMAP) += omap_uart.o -common-obj-$(CONFIG_SH4) += sh_serial.o -common-obj-$(CONFIG_DIGIC) += digic-uart.o -common-obj-$(CONFIG_STM32F2XX_USART) += stm32f2xx_usart.o -common-obj-$(CONFIG_RASPI) += bcm2835_aux.o -common-obj-$(CONFIG_RENESAS_SCI) += renesas_sci.o -common-obj-$(CONFIG_AVR_USART) += avr_usart.o - -common-obj-$(CONFIG_CMSDK_APB_UART) += cmsdk-apb-uart.o -common-obj-$(CONFIG_ETRAXFS) += etraxfs_ser.o -common-obj-$(CONFIG_ISA_DEBUG) += debugcon.o -common-obj-$(CONFIG_GRLIB) += grlib_apbuart.o -common-obj-$(CONFIG_IMX) += imx_serial.o -common-obj-$(CONFIG_LM32) += lm32_juart.o -common-obj-$(CONFIG_LM32) += lm32_uart.o -common-obj-$(CONFIG_MILKYMIST) += milkymist-uart.o -common-obj-$(CONFIG_SCLPCONSOLE) += sclpconsole.o sclpconsole-lm.o - -obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o -obj-$(CONFIG_PSERIES) += spapr_vty.o -obj-$(CONFIG_TERMINAL3270) += terminal3270.o diff --git a/hw/char/meson.build b/hw/char/meson.build new file mode 100644 index 0000000..e888215 --- /dev/null +++ b/hw/char/meson.build @@ -0,0 +1,38 @@ +softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_uart.c')) +softmmu_ss.add(when: 'CONFIG_CMSDK_APB_UART', if_true: files('cmsdk-apb-uart.c')) +softmmu_ss.add(when: 'CONFIG_ESCC', if_true: files('escc.c')) +softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_ser.c')) +softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_apbuart.c')) +softmmu_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_uart.c')) +softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_serial.c')) +softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipoctal232.c')) +softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c')) +softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c')) +softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_juart.c')) +softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_uart.c')) +softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-uart.c')) +softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_uart.c')) +softmmu_ss.add(when: 'CONFIG_PARALLEL', if_true: files('parallel.c')) +softmmu_ss.add(when: 'CONFIG_PL011', if_true: files('pl011.c')) +softmmu_ss.add(when: 'CONFIG_SCLPCONSOLE', if_true: files('sclpconsole.c', 'sclpconsole-lm.c')) +softmmu_ss.add(when: 'CONFIG_SERIAL', if_true: files('serial.c')) +softmmu_ss.add(when: 'CONFIG_SERIAL_ISA', if_true: files('serial-isa.c')) +softmmu_ss.add(when: 'CONFIG_SERIAL_PCI', if_true: files('serial-pci.c')) +softmmu_ss.add(when: 'CONFIG_SERIAL_PCI_MULTI', if_true: files('serial-pci-multi.c')) +softmmu_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-console.c')) +softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen_console.c')) +softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_uartlite.c')) + +softmmu_ss.add(when: 'CONFIG_AVR_USART', if_true: files('avr_usart.c')) +softmmu_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_uart.c')) +softmmu_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-uart.c')) +softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_uart.c')) +softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_uart.c')) +softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c')) +softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c')) +softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_serial.c')) +softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c')) + +specific_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('terminal3270.c')) +specific_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-serial-bus.c')) +specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_vty.c')) diff --git a/hw/meson.build b/hw/meson.build index 103da48..dd0c77e 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,3 +1,4 @@ +subdir('char') subdir('core') subdir('cpu') subdir('display') From patchwork Thu Aug 6 19:15: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: 276938 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=-10.1 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 68411C433E0 for ; Thu, 6 Aug 2020 20:09: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 5308F221E2 for ; Thu, 6 Aug 2020 20:09:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ge4lamyp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5308F221E2 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]:34554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mCZ-0001mA-Dx for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:09:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQr-0002FK-IS for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:05 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48380 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 1k3lQo-0006qW-0Z for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741601; 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=/83xfaOygaLxyY//8kwq5BKN5UauDG55mdMBi9Apvj8=; b=ge4lamypcv4ocLDBzhlEc/p3CnTNKKWm60ffAas9tPjB4lb8nuV8ahUw7NTy0ptXAkwpp7 KU3aOS4l90/OPMGRs4HEW8NUQ+mBUSdyUrj3Fm2cFGe0qGh/22boX523UqxWhhBF5qAn/h OfPJ76nrSTlsbnE0+VZluGH6VPa6SAI= 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-362-UZZHXvYVOsmJFs7xwSp8hg-1; Thu, 06 Aug 2020 15:19:59 -0400 X-MC-Unique: UZZHXvYVOsmJFs7xwSp8hg-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 9AA21100AA21 for ; Thu, 6 Aug 2020 19:19:58 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABBC55F9DC; Thu, 6 Aug 2020 19:19:57 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 118/143] meson: convert hw/block Date: Thu, 6 Aug 2020 21:15:54 +0200 Message-Id: <1596741379-12902-119-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 04cfb6c..9068859 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 8855c22..0000000 --- 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 0c52702..0000000 --- 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 0000000..12c6a26 --- /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 0000000..78cad8f --- /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 dd0c77e..f968aa8 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,3 +1,4 @@ +subdir('block') subdir('char') subdir('core') subdir('cpu') From patchwork Thu Aug 6 19:15:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276932 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=-10.1 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 20A49C433E0 for ; Thu, 6 Aug 2020 20:14: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 08E26221E2 for ; Thu, 6 Aug 2020 20:14:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WItSIZKc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08E26221E2 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]:59820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mHv-0003af-1g for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:14:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lQs-0002HB-8E for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:06 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:26959 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 1k3lQq-0006qs-2G for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741603; 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=0Fsag6NNlvrRMOXzEODrkAFhBspEazhjN9jO0uivwZE=; b=WItSIZKcUlR7inwUeSXW/Boy7ol5P6hyFDYVFugzvgZeH4KD9wXjttWeTsIKNyz/QWEDIl QD79ZeZPwkJPX3GhC8INFXAoNYJeZlo1J76Xr11BaloWQrrvr08vbzyzZKcjW4qOLrUb87 OOlleb0/ewfThp+3VrVS7RpCFhMs4e0= 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-396-czej-bCkPwiEuYpd7UhGyA-1; Thu, 06 Aug 2020 15:20:00 -0400 X-MC-Unique: czej-bCkPwiEuYpd7UhGyA-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 F2F09800468 for ; Thu, 6 Aug 2020 19:19:59 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 100425F9DC; Thu, 6 Aug 2020 19:19:58 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 119/143] meson: convert hw/audio Date: Thu, 6 Aug 2020 21:15:55 +0200 Message-Id: <1596741379-12902-120-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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/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 9068859..c0cbc0f 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 63db383..0000000 --- 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 0000000..549e9a0 --- /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 f968aa8..624335b 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -1,3 +1,4 @@ +subdir('audio') subdir('block') subdir('char') subdir('core') From patchwork Thu Aug 6 19:16: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: 276939 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=-10.1 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 CC90DC433E0 for ; Thu, 6 Aug 2020 20:08: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 B6E4C221E2 for ; Thu, 6 Aug 2020 20:08:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cfMdmnUI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6E4C221E2 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]:55726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mBP-0007Mp-OJ for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:08:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lR4-0002hA-LC for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:18 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:24532 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 1k3lR1-0006sZ-Uq for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741615; 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=CHfkzjmluaEjKh3lMiNCJww4YOFq5vHxdlpM0lTIqYU=; b=cfMdmnUITzLOGkls0/vFjUieOYka0qZBWcqqDIhSQPU+punVFl3XkxO7yM0SDD/LNyx6bm bpITxQl+vBsniSufg+2E87u2fcocsIkGvu5WFuSxmp4EpJ9vdEeKh7lqUz1komZrI+MAJY 5ywmSZhUB2qIaPdbxOosXGMFc5nVuPg= 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-72-lmlCcbaqOQiYxfmWMRSzXQ-1; Thu, 06 Aug 2020 15:20:11 -0400 X-MC-Unique: lmlCcbaqOQiYxfmWMRSzXQ-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 E93231800D42 for ; Thu, 6 Aug 2020 19:20:10 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 05B5B1D3; Thu, 6 Aug 2020 19:20:09 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 125/143] meson: accel Date: Thu, 6 Aug 2020 21:16:01 +0200 Message-Id: <1596741379-12902-126-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 - accel/Makefile.objs | 6 ------ accel/kvm/Makefile.objs | 2 -- accel/kvm/meson.build | 5 +++++ accel/meson.build | 7 +++++++ accel/stubs/Makefile.objs | 6 ------ accel/stubs/meson.build | 6 ++++++ accel/tcg/Makefile.objs | 9 --------- accel/tcg/meson.build | 15 +++++++++++++++ accel/xen/Makefile.objs | 1 - accel/xen/meson.build | 1 + meson.build | 1 + 13 files changed, 36 insertions(+), 26 deletions(-) delete mode 100644 accel/Makefile.objs delete mode 100644 accel/kvm/Makefile.objs create mode 100644 accel/kvm/meson.build create mode 100644 accel/meson.build delete mode 100644 accel/stubs/Makefile.objs create mode 100644 accel/stubs/meson.build delete mode 100644 accel/tcg/Makefile.objs create mode 100644 accel/tcg/meson.build delete mode 100644 accel/xen/Makefile.objs create mode 100644 accel/xen/meson.build diff --git a/Makefile.objs b/Makefile.objs index 7eaf047..40e23a2 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -38,7 +38,7 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS # single QEMU executable should support all CPUs and machines. ifeq ($(CONFIG_SOFTMMU),y) -common-obj-y = accel/ +common-obj-y = common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF) common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF) diff --git a/Makefile.target b/Makefile.target index 1ab8773..8633e2b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -110,7 +110,6 @@ obj-y += trace/ ######################################################### # cpu emulator library obj-y += exec.o exec-vary.o -obj-y += accel/ obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/tcg-op-vec.o tcg/tcg-op-gvec.o obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o diff --git a/accel/Makefile.objs b/accel/Makefile.objs deleted file mode 100644 index ff72f0d..0000000 --- a/accel/Makefile.objs +++ /dev/null @@ -1,6 +0,0 @@ -common-obj-$(CONFIG_SOFTMMU) += accel.o -obj-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_POSIX)) += qtest.o -obj-$(CONFIG_KVM) += kvm/ -obj-$(CONFIG_TCG) += tcg/ -obj-$(CONFIG_XEN) += xen/ -obj-y += stubs/ diff --git a/accel/kvm/Makefile.objs b/accel/kvm/Makefile.objs deleted file mode 100644 index fdfa481..0000000 --- a/accel/kvm/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -obj-y += kvm-all.o -obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o diff --git a/accel/kvm/meson.build b/accel/kvm/meson.build new file mode 100644 index 0000000..4db2388 --- /dev/null +++ b/accel/kvm/meson.build @@ -0,0 +1,5 @@ +kvm_ss = ss.source_set() +kvm_ss.add(files('kvm-all.c')) +kvm_ss.add(when: 'CONFIG_SEV', if_false: files('sev-stub.c')) + +specific_ss.add_all(when: 'CONFIG_KVM', if_true: kvm_ss) diff --git a/accel/meson.build b/accel/meson.build new file mode 100644 index 0000000..26c503e --- /dev/null +++ b/accel/meson.build @@ -0,0 +1,7 @@ +softmmu_ss.add(files('accel.c')) +specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_POSIX'], if_true: files('qtest.c')) + +subdir('kvm') +subdir('tcg') +subdir('xen') +subdir('stubs') diff --git a/accel/stubs/Makefile.objs b/accel/stubs/Makefile.objs deleted file mode 100644 index bbd14e7..0000000 --- a/accel/stubs/Makefile.objs +++ /dev/null @@ -1,6 +0,0 @@ -obj-$(call lnot,$(CONFIG_HAX)) += hax-stub.o -obj-$(call lnot,$(CONFIG_HVF)) += hvf-stub.o -obj-$(call lnot,$(CONFIG_WHPX)) += whpx-stub.o -obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o -obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o -obj-$(call lnot,$(CONFIG_XEN)) += xen-stub.o diff --git a/accel/stubs/meson.build b/accel/stubs/meson.build new file mode 100644 index 0000000..314e3cf --- /dev/null +++ b/accel/stubs/meson.build @@ -0,0 +1,6 @@ +specific_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c')) +specific_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c')) +specific_ss.add(when: 'CONFIG_HVF', if_false: files('hvf-stub.c')) +specific_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) +specific_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c')) +specific_ss.add(when: 'CONFIG_WHPX', if_false: files('whpx-stub.c')) diff --git a/accel/tcg/Makefile.objs b/accel/tcg/Makefile.objs deleted file mode 100644 index a92f2c4..0000000 --- a/accel/tcg/Makefile.objs +++ /dev/null @@ -1,9 +0,0 @@ -obj-$(CONFIG_SOFTMMU) += tcg-all.o -obj-$(CONFIG_SOFTMMU) += cputlb.o -obj-y += tcg-runtime.o tcg-runtime-gvec.o -obj-y += cpu-exec.o cpu-exec-common.o translate-all.o -obj-y += translator.o - -obj-$(CONFIG_USER_ONLY) += user-exec.o -obj-$(call lnot,$(CONFIG_SOFTMMU)) += user-exec-stub.o -obj-$(CONFIG_PLUGIN) += plugin-gen.o diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build new file mode 100644 index 0000000..2a335b5 --- /dev/null +++ b/accel/tcg/meson.build @@ -0,0 +1,15 @@ +tcg_ss = ss.source_set() +tcg_ss.add(files( + 'cpu-exec-common.c', + 'cpu-exec.c', + 'tcg-runtime-gvec.c', + 'tcg-runtime.c', + 'translate-all.c', + 'translator.c', +)) +tcg_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) +tcg_ss.add(when: 'CONFIG_SOFTMMU', if_false: files('user-exec-stub.c')) +tcg_ss.add(when: 'CONFIG_PLUGIN', if_true: files('plugin-gen.c')) +specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) + +specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files('tcg-all.c', 'cputlb.c')) diff --git a/accel/xen/Makefile.objs b/accel/xen/Makefile.objs deleted file mode 100644 index 7482cfb..0000000 --- a/accel/xen/Makefile.objs +++ /dev/null @@ -1 +0,0 @@ -obj-y += xen-all.o diff --git a/accel/xen/meson.build b/accel/xen/meson.build new file mode 100644 index 0000000..002bdb0 --- /dev/null +++ b/accel/xen/meson.build @@ -0,0 +1 @@ +specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c')) diff --git a/meson.build b/meson.build index 3e51340..2b2f597 100644 --- a/meson.build +++ b/meson.build @@ -677,6 +677,7 @@ subdir('monitor') subdir('net') subdir('replay') subdir('hw') +subdir('accel') # needed for fuzzing binaries subdir('tests/qtest/libqos') From patchwork Thu Aug 6 19:16: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: 276937 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=-10.1 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, URIBL_BLOCKED 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 89AADC433DF for ; Thu, 6 Aug 2020 20:09: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 56A5A221E2 for ; Thu, 6 Aug 2020 20:09:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ow/ipYkH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56A5A221E2 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]:35912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mD0-0002JY-Bg for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:09:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lR7-0002nB-9Y for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:21 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:24262 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 1k3lR3-0006t1-NR for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741617; 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=XkyiC31YIl0cu0rpw8f52jESdGw1MBfxzBOo1Zie2nw=; b=Ow/ipYkHHrhtJ0pelyPigLC0/tnrqA7AIxhV6UzfOxroW3yBJX95fKtlYK7O+ikwLx2z/U 4BbCymi+EdBE3ubSHUcfOCtbmmOgYu6WNi8+xOVykcLbWLvyE9xCtV6TtVR1c5x2Ki6b+/ 7AP67llIhASPbuOzzgXNx9M/YnVBGUE= 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-226-3Q4tvilpOyG_lIzHZre0BA-1; Thu, 06 Aug 2020 15:20:13 -0400 X-MC-Unique: 3Q4tvilpOyG_lIzHZre0BA-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 45DB6800468 for ; Thu, 6 Aug 2020 19:20:12 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DDB05F9DC; Thu, 6 Aug 2020 19:20:11 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 126/143] meson: linux-user Date: Thu, 6 Aug 2020 21:16:02 +0200 Message-Id: <1596741379-12902-127-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:24:10 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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.target | 3 --- configure | 27 ++++++++++++--------------- linux-user/Makefile.objs | 25 ------------------------- linux-user/alpha/Makefile.objs | 5 ----- linux-user/alpha/meson.build | 5 +++++ linux-user/arm/Makefile.objs | 8 -------- linux-user/arm/meson.build | 10 ++++++++++ linux-user/arm/nwfpe/Makefile.objs | 2 -- linux-user/arm/nwfpe/meson.build | 10 ++++++++++ linux-user/hppa/Makefile.objs | 5 ----- linux-user/hppa/meson.build | 5 +++++ linux-user/i386/Makefile.objs | 5 ----- linux-user/i386/meson.build | 5 +++++ linux-user/i386/syscall_nr.h | 1 + linux-user/m68k/Makefile.objs | 5 ----- linux-user/m68k/meson.build | 5 +++++ linux-user/meson.build | 37 +++++++++++++++++++++++++++++++++++++ linux-user/microblaze/Makefile.objs | 5 ----- linux-user/microblaze/meson.build | 5 +++++ linux-user/mips/Makefile.objs | 5 ----- linux-user/mips/meson.build | 5 +++++ linux-user/mips/syscall_nr.h | 1 + linux-user/mips64/Makefile.objs | 12 ------------ linux-user/mips64/meson.build | 6 ++++++ linux-user/mips64/syscall_nr.h | 7 +++++++ linux-user/ppc/Makefile.objs | 6 ------ linux-user/ppc/meson.build | 5 +++++ linux-user/s390x/Makefile.objs | 5 ----- linux-user/s390x/meson.build | 5 +++++ linux-user/sh4/Makefile.objs | 5 ----- linux-user/sh4/meson.build | 5 +++++ linux-user/sparc/Makefile.objs | 5 ----- linux-user/sparc/meson.build | 5 +++++ linux-user/sparc64/Makefile.objs | 5 ----- linux-user/sparc64/meson.build | 5 +++++ linux-user/x86_64/Makefile.objs | 5 ----- linux-user/x86_64/meson.build | 5 +++++ linux-user/x86_64/syscall_nr.h | 1 + linux-user/xtensa/Makefile.objs | 5 ----- linux-user/xtensa/meson.build | 5 +++++ meson.build | 16 +++++++++++++++- 41 files changed, 165 insertions(+), 132 deletions(-) delete mode 100644 linux-user/Makefile.objs delete mode 100644 linux-user/alpha/Makefile.objs create mode 100644 linux-user/alpha/meson.build delete mode 100644 linux-user/arm/Makefile.objs create mode 100644 linux-user/arm/meson.build delete mode 100644 linux-user/arm/nwfpe/Makefile.objs create mode 100644 linux-user/arm/nwfpe/meson.build delete mode 100644 linux-user/hppa/Makefile.objs create mode 100644 linux-user/hppa/meson.build delete mode 100644 linux-user/i386/Makefile.objs create mode 100644 linux-user/i386/meson.build create mode 100644 linux-user/i386/syscall_nr.h delete mode 100644 linux-user/m68k/Makefile.objs create mode 100644 linux-user/m68k/meson.build create mode 100644 linux-user/meson.build delete mode 100644 linux-user/microblaze/Makefile.objs create mode 100644 linux-user/microblaze/meson.build delete mode 100644 linux-user/mips/Makefile.objs create mode 100644 linux-user/mips/meson.build create mode 100644 linux-user/mips/syscall_nr.h delete mode 100644 linux-user/mips64/Makefile.objs create mode 100644 linux-user/mips64/meson.build create mode 100644 linux-user/mips64/syscall_nr.h delete mode 100644 linux-user/ppc/Makefile.objs create mode 100644 linux-user/ppc/meson.build delete mode 100644 linux-user/s390x/Makefile.objs create mode 100644 linux-user/s390x/meson.build delete mode 100644 linux-user/sh4/Makefile.objs create mode 100644 linux-user/sh4/meson.build delete mode 100644 linux-user/sparc/Makefile.objs create mode 100644 linux-user/sparc/meson.build delete mode 100644 linux-user/sparc64/Makefile.objs create mode 100644 linux-user/sparc64/meson.build delete mode 100644 linux-user/x86_64/Makefile.objs create mode 100644 linux-user/x86_64/meson.build create mode 100644 linux-user/x86_64/syscall_nr.h delete mode 100644 linux-user/xtensa/Makefile.objs create mode 100644 linux-user/xtensa/meson.build diff --git a/Makefile.target b/Makefile.target index 8633e2b..a68859d 100644 --- a/Makefile.target +++ b/Makefile.target @@ -131,9 +131,6 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \ -I$(SRC_PATH)/linux-user \ -Ilinux-user/$(TARGET_ABI_DIR) -obj-y += linux-user/ -obj-y += gdbstub.o thunk.o - endif #CONFIG_LINUX_USER ######################################################### diff --git a/configure b/configure index 3483d6c..525f415 100755 --- a/configure +++ b/configure @@ -1945,20 +1945,6 @@ fi # Remove old dependency files to make sure that they get properly regenerated rm -f */config-devices.mak.d -# Remove syscall_nr.h to be sure they will be regenerated in the build -# directory, not in the source directory -for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ - i386 x86_64 mips mips64 ; do - # remove the file if it has been generated in the source directory - rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" - # remove the dependency files - for target in ${arch}*-linux-user ; do - test -d "${target}" && find "${target}" -type f -name "*.d" \ - -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \ - -print | while read file ; do rm "${file}" "${file%.d}.o" ; done - done -done - if test -z "$python" then error_exit "Python not found. Use --python=/path/to/python" @@ -7925,18 +7911,22 @@ gdb_xml_files="" TARGET_ARCH="$target_name" TARGET_BASE_ARCH="" TARGET_ABI_DIR="" +TARGET_SYSTBL_ABI="" +TARGET_SYSTBL="" case "$target_name" in i386) mttcg="yes" gdb_xml_files="i386-32bit.xml" TARGET_SYSTBL_ABI=i386 + TARGET_SYSTBL=syscall_32.tbl ;; x86_64) TARGET_BASE_ARCH=i386 TARGET_SYSTBL_ABI=common,64 + TARGET_SYSTBL=syscall_64.tbl mttcg="yes" - gdb_xml_files="i386-64bit.xml" + gdb_xml_files="i386-64bit.xml" ;; alpha) mttcg="yes" @@ -7984,6 +7974,7 @@ case "$target_name" in TARGET_ARCH=mips echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak TARGET_SYSTBL_ABI=o32 + TARGET_SYSTBL=syscall_o32.tbl ;; mipsn32|mipsn32el) mttcg="yes" @@ -7992,6 +7983,7 @@ case "$target_name" in echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak echo "TARGET_ABI32=y" >> $config_target_mak TARGET_SYSTBL_ABI=n32 + TARGET_SYSTBL=syscall_n32.tbl ;; mips64|mips64el) mttcg="no" @@ -7999,6 +7991,7 @@ case "$target_name" in TARGET_BASE_ARCH=mips echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak TARGET_SYSTBL_ABI=n64 + TARGET_SYSTBL=syscall_n64.tbl ;; moxie) ;; @@ -8097,6 +8090,9 @@ esac if [ "$TARGET_BASE_ARCH" = "" ]; then TARGET_BASE_ARCH=$TARGET_ARCH fi +if [ "$TARGET_SYSTBL_ABI" != "" ] && [ "$TARGET_SYSTBL" = "" ]; then + TARGET_SYSTBL=syscall.tbl +fi symlink "$source_path/Makefile.target" "$target_dir/Makefile" @@ -8117,6 +8113,7 @@ if [ "$HOST_VARIANT_DIR" != "" ]; then fi if [ "$TARGET_SYSTBL_ABI" != "" ]; then echo "TARGET_SYSTBL_ABI=$TARGET_SYSTBL_ABI" >> $config_target_mak + echo "TARGET_SYSTBL=$TARGET_SYSTBL" >> $config_target_mak fi if supported_xen_target $target; then diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs deleted file mode 100644 index 1940910..0000000 --- a/linux-user/Makefile.objs +++ /dev/null @@ -1,25 +0,0 @@ -obj-y = main.o syscall.o strace.o mmap.o signal.o \ - elfload.o linuxload.o uaccess.o uname.o \ - safe-syscall.o $(TARGET_ABI_DIR)/signal.o \ - $(TARGET_ABI_DIR)/cpu_loop.o exit.o fd-trans.o - -obj-$(TARGET_HAS_BFLT) += flatload.o -obj-$(TARGET_I386) += vm86.o -obj-$(TARGET_AARCH64) += arm/semihost.o - -obj-$(TARGET_ALPHA) += alpha/ -obj-$(TARGET_ARM) += arm/ -obj-$(TARGET_HPPA) += hppa/ -obj-$(TARGET_I386) += i386/ -obj-$(TARGET_M68K) += m68k/ -obj-$(TARGET_MICROBLAZE) += microblaze/ -obj-$(TARGET_MIPS) += mips/ -obj-$(TARGET_MIPS64) += mips64/ -obj-$(TARGET_PPC) += ppc/ -obj-$(TARGET_PPC64) += ppc/ -obj-$(TARGET_S390X) += s390x/ -obj-$(TARGET_SH4) += sh4/ -obj-$(TARGET_SPARC) += sparc/ -obj-$(TARGET_SPARC64) += $(TARGET_ABI_DIR)/ -obj-$(TARGET_X86_64) += x86_64/ -obj-$(TARGET_XTENSA) += xtensa/ diff --git a/linux-user/alpha/Makefile.objs b/linux-user/alpha/Makefile.objs deleted file mode 100644 index d6397a7..0000000 --- a/linux-user/alpha/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/alpha/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/alpha/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/alpha/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/alpha/meson.build b/linux-user/alpha/meson.build new file mode 100644 index 0000000..a3cd22d --- /dev/null +++ b/linux-user/alpha/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'alpha': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/arm/Makefile.objs b/linux-user/arm/Makefile.objs deleted file mode 100644 index c7eb94d..0000000 --- a/linux-user/arm/Makefile.objs +++ /dev/null @@ -1,8 +0,0 @@ -obj-$(TARGET_ARM) += nwfpe/ -obj-$(TARGET_ARM) += semihost.o - -generated-files-y += linux-user/arm/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/arm/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/arm/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/arm/meson.build b/linux-user/arm/meson.build new file mode 100644 index 0000000..432984b --- /dev/null +++ b/linux-user/arm/meson.build @@ -0,0 +1,10 @@ +linux_user_ss.add(when: 'TARGET_AARCH64', if_true: files('semihost.c')) +linux_user_ss.add(when: 'TARGET_ARM', if_true: files('semihost.c')) + +subdir('nwfpe') + +syscall_nr_generators += { + 'arm': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/arm/nwfpe/Makefile.objs b/linux-user/arm/nwfpe/Makefile.objs deleted file mode 100644 index 51b0c32..0000000 --- a/linux-user/arm/nwfpe/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o -obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o diff --git a/linux-user/arm/nwfpe/meson.build b/linux-user/arm/nwfpe/meson.build new file mode 100644 index 0000000..1c27e55 --- /dev/null +++ b/linux-user/arm/nwfpe/meson.build @@ -0,0 +1,10 @@ +linux_user_ss.add(when: 'TARGET_ARM', if_true: files( + 'double_cpdo.c', + 'extended_cpdo.c', + 'fpa11.c', + 'fpa11_cpdo.c', + 'fpa11_cpdt.c', + 'fpa11_cprt.c', + 'fpopcode.c', + 'single_cpdo.c', +)) diff --git a/linux-user/hppa/Makefile.objs b/linux-user/hppa/Makefile.objs deleted file mode 100644 index f8368be..0000000 --- a/linux-user/hppa/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/hppa/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/hppa/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/hppa/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/hppa/meson.build b/linux-user/hppa/meson.build new file mode 100644 index 0000000..4709508 --- /dev/null +++ b/linux-user/hppa/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'hppa': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/i386/Makefile.objs b/linux-user/i386/Makefile.objs deleted file mode 100644 index c25cf17..0000000 --- a/linux-user/i386/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/i386/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/i386/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/i386/syscall_32.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/i386/meson.build b/linux-user/i386/meson.build new file mode 100644 index 0000000..ee52301 --- /dev/null +++ b/linux-user/i386/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'i386': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/i386/syscall_nr.h b/linux-user/i386/syscall_nr.h new file mode 100644 index 0000000..976caab --- /dev/null +++ b/linux-user/i386/syscall_nr.h @@ -0,0 +1 @@ +#include "syscall_32_nr.h" diff --git a/linux-user/m68k/Makefile.objs b/linux-user/m68k/Makefile.objs deleted file mode 100644 index 961bd05..0000000 --- a/linux-user/m68k/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/m68k/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/m68k/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/m68k/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/m68k/meson.build b/linux-user/m68k/meson.build new file mode 100644 index 0000000..c0f436f --- /dev/null +++ b/linux-user/m68k/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'm68k': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/meson.build b/linux-user/meson.build new file mode 100644 index 0000000..2b94e4b --- /dev/null +++ b/linux-user/meson.build @@ -0,0 +1,37 @@ +linux_user_ss.add(files( + 'elfload.c', + 'exit.c', + 'fd-trans.c', + 'linuxload.c', + 'main.c', + 'mmap.c', + 'safe-syscall.S', + 'signal.c', + 'strace.c', + 'syscall.c', + 'uaccess.c', + 'uname.c', +)) +linux_user_ss.add(rt) + +linux_user_ss.add(when: 'TARGET_HAS_BFLT', if_true: files('flatload.c')) +linux_user_ss.add(when: 'TARGET_I386', if_true: files('vm86.c')) + + +syscall_nr_generators = {} + +subdir('alpha') +subdir('arm') +subdir('hppa') +subdir('i386') +subdir('m68k') +subdir('microblaze') +subdir('mips64') +subdir('mips') +subdir('ppc') +subdir('s390x') +subdir('sh4') +subdir('sparc64') +subdir('sparc') +subdir('x86_64') +subdir('xtensa') diff --git a/linux-user/microblaze/Makefile.objs b/linux-user/microblaze/Makefile.objs deleted file mode 100644 index bb8b318..0000000 --- a/linux-user/microblaze/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/microblaze/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/microblaze/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/microblaze/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/microblaze/meson.build b/linux-user/microblaze/meson.build new file mode 100644 index 0000000..f749d89 --- /dev/null +++ b/linux-user/microblaze/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'microblaze': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/mips/Makefile.objs b/linux-user/mips/Makefile.objs deleted file mode 100644 index 9be4de0..0000000 --- a/linux-user/mips/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/mips/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/mips/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/mips/syscall_o32.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI) "" 4000,"GEN","$@") diff --git a/linux-user/mips/meson.build b/linux-user/mips/meson.build new file mode 100644 index 0000000..6066a50 --- /dev/null +++ b/linux-user/mips/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'mips': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/mips/syscall_nr.h b/linux-user/mips/syscall_nr.h new file mode 100644 index 0000000..45d133c --- /dev/null +++ b/linux-user/mips/syscall_nr.h @@ -0,0 +1 @@ +#include "syscall_o32_nr.h" diff --git a/linux-user/mips64/Makefile.objs b/linux-user/mips64/Makefile.objs deleted file mode 100644 index 573448f..0000000 --- a/linux-user/mips64/Makefile.objs +++ /dev/null @@ -1,12 +0,0 @@ -generated-files-y += linux-user/$(TARGET_ABI_DIR)/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscallhdr.sh - -ifeq ($(TARGET_SYSTBL_ABI),n32) -%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall_n32.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ n32 "" 6000,"GEN","$@") -endif -ifeq ($(TARGET_SYSTBL_ABI),n64) -%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall_n64.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ n64 "" 5000,"GEN","$@") -endif diff --git a/linux-user/mips64/meson.build b/linux-user/mips64/meson.build new file mode 100644 index 0000000..0caab5f --- /dev/null +++ b/linux-user/mips64/meson.build @@ -0,0 +1,6 @@ +syscall_nr_generators += { + 'mips64': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@', + '', 'TARGET_SYSCALL_OFFSET' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/mips64/syscall_nr.h b/linux-user/mips64/syscall_nr.h new file mode 100644 index 0000000..672f2fa --- /dev/null +++ b/linux-user/mips64/syscall_nr.h @@ -0,0 +1,7 @@ +#ifdef TARGET_ABI_MIPSN32 +#define TARGET_SYSCALL_OFFSET 6000 +#include "syscall_n32_nr.h" +#else +#define TARGET_SYSCALL_OFFSET 5000 +#include "syscall_n64_nr.h" +#endif diff --git a/linux-user/ppc/Makefile.objs b/linux-user/ppc/Makefile.objs deleted file mode 100644 index be92e67..0000000 --- a/linux-user/ppc/Makefile.objs +++ /dev/null @@ -1,6 +0,0 @@ -generated-files-y += linux-user/$(TARGET_ABI_DIR)/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscallhdr.sh - -%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/ppc/meson.build b/linux-user/ppc/meson.build new file mode 100644 index 0000000..19fead7 --- /dev/null +++ b/linux-user/ppc/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'ppc': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/s390x/Makefile.objs b/linux-user/s390x/Makefile.objs deleted file mode 100644 index f30f162..0000000 --- a/linux-user/s390x/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/s390x/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/s390x/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/s390x/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/s390x/meson.build b/linux-user/s390x/meson.build new file mode 100644 index 0000000..0781cce --- /dev/null +++ b/linux-user/s390x/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 's390x': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/sh4/Makefile.objs b/linux-user/sh4/Makefile.objs deleted file mode 100644 index 83fc939..0000000 --- a/linux-user/sh4/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/sh4/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/sh4/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/sh4/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/sh4/meson.build b/linux-user/sh4/meson.build new file mode 100644 index 0000000..3bc3a69 --- /dev/null +++ b/linux-user/sh4/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'sh4': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/sparc/Makefile.objs b/linux-user/sparc/Makefile.objs deleted file mode 100644 index 29d3f06..0000000 --- a/linux-user/sparc/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/sparc/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/sparc/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/sparc/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/sparc/meson.build b/linux-user/sparc/meson.build new file mode 100644 index 0000000..51a9c77 --- /dev/null +++ b/linux-user/sparc/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'sparc': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/sparc64/Makefile.objs b/linux-user/sparc64/Makefile.objs deleted file mode 100644 index afcd535..0000000 --- a/linux-user/sparc64/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/sparc64/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/sparc64/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/sparc/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/sparc64/meson.build b/linux-user/sparc64/meson.build new file mode 100644 index 0000000..9527a40 --- /dev/null +++ b/linux-user/sparc64/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'sparc64': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/x86_64/Makefile.objs b/linux-user/x86_64/Makefile.objs deleted file mode 100644 index 2cef1d4..0000000 --- a/linux-user/x86_64/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/x86_64/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/x86_64/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/x86_64/syscall_64.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/x86_64/meson.build b/linux-user/x86_64/meson.build new file mode 100644 index 0000000..203af9a --- /dev/null +++ b/linux-user/x86_64/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'x86_64': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/linux-user/x86_64/syscall_nr.h b/linux-user/x86_64/syscall_nr.h new file mode 100644 index 0000000..760302c --- /dev/null +++ b/linux-user/x86_64/syscall_nr.h @@ -0,0 +1 @@ +#include "syscall_64_nr.h" diff --git a/linux-user/xtensa/Makefile.objs b/linux-user/xtensa/Makefile.objs deleted file mode 100644 index d4be1b7..0000000 --- a/linux-user/xtensa/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -generated-files-y += linux-user/xtensa/syscall_nr.h - -syshdr := $(SRC_PATH)/linux-user/xtensa/syscallhdr.sh -%/syscall_nr.h: $(SRC_PATH)/linux-user/xtensa/syscall.tbl $(syshdr) - $(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@") diff --git a/linux-user/xtensa/meson.build b/linux-user/xtensa/meson.build new file mode 100644 index 0000000..de77f3b --- /dev/null +++ b/linux-user/xtensa/meson.build @@ -0,0 +1,5 @@ +syscall_nr_generators += { + 'xtensa': generator(sh, + arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ], + output: '@BASENAME@_nr.h') +} diff --git a/meson.build b/meson.build index 2b2f597..483e65f 100644 --- a/meson.build +++ b/meson.build @@ -678,6 +678,10 @@ subdir('net') subdir('replay') subdir('hw') subdir('accel') +subdir('linux-user') + +linux_user_ss.add(files('gdbstub.c', 'thunk.c')) +specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss) # needed for fuzzing binaries subdir('tests/qtest/libqos') @@ -775,6 +779,7 @@ foreach target : target_dirs arch_srcs += config_devices_h[target] else + abi = config_target['TARGET_ABI_DIR'] target_type='user' qemu_target_name = 'qemu-' + target_name if 'CONFIG_LINUX_USER' in config_target @@ -785,8 +790,17 @@ foreach target : target_dirs endif target_inc += include_directories( base_dir, - base_dir / config_target['TARGET_ABI_DIR'], + base_dir / abi, ) + if 'CONFIG_LINUX_USER' in config_target + dir = base_dir / abi + arch_srcs += files(dir / 'signal.c', dir / 'cpu_loop.c') + if config_target.has_key('TARGET_SYSTBL_ABI') + arch_srcs += \ + syscall_nr_generators[abi].process(base_dir / abi / config_target['TARGET_SYSTBL'], + extra_args : config_target['TARGET_SYSTBL_ABI']) + endif + endif endif t = target_arch[arch].apply(config_target, strict: false) From patchwork Thu Aug 6 19:16:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276927 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=-10.1 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, URIBL_BLOCKED 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 72668C433E0 for ; Thu, 6 Aug 2020 20:20: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 59FC22177B for ; Thu, 6 Aug 2020 20:20:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KHd6+hyy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59FC22177B 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]:55016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mMx-0004fE-EJ for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lRE-00030c-8p for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lRB-0006uz-QT for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741624; 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=IScVnqdJgmrqt1snimRRJFoeT095pzDRUUa9d6shcZ8=; b=KHd6+hyyoQM4rY35/fttrL5U04Sqng9Wb/hvt6PRcsdUCx76HjTOZlaEXTNw5IIRBYVT7p k2+11AZGGm32ic4eSMwIQ70YinljH2WdOhnyWLOoWy8Xw3yGCQC5gyenhCgs/kijRWGAJx ac9dUxaaGkGUhOHqt0nlOwQx7sZX8uI= 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-166-QCe1HqHVOjCxaF5Pcw_vAQ-1; Thu, 06 Aug 2020 15:20:23 -0400 X-MC-Unique: QCe1HqHVOjCxaF5Pcw_vAQ-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 6CB641DE6 for ; Thu, 6 Aug 2020 19:20:22 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D82569315; Thu, 6 Aug 2020 19:20:21 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 131/143] meson: convert systemtap files Date: Thu, 6 Aug 2020 21:16:07 +0200 Message-Id: <1596741379-12902-132-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 13:48:01 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 | 85 ++----------------------------------------------------- meson.build | 26 +++++++++++++++++ rules.mak | 3 -- trace/meson.build | 14 ++++----- 4 files changed, 35 insertions(+), 93 deletions(-) diff --git a/Makefile.target b/Makefile.target index 8ee4c78..a07149c 100644 --- a/Makefile.target +++ b/Makefile.target @@ -6,88 +6,7 @@ include ../config-host.mak include config-target.mak include $(SRC_PATH)/rules.mak -$(call set-vpath, $(SRC_PATH):$(BUILD_DIR)) - -ifdef CONFIG_USER_ONLY -# user emulator name -QEMU_PROG=qemu-$(TARGET_NAME) -else -# system emulator name -QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF) -endif - -STPFILES= - -ifdef CONFIG_TRACE_SYSTEMTAP -stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace.stp $(QEMU_PROG)-log.stp - -ifdef CONFIG_USER_ONLY -TARGET_TYPE=user -else -TARGET_TYPE=system -endif - -tracetool-y = $(SRC_PATH)/scripts/tracetool.py -tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py") - -$(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=all \ - --format=stap \ - --backends=$(TRACE_BACKENDS) \ - --binary=$(bindir)/$(QEMU_PROG) \ - --target-name=$(TARGET_NAME) \ - --target-type=$(TARGET_TYPE) \ - $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp-installed") - -$(QEMU_PROG).stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=all \ - --format=stap \ - --backends=$(TRACE_BACKENDS) \ - --binary=$(realpath .)/$(QEMU_PROG) \ - --target-name=$(TARGET_NAME) \ - --target-type=$(TARGET_TYPE) \ - $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp") - -$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=all \ - --format=simpletrace-stap \ - --backends=$(TRACE_BACKENDS) \ - --probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \ - $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-simpletrace.stp") - -$(QEMU_PROG)-log.stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=all \ - --format=log-stap \ - --backends=$(TRACE_BACKENDS) \ - --probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \ - $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-log.stp") - -else -stap: -endif -.PHONY: stap - -all: stap - -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 -ifdef CONFIG_TRACE_SYSTEMTAP - rm -f *.stp -endif - +all: install: all -ifdef CONFIG_TRACE_SYSTEMTAP - $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset" - $(INSTALL_DATA) $(QEMU_PROG).stp-installed "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG).stp" - $(INSTALL_DATA) $(QEMU_PROG)-simpletrace.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-simpletrace.stp" - $(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp" -endif - + .PHONY: all clean install diff --git a/meson.build b/meson.build index 5052165..44b2645 100644 --- a/meson.build +++ b/meson.build @@ -797,6 +797,7 @@ common_all = static_library('common', name_suffix: 'fa') feature_to_c = find_program('scripts/feature_to_c.sh') +tracetool = find_program('scripts/tracetool.py') emulators = [] foreach target : target_dirs @@ -939,6 +940,31 @@ foreach target : target_dirs link_depends: [block_syms, qemu_syms] + exe.get('link_depends', []), link_args: link_args, gui_app: exe['gui']) + + if 'CONFIG_TRACE_SYSTEMTAP' in config_host + foreach stp: [ + {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / exe_name, 'install': false}, + {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / get_option('bindir') / exe_name, 'install': true}, + {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true}, + {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true}, + ] + custom_target(exe_name + stp['ext'], + input: trace_events_all, + output: exe_name + stp['ext'], + capture: true, + install: stp['install'], + install_dir: config_host['qemu_datadir'] / '../systemtap/tapset', + command: [ + tracetool, '--group=all', '--format=' + stp['fmt'], + '--backends=' + config_host['TRACE_BACKENDS'], + '--binary=' + stp['bin'], + '--target-name=' + target_name, + '--target-type=' + target_type, + '--probe-prefix=qemu.' + target_type + '.' + target_name, + '@INPUT@', + ]) + endforeach + endif endforeach endforeach diff --git a/rules.mak b/rules.mak index 6488dc3..b983c7f 100644 --- a/rules.mak +++ b/rules.mak @@ -199,9 +199,6 @@ ne = $(if $(subst $2,,$1)$(subst $1,,$2),y,n) isempty = $(if $1,n,y) notempty = $(if $1,y,n) -# Generate files with tracetool -TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py - .PHONY: clean-timestamp clean-timestamp: rm -f *.timestamp diff --git a/trace/meson.build b/trace/meson.build index b113425..eb28aff 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -55,13 +55,13 @@ foreach dir : [ '.' ] + trace_events_subdirs 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']) +trace_events_all = 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']) foreach d : [ ['generated-tcg-tracers.h', 'tcg-h'], From patchwork Thu Aug 6 19:16: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: 276926 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=-10.1 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, URIBL_BLOCKED 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 B409FC433E0 for ; Thu, 6 Aug 2020 20:22: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 9B7DA20748 for ; Thu, 6 Aug 2020 20:22:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Xgn77g7v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B7DA20748 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]:33780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mOl-0007gB-Mm for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:21:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lRH-00037P-VH for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:32 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:42132 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 1k3lRF-0006wZ-KM for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741628; 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=5FnrmMLE4EAC/6GyLaxYVarZr3DphboiHmppwZPUZ2k=; b=Xgn77g7vrud8LLmzieHiQjyOkdU+Dv84ZgmgV0xTlXBUeHv9DEuIEfkxzoYCzPSO1np+r2 APF9ECC+dggvz8railbw+O0zuuGHAKgHY0AofpHV7JyoWWWPBJQCD4/4TwBMY96TstQsBL D3mkFLWBezJaLlBEJHxtp7OFczbt8Eo= 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-160-xZYwxFn-P3-Ov_69HZug6g-1; Thu, 06 Aug 2020 15:20:26 -0400 X-MC-Unique: xZYwxFn-P3-Ov_69HZug6g-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 2A590100AA21 for ; Thu, 6 Aug 2020 19:20:25 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BADD5F9DC; Thu, 6 Aug 2020 19:20:24 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 133/143] remove Makefile.target Date: Thu, 6 Aug 2020 21:16:09 +0200 Message-Id: <1596741379-12902-134-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 00:07:42 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 | 53 ++++------------------------------------------------- Makefile.target | 12 ------------ configure | 2 -- 3 files changed, 4 insertions(+), 63 deletions(-) delete mode 100644 Makefile.target diff --git a/Makefile b/Makefile index 603869d..9a97de0 100644 --- a/Makefile +++ b/Makefile @@ -164,17 +164,6 @@ include $(SRC_PATH)/tests/Makefile.include all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules -config-host.h: config-host.h-timestamp -config-host.h-timestamp: config-host.mak - -TARGET_DIRS_RULES := $(foreach t, all fuzz clean install, $(addsuffix /$(t), $(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_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 DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib="" DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) @@ -211,8 +200,6 @@ 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)): - ROM_DIRS = $(addprefix pc-bios/, $(ROMS)) ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) # Only keep -O and -g cflags @@ -220,11 +207,9 @@ ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) $(ROM_DIRS_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),) -.PHONY: recurse-all recurse-clean recurse-install -recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS)) -recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS)) -recurse-install: $(addsuffix /install, $(TARGET_DIRS)) -$(addsuffix /install, $(TARGET_DIRS)): all +.PHONY: recurse-all recurse-clean +recurse-all: $(ROM_DIRS) +recurse-clean: $(addsuffix /clean, $(ROM_DIRS)) ###################################################################### @@ -274,9 +259,6 @@ distclean: clean $(call clean-manual,system) $(call clean-manual,tools) $(call clean-manual,user) - for d in $(TARGET_DIRS); do \ - rm -rf $$d || exit 1 ; \ - done rm -Rf .sdk KEYMAPS=da en-gb et fr fr-ch is lt no pt-br sv \ @@ -386,8 +368,7 @@ ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 export DESTDIR install: all $(if $(BUILD_DOCS),install-doc) \ install-datadir install-localstatedir \ - $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \ - recurse-install + $(if $(INSTALL_BLOBS),$(edk2-decompressed)) ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) endif @@ -432,9 +413,6 @@ endif set -e; for x in $(KEYMAPS); do \ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ done - for d in $(TARGET_DIRS); do \ - $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ - done # documentation MAKEINFO=makeinfo @@ -549,20 +527,6 @@ docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \ $(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl -# Reports/Analysis - -%/coverage-report.html: - @mkdir -p $* - $(call quiet-command,\ - gcovr -r $(SRC_PATH) \ - $(foreach t, $(TARGET_DIRS), --object-directory $(BUILD_DIR)/$(t)) \ - --object-directory $(BUILD_DIR) \ - -p --html --html-details -o $@, \ - "GEN", "coverage-report.html") - -.PHONY: coverage-report -coverage-report: $(CURDIR)/reports/coverage/coverage-report.html - ifdef CONFIG_WIN32 INSTALLER = qemu-setup-$(VERSION)$(EXESUF) @@ -650,15 +614,6 @@ endif $(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:'; \ - $(foreach t, $(TARGET_DIRS), \ - $(call print-help-run,$(t)/all,Build for $(t)); \ - $(if $(CONFIG_FUZZ), \ - $(if $(findstring softmmu,$(t)), \ - $(call print-help-run,$(t)/fuzz,Build fuzzer for $(t)); \ - ))) \ - echo '') @echo 'Cleaning targets:' $(call print-help,clean,Remove most generated files but keep the config) $(call print-help,distclean,Remove all generated files) diff --git a/Makefile.target b/Makefile.target deleted file mode 100644 index a07149c..0000000 --- a/Makefile.target +++ /dev/null @@ -1,12 +0,0 @@ -# -*- Mode: makefile -*- - -BUILD_DIR?=$(CURDIR)/.. - -include ../config-host.mak -include config-target.mak -include $(SRC_PATH)/rules.mak - -all: -install: all - -.PHONY: all clean install diff --git a/configure b/configure index 61100c1..a3727dc 100755 --- a/configure +++ b/configure @@ -8094,8 +8094,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]' } From patchwork Thu Aug 6 19:16:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276935 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=-10.1 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, URIBL_BLOCKED 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 6485EC433E0 for ; Thu, 6 Aug 2020 20:12:11 +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 413EF221E3 for ; Thu, 6 Aug 2020 20:12:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CNkvHviV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 413EF221E3 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]:46268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mFG-0006ZM-DI for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:12:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lRK-0003C3-I4 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:26181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lRH-0006x7-GW for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741630; 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=yd7obrRbucZAlwB7gRRb6IthMsFyzOOj2nq3KgkFJxU=; b=CNkvHviVNiv6BA8gUkrnBOroMLDMxquvkcPrMwAMN4Iv4AcyMi+BpMHky99kV49IZc2r5o ni7rGlLL9xmopS0ieHf+TwXPAH5Bsy4HkspYjskeEpRVYjWAP9UCJBSjYTsLh3lTLcKQdl WrPvVNcSaZT6Cw6/l6r3lIm0c+TEA7I= 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-438-ZSglDG4wNd2dkQHWC3fNeQ-1; Thu, 06 Aug 2020 15:20:28 -0400 X-MC-Unique: ZSglDG4wNd2dkQHWC3fNeQ-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 DC231107BEF5 for ; Thu, 6 Aug 2020 19:20:27 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED1A15F9DC; Thu, 6 Aug 2020 19:20:26 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 135/143] meson: build texi doc Date: Thu, 6 Aug 2020 21:16:11 +0200 Message-Id: <1596741379-12902-136-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 13:48:01 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 | 108 +++-------------------------------------- docs/interop/qemu-ga-ref.texi | 2 +- docs/interop/qemu-qmp-ref.texi | 2 +- meson.build | 85 ++++++++++++++++++++++++++++++++ qga/meson.build | 12 +++-- version.texi.in | 2 + 6 files changed, 105 insertions(+), 106 deletions(-) create mode 100644 version.texi.in diff --git a/Makefile b/Makefile index d0d0294..6735832 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,6 @@ BUILD_DIR=$(CURDIR) SRC_PATH=. UNCHECKED_GOALS := %clean TAGS cscope ctags dist \ - html info pdf txt \ help check-help print-% \ docker docker-% vm-help vm-test vm-build-% @@ -113,20 +112,13 @@ edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2)) Makefile: ; configure: ; -.PHONY: all clean cscope distclean html info install install-doc \ - pdf txt recurse-all dist msi FORCE +.PHONY: all clean cscope distclean install \ + recurse-all dist msi FORCE $(call set-vpath, $(SRC_PATH)) LIBS+=-lz $(LIBS_TOOLS) -ifdef BUILD_DOCS -DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7 -DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7 -else -DOCS= -endif - SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR) ifneq ($(wildcard config-host.mak),) @@ -135,7 +127,7 @@ endif include $(SRC_PATH)/tests/Makefile.include -all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules +all: recurse-all modules # 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 +198,7 @@ qemu-%.tar.bz2: $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" distclean: clean - rm -f config-host.mak config-host.h* $(DOCS) + 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 @@ -214,12 +206,6 @@ distclean: clean rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols rm -f config.log rm -f linux-headers/asm - rm -f docs/version.texi - rm -f docs/interop/qemu-ga-qapi.texi docs/interop/qemu-qmp-qapi.texi - rm -f docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7 - rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt - rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf - rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html rm -Rf .sdk KEYMAPS=da en-gb et fr fr-ch is lt no pt-br sv \ @@ -258,29 +244,6 @@ BLOBS= DESCS= endif -install-doc: $(DOCS) - $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" - $(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)/interop" - $(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)/interop" -ifdef CONFIG_POSIX - $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" - $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu.1 "$(DESTDIR)$(mandir)/man1" - $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7" - $(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7" -ifeq ($(CONFIG_GUEST_AGENT),y) - $(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)/interop" - $(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)/interop" - $(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7" -endif -endif -ifdef CONFIG_VIRTFS - $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" - $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1" -endif -ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) - $(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtiofsd.1 "$(DESTDIR)$(mandir)/man1" -endif - install-datadir: $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)" @@ -295,8 +258,7 @@ ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 # Needed by "meson install" export DESTDIR -install: all $(if $(BUILD_DOCS),install-doc) \ - install-datadir install-localstatedir \ +install: all install-datadir install-localstatedir \ $(if $(INSTALL_BLOBS),$(edk2-decompressed)) ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) @@ -343,62 +305,6 @@ endif $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ done -# documentation -MAKEINFO=makeinfo -MAKEINFOINCLUDES= -I docs -I $( $@,"GEN","$@") - -%.html: %.texi docs/version.texi - $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ - --html $< -o $@,"GEN","$@") - -%.info: %.texi docs/version.texi - $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) $< -o $@,"GEN","$@") - -%.txt: %.texi docs/version.texi - $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ - --plaintext $< -o $@,"GEN","$@") - -%.pdf: %.texi docs/version.texi - $(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@") - -docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi - @cp -p $< $@ - -docs/interop/qemu-ga-qapi.texi: qga/qga-qapi-doc.texi - @cp -p $< $@ - -html: docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs -info: docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info -pdf: docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf -txt: docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt - -docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \ - docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \ - docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7: \ - docs/interop/qemu-ga-ref.texi docs/interop/qemu-ga-qapi.texi - -docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \ - docs/interop/qemu-qmp-ref.info docs/interop/qemu-qmp-ref.pdf \ - docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \ - docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi - -$(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl - $(call quiet-command, \ - perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $(TEXI2PODFLAGS) $< $@.pod && \ - $(POD2MAN) --section=$(subst .,,$(suffix $@)) --center=" " --release=" " $@.pod > $@, \ - "GEN","$@") - -man: $(filter %.1 %.7 %.8,$(DOCS)) - ifdef CONFIG_WIN32 INSTALLER = qemu-setup-$(VERSION)$(EXESUF) @@ -421,7 +327,7 @@ installer: $(INSTALLER) INSTDIR=/tmp/qemu-nsis -$(INSTALLER): install-doc $(SRC_PATH)/qemu.nsi +$(INSTALLER): $(SRC_PATH)/qemu.nsi $(MAKE) install prefix=${INSTDIR} ifdef SIGNCODE (cd ${INSTDIR}; \ @@ -497,7 +403,7 @@ endif $(call print-help,vm-help,Help about targets running tests inside VM) @echo '' @echo 'Documentation targets:' - $(call print-help,html info pdf txt,Build documentation in specified format) + $(call print-help,html info pdf txt man,Build documentation in specified format) @echo '' ifdef CONFIG_WIN32 @echo 'Windows targets:' diff --git a/docs/interop/qemu-ga-ref.texi b/docs/interop/qemu-ga-ref.texi index ddb76ce..a23cc2e 100644 --- a/docs/interop/qemu-ga-ref.texi +++ b/docs/interop/qemu-ga-ref.texi @@ -65,7 +65,7 @@ along with this manual. If not, see http://www.gnu.org/licenses/. @c for texi2pod: @c man begin DESCRIPTION -@include qemu-ga-qapi.texi +@include qga/qga-qapi-doc.texi @c man end diff --git a/docs/interop/qemu-qmp-ref.texi b/docs/interop/qemu-qmp-ref.texi index bb25758..ea1d7fe 100644 --- a/docs/interop/qemu-qmp-ref.texi +++ b/docs/interop/qemu-qmp-ref.texi @@ -65,7 +65,7 @@ along with this manual. If not, see http://www.gnu.org/licenses/. @c for texi2pod: @c man begin DESCRIPTION -@include qemu-qmp-qapi.texi +@include qapi/qapi-doc.texi @c man end diff --git a/meson.build b/meson.build index eb1b0cd..e2e3348 100644 --- a/meson.build +++ b/meson.build @@ -1034,6 +1034,91 @@ subdir('pc-bios') subdir('tests') subdir('docs') +if build_docs + makeinfo = find_program('makeinfo', required: build_docs) + + docs_inc = [ + '-I', meson.current_source_dir(), + '-I', meson.current_build_dir() / 'docs', + '-I', '@OUTDIR@', + ] + + version_texi = configure_file(output: 'version.texi', + input: 'version.texi.in', + configuration: {'VERSION': meson.project_version(), + 'qemu_confdir': config_host['qemu_confdir']}) + + texi = { + 'qemu-qmp-ref': ['docs/interop/qemu-qmp-ref.texi', qapi_doc_texi, version_texi], + } + if 'CONFIG_GUEST_AGENT' in config_host + texi += {'qemu-ga-ref': ['docs/interop/qemu-ga-ref.texi', qga_qapi_doc_texi, version_texi]} + endif + + if makeinfo.found() + cmd = [ + 'env', 'LC_ALL=C', makeinfo, '--no-split', '--number-sections', docs_inc, + '@INPUT0@', '-o', '@OUTPUT@', + ] + foreach ext, args: { + 'info': [], + 'html': ['--no-headers', '--html'], + 'txt': ['--no-headers', '--plaintext'], + } + t = [] + foreach doc, input: texi + output = doc + '.' + ext + t += custom_target(output, + input: input, + output: output, + install: true, + install_dir: config_host['qemu_docdir'] / 'interop', + command: cmd + args) + endforeach + alias_target(ext, t) + endforeach + endif + + texi2pdf = find_program('texi2pdf', required: false) + + if texi2pdf.found() + pdfs = [] + foreach doc, input: texi + output = doc + '.pdf' + pdfs += custom_target(output, + input: input, + output: output, + command: [texi2pdf, '-q', docs_inc, '@INPUT0@', '-o', '@OUTPUT@'], + build_by_default: false) + endforeach + alias_target('pdf', pdfs) + endif + + texi2pod = find_program('scripts/texi2pod.pl') + pod2man = find_program('pod2man', required: build_docs) + + if pod2man.found() + foreach doc, input: texi + man = doc + '.7' + pod = custom_target(man + '.pod', + input: input, + output: man + '.pod', + command: [texi2pod, + '-DVERSION="' + meson.project_version() + '"', + '-DCONFDIR="' + config_host['qemu_confdir'] + '"', + '@INPUT0@', '@OUTPUT@']) + man = custom_target(man, + input: pod, + output: man, + capture: true, + install: true, + install_dir: config_host['mandir'] / 'man7', + command: [pod2man, '--utf8', '--section=7', '--center=" "', + '--release=" "', '@INPUT@']) + endforeach + endif +endif + summary_info = {} summary_info += {'Install prefix': config_host['prefix']} summary_info += {'BIOS directory': config_host['qemu_datadir']} diff --git a/qga/meson.build b/qga/meson.build index dcd4772..55d590c 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -1,7 +1,6 @@ qga_qapi_outputs = [ 'qga-qapi-commands.c', 'qga-qapi-commands.h', - 'qga-qapi-doc.texi', 'qga-qapi-emit-events.c', 'qga-qapi-emit-events.h', 'qga-qapi-events.c', @@ -17,12 +16,19 @@ qga_qapi_outputs = [ ] qga_qapi_files = custom_target('QGA QAPI files', - output: qga_qapi_outputs, + output: qga_qapi_outputs + ['qga-qapi-doc.texi'], input: 'qapi-schema.json', command: [ qapi_gen, '-o', 'qga', '-p', 'qga-', '@INPUT0@' ], depend_files: qapi_gen_depends) + qga_ss = ss.source_set() -qga_ss.add(qga_qapi_files) +i = 0 +foreach output: qga_qapi_outputs + qga_ss.add(qga_qapi_files[i]) + i = i + 1 +endforeach +qga_qapi_doc_texi = qga_qapi_files[i] + qga_ss.add(files( 'commands.c', 'guest-agent-command-state.c', diff --git a/version.texi.in b/version.texi.in new file mode 100644 index 0000000..0a723b8 --- /dev/null +++ b/version.texi.in @@ -0,0 +1,2 @@ +@set VERSION @VERSION@ +@set CONFDIR @qemu_confdir@ From patchwork Thu Aug 6 19:16: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: 276933 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=-10.1 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 108A3C433E3 for ; Thu, 6 Aug 2020 20:14: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 C84F3221E3 for ; Thu, 6 Aug 2020 20:14:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q6UU/FWG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C84F3221E3 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]:54694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mH2-0001WM-Tc for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:14:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lRR-0003Vy-SJ for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:41 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:53327 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 1k3lRM-00071q-Ns for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741636; 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=iMqiVGkfTXBbd/uGgjukbP8TbjyGiH/6P2i6AizPOi8=; b=Q6UU/FWGHjxHhOHPVk7FAmKq1z8cgQKxZ3ChIv4zU+NLOc8edzfsOMzg30QBIktpocp/YV 1XfOLRmKNqIn5bIag9BlR3scXSnkuAhOPLuD1Y6uwZPXU6hCMs41Bkg2rpkf4CkxUy+GFp b0jVxh73SikkroVbenObti1wSYb5cXQ= 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-423-21hHZzNuNdukS9xQjtwspA-1; Thu, 06 Aug 2020 15:20:31 -0400 X-MC-Unique: 21hHZzNuNdukS9xQjtwspA-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 2BEC6107BEF5 for ; Thu, 6 Aug 2020 19:20:30 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73FA35F9DC for ; Thu, 6 Aug 2020 19:20:29 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 137/143] rules.mak: drop unneeded macros Date: Thu, 6 Aug 2020 21:16:13 +0200 Message-Id: <1596741379-12902-138-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-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 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/06 05:03:13 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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 | 32 +----- docs/devel/build-system.txt | 5 +- rules.mak | 231 +------------------------------------------- scripts/create_config | 6 +- 6 files changed, 14 insertions(+), 268 deletions(-) diff --git a/.gitignore b/.gitignore index de1f20e..5eaeada 100644 --- a/.gitignore +++ b/.gitignore @@ -78,7 +78,6 @@ *.msi *.dll *.so -*.mo *.fn *.ky *.log diff --git a/Makefile b/Makefile index 6735832..cc0b053 100644 --- a/Makefile +++ b/Makefile @@ -127,7 +127,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="" @@ -181,7 +181,7 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS)) clean: recurse-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 \ @@ -383,9 +383,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 08aee81..99ed6fa 100755 --- a/configure +++ b/configure @@ -29,7 +29,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 @@ -424,7 +423,7 @@ bigendian="no" mingw32="no" gcov="no" EXESUF="" -DSOSUF=".so" +HOST_DSOSUF=".so" LDFLAGS_SHARED="-shared" modules="no" module_upgrades="no" @@ -958,7 +957,7 @@ fi if test "$mingw32" = "yes" ; then EXESUF=".exe" - DSOSUF=".dll" + HOST_DSOSUF=".dll" # MinGW needs -mthreads for TLS and macro _MT. QEMU_CFLAGS="-mthreads $QEMU_CFLAGS" LIBS="-lwinmm -lws2_32 $LIBS" @@ -6205,31 +6204,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 @@ -7803,7 +7777,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 41bd08e..fea67b2 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 6cab0b9..c66c821 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 bc82661..ec5c0b4 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 Thu Aug 6 19:16: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: 276931 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=-10.1 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 2B569C433E0 for ; Thu, 6 Aug 2020 20:16: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 08D1A2177B for ; Thu, 6 Aug 2020 20:16:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YgKavgs9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08D1A2177B 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]:37946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mJe-0006Dt-4J for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:16:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lRO-0003J3-2Y for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:31676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3lRK-00070Z-SM for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=PnW1d/mMnK2iy+7KtWSCMbUu0Dgra3qRDQymmCUa7ZE=; b=YgKavgs9BIyrJS6KSlr0h8dhzAYOeaLA4HK+A4Aewg+5SNvUockzySGQ36tFa5NoZ8P33b j9PB8mXOECQT9+RjOnrsBvte3/84NGf32ECUNQJ3G/jV8quh9R/NT42k7uoEyVoVBf++Xt nmDlB7esbRhpE1rwlOh3GuGPC4uIwog= 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-d6CvKEdkPG-XnR54Cshffw-1; Thu, 06 Aug 2020 15:20:32 -0400 X-MC-Unique: d6CvKEdkPG-XnR54Cshffw-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 4DDA11DE4 for ; Thu, 6 Aug 2020 19:20:31 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 969961D3 for ; Thu, 6 Aug 2020 19:20:30 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 138/143] meson: replace create-config with meson configure_file Date: Thu, 6 Aug 2020 21:16:14 +0200 Message-Id: <1596741379-12902-139-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 13:48:01 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, RCVD_IN_DNSWL_NONE=-0.0001, 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 | 2 +- block.c | 4 +- configure | 9 ++- meson.build | 100 ++++++++++++++++++++++--------- scripts/create_config | 131 ----------------------------------------- tests/qtest/bios-tables-test.c | 2 +- 6 files changed, 80 insertions(+), 168 deletions(-) delete mode 100755 scripts/create_config diff --git a/Makefile b/Makefile index cc0b053..bab1021 100644 --- a/Makefile +++ b/Makefile @@ -190,7 +190,7 @@ clean: recurse-clean 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 67c5028..67ca543 100644 --- a/block.c +++ b/block.c @@ -443,13 +443,13 @@ static int bdrv_format_is_whitelisted(const char *format_name, bool read_only) return 1; /* no whitelist, anything goes */ } - for (p = whitelist_rw; *p; p++) { + for (p = whitelist_rw; p < &whitelist_rw[ARRAY_SIZE(whitelist_rw)]; p++) { if (!strcmp(format_name, *p)) { return 1; } } if (read_only) { - for (p = whitelist_ro; *p; p++) { + for (p = whitelist_ro; p < &whitelist_ro[ARRAY_SIZE(whitelist_ro)]; p++) { if (!strcmp(format_name, *p)) { return 1; } diff --git a/configure b/configure index 99ed6fa..13b03ac 100755 --- a/configure +++ b/configure @@ -6905,7 +6905,7 @@ if test "$slirp" != "no"; then echo "SLIRP_LIBS=$slirp_libs" >> $config_host_mak fi if [ "$slirp" = "git" -o "$slirp" = "internal" ]; then - echo "config-host.h: slirp/all" >> $config_host_mak + echo "all Makefile: slirp/all" >> $config_host_mak fi if test "$vde" = "yes" ; then echo "CONFIG_VDE=y" >> $config_host_mak @@ -6983,7 +6983,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 @@ -7742,7 +7741,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 "HOST_CC=$host_cc" >> $config_host_mak echo "CXX=$cxx" >> $config_host_mak @@ -8271,10 +8270,10 @@ 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 + echo "all Makefile: dtc/all" >> $config_host_mak fi if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then - echo "config-host.h: capstone/all" >> $config_host_mak + echo "all Makefile: capstone/all" >> $config_host_mak fi if test -n "$LIBCAPSTONE"; then echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak diff --git a/meson.build b/meson.build index e2e3348..cb2ffd6 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(), language: ['c', 'objc']) @@ -342,13 +344,47 @@ 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'] +ignored = ['HOST_USB', 'HOST_CC'] +strings = ['HOST_DSOSUF', 'CONFIG_IASL'] +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 ignored.contains(k) + # do nothing + elif k.startswith('qemu') and (k.endswith('dir') or k.endswith('path')) + config_host_data.set_quoted('CONFIG_' + k.to_upper(), v) + elif strings.contains(k) + config_host_data.set_quoted(k, v) + elif k.startswith('CONFIG_') or k.startswith('HAVE_') or k.startswith('HOST_') + if v == 'y' or v == 'm' + config_host_data.set(k, 1) + else + config_host_data.set(k, v) + endif + 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', @@ -364,16 +400,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 @@ -387,14 +443,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 @@ -434,7 +492,6 @@ config_all += { # Generators -genh = [] hxtool = find_program('scripts/hxtool') shaderinclude = find_program('scripts/shaderinclude.pl') qapi_gen = find_program('scripts/qapi-gen.py') @@ -458,7 +515,7 @@ qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py', 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, @@ -467,13 +524,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'], @@ -805,13 +855,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 = config_target['QEMU_CFLAGS'].split() + ['-DNEED_CPU_H', '-DCONFIG_TARGET="@0@-config-target.h"'.format(target), '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)] link_args = config_target['QEMU_LDFLAGS'].split() + config_target += config_host target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])] if host_machine.system() == 'linux' target_inc += include_directories('linux-headers', is_system: true) @@ -872,19 +923,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 ec5c0b4..0000000 --- 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 d49b398..d25ff35 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 From patchwork Thu Aug 6 19:16:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276930 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=-10.1 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 A4F57C433DF for ; Thu, 6 Aug 2020 20:17: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 7C4FD2177B for ; Thu, 6 Aug 2020 20:17:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NF4FTX/R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C4FD2177B 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]:40572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mKC-0007Hd-KM for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:17:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lRR-0003Th-9e for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:41 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:34939 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 1k3lRO-000727-Fl for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=E5ZIJKbm/017peeiZpXHusOm8Lj0qXBHep10+qPSv30=; b=NF4FTX/RvpbLA0ZpV7C6kUu/S9HNatBCprbRUUFK1WzQz8B5PmAzmbUouGjA0ph3bGPiWH u0EfhbGmcfrOSYkrrSYj/D5/Bog8ahkoBzJpjALL/NtLMoqHebVal1ewH5Wzidef6uz+RS 1WYcFKki5WP0P2D3pHqftxE9ba5aJPw= 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-154--GosM5NtN7aSCL8OL5d9AA-1; Thu, 06 Aug 2020 15:20:35 -0400 X-MC-Unique: -GosM5NtN7aSCL8OL5d9AA-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 B43881DE6 for ; Thu, 6 Aug 2020 19:20:34 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06BEB69314 for ; Thu, 6 Aug 2020 19:20:33 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 141/143] meson: convert VNC and dependent libraries to meson Date: Thu, 6 Aug 2020 21:16:17 +0200 Message-Id: <1596741379-12902-142-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 00:07:42 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 | 42 ++++++++++--------- meson_options.txt | 4 ++ ui/meson.build | 10 ++--- 4 files changed, 44 insertions(+), 134 deletions(-) diff --git a/configure b/configure index 288a75f..cd1ab0c 100755 --- a/configure +++ b/configure @@ -381,12 +381,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="" @@ -1112,9 +1112,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" ;; @@ -1150,17 +1150,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" ;; @@ -3369,85 +3369,6 @@ EOF 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 if $pkg_config xkbcommon --exists; then @@ -6834,24 +6755,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 @@ -8298,6 +8201,7 @@ NINJA=$PWD/ninjatool $python $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 8bb0c69..913f22d 100644 --- a/meson.build +++ b/meson.build @@ -285,20 +285,20 @@ 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()) +if get_option('vnc').enabled() + vnc = declare_dependency() # dummy dependency + png = dependency('libpng', required: get_option('vnc_png')) + jpeg = cc.find_library('jpeg', has_headers: ['jpeglib.h'], + required: get_option('vnc_jpeg')) + sasl = cc.find_library('sasl2', has_headers: ['sasl/sasl.h'], + required: get_option('vnc_sasl')) + sasl = declare_dependency(dependencies: sasl, + compile_args: '-DSTRUCT_IOVEC_DEFINED') +else + vnc = not_found + png = not_found + jpeg = not_found + sasl = not_found endif fdt = not_found if 'CONFIG_FDT' in config_host @@ -356,6 +356,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]) @@ -1262,11 +1266,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 e548211..67455c5 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 2822ad9..1504338 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 Thu Aug 6 19:16:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 276928 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=-10.1 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, URIBL_BLOCKED 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 A0933C433DF for ; Thu, 6 Aug 2020 20:18: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 6C4D42177B for ; Thu, 6 Aug 2020 20:18:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OStbgmkL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C4D42177B 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]:48972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3mLl-0002FX-H3 for qemu-devel@archiver.kernel.org; Thu, 06 Aug 2020 16:18:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3lRb-0003sZ-J0 for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:36969 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 1k3lRX-00073h-LX for qemu-devel@nongnu.org; Thu, 06 Aug 2020 15:20:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596741647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=AwFIE+gHMatUcdbtwBjO4GnqopSs3bbCsr7ua/sQtsg=; b=OStbgmkLsMSQ9pLQixl0431SlhuTJ9ybFU/HDbV1Gza5xS/4/aS5lObPP8OrLWLttCkxXz BH/S1KSjn4idEIxlEpMvC92hELZvxzQ93VmFS6f+OOni0nG3ItsIdQeEvRXLxlcw0pdpI7 GgagupIHDqvq3JitbLjPldoCUjNWkqA= 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-459-RBBr35yeNwOq40R610HVIQ-1; Thu, 06 Aug 2020 15:20:41 -0400 X-MC-Unique: RBBr35yeNwOq40R610HVIQ-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 04FBF19200C0 for ; Thu, 6 Aug 2020 19:20:41 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 557035F9DC for ; Thu, 6 Aug 2020 19:20:40 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 143/143] meson: update build-system documentation Date: Thu, 6 Aug 2020 21:16:19 +0200 Message-Id: <1596741379-12902-144-git-send-email-pbonzini@redhat.com> In-Reply-To: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> References: <1596741379-12902-1-git-send-email-pbonzini@redhat.com> 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 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/06 03:10: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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, 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/devel/build-system.txt | 373 ++++++++++++++++++++++---------------------- 1 file changed, 185 insertions(+), 188 deletions(-) diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt index fea67b2..fb62cb2 100644 --- a/docs/devel/build-system.txt +++ b/docs/devel/build-system.txt @@ -22,6 +22,30 @@ 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. +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. + Adding new checks to the configure script usually comprises the following tasks: @@ -164,145 +188,161 @@ developers in checking for system features: then --static will be automatically added to $ARGS -Stage 2: makefiles -================== - -The use of GNU make is required with the QEMU build system. - -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. - -QEMU currently supports both VPATH and non-VPATH builds, so there are -three general ways to invoke configure & perform a build. +Stage 2: Meson +============== - - VPATH, build artifacts outside of QEMU source tree entirely +The Meson build system is currently used to describe the build +process for: - cd ../ - mkdir build - cd build - ../qemu/configure - make - - - VPATH, build artifacts in a subdir of QEMU source tree +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 - mkdir build - cd build - ../configure - make +2) documentation - - non-VPATH, build artifacts everywhere +3) ROMs, which can be either installed as binary blobs or compiled - ./configure - make +4) other data files, such as icons or desktop files -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: + include arm-softmmu.mak + CONFIG_XLNX_ZYNQMP_ARM=y + CONFIG_XLNX_VERSAL=y -Windows platform portability ----------------------------- +These files rarely need changing unless new devices / hardware need to +be enabled for a particular system/userspace emulation target -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. +- */Kconfig - qemu-img$(EXESUF): qemu-img.o ..snip.. +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. -This expands to '.exe' on Windows, or '' on other platforms. -A further complication for the system emulator binaries is that -two separate binaries need to be generated. +Stage 3: makefiles +================== -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. +The use of GNU make is required with the QEMU build system. -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. +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. -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. +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. -Object variable naming ----------------------- +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'. + +Likewise, tests that are executed by "make check-unit" are grouped into +a variable check-unit-y, like this: - 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 + check-unit-y += tests/test-visitor-serialization$(EXESUF) + check-unit-y += tests/test-iov$(EXESUF) + check-unit-y += tests/test-bitmap$(EXESUF) -When there is an object file which needs to be conditionally built based +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 +356,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 +386,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 +- Makefile.objs -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 +Defines *-obj-y files corresponding to - block-obj-$(CONFIG_LIBISCSI) += iscsi.o - block-obj-$(CONFIG_CURL) += curl.o - - ..snip... - - iscsi.o-cflags := $(LIBISCSI_CFLAGS) - iscsi.o-libs := $(LIBISCSI_LIBS) - curl.o-cflags := $(CURL_CFLAGS) - curl.o-libs := $(CURL_LIBS) - -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 +418,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 +433,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 +441,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 +462,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