From patchwork Fri Jun 24 08:27:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id F20CCC43334 for ; Fri, 24 Jun 2022 08:50:45 +0000 (UTC) Received: from localhost ([::1]:51852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4f1Y-00035O-UZ for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:50:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efG-0005m5-VJ for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efE-0005Rn-Ds for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059258; 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=vvCO5iW75Uo0QBR8ClgsLomr7SuVTuh71gKSSgESR6U=; b=jDI/4CGaFt0l/ioQb16OUzvKpjR1EyQEtjXXAAcXKmlDZsrSNjvQaUQv9oGG0XLu/lghYJ KWBUMuA0X7QSshlaDZlT3AG8fKbxglr3zZWgWWdaBB9oa79Y9/iKEenAumwnP/jSpq2BQr aDiIXE6SlPIu/6LDjWDdiIUEq3FEZg0= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-362-Ab26ZH_kNROt3vuSdR_zog-1; Fri, 24 Jun 2022 04:27:35 -0400 X-MC-Unique: Ab26ZH_kNROt3vuSdR_zog-1 Received: by mail-ed1-f71.google.com with SMTP id r12-20020a05640251cc00b00435afb01d7fso1350465edd.18 for ; Fri, 24 Jun 2022 01:27:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vvCO5iW75Uo0QBR8ClgsLomr7SuVTuh71gKSSgESR6U=; b=u8wU370ls0+UIUr8gtouMydltz5+8IzJU3Ije32alspICe9iJ7rFn2QPJpkZOH4hhD yDBLGFNoYtHDxNno0jxydvO+agvnysk83fuDJHAyxAzDwCb3eAmMmNosDtac/+4L+NVP 7ecX3e+FqmX0BMeHAqh5PQ/Rg0QK+a34zgVpz6N2SbPtPAwzaT/TKWZTJHy7QAr7RUy+ uMyWpBWuQ1lgCLs/CtS9iwN1Vs1Ox9L7RwtHLQM/Q33JHUu0CZjxkxcXaOmFZX+1/IYk j+U4CYg45XuR/5qYBiHO4y9btSnGM3kQkCBN/V/KAFV4KxOP8Csmw5pcMkmU9qrATn3U O3eQ== X-Gm-Message-State: AJIora8BRZ3DdYznAWZf+vrWmRTCbNA5nEycaipiZlxX6wn9Lxz32CS1 Y9xQuD6JY1K/axQRgrsyuCGwW/nyIFW+R8KG0U+EvVvPKeO0RSOAhN7uD3rUUyCoURFSg9SzJZr UPKG/42G43NN7SQ2ua6zaQZhihNxQs/z1MM0V6NQELmhouk8XHjkZa3dAGuNy6f0ohaA= X-Received: by 2002:a05:6402:154a:b0:435:5261:f776 with SMTP id p10-20020a056402154a00b004355261f776mr15725358edx.118.1656059254343; Fri, 24 Jun 2022 01:27:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v3etmjvfztJ7xa+VKLtcRCdhLtzdksUnCex+4rgBhH+fgubBqg6H2JD9xU6FNQMyEUMEiBFQ== X-Received: by 2002:a05:6402:154a:b0:435:5261:f776 with SMTP id p10-20020a056402154a00b004355261f776mr15725315edx.118.1656059253947; Fri, 24 Jun 2022 01:27:33 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id s7-20020a1709066c8700b0070c4abe4706sm708807ejr.158.2022.06.24.01.27.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 01/14] tests/vm: do not specify -bios option Date: Fri, 24 Jun 2022 10:27:17 +0200 Message-Id: <20220624082730.246924-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" When running from the build tree, the executable is able to find the BIOS on its own; when running from the source tree, a firmware blob should already be installed and there is no guarantee that the one in the source tree works with the QEMU that is being used for the installation. Just remove the -bios option, since it is unnecessary and in fact there are other x86 VM tests that do not bother specifying it. Signed-off-by: Paolo Bonzini --- tests/vm/fedora | 1 - tests/vm/freebsd | 1 - tests/vm/netbsd | 1 - tests/vm/openbsd | 1 - 4 files changed, 4 deletions(-) diff --git a/tests/vm/fedora b/tests/vm/fedora index 92b78d6e2c..12eca919a0 100755 --- a/tests/vm/fedora +++ b/tests/vm/fedora @@ -79,7 +79,6 @@ class FedoraVM(basevm.BaseVM): self.exec_qemu_img("create", "-f", "qcow2", img_tmp, self.size) self.print_step("Booting installer") self.boot(img_tmp, extra_args = [ - "-bios", "pc-bios/bios-256k.bin", "-machine", "graphics=off", "-device", "VGA", "-cdrom", iso diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 805db759d6..cd1fabde52 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -95,7 +95,6 @@ class FreeBSDVM(basevm.BaseVM): self.print_step("Booting installer") self.boot(img_tmp, extra_args = [ - "-bios", "pc-bios/bios-256k.bin", "-machine", "graphics=off", "-device", "VGA", "-cdrom", iso diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 45aa9a7fda..aa883ec23c 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -86,7 +86,6 @@ class NetBSDVM(basevm.BaseVM): self.print_step("Booting installer") self.boot(img_tmp, extra_args = [ - "-bios", "pc-bios/bios-256k.bin", "-machine", "graphics=off", "-cdrom", iso ]) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 13c8254214..6f1b6f5b98 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -82,7 +82,6 @@ class OpenBSDVM(basevm.BaseVM): self.print_step("Booting installer") self.boot(img_tmp, extra_args = [ - "-bios", "pc-bios/bios-256k.bin", "-machine", "graphics=off", "-device", "VGA", "-cdrom", iso From patchwork Fri Jun 24 08:27:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 36B0AC433EF for ; Fri, 24 Jun 2022 08:30:34 +0000 (UTC) Received: from localhost ([::1]:40788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4ei0-00007x-Tb for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:30:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efG-0005m3-Uh for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efE-0005ST-E5 for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059259; 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=fWki7fDQXi5B/Xr/+5WLHFaR3k7nJmfyFC3RmETDRPc=; b=dtijfuSZQDbHpprLCS8c0Py2uWKdQtIEw1B5P4ZiOClMLMgnp+Vodn5QZRfTemSLQMt5AI 6nArAUxVkksNHCafXDpeiDCADOlUvaY2DlkemtxQT4jDi3PAW4fNgwSzHEyD1n6s3viVJ9 87Pl7UY1DpPlBPItOEHeEwDFWV3Lv4o= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-10-lvJLfgQpPtuLPQHBuSLsIg-1; Fri, 24 Jun 2022 04:27:37 -0400 X-MC-Unique: lvJLfgQpPtuLPQHBuSLsIg-1 Received: by mail-ej1-f72.google.com with SMTP id hq41-20020a1709073f2900b00722e5ad076cso567675ejc.20 for ; Fri, 24 Jun 2022 01:27:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fWki7fDQXi5B/Xr/+5WLHFaR3k7nJmfyFC3RmETDRPc=; b=rMt9Rn0olnnwoSufUAXQzl2nV5942CrpuNkml3TqfN9Np/qL1I/KMAnqxd4DMNBKK2 UoFPk5POKbae7rN93hOhZGc4yE+x0Tc2eWPhuZdhxN+PHUmQ5ACyd+cdUxlPxUyyNgbB fH1yOGfbosMhwm7/mTnwSZ6YX5oC1Bm9KZ5xteE02xa5a9HUYyLdWilxzt500M1KSpB9 1kzeL1KVvKrfOyHFspM6+9wGf4zKFaOpyEa1ZeDCQC/M4pxEVnj7Zk1sSwn1Jr9qnDYO DB23P17FqouMM1jatckWmuEX12BFm3HUD6gpR29W+A1OeN6Y1bEac0cMvdasO0RUzcaD vd1g== X-Gm-Message-State: AJIora/ukhbwbZmokhL5wy/4vO09gTblXRDcDv0weh+OeZVkVU6QY2vI cr32ECcF0TqNjmqqFjq+xG1sZqGRGHVlTXCKTrmqAB951D8Ex3n0b08cKCaQpD2Umcq/1UCj9m/ pKm9CYH1jkZE2boClEkjntgiYVlaTa9aqeTQUy6ePNZwy0foAtjMAINLShduM5IzsEYE= X-Received: by 2002:a05:6402:3988:b0:434:e2a8:8459 with SMTP id fk8-20020a056402398800b00434e2a88459mr15836700edb.253.1656059255787; Fri, 24 Jun 2022 01:27:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRdsGgaqz+yU8ZZUV9qv+l0taqyC7Dijbku3Oa1nCVT5TsDOXL0nZd9tREP4oeBHXFUtmt+Q== X-Received: by 2002:a05:6402:3988:b0:434:e2a8:8459 with SMTP id fk8-20020a056402398800b00434e2a88459mr15836671edb.253.1656059255404; Fri, 24 Jun 2022 01:27:35 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id m16-20020a1709061ed000b006fe8ac6bc69sm714768ejj.140.2022.06.24.01.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 02/14] pc-bios/optionrom: use -m16 unconditionally Date: Fri, 24 Jun 2022 10:27:18 +0200 Message-Id: <20220624082730.246924-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" Remove support for .code16gcc, all supported platforms have -m16. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- pc-bios/optionrom/Makefile | 15 +-------------- pc-bios/optionrom/code16gcc.h | 3 --- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 pc-bios/optionrom/code16gcc.h diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index f639915b4f..ea89ce9d59 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -11,7 +11,7 @@ CFLAGS = -O2 -g quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) cc-option = $(if $(shell $(CC) $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2) -override CFLAGS += -march=i486 -Wall +override CFLAGS += -march=i486 -Wall -m16 # If -fcf-protection is enabled in flags or compiler defaults that will # conflict with -march=i486 @@ -24,21 +24,8 @@ override CFLAGS += $(filter -W%, $(QEMU_CFLAGS)) override CFLAGS += $(call cc-option, -fno-pie) override CFLAGS += -ffreestanding -I$(TOPSRC_DIR)/include override CFLAGS += $(call cc-option, -fno-stack-protector) -override CFLAGS += $(call cc-option, -m16) override CFLAGS += $(call cc-option, -Wno-array-bounds) -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. -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 - Wa = -Wa, override ASFLAGS += -32 override CFLAGS += $(call cc-option, $(Wa)-32) diff --git a/pc-bios/optionrom/code16gcc.h b/pc-bios/optionrom/code16gcc.h deleted file mode 100644 index 9c8d25d508..0000000000 --- a/pc-bios/optionrom/code16gcc.h +++ /dev/null @@ -1,3 +0,0 @@ -asm( -".code16gcc\n" -); From patchwork Fri Jun 24 08:27:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 91456C43334 for ; Fri, 24 Jun 2022 08:32:56 +0000 (UTC) Received: from localhost ([::1]:45736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4ekJ-0003iR-IX for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:32:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efI-0005pI-OB for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:50881) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efH-0005Sx-4x for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059262; 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=c8+iHZndsfh6ZPzkxpQlOZtsgTLcoWONkUeR9C5fSbg=; b=Qb+DVvpuhx7zo/0vnjWEh/ikhPxmXWZGLa38h1qsTtYGQmB1H4OCUNs2PvKMNsx1lQ3WLr cD9RChgijQqMV4gVDU8dVtZDTLugJRbeT5K6EWvTd9WdjByGIOEFiDG/qBzHB8ibbFFKCE Px7e8XrE4ezbCNTKLC/WhmR3BIFg/a0= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-85nXJWcrMmGt7qR3thicRA-1; Fri, 24 Jun 2022 04:27:41 -0400 X-MC-Unique: 85nXJWcrMmGt7qR3thicRA-1 Received: by mail-ej1-f72.google.com with SMTP id sb34-20020a1709076da200b00722f4a9865bso592960ejc.1 for ; Fri, 24 Jun 2022 01:27:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c8+iHZndsfh6ZPzkxpQlOZtsgTLcoWONkUeR9C5fSbg=; b=7pao0ot/fKijYEWu7D0eU3ASjDrb8jRgB6wsNGGbPPJvfrK1SVY6IxLfNB0bcJcuKY /JwcL0z/LH4/+KNsy4Hx715YXutwQYHLIIOnVpuwzwGFjuBEDH9LDkWDztpjykcrgptB aL6mXg+vzgTHvEn+resdFmYP8qFI9iND5j6q8O4lFTkmn/y6PxgUrRmSr6UWM3KT8jwr zmwdaJ6H1GO00xLFtFiJ0VMEquU4PnX1u+lJS4takf73VGGgLBaqM6toG/BF+pADNSto gbaa/sabarZmcrhMKpppPlR2v0rG0ZeSMtLRXMVBD/nNSWPp6VUdzhCrTW5me51xCXFJ evFQ== X-Gm-Message-State: AJIora+Yc4zfe6oVj3W+DWH5gbeowagmqSTo67q2R+fhzzi2KibZb0uH m2DlLnV4Adkl8O2PDU7RiYo4pAKQM0VXrqbgUkUEMUL2JCRme0U+r++JhJmYmbrVg/yLZSwi6QU PSap1CpRcJHnZt0K1+ZknUQ4rsd5Gd+HHcPFAe+FHw7cGlW/DUp+Zd8qpIs5gDAQgCjg= X-Received: by 2002:a17:906:ae0f:b0:726:32b3:17f4 with SMTP id le15-20020a170906ae0f00b0072632b317f4mr1420906ejb.116.1656059259535; Fri, 24 Jun 2022 01:27:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t8a9SHHCsYy2v9/V2h1FDtKvJIKOUizLFIVpno5+2gYHrMe0g07mWpOfi7Tb/rko68mQUe/w== X-Received: by 2002:a17:906:ae0f:b0:726:32b3:17f4 with SMTP id le15-20020a170906ae0f00b0072632b317f4mr1420885ejb.116.1656059259208; Fri, 24 Jun 2022 01:27:39 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id q21-20020aa7cc15000000b0042617ba638esm1429894edt.24.2022.06.24.01.27.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/14] configure, pc-bios/optionrom: pass cross CFLAGS correctly Date: Fri, 24 Jun 2022 10:27:19 +0200 Message-Id: <20220624082730.246924-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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 optionrom build is disregarding the flags passed to the configure script via --cross-cflags-i386. Pass it down and add it to the Makefile. This will make it possible to get the -m32 flag from $target_cflags to force a 32-bit build on 64-bit hosts, instead of supplying manually the arcane -Wa,-32 and linker emulation options. Signed-off-by: Paolo Bonzini --- configure | 32 ++++++++++++++++++-------------- pc-bios/optionrom/Makefile | 2 +- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 76728b31f7..3d00b361d7 100755 --- a/configure +++ b/configure @@ -2057,19 +2057,22 @@ probe_target_compiler() { compute_target_variable $1 target_objcopy objcopy compute_target_variable $1 target_ranlib ranlib compute_target_variable $1 target_strip strip - if test "$1" = $cpu; then - : ${target_cc:=$cc} - : ${target_ccas:=$ccas} - : ${target_as:=$as} - : ${target_ld:=$ld} - : ${target_ar:=$ar} - : ${target_as:=$as} - : ${target_ld:=$ld} - : ${target_nm:=$nm} - : ${target_objcopy:=$objcopy} - : ${target_ranlib:=$ranlib} - : ${target_strip:=$strip} - fi + case "$1:$cpu" in + i386:x86_64 | \ + "$cpu:$cpu") + : ${target_cc:=$cc} + : ${target_ccas:=$ccas} + : ${target_as:=$as} + : ${target_ld:=$ld} + : ${target_ar:=$ar} + : ${target_as:=$as} + : ${target_ld:=$ld} + : ${target_nm:=$nm} + : ${target_objcopy:=$objcopy} + : ${target_ranlib:=$ranlib} + : ${target_strip:=$strip} + ;; + esac if test -n "$target_cc"; then case $1 in i386|x86_64) @@ -2238,7 +2241,7 @@ done # Mac OS X ships with a broken assembler roms= -probe_target_compilers i386 x86_64 +probe_target_compiler i386 if test -n "$target_cc" && test "$targetos" != "darwin" && test "$targetos" != "sunos" && \ test "$targetos" != "haiku" && test "$softmmu" = yes ; then @@ -2257,6 +2260,7 @@ if test -n "$target_cc" && echo "# Automatically generated by configure - do not modify" > $config_mak echo "TOPSRC_DIR=$source_path" >> $config_mak echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_mak + echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak fi fi diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index ea89ce9d59..e90ca2e1c6 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -11,7 +11,7 @@ CFLAGS = -O2 -g quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) cc-option = $(if $(shell $(CC) $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2) -override CFLAGS += -march=i486 -Wall -m16 +override CFLAGS += -march=i486 -Wall $(EXTRA_CFLAGS) -m16 # If -fcf-protection is enabled in flags or compiler defaults that will # conflict with -march=i486 From patchwork Fri Jun 24 08:27:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 212B8C433EF for ; Fri, 24 Jun 2022 08:35:46 +0000 (UTC) Received: from localhost ([::1]:49602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4en3-0006Oz-37 for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:35:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efK-0005xC-W4 for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efJ-0005TH-23 for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059264; 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=UGi9+Bh2Lb6sfY2xhgQtU5dM27OLDajFSLGUA3UZW3Y=; b=TOVc7+JSH3B7ir9gtdptvlD7ewSdIr55e1ID4Na5EFGKxWXgewY/ZtCX6biSekksp3iUfN uw51Mta5P3DLOTo3/bbd2VigU5OAKFivZ+tDUu69yfCOCVeg1yjwFKkKBX6uFnE00cCgyx cSE1y/1G9GP+MVbY9lAA89pzm046jes= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-586-0KYmGgDPPBiNQ3NGoD5a5Q-1; Fri, 24 Jun 2022 04:27:43 -0400 X-MC-Unique: 0KYmGgDPPBiNQ3NGoD5a5Q-1 Received: by mail-ej1-f71.google.com with SMTP id gr1-20020a170906e2c100b006fefea3ec0aso570849ejb.14 for ; Fri, 24 Jun 2022 01:27:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UGi9+Bh2Lb6sfY2xhgQtU5dM27OLDajFSLGUA3UZW3Y=; b=3+Ye1Dq9EAodP1Ek/uFSDsnJxn4B+qiWQf1H/VNVJ4+S2YPvpDmcnXcowREBMRV0S4 pXJSqIjFi8svp/MmGHG89QXMQrQszFA8LWRunPVo2Gvsu2HCaE536LS/ptbQ/lZSrErW W9Tskn5aytNiOET5AYNTiSKml+A5WGsI7mllyqvTX9dcuy8ZTIg9L+astRBj2YM15A6v dPm4N1LiV/NvN51nYeibTdc6kYFUeevMF0X3mWWQU1mj+cFbObmhtxoYkmmEwSHDezn1 9FzB3OZ1u6WDeuHVmdaMlanUwf3Cs0JJEO7qwHKTR5dcaqaXwc05C96g6SURpvXZDoDJ +UWQ== X-Gm-Message-State: AJIora9jfgkSlrpQ98ZM0eJUHkh6hgJMT3Sh3AtZ8/BkgKrTSRf8Vzdm AMVJVH25SUpXWoEdK18HmjDXqtfuXaRXR2VuUxjUEXWVl41UiF3JOLKBjl1j8aU/OGB97g6KgAb D5OxHmU6WTwDgeaGVbEXMyKW0nzN/AE8w6tXT5/SrTQi7yquGgt8elxDm2jG8/kntH18= X-Received: by 2002:a05:6402:50ce:b0:435:a2bf:e44d with SMTP id h14-20020a05640250ce00b00435a2bfe44dmr16119033edb.386.1656059261424; Fri, 24 Jun 2022 01:27:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uQYMWNdtMb5kTPVFIttX+Qp7q7ZInWM6Fp3LQquaPKohTOJhRxbhXY6vbd4Unoc5dN5orfRw== X-Received: by 2002:a05:6402:50ce:b0:435:a2bf:e44d with SMTP id h14-20020a05640250ce00b00435a2bfe44dmr16119016edb.386.1656059261147; Fri, 24 Jun 2022 01:27:41 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id r1-20020a17090638c100b007219c20dcd8sm696021ejd.196.2022.06.24.01.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth Subject: [PULL 04/14] configure, pc-bios/s390-ccw: pass cross CFLAGS correctly Date: Fri, 24 Jun 2022 10:27:20 +0200 Message-Id: <20220624082730.246924-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" QEMU_CFLAGS is not available in pc-bios/s390-ccw/netboot.mak, but the Makefile needs to access the flags passed to the configure script for the s390x cross compiler. Fix everything and rename QEMU_CFLAGS to EXTRA_CFLAGS for consistency with tests/tcg. Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 1 + pc-bios/s390-ccw/Makefile | 20 ++++++++++---------- pc-bios/s390-ccw/netboot.mak | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 3d00b361d7..bf9282e2a1 100755 --- a/configure +++ b/configure @@ -2290,6 +2290,7 @@ if test -n "$target_cc" && test "$softmmu" = yes; then config_mak=pc-bios/s390-ccw/config-host.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak + echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak # SLOF is required for building the s390-ccw firmware on s390x, # since it is using the libnet code from SLOF for network booting. diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 6eb713bf37..26ad40f94e 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -18,11 +18,11 @@ $(call set-vpath, $(SRC_PATH)) QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d %.o: %.c - $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ + $(call quiet-command,$(CC) $(EXTRA_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ -c -o $@ $<,"CC","$(TARGET_DIR)$@") %.o: %.S - $(call quiet-command,$(CCAS) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ + $(call quiet-command,$(CCAS) $(EXTRA_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ -c -o $@ $<,"CCAS","$(TARGET_DIR)$@") .PHONY : all clean build-all @@ -30,14 +30,14 @@ QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d 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 := -Wall $(filter -W%, $(QEMU_CFLAGS)) -QEMU_CFLAGS += $(call cc-option,-Werror $(QEMU_CFLAGS),-Wno-stringop-overflow) -QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -fno-common -fPIE -QEMU_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) -QEMU_CFLAGS += -msoft-float -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS),-march=z900,-march=z10) -QEMU_CFLAGS += -std=gnu99 +EXTRA_CFLAGS := $(EXTRA_CFLAGS) -Wall +EXTRA_CFLAGS += $(call cc-option,-Werror $(EXTRA_CFLAGS),-Wno-stringop-overflow) +EXTRA_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -fno-common -fPIE +EXTRA_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables +EXTRA_CFLAGS += $(call cc-option, $(EXTRA_CFLAGS), -fno-stack-protector) +EXTRA_CFLAGS += -msoft-float +EXTRA_CFLAGS += $(call cc-option, $(EXTRA_CFLAGS),-march=z900,-march=z10) +EXTRA_CFLAGS += -std=gnu99 LDFLAGS += -Wl,-pie -nostdlib build-all: s390-ccw.img s390-netboot.img diff --git a/pc-bios/s390-ccw/netboot.mak b/pc-bios/s390-ccw/netboot.mak index 1a06befa4b..ee59a5f4de 100644 --- a/pc-bios/s390-ccw/netboot.mak +++ b/pc-bios/s390-ccw/netboot.mak @@ -8,7 +8,7 @@ LIBNET_INC := -I$(SLOF_DIR)/lib/libnet NETLDFLAGS := $(LDFLAGS) -Wl,-Ttext=0x7800000 -$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC) +$(NETOBJS): EXTRA_CFLAGS += $(LIBC_INC) $(LIBNET_INC) s390-netboot.elf: $(NETOBJS) libnet.a libc.a $(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@") @@ -18,7 +18,7 @@ s390-netboot.img: s390-netboot.elf # libc files: -LIBC_CFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ +LIBC_CFLAGS = $(EXTRA_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ -MMD -MP -MT $@ -MF $(@:%.o=%.d) CTYPE_OBJS = isdigit.o isxdigit.o toupper.o @@ -52,7 +52,7 @@ libc.a: $(LIBCOBJS) 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) \ +LIBNETCFLAGS = $(EXTRA_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ -DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d) %.o : $(SLOF_DIR)/lib/libnet/%.c From patchwork Fri Jun 24 08:27:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894175 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9E996C433EF for ; Fri, 24 Jun 2022 08:36:50 +0000 (UTC) Received: from localhost ([::1]:54434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4eo5-0001Rd-Lo for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:36:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efO-00060p-HW for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:28665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efM-0005Tf-5Z for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059267; 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=fdKREiWGlc9GRmtH2zZG1YUUIf3U3o7uZP/DuGpn4k0=; b=P/ia0jDT/xhjKXg4FZdU02wY8fsHq6G9hqRfDhV9ZRAuVcnk6uN89UyOZm1q9TY7Gf750f eYnsFZJ+Mmf4S2j7YPiN9RzXnY39nQCnfCxZl30xDZ0+ZGLcgUVqB7jzl2qafWVKdXvAH9 OZZVGPgabSqn92qHSQ1FuzY6O+zK64k= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-221-0LjA2anTP5eZWHQ5JrRd4g-1; Fri, 24 Jun 2022 04:27:44 -0400 X-MC-Unique: 0LjA2anTP5eZWHQ5JrRd4g-1 Received: by mail-ej1-f70.google.com with SMTP id q5-20020a17090676c500b00704ffb95131so581186ejn.8 for ; Fri, 24 Jun 2022 01:27:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fdKREiWGlc9GRmtH2zZG1YUUIf3U3o7uZP/DuGpn4k0=; b=RJ1FZbROkhxF21yTBl4TOyIfio5YzssToCaKkgj2W4Ro5JTU2aAKnppJED+SCAga+F BA8lSZuvFf05vLRAi0liSgjwZKGrSgyFSApH78WK+u4FN3hM+CYyUS+pajbapG1Wh/sp pYjKhl0qzShZWYiCdffWmDPw0an1uI9doobG8wPMglcHF5CRs4+WiKQdp2kvyHYHgSmQ /viMxM+KoX++nz0CN24cWy1OD0LGZEChbwRBSD/hcPkGu0BZ1SoZyw5RVJiNgYuamHb4 KhlCMeQuzjJ+1E/ngVrQYBUgNjZaMwHYuZjMaXfBkIU3dGy1aAb0/mHtDnQVIBloVbo6 4ANA== X-Gm-Message-State: AJIora+ZS73DcViuI91tc6Da6Meqir1iUOJmC+cwb4N55RRrcZ07mSPo JWB9ZXBsIKHY4/4avvj6J90/SfiQDV7yAj/kRXnNvs+PYnpbyxSDylUMsc1Me33O+hPj+farqui 4WL9I4FlYC8sUuOqIpyy4Cdxj/u8uWLB2O5t+63aGhotcOgZFnNyJYdj1U5L/3Glt3GY= X-Received: by 2002:a17:906:4795:b0:722:f42b:18b8 with SMTP id cw21-20020a170906479500b00722f42b18b8mr11169845ejc.34.1656059263087; Fri, 24 Jun 2022 01:27:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7qwVfDXqiFBwqThOatp5KNMISoVADU4clM2DJ1WMfCKzJLi2A+ClxC8JlSmLcwcDmge2tkA== X-Received: by 2002:a17:906:4795:b0:722:f42b:18b8 with SMTP id cw21-20020a170906479500b00722f42b18b8mr11169824ejc.34.1656059262824; Fri, 24 Jun 2022 01:27:42 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id p19-20020aa7cc93000000b0042bdb6a3602sm1396429edt.69.2022.06.24.01.27.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 05/14] configure, pc-bios/vof: pass cross CFLAGS correctly Date: Fri, 24 Jun 2022 10:27:21 +0200 Message-Id: <20220624082730.246924-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" Use the flags passed to the configure script for the ppc cross compiler, which in fact default to those that are needed to get the 32-bit ISA. Add the endianness flag so that it remains possible to use a ppc64le compiler to compile VOF. Signed-off-by: Paolo Bonzini --- configure | 13 ++++--------- pc-bios/vof/Makefile | 8 +++----- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/configure b/configure index bf9282e2a1..8f3401a23e 100755 --- a/configure +++ b/configure @@ -1858,7 +1858,7 @@ fi : ${cross_cc_hexagon="hexagon-unknown-linux-musl-clang"} : ${cross_cc_cflags_hexagon="-mv67 -O2 -static"} : ${cross_cc_cflags_i386="-m32"} -: ${cross_cc_cflags_ppc="-m32"} +: ${cross_cc_cflags_ppc="-m32 -mbig-endian"} : ${cross_cc_cflags_ppc64="-m64 -mbig-endian"} : ${cross_cc_ppc64le="$cross_cc_ppc64"} : ${cross_cc_cflags_ppc64le="-m64 -mlittle-endian"} @@ -2059,6 +2059,7 @@ probe_target_compiler() { compute_target_variable $1 target_strip strip case "$1:$cpu" in i386:x86_64 | \ + ppc*:ppc64 | \ "$cpu:$cpu") : ${target_cc:=$cc} : ${target_ccas:=$ccas} @@ -2084,13 +2085,6 @@ probe_target_compiler() { fi } -probe_target_compilers() { - for i; do - probe_target_compiler $i - test -n "$target_cc" && return 0 - done -} - write_target_makefile() { if test -n "$target_cc"; then echo "CC=$target_cc" @@ -2265,12 +2259,13 @@ if test -n "$target_cc" && fi fi -probe_target_compilers ppc ppc64 +probe_target_compiler ppc if test -n "$target_cc" && test "$softmmu" = yes; then roms="$roms pc-bios/vof" config_mak=pc-bios/vof/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak + echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak fi diff --git a/pc-bios/vof/Makefile b/pc-bios/vof/Makefile index 391ac0d600..8809c82768 100644 --- a/pc-bios/vof/Makefile +++ b/pc-bios/vof/Makefile @@ -2,15 +2,13 @@ include config.mak VPATH=$(SRC_DIR) all: vof.bin -CC ?= $(CROSS)gcc -LD ?= $(CROSS)ld -OBJCOPY ?= $(CROSS)objcopy +EXTRA_CFLAGS += -mcpu=power4 %.o: %.S - $(CC) -m32 -mbig-endian -mcpu=power4 -c -o $@ $< + $(CC) $(EXTRA_CFLAGS) -c -o $@ $< %.o: %.c - $(CC) -m32 -mbig-endian -mcpu=power4 -c -fno-stack-protector -o $@ $< + $(CC) $(EXTRA_CFLAGS) -c -fno-stack-protector -o $@ $< vof.elf: entry.o main.o ci.o bootmem.o libc.o $(LD) -nostdlib -e_start -T$(SRC_DIR)/vof.lds -EB -o $@ $^ From patchwork Fri Jun 24 08:27:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894176 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 99DD7C43334 for ; Fri, 24 Jun 2022 08:37:35 +0000 (UTC) Received: from localhost ([::1]:56804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4eoo-00035C-LN for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:37:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efh-0006ZU-Ij for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4eff-0005X2-1I for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059286; 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=vdqmLvR6JN932wcQnmiu8+mPHY+md+mV37njXiUqS3g=; b=YdQ8SVqP4lUcU5VWTO6u9H4nUOxWVK8f6sozkKK9igDSejLVskY/e9nmQ0LxdysuJXczDf Nxt1MQoJBqqOHvZgEa8ZE49atSRpEhrcpWUyvF8BNArug5hW6M20K1azJyKJND6U1hh+yt yMq3n1zjTyoskiLZf1r88wPEPCyi/do= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-480-u65Uel5FMZ-U8Ol0hu4Veg-1; Fri, 24 Jun 2022 04:27:46 -0400 X-MC-Unique: u65Uel5FMZ-U8Ol0hu4Veg-1 Received: by mail-ej1-f70.google.com with SMTP id nb10-20020a1709071c8a00b006e8f89863ceso568194ejc.18 for ; Fri, 24 Jun 2022 01:27:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vdqmLvR6JN932wcQnmiu8+mPHY+md+mV37njXiUqS3g=; b=QgOXFD5D5zeszLPKdGRXxnSN9A4rH1QpzyC0m3ugcl18H6qQy+LWTlgmfMA3F54PNT Xog26l2DATNw0NVgM8GrubEIalr8esp3JA+f1QI1iasdcD62B7stEikfuEWE+a8/rJ1X qx/EG0J5HD68o+REUWTq7excQ5SII3gJ0WBrA3ZZt9qGcdvPWJyrLx1lCuYYfMH7Wb0z Ct9l2UxLZ/DKsVYvcBP4cMwp8aJqUoqmroBh9vRdZLOsx4qd5miLafMr131TRBnSqIz2 M1oRq76JP2Jx9O0rQ/MStEhe0rV24Ur6siG8XK7dztrIV+Dj7D54RMHuF7Dpq1+s618i 6UUg== X-Gm-Message-State: AJIora/WBqYHyTseF8tpZtoTgAmVEl2EXS4TZdZ9SLVAwxpE6Escf0wA oPl8AqyGht31Vne/CvR9+XLvJ71/2nCArnOaD+2Xbf6hOox8VlOqyZ3U5mOmcGGZHbxa9m97De1 LFkHJ+jZ9GC54EQZbvd/rV+r4VIhTTKYQqXy/awABIYIhqEnkdYU2EWSZADiNINypFXQ= X-Received: by 2002:a17:907:2d8a:b0:722:e35b:695 with SMTP id gt10-20020a1709072d8a00b00722e35b0695mr12262442ejc.470.1656059264742; Fri, 24 Jun 2022 01:27:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vXYXpHp1iAN7263xRh34TwTKUvih2wPBY4TikT1T7PAHvO7PFV059zFSA9uEUXzQPhg5/Z2A== X-Received: by 2002:a17:907:2d8a:b0:722:e35b:695 with SMTP id gt10-20020a1709072d8a00b00722e35b0695mr12262413ejc.470.1656059264331; Fri, 24 Jun 2022 01:27:44 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id g20-20020a170906521400b00722f48d1f19sm715121ejm.67.2022.06.24.01.27.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 06/14] configure: allow more host/target combos to use the host compiler Date: Fri, 24 Jun 2022 10:27:22 +0200 Message-Id: <20220624082730.246924-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" Add more pairs of bi-arch compilers, so that it is not necessary to have e.g. both little-endian and big-endian ARM compilers. Signed-off-by: Paolo Bonzini --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 8f3401a23e..c9feb1a924 100755 --- a/configure +++ b/configure @@ -2058,8 +2058,12 @@ probe_target_compiler() { compute_target_variable $1 target_ranlib ranlib compute_target_variable $1 target_strip strip case "$1:$cpu" in + aarch64_be:aarch64 | \ + armeb:arm | \ i386:x86_64 | \ + mips*:mips64 | \ ppc*:ppc64 | \ + sparc:sparc64 | \ "$cpu:$cpu") : ${target_cc:=$cc} : ${target_ccas:=$ccas} From patchwork Fri Jun 24 08:27:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 94DE7C43334 for ; Fri, 24 Jun 2022 08:38:27 +0000 (UTC) Received: from localhost ([::1]:58368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4epe-00046Z-FS for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:38:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efP-00060q-DL for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:59579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efN-0005To-T0 for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:27:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059269; 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=OmKEKXz1WMCXAE3ifCH3/oBkIMjVzlAEXgVpEHl337o=; b=KG9nj5TTxEOw4ta5JgRwaSbz1y33CvbjCNnph6vOQm9uSQAy6CROIg3tGOML5C3Z4JkvnX qO+o96ojQ99Rw50nI6CYpSABzWRR8m9GOBWWy/5Olx8M9sffzglTei+STCvOpT+CFFnKhR ZuyqA+PHWUxMALorG7niZ73M+Iswr+k= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-621-r4m-nkHQNqioxzL1aibp2w-1; Fri, 24 Jun 2022 04:27:47 -0400 X-MC-Unique: r4m-nkHQNqioxzL1aibp2w-1 Received: by mail-ed1-f70.google.com with SMTP id t14-20020a056402524e00b0043595a18b91so1355411edd.13 for ; Fri, 24 Jun 2022 01:27:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OmKEKXz1WMCXAE3ifCH3/oBkIMjVzlAEXgVpEHl337o=; b=nTqONWrCNqgeQCTIucBfbdHl+74pw6EK7fAEg9UAYQ0Dl7Du+IAjeR91RITV0Ufk0M GloT+eCxS2847Vi5XJ4hLnXoXTzsxAFozNyIYpOLx2A42iSnXyLfLO/7s/degq1SrpW2 GfxcSCzHAz9LEqG1NhGAxEJTPcjFCD5IoQzUiGZlfenHuFztjxhZupBA2uTiQh+8ye8l ZKY6oyyPVI5aGuWMCo9yPTysQ829K0P1hajaRnLqy4+QGeioOr7sdz8dW41TQT7pH0mY l2qcu48u1rRb94cCR55/vdTqczD665WSk7kiD8/zso84h1n2ma0vMLwY70PH8Hej5/2o c3gQ== X-Gm-Message-State: AJIora++lp9Kvr2a2yUsAoWHqFIwIHUjSNkVYvyY+5g5sGGLvn6bqpNl 5SW0OPIaLlrO38W+unnKc3jRYDI/az0/PsDgf+s56d1kAjN7+DRwRuNQnFC0dBY2/OVFSkppbvC g0F3gy0uIY+9oXEvbBfDEhpWk7GtXPjPQ6FHeMZbzidY6zQXbW0OX0oH/4+kCUT67jmM= X-Received: by 2002:a05:6402:d0a:b0:421:10e6:2ecc with SMTP id eb10-20020a0564020d0a00b0042110e62eccmr16000340edb.329.1656059266331; Fri, 24 Jun 2022 01:27:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vY5zcPEkE/xkuFOMhMlCAeBxysK+ZoSWoswbeUwvHVrMlV9m856gRvWoRWfQtBtsOswIz2tQ== X-Received: by 2002:a05:6402:d0a:b0:421:10e6:2ecc with SMTP id eb10-20020a0564020d0a00b0042110e62eccmr16000322edb.329.1656059266073; Fri, 24 Jun 2022 01:27:46 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id k13-20020a170906a38d00b006fed787478asm722921ejz.92.2022.06.24.01.27.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 07/14] configure: write EXTRA_CFLAGS for all sub-Makefiles Date: Fri, 24 Jun 2022 10:27:23 +0200 Message-Id: <20220624082730.246924-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configure b/configure index c9feb1a924..0fd2838e82 100755 --- a/configure +++ b/configure @@ -2090,6 +2090,7 @@ probe_target_compiler() { } write_target_makefile() { + echo "EXTRA_CFLAGS=$target_cflags" if test -n "$target_cc"; then echo "CC=$target_cc" echo "CCAS=$target_ccas" @@ -2118,6 +2119,7 @@ write_target_makefile() { } write_container_target_makefile() { + echo "EXTRA_CFLAGS=$target_cflags" if test -n "$container_cross_cc"; then echo "CC=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --" echo "CCAS=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --" @@ -2258,7 +2260,6 @@ if test -n "$target_cc" && echo "# Automatically generated by configure - do not modify" > $config_mak echo "TOPSRC_DIR=$source_path" >> $config_mak echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_mak - echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak fi fi @@ -2269,7 +2270,6 @@ if test -n "$target_cc" && test "$softmmu" = yes; then config_mak=pc-bios/vof/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak - echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak fi @@ -2289,7 +2289,6 @@ if test -n "$target_cc" && test "$softmmu" = yes; then config_mak=pc-bios/s390-ccw/config-host.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak - echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak # SLOF is required for building the s390-ccw firmware on s390x, # since it is using the libnet code from SLOF for network booting. @@ -2604,7 +2603,6 @@ for target in $target_list; do if test $got_cross_cc = yes; then mkdir -p tests/tcg/$target echo "QEMU=$PWD/$qemu" >> $config_target_mak - echo "EXTRA_CFLAGS=$target_cflags" >> $config_target_mak echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile tcg_tests_targets="$tcg_tests_targets $target" fi From patchwork Fri Jun 24 08:27:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894196 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E5B30C43334 for ; Fri, 24 Jun 2022 08:50:15 +0000 (UTC) Received: from localhost ([::1]:49856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4f14-0001bC-Sf for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:50:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4eff-0006Sr-Hy for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:55362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efQ-0005U6-G4 for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059271; 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=HOJOnSmKg2WSy30NZDwJenV9RNS5JdblfeNNvCQXTJ0=; b=NZlKXGwawNAaIGZxA8fM6mdTHzSymjTHx6Y76oI5Pg1NKV6zhNvpGMatNXUPYNz07lRj4w jEuuX2vBb43fpwmXdabbm4hZ5KKmNxUsDDVGGLsDIZ8U1kJm0axB7Ggdufkq2J2dcIyp3A IFnkUyVf5ZjtS/t+dIjNdXswCZBdlBg= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-661-keqfQgkXPKaGvz8zm1VgHw-1; Fri, 24 Jun 2022 04:27:49 -0400 X-MC-Unique: keqfQgkXPKaGvz8zm1VgHw-1 Received: by mail-ed1-f71.google.com with SMTP id n8-20020a05640205c800b00434fb0c150cso1333412edx.19 for ; Fri, 24 Jun 2022 01:27:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HOJOnSmKg2WSy30NZDwJenV9RNS5JdblfeNNvCQXTJ0=; b=nOWvc0i7mWH4znm7zXYWOLAQzOnBAOQpoguZvt11yn3GIepxWyEvpm46fWDcA09eY1 TSaIWOzzbp4niGPaybb3E1ENXjmQuh1Lb+IZH0qtgkDeENi6sPhOwKGtzwMVWZ4gKcSS CdocShVzTZzxO5XIb24YZ1lZ+S2FraCfPKDRgDMqSyiOAsejrpAoXmDP+lVvzMOw0K2Z iKSm8soUKKVOPNcR9iyvB0bmNW3K1/bPK49PVUCwh+apQq+OEh8VJ4jOzmL/yoPtd0D7 lV9LIweaeHYkSN+hJKI6mFNzdiPcaTARtNQ990EOBGZf5ZUKGbv9AHwSNCdb2xoCaU76 V56Q== X-Gm-Message-State: AJIora/M8nLptcZc7yCLjt7sdHWQr5UnBZymvgU7OdkVCisZGSGOte2z dSqALIx4d+T66hytGNIYQovg0/7aqZP4o9PWmk5Ji4UTA1a+h8YFMK1Hs31DbhWOYVdGebmgMqd hc9IA5zLo1Ayjug3xXme/z2qrk+P0qCV7+eaK+N6cYHWRz1li591OX3L6lIE4PmqPX1U= X-Received: by 2002:a17:907:3e82:b0:6ff:1e04:a365 with SMTP id hs2-20020a1709073e8200b006ff1e04a365mr12170256ejc.617.1656059268229; Fri, 24 Jun 2022 01:27:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sbtUOG6Q0gzsUyp4wVUFegH9TuVKdpGDZ7IszdKV32JQ6iyFoiPM2Hh1gs6iZCn4fWJYVbGQ== X-Received: by 2002:a17:907:3e82:b0:6ff:1e04:a365 with SMTP id hs2-20020a1709073e8200b006ff1e04a365mr12170240ejc.617.1656059267912; Fri, 24 Jun 2022 01:27:47 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id o19-20020a17090611d300b007109b15c109sm720874eja.66.2022.06.24.01.27.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 08/14] tests/tcg: compile system emulation tests as freestanding Date: Fri, 24 Jun 2022 10:27:24 +0200 Message-Id: <20220624082730.246924-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" System emulation tests do not run in a hosted environment, since they do not link with libc. They should only use freestanding headers (float.h, limits.h, stdarg.h, stddef.h, stdbool.h, stdint.h, stdalign.h, stdnoreturn.h) and should be compiled with -ffreestanding in order to use the compiler implementation of those headers rather than the one in libc. Some tests are using inttypes.h instead of stdint.h, so fix that. Signed-off-by: Paolo Bonzini --- tests/tcg/Makefile.target | 1 + tests/tcg/aarch64/system/pauth-3.c | 2 +- tests/tcg/aarch64/system/semiconsole.c | 2 +- tests/tcg/aarch64/system/semiheap.c | 2 +- tests/tcg/multiarch/system/memory.c | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index f427a0304e..e68830af15 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -111,6 +111,7 @@ else # For softmmu targets we include a different Makefile fragement as the # build options for bare programs are usually pretty different. They # are expected to provide their own build recipes. +EXTRA_CFLAGS += -ffreestanding -include $(SRC_PATH)/tests/tcg/minilib/Makefile.target -include $(SRC_PATH)/tests/tcg/multiarch/system/Makefile.softmmu-target -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target diff --git a/tests/tcg/aarch64/system/pauth-3.c b/tests/tcg/aarch64/system/pauth-3.c index 42eff4d5ea..77a467277b 100644 --- a/tests/tcg/aarch64/system/pauth-3.c +++ b/tests/tcg/aarch64/system/pauth-3.c @@ -1,4 +1,4 @@ -#include +#include #include int main() diff --git a/tests/tcg/aarch64/system/semiconsole.c b/tests/tcg/aarch64/system/semiconsole.c index bfe7c9e26b..81324c639f 100644 --- a/tests/tcg/aarch64/system/semiconsole.c +++ b/tests/tcg/aarch64/system/semiconsole.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#include +#include #include #define SYS_READC 0x7 diff --git a/tests/tcg/aarch64/system/semiheap.c b/tests/tcg/aarch64/system/semiheap.c index 4ed258476d..a254bd8982 100644 --- a/tests/tcg/aarch64/system/semiheap.c +++ b/tests/tcg/aarch64/system/semiheap.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#include +#include #include #include diff --git a/tests/tcg/multiarch/system/memory.c b/tests/tcg/multiarch/system/memory.c index 41c7f66e2e..214f7d4f54 100644 --- a/tests/tcg/multiarch/system/memory.c +++ b/tests/tcg/multiarch/system/memory.c @@ -12,7 +12,7 @@ * - sign extension when loading */ -#include +#include #include #include From patchwork Fri Jun 24 08:27:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E2D67C433EF for ; Fri, 24 Jun 2022 08:34:19 +0000 (UTC) Received: from localhost ([::1]:48468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4ele-0005dd-U4 for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:34:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efY-0006Lc-Nu for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:39427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efT-0005UQ-FV for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059274; 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=XXfqePbcil937leefrTmnCxW5bgJKZTQLKsMsHClHYY=; b=aDsLT+M/o4YrpgpV8bVFFnrM0gw/hgBBfIl7tegqCW40MuMLBzztiDQ7cO0xomO9Lo6XVM ELo4xiG03upXqh53L1KOI8vtiKx6uAf19ZW9VLTkEIJ+8m6P6n88Oouyx3C1Oe+suBJxlS nDY99RbHI7CVuxQjhVOLo6uQFeag06o= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-627-kyridhu_OveljPpo70XpMw-1; Fri, 24 Jun 2022 04:27:51 -0400 X-MC-Unique: kyridhu_OveljPpo70XpMw-1 Received: by mail-ed1-f70.google.com with SMTP id m8-20020a056402430800b00435cfa7c6d1so1364571edc.9 for ; Fri, 24 Jun 2022 01:27:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XXfqePbcil937leefrTmnCxW5bgJKZTQLKsMsHClHYY=; b=cqT168CSdwNykZr/lStjiNPJktQsLO/foTnRZK8lzDDY8r3iiQbvTJ1RD9+mZL8F8+ ZnMaWvTS2hgz3ZTYN/5BjAmm9reOEyNFcp+tfxE4RfkrnzklJKqWiXeMhXFp3B5/ET5r oMddJ3TpnSi8QWitAJ505n5ugPhZvQtVa53EEQ3HzUGCCqiMaB479OhqvKp8g7oDwdr8 n/m4PsNYuCMu0GsI5x0GXCpLi2k85iSLimXDp/Sf40oba11KeI8jOb2lzOJbRGXYAMQ+ esydUyaPW6KDAJk6Lrqh06xCB7WB+kQqxjmY9j1zJKJIjIih/32u0Q+E9J5TESyadyVm I7ug== X-Gm-Message-State: AJIora9Nfz45oKLQVGvs89TCif1khJJk4fB72cYaE3B0g4N7Aky/BbOF 252ZmSpi17+iDoVjBUEBjBcIPosAtzxghxOQvhDNlmwEG6MLwDx0zyJ11R+3hPgKpVWm2Za8qNC 0T4xtVgOeHu5Wk58wZ1bPlwR2ryxSZ+YRMSIVszm/ybkYd7tkt6UXLGwyxoYgs+nmjS4= X-Received: by 2002:a17:906:7742:b0:708:ad9f:8e88 with SMTP id o2-20020a170906774200b00708ad9f8e88mr11765026ejn.735.1656059270364; Fri, 24 Jun 2022 01:27:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uFatitEafqjCmIUtLAy7eHPWkju5FwqGyD6u8qN7mh8O/VF9UG2jZA7RhRapZH+48fY12gTQ== X-Received: by 2002:a17:906:7742:b0:708:ad9f:8e88 with SMTP id o2-20020a170906774200b00708ad9f8e88mr11765001ejn.735.1656059269964; Fri, 24 Jun 2022 01:27:49 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id g20-20020a50d5d4000000b0042617ba63c2sm1421355edj.76.2022.06.24.01.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Matheus Kowalczuk Ferst Subject: [PULL 09/14] build: try both native and cross compilers for linux-user tests Date: Fri, 24 Jun 2022 10:27:25 +0200 Message-Id: <20220624082730.246924-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" Configure is trying to fall back on cross compilers for targets that can have bi-arch or bi-endian toolchains, but there are many corner cases where just checking the name can go wrong. For example, the RHEL ppc64le compiler is bi-arch and bi-endian, but multilibs are disabled. Therefore it cannot be used to build 32-bit hosted binaries like the linux-user TCG tests. Trying the cross compiler first also does not work, and an example for this is also ppc64le. The powerpc64-linux-gnu-gcc binary from the cross-gcc package is theoretically multilib-friendly, but it cannot find the CRT files on a ppc64le host, because they are not in the .../le multilib subdirectory. This can be fixed by testing both the native compiler and the cross compiler, and proceeding with the first one that works. To do this, move the compiler usability check from the tests/tcg snippet to inside probe_target_compiler and, while at it, restrict it to just the user-mode emulation tests; if a compiler is not able to build nostdlib freestanding binaries the installation is broken. Tested-by: Matheus Kowalczuk Ferst Signed-off-by: Paolo Bonzini --- configure | 166 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 100 insertions(+), 66 deletions(-) diff --git a/configure b/configure index 0fd2838e82..e719afb80b 100755 --- a/configure +++ b/configure @@ -1868,6 +1868,7 @@ fi : ${cross_cc_cflags_x86_64="-m64"} compute_target_variable() { + eval "$2=" if eval test -n "\"\${cross_prefix_$1}\""; then if eval has "\"\${cross_prefix_$1}\$3\""; then eval "$2=\"\${cross_prefix_$1}\$3\"" @@ -1875,8 +1876,21 @@ compute_target_variable() { fi } +# probe_target_compiler TARGET TEST-PROGRAM +# +# Look for a compiler for the given target, either native or cross. +# Set variables target_* if a compiler is found, and container_cross_* +# if a Docker-based cross-compiler image is known for the target. +# Set got_cross_cc to yes/no depending on whether a non-container-based +# compiler was found. +# +# If TEST-PROGRAM is present, use it to test the usability of the +# compiler, and also set build_static to "y" if static linking is +# possible. +# probe_target_compiler() { # reset all output variables + got_cross_cc=no container_image= container_hosts= container_cross_cc= @@ -1887,14 +1901,6 @@ probe_target_compiler() { container_cross_objcopy= container_cross_ranlib= container_cross_strip= - target_cc= - target_ar= - target_as= - target_ld= - target_nm= - target_objcopy= - target_ranlib= - target_strip= case $1 in aarch64) container_hosts="x86_64 aarch64" ;; @@ -2041,22 +2047,8 @@ probe_target_compiler() { : ${container_cross_strip:=${container_cross_prefix}strip} done - eval "target_cflags=\${cross_cc_cflags_$1}" - if eval test -n "\"\${cross_cc_$1}\""; then - if eval has "\"\${cross_cc_$1}\""; then - eval "target_cc=\"\${cross_cc_$1}\"" - fi - else - compute_target_variable $1 target_cc gcc - fi - target_ccas=$target_cc - compute_target_variable $1 target_ar ar - compute_target_variable $1 target_as as - compute_target_variable $1 target_ld ld - compute_target_variable $1 target_nm nm - compute_target_variable $1 target_objcopy objcopy - compute_target_variable $1 target_ranlib ranlib - compute_target_variable $1 target_strip strip + local t try + try=cross case "$1:$cpu" in aarch64_be:aarch64 | \ armeb:arm | \ @@ -2065,27 +2057,89 @@ probe_target_compiler() { ppc*:ppc64 | \ sparc:sparc64 | \ "$cpu:$cpu") - : ${target_cc:=$cc} - : ${target_ccas:=$ccas} - : ${target_as:=$as} - : ${target_ld:=$ld} - : ${target_ar:=$ar} - : ${target_as:=$as} - : ${target_ld:=$ld} - : ${target_nm:=$nm} - : ${target_objcopy:=$objcopy} - : ${target_ranlib:=$ranlib} - : ${target_strip:=$strip} - ;; + try='native cross' ;; esac - if test -n "$target_cc"; then - case $1 in - i386|x86_64) - if $target_cc --version | grep -qi "clang"; then - unset target_cc + eval "target_cflags=\${cross_cc_cflags_$1}" + for t in $try; do + case $t in + native) + target_cc=$cc + target_ccas=$ccas + target_ar=$ar + target_as=$as + target_ld=$ld + target_nm=$nm + target_objcopy=$objcopy + target_ranlib=$ranlib + target_strip=$strip + ;; + cross) + target_cc= + if eval test -n "\"\${cross_cc_$1}\""; then + if eval has "\"\${cross_cc_$1}\""; then + eval "target_cc=\"\${cross_cc_$1}\"" fi - ;; + else + compute_target_variable $1 target_cc gcc + fi + target_ccas=$target_cc + compute_target_variable $1 target_ar ar + compute_target_variable $1 target_as as + compute_target_variable $1 target_ld ld + compute_target_variable $1 target_nm nm + compute_target_variable $1 target_objcopy objcopy + compute_target_variable $1 target_ranlib ranlib + compute_target_variable $1 target_strip strip + ;; esac + + if test -n "$target_cc"; then + case $1 in + i386|x86_64) + if $target_cc --version | grep -qi "clang"; then + continue + fi + ;; + esac + elif test -n "$target_as" && test -n "$target_ld"; then + # Special handling for assembler only targets + case $target in + tricore-softmmu) + build_static= + got_cross_cc=yes + break + ;; + *) + continue + ;; + esac + else + continue + fi + + if test $# = 2 && do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC -static ; then + build_static=y + got_cross_cc=yes + break + fi + if test $# = 1 || do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC ; then + build_static= + got_cross_cc=yes + break + fi + done + if test $got_cross_cc != yes; then + build_static= + target_cc= + target_ccas= + target_cflags= + target_ar= + target_as= + target_ld= + target_nm= + target_objcopy= + target_ranlib= + target_strip= fi } @@ -2488,9 +2542,10 @@ tcg_tests_targets= for target in $target_list; do arch=${target%%-*} - probe_target_compiler ${arch} config_target_mak=tests/tcg/config-$target.mak + write_c_skeleton + echo "# Automatically generated by configure - do not modify" > $config_target_mak echo "TARGET_NAME=$arch" >> $config_target_mak case $target in @@ -2501,35 +2556,14 @@ for target in $target_list; do *-softmmu) test -f $source_path/tests/tcg/$arch/Makefile.softmmu-target || continue qemu="qemu-system-$arch" + probe_target_compiler ${arch} ;; *-linux-user|*-bsd-user) qemu="qemu-$arch" + probe_target_compiler ${arch} $TMPC ;; esac - got_cross_cc=no - unset build_static - - if test -n "$target_cc"; then - write_c_skeleton - if ! do_compiler "$target_cc" $target_cflags \ - -o $TMPE $TMPC -static ; then - # For host systems we might get away with building without -static - if do_compiler "$target_cc" $target_cflags \ - -o $TMPE $TMPC ; then - got_cross_cc=yes - fi - else - got_cross_cc=yes - build_static=y - fi - elif test -n "$target_as" && test -n "$target_ld"; then - # Special handling for assembler only tests - case $target in - tricore-softmmu) got_cross_cc=yes ;; - esac - fi - if test $got_cross_cc = yes; then # Test for compiler features for optional tests. We only do this # for cross compilers because ensuring the docker containers based From patchwork Fri Jun 24 08:27:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D792EC433EF for ; Fri, 24 Jun 2022 08:58:54 +0000 (UTC) Received: from localhost ([::1]:40500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4f9R-0006M2-VD for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:58:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efl-0006ie-KV for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:45063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efT-0005US-JK for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059275; 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=SHEbEFsqUdW8BUVYpCGpPX/zr8CGI3b+oCCQuAT71sg=; b=Kw1OaFCgZBB+C1uRSFsoGMluYFh8g5iqe1RlK4FmGkD9Ojwn2MK93LLAQidFByiJAtcWfo pw1N1G6FpAxw8nB9bGK//UkNZT6eWx9W9zWx/SGWzq7RE4wkFbo/ED+S7GpJzNpZtEuOB6 7lJM+pOvYbGE/icVTwbXpR7ULjjiqx4= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-471-zyCDrB2TOFCQzmSe6dQa8w-1; Fri, 24 Jun 2022 04:27:53 -0400 X-MC-Unique: zyCDrB2TOFCQzmSe6dQa8w-1 Received: by mail-ej1-f70.google.com with SMTP id k7-20020a1709062a4700b006fe92440164so562260eje.23 for ; Fri, 24 Jun 2022 01:27:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SHEbEFsqUdW8BUVYpCGpPX/zr8CGI3b+oCCQuAT71sg=; b=kLN4zqL4rLdAuyifHSysWlt1UgqogkeZ/kbz7BWEFYBq5FK40quw6nIYCpaC/mDGrW dLXRLFyKAs8mXTTIRcLc49hWOI31ERCHnJdc7Q2nDPOXkkPpCYjX1fx1cQtiwDZOGT4G 5L3J/3PdQpbCu58Hi3WED0apW9fUIvvrAngah9RiNmMepbE2LX9G17G7eMtceWjpLJpv RHfgk1d7Tst+agTZsjvDQIHtkt1PtSIzl4t7A1QjCWw7/SF4B04AOgnJrBi/U32PHwly oMIq5WTLWsjsA0Nwlxy7wQkyZlbNxjecOtlJminx0UfM/+jAEA2UFjycWzbAnTGTTwGI QijA== X-Gm-Message-State: AJIora+P1HDHs2iQzZCL9QXoRjlDj0AKXlXysgD1EmxW1Hq23s0xtWIF sVpg9rKUbCn3JPdnXNLl2DB9k5kxsTulKBAkZmvko6t3r+JUQRohYJQ9DTH7lr8T5PzBPP0YRBH 00cBVsAONBTd8RwVQ4vdOdyoY9wkexsukmgJpSZAEDBbbN5+cDhW4qmxwJuGx+ycKD28= X-Received: by 2002:a17:907:d0d:b0:711:d554:1c8f with SMTP id gn13-20020a1709070d0d00b00711d5541c8fmr12212671ejc.223.1656059272119; Fri, 24 Jun 2022 01:27:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1va9mow4twwJq0RPCeO5mCdLJAzcFnF6xtT8xGMPdKX6oXZmK//eA4pKkjMrf0Nf1y17CXAvA== X-Received: by 2002:a17:907:d0d:b0:711:d554:1c8f with SMTP id gn13-20020a1709070d0d00b00711d5541c8fmr12212655ejc.223.1656059271823; Fri, 24 Jun 2022 01:27:51 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id m14-20020aa7c2ce000000b0042dc9aafbfbsm1413755edp.39.2022.06.24.01.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Alexander Bulekov Subject: [PULL 10/14] build: improve -fsanitize-coverage-allowlist check Date: Fri, 24 Jun 2022 10:27:26 +0200 Message-Id: <20220624082730.246924-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" From: Alexander Bulekov The sancov filter check still fails when unused arguments are treated as errors. To work around that, add a SanitizerCoverage flag to the build-check. Fixes: aa4f3a3b88 ("build: fix check for -fsanitize-coverage-allowlist") Signed-off-by: Alexander Bulekov Message-Id: <20220621204507.698711-1-alxndr@bu.edu> Signed-off-by: Paolo Bonzini --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 9efcb175d1..1b255f91ef 100644 --- a/meson.build +++ b/meson.build @@ -212,7 +212,8 @@ if get_option('fuzzing') if cc.compiles('int main () { return 0; }', name: '-fsanitize-coverage-allowlist=/dev/null', - args: ['-fsanitize-coverage-allowlist=/dev/null'] ) + args: ['-fsanitize-coverage-allowlist=/dev/null', + '-fsanitize-coverage=trace-pc'] ) add_global_arguments('-fsanitize-coverage-allowlist=instrumentation-filter', native: false, language: ['c', 'cpp', 'objc']) endif From patchwork Fri Jun 24 08:27:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894186 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 18814C43334 for ; Fri, 24 Jun 2022 08:40:55 +0000 (UTC) Received: from localhost ([::1]:34808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4es2-0007YA-5g for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:40:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efY-0006Lf-Pk for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efW-0005Vq-O3 for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059278; 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=rKRIRkfS5iDFDtYG1yCN2RIcM7QWhd9MCUeeaDQfRyQ=; b=Pe4+ZDpxUhdxNK1DRFlE4VJSnTOctVKPfR3Su4qJaeBoyZab+evJlC2blN+m0ncU2bcJyq WYMOiYcOkYmRX7sf04OmSgEFJDyxUZizicBMG8zQUZkSRSNwuuWukgYv/MOmeA9K718vMn /4fsU1Fg+MF1SW4k07roZt2DPaiGchs= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-674-8ekuZRvDNxuPb14Z_fihrw-1; Fri, 24 Jun 2022 04:27:55 -0400 X-MC-Unique: 8ekuZRvDNxuPb14Z_fihrw-1 Received: by mail-ej1-f72.google.com with SMTP id p7-20020a170906614700b006f87f866117so565081ejl.21 for ; Fri, 24 Jun 2022 01:27:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rKRIRkfS5iDFDtYG1yCN2RIcM7QWhd9MCUeeaDQfRyQ=; b=o+NTFkdSm9ybtHvvQ7eREbVQvfkHXlCkRb0zt5pYxOjo2BaIC+xvclvlOo8zZL8aK/ uQm77CCjiPKoMm6stSN60u7f/qPWRy+vQvJlvkkudn2HoFd6bOGAfp05blW9c6qMHyVL hJJRe+EU/hOBHujJDtYLvtAYC2bF5aCfcMQAtOwRml7C8I4mAH6JiVwnzltvE6r/S/Ct MpUGMVhTUeKSsoHkbFVB3vpwfyFC0UVi/KuOvzedIyxu/JzjvGWRKV8CA4c/u0ftZjQJ sCXqRGTVmBRY1JPGUs2Q2eup/ldjJbi+3V+8CTkax4OsV2NIwWlTQ+N0TXLTCMkdk7/z GkUw== X-Gm-Message-State: AJIora8EnzwnDnErySxFVxLNNQfuLd6pdX+9jhUxBO0DlaL86iFqYwCK L6+KD61PQAP/hMKHUZsDd8ZHfkOKngeDf4d/SFoYfOv5C/Z+bra/j4reNiYsowXYENJuy028k1O Fki6dUOh9NGzbWCjauz2YonlmFCdoC/tLPTl9/md0B9ewvI+mqRiv528VolbVzKEvq1s= X-Received: by 2002:a05:6402:498:b0:435:daf0:915b with SMTP id k24-20020a056402049800b00435daf0915bmr7106608edv.322.1656059273668; Fri, 24 Jun 2022 01:27:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vdKXqZmH+zWXu0ZdpOei0SyVHHiIqsU809bTfeLmf6T+P+ytXO2j0Mij1Qy0Z2rsKjey/Krw== X-Received: by 2002:a05:6402:498:b0:435:daf0:915b with SMTP id k24-20020a056402049800b00435daf0915bmr7106580edv.322.1656059273408; Fri, 24 Jun 2022 01:27:53 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id u6-20020aa7d0c6000000b0043572ffafe0sm1379190edo.92.2022.06.24.01.27.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:52 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Alexander Bulekov , Darren Kenny Subject: [PULL 11/14] fuzz: only use generic-fuzz targets on oss-fuzz Date: Fri, 24 Jun 2022 10:27:27 +0200 Message-Id: <20220624082730.246924-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" From: Alexander Bulekov The non-generic-fuzz targets often time-out, or run out of memory. Additionally, they create unreproducible bug-reports. It is possible that this is resulting in failing coverage-reports on OSS-Fuzz. In the future, these test-cases should be fixed, or removed. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov Message-Id: <20220623125505.2137534-1-alxndr@bu.edu> Signed-off-by: Paolo Bonzini --- scripts/oss-fuzz/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh index 98b56e0521..aaf485cb55 100755 --- a/scripts/oss-fuzz/build.sh +++ b/scripts/oss-fuzz/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e # # OSS-Fuzz build script. See: # https://google.github.io/oss-fuzz/getting-started/new-project-guide/#buildsh @@ -105,7 +105,7 @@ do # to be configured. We have some generic-fuzz-{pc-q35, floppy, ...} targets # that are thin wrappers around this target that set the required # environment variables according to predefined configs. - if [ "$target" != "generic-fuzz" ]; then + if [[ $target == "generic-fuzz-"* ]]; then ln $base_copy \ "$DEST_DIR/qemu-fuzz-i386-target-$target" fi From patchwork Fri Jun 24 08:27:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 25785C433EF for ; Fri, 24 Jun 2022 08:45:32 +0000 (UTC) Received: from localhost ([::1]:42442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4ewU-0004a6-V1 for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:45:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efd-0006NW-Mi for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:44037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efW-0005Vv-VG for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059278; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XO0/hHLiaiRfru8/swolIqF1t4dhJ09LpUBzfgsfzkA=; b=hNkdtJTIKAHEtvwzyCpUM4+qQ6ZAniTi2SJ/7/bmdxcdkfNr4nnFrNCl9cQg8aLWYpp/9N tXhKru2jau4acF1DcXZE7QqzFPWcTOjIgSu8zqc9gjGc0W0YdZz48V+7AoXvNwwi1HqIC8 prHexrYb7VaPZOtsWFWVe4/dQaVDeNg= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-629-Wn4Cj0lIO2GuKxKjzczaag-1; Fri, 24 Jun 2022 04:27:57 -0400 X-MC-Unique: Wn4Cj0lIO2GuKxKjzczaag-1 Received: by mail-ed1-f69.google.com with SMTP id q18-20020a056402519200b004358ce90d97so1379083edd.4 for ; Fri, 24 Jun 2022 01:27:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XO0/hHLiaiRfru8/swolIqF1t4dhJ09LpUBzfgsfzkA=; b=IdhD2ZPhnKLP2vNysMhP4efrziXNiPEdjle31kLH0BNqCGsx35ldE/J5kXh8lPmGpU 3etV3KBhTdjxlBkConTkwMT3Q+khVPAku4DsOwW02bz/ksjOpSWA85jy5bsbpHAo7oDV zeA2+7Nkb5FdTrEuhvHRsgSRMAVnj9L9LloiSShzNrgHmrS1VwV/aDAiQJZNTsbzOOGS bLP9Dbg3GZ/oBW1XRhPgnFi5GP5biPgRrtuNQKrpVBdXBgS7elMxPi27dpKGxlC/3O+b cgEl4ekTwt1pBjAHkZfCBmd2usqsNDXt47fFi51lAJAN5Z/3VEclseTfL9oo26Cs0+Hw 3XNA== X-Gm-Message-State: AJIora/j/stX/DJ32Hq1dBNorf9gYvM4CxFoOQ2Z+GKmolbNU3S4Da66 x+7hDWX0ztGRDtDjUF3fqk4YQpYsZr5zV6ySzQGeZhwCrsqTDXktF4IvzSobcfhtXfb4eB+m/XN ick59TNvRfMTJl3uzWz1ue7czhOI347IEyGR2v6AVpqdrxZBr27hOLfh+S5T8M4c/rgI= X-Received: by 2002:a17:906:149:b0:712:c8:fa53 with SMTP id 9-20020a170906014900b0071200c8fa53mr11899414ejh.563.1656059275602; Fri, 24 Jun 2022 01:27:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sqcLBCh0eA8G2LFh3Yez1gZP8GfCIUXOmiNBl7O/HwYF9YcUQx+LrE6DKDQSs4/tH+h90qAQ== X-Received: by 2002:a17:906:149:b0:712:c8:fa53 with SMTP id 9-20020a170906014900b0071200c8fa53mr11899396ejh.563.1656059275330; Fri, 24 Jun 2022 01:27:55 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id q2-20020a170906a08200b006fed93bf71fsm736249ejy.18.2022.06.24.01.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:54 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Subject: [PULL 12/14] audio/dbus: fix building Date: Fri, 24 Jun 2022 10:27:28 +0200 Message-Id: <20220624082730.246924-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" From: Marc-André Lureau Commit c9c847481 broken dbus audio module compilation with bad 'CONFIG_GIO' usage. Furthermore, it implied extra dependency on audio module which aren't necessary. The problem was that 'dbus_display' is not correctly automatically set on MacOS, because opengl dependency wasn't taken into account. Fixes: c9c847481 ("audio/dbus: Fix building with modules on macOS") Signed-off-by: Marc-André Lureau Message-Id: <20220622154918.560870-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- audio/meson.build | 2 +- meson.build | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/audio/meson.build b/audio/meson.build index 94dab16891..3abee90860 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -28,7 +28,7 @@ endforeach if dbus_display module_ss = ss.source_set() - module_ss.add(when: [gio, pixman, opengl, 'CONFIG_GIO'], if_true: files('dbusaudio.c')) + module_ss.add(when: gio, if_true: files('dbusaudio.c')) audio_modules += {'dbus': module_ss} endif diff --git a/meson.build b/meson.build index 1b255f91ef..4b2a0b35cb 100644 --- a/meson.build +++ b/meson.build @@ -1653,6 +1653,8 @@ dbus_display = get_option('dbus_display') \ error_message: '-display dbus requires --enable-modules') \ .require(gdbus_codegen.found(), error_message: '-display dbus requires gdbus-codegen') \ + .require(opengl.found(), + error_message: '-display dbus requires epoxy/egl') \ .allowed() have_virtfs = get_option('virtfs') \ From patchwork Fri Jun 24 08:27:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894188 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E12C8C433EF for ; Fri, 24 Jun 2022 08:42:28 +0000 (UTC) Received: from localhost ([::1]:38510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4etY-0001gX-2K for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:42:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efd-0006Nf-Ka for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:46029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efY-0005W5-Mk for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059280; 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=v588GaBKDDpuCNEdCzM5sGhdQL3uUyd+/iy8ZROE6Hg=; b=DH1O2iF/z8lKIz6j0AYsBTkyu/T4fz8KmWBvrtFCx59e1wVLNCy6yIjFg2xbbOdDsnE/0n ml+/SuuqXXBUQNeTqD5g8++NKD/vA6Y7dPGK/Lwi89aIDUEaZhUAqSZHWFHC7gZ47BFuya y+TXkici9iVUNQ761uYeqqs3wrFGLVs= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-55-Sfyc4RVYOJODdpZTB7udgw-1; Fri, 24 Jun 2022 04:27:59 -0400 X-MC-Unique: Sfyc4RVYOJODdpZTB7udgw-1 Received: by mail-ed1-f71.google.com with SMTP id y5-20020a056402358500b0043592ac3961so1381519edc.6 for ; Fri, 24 Jun 2022 01:27:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v588GaBKDDpuCNEdCzM5sGhdQL3uUyd+/iy8ZROE6Hg=; b=p6se4pJtXEH2CQnzDa820bvqE8Q0VMAxYZ3rwsjWU2KvzlRUJaBLycUy74984Kd51U m4LsjT4bdsZ9l6ahKnZCHHpnVgnaLvkf0MGfK3wDwDnevnC0vmGKHfNK9D1pJIh13wgH wG/TCIJ6/4Dv1T4wBACimsqJwHUXKA+oChj1lyzRYnHkIjl5JrobmplNpu8zZl0x7wnp QTyCYyIaiIdcB9z7RQEZ4zu63nZ0UAURABPHPpIJNxMCJpye0O09p13MzgX51r25rDik EutmqlWmo+xm7xfnq14OEsBSeETp5TpCS3et1nhQmxlBQN1qenoL4S4ZpiAVxXM0aC4F pmcg== X-Gm-Message-State: AJIora/l519lmP7vrlyUgzTXPrcKp06LfLWZVmZMicuWOUTlmn3HpNRi z99Hn6eXGzGqkX5HoMi4Ro5dZQXZb07CeyV6jxbQzbz64kCdzWhCatf52SDjQgibMk40h+gkCas EmHXzj3H6psT83pgm1qu68y9jW/q1tV8zdnSviJmsX2YQIP+BqG0na2TH+bW5vMnODqg= X-Received: by 2002:a05:6402:1e8b:b0:41c:59f6:2c26 with SMTP id f11-20020a0564021e8b00b0041c59f62c26mr16055669edf.156.1656059277663; Fri, 24 Jun 2022 01:27:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1too4n7VxDKdtitWHwjsQIZjO+zm63q56vOciwMH/5K0oemY3rW8lRipRSn9VaMWQ0nJfhZ1Q== X-Received: by 2002:a05:6402:1e8b:b0:41c:59f6:2c26 with SMTP id f11-20020a0564021e8b00b0041c59f62c26mr16055654edf.156.1656059277433; Fri, 24 Jun 2022 01:27:57 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id a21-20020a056402169500b004357063bf60sm1414927edv.41.2022.06.24.01.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:56 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth , Richard Henderson Subject: [PULL 13/14] meson.build: Require a recent version of libpng Date: Fri, 24 Jun 2022 10:27:29 +0200 Message-Id: <20220624082730.246924-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" From: Thomas Huth According to https://gitlab.com/qemu-project/qemu/-/issues/1080#note_998088246 QEMU does not compile with older versions of libpng, so we should check for a good version in meson.build. According to repology.org, our supported host target operating systems ship these versions: Fedora 35: 1.6.37 CentOS 8 (RHEL-8): 1.6.34 Debian 11: 1.6.37 OpenSUSE Leap 15.3: 1.6.34 Ubuntu LTS 20.04: 1.6.37 FreeBSD Ports: 1.6.37 NetBSD pkgsrc: 1.6.37 OpenBSD Ports: 1.6.37 Homebrew: 1.6.37 MSYS2 mingw: 1.6.37 So it seem reasonable to require at least libpng version 1.6.34 for our builds. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1080 Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220623174941.531196-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 4b2a0b35cb..bf8cfcd5f9 100644 --- a/meson.build +++ b/meson.build @@ -1211,7 +1211,7 @@ if gtkx11.found() endif png = not_found if get_option('png').allowed() and have_system - png = dependency('libpng', required: get_option('png'), + png = dependency('libpng', version: '>=1.6.34', required: get_option('png'), method: 'pkg-config', kwargs: static_kwargs) endif vnc = not_found From patchwork Fri Jun 24 08:27:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 12894199 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2ACFDC43334 for ; Fri, 24 Jun 2022 08:54:52 +0000 (UTC) Received: from localhost ([::1]:60316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4f5X-0000Zc-4b for qemu-devel@archiver.kernel.org; Fri, 24 Jun 2022 04:54:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efd-0006OM-TW for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:54645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4efc-0005WU-6k for qemu-devel@nongnu.org; Fri, 24 Jun 2022 04:28:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656059282; 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=JhT2ZFpO3KJr1H7Z4giO4e6EM4PklFeAguLG50U8/JM=; b=XcTvfPKb1KdeL55hCPmLLlhRmVk8ptZVetDHLOzKFT6V0Bi6x1TYcpDiBwPRCQBBQZaxHy CWcRz5nGatqjAPZ9P5JeMnd4ZIM1FG/3A22NYpMw1qYxTZNv5ydBDX8OlTtpsi32CHuJTe kchPr4HzfSO4Gwc1l3yOvZUdovx5uP8= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-201-zXi2G2SAMwaLpdTx7Io9CQ-1; Fri, 24 Jun 2022 04:28:00 -0400 X-MC-Unique: zXi2G2SAMwaLpdTx7Io9CQ-1 Received: by mail-ed1-f71.google.com with SMTP id h16-20020a05640250d000b00435bab1a7b4so1371262edb.10 for ; Fri, 24 Jun 2022 01:28:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JhT2ZFpO3KJr1H7Z4giO4e6EM4PklFeAguLG50U8/JM=; b=grA/0nmyvd+bdR8OvAwLpxR7nmvPSis3HWHhMUtRGqAa8VXrwDNBeXoiUEj5LpZOAk 5q1HaEDYjsjYcKiPaaL4yEBcRsBjBN0+///ROudv5YIrfKlG2sFq4UyTKadpMeRSy0N9 tjdO5q4qqqBF0plSSG+OFMT18U/oKFjDQKRhZpU3J0drMkpoG3n3Aoj29++KH27N8Y1H iq36YDi2y5ZpWmN9dGyvCHBuYzLiLgPz8Hs/2gAlYLWbYb1vicx/mZ4OQRXHtKJ40WnN Yo5qJxGSE5Y4oKZKIpv5f29m21JQ24Ir06Kt+zsk5PjKG0nPHvlat094n8NpTSLK9D0b YsiQ== X-Gm-Message-State: AJIora8nQfaBKPzl9LkA8sHSbl0oE+oqToSrxtkApNcS7TLQ9GRbtDoL ICOQKN5VPS/VDmT+hDx5/ixsmWwJzdXlkSDP5hIq/M3/4zzp7951fF3x/Iqu/A9a6FPqDfHv81W VqlrS0vS7dlUL/7kARVskKKhcxCfTYf8jogj4ExWCqhGTXzISOO0M/hGEEILgAdOZ1KU= X-Received: by 2002:a17:907:c14:b0:722:bc08:c4ae with SMTP id ga20-20020a1709070c1400b00722bc08c4aemr12361321ejc.8.1656059279374; Fri, 24 Jun 2022 01:27:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ubbpR4fWtQX3lUpkeiYR8tozIrCUWjjzLREOqHOY+W8xor5U1UKrJI8h+zdtIHNB7f9Rem6Q== X-Received: by 2002:a17:907:c14:b0:722:bc08:c4ae with SMTP id ga20-20020a1709070c1400b00722bc08c4aemr12361305ejc.8.1656059279095; Fri, 24 Jun 2022 01:27:59 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id q18-20020a17090609b200b006feaa22e367sm694353eje.165.2022.06.24.01.27.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 01:27:58 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Miaoqian Lin Subject: [PULL 14/14] accel: kvm: Fix memory leak in find_stats_descriptors Date: Fri, 24 Jun 2022 10:27:30 +0200 Message-Id: <20220624082730.246924-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220624082730.246924-1-pbonzini@redhat.com> References: <20220624082730.246924-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" From: Miaoqian Lin This function doesn't release descriptors in one error path, result in memory leak. Call g_free() to release it. Fixes: cc01a3f4cadd ("kvm: Support for querying fd-based stats") Signed-off-by: Miaoqian Lin Message-Id: <20220624063159.57411-1-linmq006@gmail.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index ba3210b1c1..ed8b6b896e 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -3891,6 +3891,7 @@ static StatsDescriptors *find_stats_descriptors(StatsTarget target, int stats_fd error_setg(errp, "KVM stats: failed to read stats header: " "expected %zu actual %zu", sizeof(*kvm_stats_header), ret); + g_free(descriptors); return NULL; } size_desc = sizeof(*kvm_stats_desc) + kvm_stats_header->name_size;