From patchwork Tue Jul 12 12:49:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gibazowU; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj0z65Fk0z9sB4 for ; Tue, 12 Jul 2022 22:52:50 +1000 (AEST) Received: from localhost ([::1]:56846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFNf-0004k4-2j for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:52:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFL5-00035R-T9 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:53138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFL4-0001Q7-36 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630204; 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=gibazowUjq72n7/5HPLVPAqv8GTsYa7yN3rPx1jrdoxtMbXRXIV7qxf88DAAZijImfWy7i QUXeE2e2MlTzqTi3olqF7TKU9BRgFgtD5ZUrsbeU9eWiSto36yV1t6f4Y0IKRhMk2CSEzq fMjEMlZb9zZIBO1xhIEDW663QdrH0pE= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-675-mEQIPVHjPP6dXLFBQg9qZA-1; Tue, 12 Jul 2022 08:50:03 -0400 X-MC-Unique: mEQIPVHjPP6dXLFBQg9qZA-1 Received: by mail-ej1-f69.google.com with SMTP id gb37-20020a170907962500b0072b820af09dso645018ejc.20 for ; Tue, 12 Jul 2022 05:50:03 -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=EuCblK98ul11HMlETJ4fazwkojCeRsfAoCahPYvm7dHNJlPlKmTfo2h95wI1B+QZAb wjo7LDTi8cuSRlVppxI4YlNNeButEb3pukPaQ2YEIN7rxu9QUD5QNHCLTDa2c3qPeH6r 5jKhca2jAnUk6wkGirMU1QUBk/ve+eLvssf0d2j1rgB0H6xZ0d46cQCME3Mt1v/5UYDV GSpmtvvxK/Y67tw7v8XGoyo9/RGlNfXBAXbO5XpTCmjJFjrrepwD+i+els6VJhvc7KCE 3Od5J3Ieg/YgN5cFTWIGu1Ftthoc/8ASUIK1sYf8ZwMiQaZ3OfG86Kt1XTOKLLUF8ctA XlXg== X-Gm-Message-State: AJIora8+8IsLaRDy4tur5lLwoKkqxjW8P4wvnq+mPvxFPRbHCe5jBxz7 Fa6jNzNw6o9cO9qFZ2CR7aWl88z9SZR670+sREIgtPZaMTyd0IbA60EX3LaADiKYurNGMIZpasQ k8oUklKLBC29qaxmT64R4mJ9PuMvIgdu2wan8m9rRAF6ycYDf0c83Nj8k/dcYKDNjqzk= X-Received: by 2002:a17:906:4fd4:b0:722:f223:8d86 with SMTP id i20-20020a1709064fd400b00722f2238d86mr24030231ejw.558.1657630201962; Tue, 12 Jul 2022 05:50:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tRxJKDhf+1hcEPgsrEeGOFJcEhzV40/DHM1P34InGc0MWY5hmU6wZGNmZQVpgn86+jhHo8DA== X-Received: by 2002:a17:906:4fd4:b0:722:f223:8d86 with SMTP id i20-20020a1709064fd400b00722f2238d86mr24030194ejw.558.1657630201517; Tue, 12 Jul 2022 05:50:01 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id w20-20020a056402071400b0043a87e6196esm6002885edx.6.2022.07.12.05.50.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 01/18] tests/vm: do not specify -bios option Date: Tue, 12 Jul 2022 14:49:39 +0200 Message-Id: <20220712124956.150451-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HGWwkcAu; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj0yH6QNsz9sB4 for ; Tue, 12 Jul 2022 22:52:06 +1000 (AEST) Received: from localhost ([::1]:54708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFMw-00037X-De for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:52:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFL7-00035v-9b for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:52328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFL4-0001QL-EN for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630205; 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=+oHsL0UgmU4ocGnZ7i9v8K9QoHE3jM8d8IY14J+kYAE=; b=HGWwkcAugkfMz4P3XdJR85jUXQ9alXE5iRifL5LZx7gvVk9cbn8ZEbYGwwXY0wvJpT2Td8 xM7xcU9vzo4CXjj3cK7P8xBIl1EMoHmsULIFXJEHhxbLUOA94f0qhDAxBY7X3KtcLxVeeR iXDe/ems3O2g9+ZFkh/VuGGHUJDwDnc= 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-655-cmmks6LANTuy7Ilw8Ys7ug-1; Tue, 12 Jul 2022 08:50:04 -0400 X-MC-Unique: cmmks6LANTuy7Ilw8Ys7ug-1 Received: by mail-ej1-f71.google.com with SMTP id sh39-20020a1709076ea700b0072aa3156a68so2252571ejc.19 for ; Tue, 12 Jul 2022 05:50:04 -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=+oHsL0UgmU4ocGnZ7i9v8K9QoHE3jM8d8IY14J+kYAE=; b=f56/TYL7ab8K/C77A7SbN7K0M/ZhfSseD9B5+aX19rOuxWLxweAtmkIPRc+2OjtY1n C4mJ4YpqR7C78WUF+er3xcaqC2cihVWBXh/B3s18zvfas8HlhIyBPFkZMY+V/2et0dti yvT+vrMDekBhQttgU0k58yP/8EROvBQFTSQjBgLVY9xcxqhjp30d6U8VQvqGmhL3lxI0 XXY1DAg5vE571oscnqZ35NlWt5G/QfKvO9EjMvPzBcUXB/NeadWu8mTaHPWUh2CfeQdZ TaLZM5nyA4a0vC5JcmJrwXkzLiR5txbIUaTzBVm6lzqx5NM4/cCOIpkBoEympwFABn7V EClw== X-Gm-Message-State: AJIora8M94/jD2/g8fYSNy7RXjLNg3FflUWQrk3YI1nqHBnZn8Cz8zmw r4WXX+Fy8+0XpPoBgXiTnuRvX5iKSpchcwaXg7vfJRHcjZ7eu/cVMX1Q4iJnnNFU41Oayt0V30U tTikPIsNgZlES5R6heT3NZTCk3ocxNcbVMQsIr5jEN8+4z7oni/EbotQfGnEspuGotuo= X-Received: by 2002:a05:6402:5412:b0:435:5997:ccb5 with SMTP id ev18-20020a056402541200b004355997ccb5mr30832289edb.167.1657630203290; Tue, 12 Jul 2022 05:50:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ug682Dk4f4UHo5FVdS78vjvDP9FIBwrqN0sFO7K63diZrQ0bWtP1oV9QwCmE/eYrQ9EnxsaQ== X-Received: by 2002:a05:6402:5412:b0:435:5997:ccb5 with SMTP id ev18-20020a056402541200b004355997ccb5mr30832235edb.167.1657630203075; Tue, 12 Jul 2022 05:50:03 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id x21-20020a170906149500b0072b2ef2757csm3733410ejc.180.2022.07.12.05.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Mauro Matteo Cascella , Thomas Huth Subject: [PULL 02/18] scsi/lsi53c895a: fix use-after-free in lsi_do_msgout (CVE-2022-0216) Date: Tue, 12 Jul 2022 14:49:40 +0200 Message-Id: <20220712124956.150451-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mauro Matteo Cascella Set current_req->req to NULL to prevent reusing a free'd buffer in case of repeated SCSI cancel requests. Thanks to Thomas Huth for suggesting the patch. Fixes: CVE-2022-0216 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/972 Signed-off-by: Mauro Matteo Cascella Reviewed-by: Thomas Huth Message-Id: <20220705200543.2366809-1-mcascell@redhat.com> Signed-off-by: Paolo Bonzini --- hw/scsi/lsi53c895a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index c8773f73f7..99ea42d49b 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -1028,8 +1028,9 @@ static void lsi_do_msgout(LSIState *s) case 0x0d: /* The ABORT TAG message clears the current I/O process only. */ trace_lsi_do_msgout_abort(current_tag); - if (current_req) { + if (current_req && current_req->req) { scsi_req_cancel(current_req->req); + current_req->req = NULL; } lsi_disconnect(s); break; From patchwork Tue Jul 12 12:49:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655405 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Y6lioF7d; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj0yK0NCmz9sFk for ; Tue, 12 Jul 2022 22:52:09 +1000 (AEST) Received: from localhost ([::1]:54810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFN0-0003BC-Rj for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:52:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLF-00036y-H0 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFL9-0001RD-32 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630210; 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=Y6lioF7dQ1WF/Q/1cUec6yOpaKiyRE716twJcKb1YVBH/CZqKemt4NQsv2aW50fF2BptzI ViFaXTDXTA9Aw+WCSYn4u6gYAy7FC1W7EigcSaNFoK9nxZ7zrcPw+0MewBmSDTwc7WRZby rxJkj9v1Td87tGb9H9ipcSMb5fzLY7c= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-408-BFMUlnftP1O1AEe1mkqOUw-1; Tue, 12 Jul 2022 08:50:06 -0400 X-MC-Unique: BFMUlnftP1O1AEe1mkqOUw-1 Received: by mail-ed1-f72.google.com with SMTP id w13-20020a05640234cd00b0043a991fb3f3so6126704edc.3 for ; Tue, 12 Jul 2022 05:50:06 -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=GTCQLF0oKOAI2G4C6Aj6pVcj0fnmbUOa1V8XNFUocHIskcKBgWlqlsJD/gWoYG3gxM vuI6SXPZzcMZXJ4VAoVNcDzGsLM5hb2NgVKIqtlDbCCOT0jGtHdaTA1c98UgFaeMbSHi UDAJcTaX82/BRA8zAlWMGx3ffC82HXaohiwLO+6E3xCn/Viz0nEik6jIk1Cb9d1WhkKS K6Z5h5nCY/qAKbpLiHMmxOdWZNrCBFTgzAXkB3swzVWm5jzkwVgQGtGZ4Q0X7bu7t4Ct fpdKp6W4ULvAhi8G0nJasNcgCdYJ3OUTPuSuQb+R+LzcCBNue4fx4PpTWJcFyqvDyeqh REMw== X-Gm-Message-State: AJIora8j/vMhNKyB9CkLJkzAlTR0662H/I2mBOed/bE6yQa9CUCIpYnX wZweGS9xBw6ml/i0DM25Nir9q1FM7vw3LUSKB05NqBOp3UsD8rKxr0EfmKViPJz75A6/E0bTrTy iOp+8D0tHPrh/cacNpuXeTCmNimUgWWWPdTZMKah3VbwvV24MuStvXE+PE4h0CFQSgQA= X-Received: by 2002:a05:6402:26c3:b0:43a:a846:b2c1 with SMTP id x3-20020a05640226c300b0043aa846b2c1mr31935719edd.133.1657630205363; Tue, 12 Jul 2022 05:50:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tccPR0rrV5Ys2UjHI81MzUmOAgvwgBetzt/w/jMkE9nk6OQZJrAQHI7YqxM4d3+2MWeIyXVw== X-Received: by 2002:a05:6402:26c3:b0:43a:a846:b2c1 with SMTP id x3-20020a05640226c300b0043aa846b2c1mr31935693edd.133.1657630205100; Tue, 12 Jul 2022 05:50:05 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id g12-20020aa7d1cc000000b00435726bd375sm5988114edp.57.2022.07.12.05.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 03/18] pc-bios/optionrom: use -m16 unconditionally Date: Tue, 12 Jul 2022 14:49:41 +0200 Message-Id: <20220712124956.150451-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=V3m3GeRu; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj15y4n4pz9ryY for ; Tue, 12 Jul 2022 22:58:45 +1000 (AEST) Received: from localhost ([::1]:42850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFTO-00069i-Do for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:58:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLQ-0003B8-I1 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45915) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFL9-0001RT-VL for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630211; 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=V3m3GeRuf62Ms+Esxr+JAsT4t98CCPFn6MRARwnqJgGS2kFFykXk7K/sYj1Wr6jml30LKq 3U8ybaspzX/RXHuS3NVXAfmP/fMy5GrTFLXoNgHFnnmiIp9CpOvFFPSb1nPKqk4opehgtK xHSszDNeHjwopOzc8PzYHUB5mQ/pZao= 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-410-qwUZAhN0OQ6ExBFDbhcdDQ-1; Tue, 12 Jul 2022 08:50:08 -0400 X-MC-Unique: qwUZAhN0OQ6ExBFDbhcdDQ-1 Received: by mail-ed1-f69.google.com with SMTP id i9-20020a05640242c900b0043aeffc5cf1so1052623edc.18 for ; Tue, 12 Jul 2022 05:50:08 -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=wKXt7g9bvmb+w/hGMgU/j1OgEipAGBf3k34NA/6upFIc9xTGbZz5H+pmtCVP+WNucC KCxFR+2AFJLcpGh+DPHsttu2Lukhhx+Uug7aqvp6oRYMXmROh6OuPuWjQ3YZEDbnM2TJ EIBQaoU7kFSPcEZtzuYF3/Hd6FkPNcndKmvxU0Y0a4XwNfC58YyxxyKLOE5pH/aorJ52 Sr99iy47VfyKO7zk7LsySEC2TChLuKFx45V0y3fqJpv2RwxL52r8c19lp8meL+ayiERR I3qKZm1rdEtGfOt0p6WIAVXwk5n1ilsGy7luLYwzn6I0AQRYYVmHy/R0zDYvwO/TQsH1 9l/A== X-Gm-Message-State: AJIora+k+Qu8JTJjgldSxaxMYae23afJhtuR6g+gSgKUeUItKbtmFAoF Gw4FKjJc6V9wpqPcfDKV171EuDW/cO1tG3dZ4dcnwUsQlVtXlnE8QCYYYG4G60n2u183uEUu9s4 jZ8Z27YkcdJvdAgJ6ZG4xOAuTvoXjNrn/AtApR0cz6oJLied4Zi1p8GwVg7T3XUFSWb4= X-Received: by 2002:a17:907:7747:b0:6f3:ead4:abcb with SMTP id kx7-20020a170907774700b006f3ead4abcbmr23869787ejc.296.1657630206970; Tue, 12 Jul 2022 05:50:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vHKmOGGWCW8KljEhYG4QJFfppSfyqJaCQcqa/13+JL0x7XkZAZxkVOsU+CTTdzpiumlczS7w== X-Received: by 2002:a17:907:7747:b0:6f3:ead4:abcb with SMTP id kx7-20020a170907774700b006f3ead4abcbmr23869763ejc.296.1657630206683; Tue, 12 Jul 2022 05:50:06 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id q23-20020aa7d457000000b0043585bb803fsm6035462edr.25.2022.07.12.05.50.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:06 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 04/18] configure, pc-bios/optionrom: pass cross CFLAGS correctly Date: Tue, 12 Jul 2022 14:49:42 +0200 Message-Id: <20220712124956.150451-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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, 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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655407 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=By1kN52P; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj11S3KyTz9sB4 for ; Tue, 12 Jul 2022 22:54:52 +1000 (AEST) Received: from localhost ([::1]:34282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFPd-0000Az-G1 for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:54:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLF-00036z-Hb for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFL9-0001RJ-Fe for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630210; 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=By1kN52PnRGOkTpnMUrU2CaEDLWvdKhgGa7Il1gyWM2Ub3N/yqZSbTC+ngLjkfCpUyT34D iHqQmVvjW60x23L22yhPanTJY5XncQKgtFgdM7V5Kjz7lF3a8sZ1UK7O2KzHqAyov7hR+s vAn+ygJNo2MS0mc5/2oXtyI3z2swJQU= 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-306-1OZJAQ9FNS6t136z5_qTjw-1; Tue, 12 Jul 2022 08:50:09 -0400 X-MC-Unique: 1OZJAQ9FNS6t136z5_qTjw-1 Received: by mail-ed1-f71.google.com with SMTP id b15-20020a056402278f00b0043acaf76f8dso4733575ede.21 for ; Tue, 12 Jul 2022 05:50:09 -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=mtFBDvdPsedr2MfUNrKF8Gx+cGNgSzdXKlFtmwUYP2cB445D56qxVcQfBmtwWL+Fdk QIR9slCFC4vpcDdTrtkJr3IQfKD1VQHPItF5/XMrmAI/9xKK1JtjPSQqcHmtor9N1JOV zlQ9FE5dco0gUENQ5VsNg/Y2bLoHSne8QEknZNjv55oD5UNyHAwLb9szzpKMw7OIW4qZ WUH8BoatsWy9oNBKNfE92iOo0/MB52b3lV5J9CNaoMX4Klon/EHgGwJEnbBHJ2tRw/6I tptt4juLsMXpj4Xla6OPf1K/6ModH0tN0tmURrW7fTYFtBZdKhdx0e0fnn50tAxEQm+C x4hg== X-Gm-Message-State: AJIora+nZxXMPb/G8opckATQgjtkQxHzjyQsKF/ZO6JiMJYz+4tmGMk+ w/8y1kLO0kS0v3PK/wfp8sD6EHVVKpRXdRIGoNEhUUwbx+Rr15lKDSKXGNHqmQZtrVuUCvYzjzN jdriCd0QMokT+hIy1+5tk7vE8dFlOq/Gfu7/nUX7CwOGzg5b/03Zu3gufUtXpvvzdNQE= X-Received: by 2002:a05:6402:388e:b0:43a:d5ff:60f0 with SMTP id fd14-20020a056402388e00b0043ad5ff60f0mr13381330edb.152.1657630208307; Tue, 12 Jul 2022 05:50:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uysj8eeoQgZFTrqGdSM9dHtrDqtEKloGuVtw9cxYh5JdisTf6GB4puFjg9w7NptERi+Ws/PQ== X-Received: by 2002:a05:6402:388e:b0:43a:d5ff:60f0 with SMTP id fd14-20020a056402388e00b0043ad5ff60f0mr13381290edb.152.1657630207928; Tue, 12 Jul 2022 05:50:07 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id u1-20020a1709061da100b006fe8c831632sm100271ejh.73.2022.07.12.05.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:07 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth Subject: [PULL 05/18] configure, pc-bios/s390-ccw: pass cross CFLAGS correctly Date: Tue, 12 Jul 2022 14:49:43 +0200 Message-Id: <20220712124956.150451-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=jB1FUofD; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj16r6rKSz9ryY for ; Tue, 12 Jul 2022 22:59:32 +1000 (AEST) Received: from localhost ([::1]:45128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFUA-0007mw-PU for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:59:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLI-00037Z-SR for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:25921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLC-0001Rc-G5 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630212; 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=jB1FUofDkIzzUi+jzI5aQhxfYsrdq77eeZXz/Kws/vyDebZRlV8jMG5KUG+5I/SO3KQFx9 RnzoaIRrIYd84LaNGbE/Xm791MvbHKhC+lCWhZucGyVrDD92CWekcaIEu/rkccIVt5U0l+ TwSwM0sLsEHd+c4IjtB/0FG5F4i2o+c= 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-27-0H63s1XeMbGrTN-0YyfaFw-1; Tue, 12 Jul 2022 08:50:11 -0400 X-MC-Unique: 0H63s1XeMbGrTN-0YyfaFw-1 Received: by mail-ed1-f70.google.com with SMTP id b15-20020a056402278f00b0043acaf76f8dso4733626ede.21 for ; Tue, 12 Jul 2022 05:50:11 -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=1wGSImoR1JX3Qr4T613p6DhXvtzTsKovlxKYgFTBZHRUFJmwlJCvttn923eja4vUqw 3UU9cTtYUaP1KaASK+qKUGL/wsSx/TKKqN/qKep/l+O2vsFl7W28o9PPTW5hD5yPtiqA 0OjeyGDKoHh1q9whHVYB9Xaog4iE9NiG8oQWxjzFYEFVKNz8xs3MwUvhvht9Ote3aAPk 9ec7mNE7iBAYlW9ZIOgDvLIHJj6PTG3wbBx24t6iWwSSOU9nm3lkEx/GWlMHtj/YgkAV aibGUBZP7Rd9J9KEoHWPQdmzMXH3pOcKWLvHGET8dnpz65zevD7JttFl2Qbepyx6OTDv /h8Q== X-Gm-Message-State: AJIora9QwBgrcGbtwO9QY5/9eslMFu/nJl9fqiZwV6DHXuBeTy8GCvxJ qWXAyV0zs7MGnwoj57xlhnEVnvVfqvnypknghTjxho1bWzkasSQUJa15oEUm7AqtoEd+PkOc4/t s5TAz/Y4z4iaX4rZA+59OfA+HB30RsYeoLAjUWr1/wHDmdh539yioBXbxrlyqF/FsZ4U= X-Received: by 2002:a17:907:d22:b0:726:dbb1:8828 with SMTP id gn34-20020a1709070d2200b00726dbb18828mr24458956ejc.722.1657630210190; Tue, 12 Jul 2022 05:50:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vdcaw4xo/tMUI3Wj3HOxz4P9pnBewlzwj0ia/SIx8s9nVm0pShclDvTQ8CMPSpgOBJP0jxzQ== X-Received: by 2002:a17:907:d22:b0:726:dbb1:8828 with SMTP id gn34-20020a1709070d2200b00726dbb18828mr24458928ejc.722.1657630209859; Tue, 12 Jul 2022 05:50:09 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id bf14-20020a0564021a4e00b0043a78236cd2sm5993004edb.89.2022.07.12.05.50.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:09 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 06/18] configure, pc-bios/vof: pass cross CFLAGS correctly Date: Tue, 12 Jul 2022 14:49:44 +0200 Message-Id: <20220712124956.150451-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gpiZ8l2o; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj13j5sMXz9sB4 for ; Tue, 12 Jul 2022 22:56:49 +1000 (AEST) Received: from localhost ([::1]:36966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFRX-00020a-L7 for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:56:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLI-00037e-Va for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:23742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLE-0001Rq-2B for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630214; 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=gpiZ8l2oLRpMv071k9Fs5GY389akS0KdV/ygqJH/jcZnA2iSaq1PTjLwkOtp+XRgtiYwV3 STcNE/K+8v9Njw0iriNTn5KQ+Rm2UnlEEwqUnne55v7YWE/3HHgdzEYRIcl73McNu5a4tp M6iG2pZedhzPYwlRjBBslvG3PnHjwIw= 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-481-MUyGXDHtOs6G9onTAU7IHQ-1; Tue, 12 Jul 2022 08:50:12 -0400 X-MC-Unique: MUyGXDHtOs6G9onTAU7IHQ-1 Received: by mail-ej1-f72.google.com with SMTP id sc42-20020a1709078a2a00b0072b5f51a9dbso1888098ejc.1 for ; Tue, 12 Jul 2022 05:50:12 -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=aUbltpC04sR60M8mtVkopAeIJES8bu8PIGFxsSKz+hIG/7L3qZCgWrUW4UvOfJ707U h1g2ca6oq/GJQejP/XOrwm3cyxUkG/NN4SY/4KLt4zDF6DCnDe6D6BhAbCttuwqzzB3n snIDagEQyMrOoS1OpIKpvaMTLEZzB99Ups/paomI7BIjp2Uut00P57ai7+OqvTWbqdkx Db4w485i2+y/L+jes90qSr3J4BAjNuTIQcxkIngqbyhCFFdh1N11QI2pN7QqTdI8/xob ac6aL0iOkrNWQthcZEKJ5+8JHeAcgDloWpZhc/Dpp1BQIVNyuX7XIg7wnEvEXJJe5c21 GLdw== X-Gm-Message-State: AJIora9eiUxqwurbnvG/Fm87lXm14tpygMK4uQLVW95MnxI4Iid08yao dZ0H/0xcslWxafR6d377/7WMp4pYftZNgWAru3Qa8jPO6UD1tEJtkI3srmsTwwA6sm8elYw/zlD QlP7+YU1UIoHTMS24a+7fr9ALdLdZBajxVcv4B5BfX0DYhswPuIMjHDhjlPTsfXUci9c= X-Received: by 2002:aa7:c2d7:0:b0:43a:78af:6e57 with SMTP id m23-20020aa7c2d7000000b0043a78af6e57mr31507216edp.163.1657630211486; Tue, 12 Jul 2022 05:50:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tIP/7f3VhUc2LnZnQLNkLTa8q2AleDk5eO6cOIwXMSLo4CP1VbPTZdz+7F3mcuioz4u7HXjg== X-Received: by 2002:aa7:c2d7:0:b0:43a:78af:6e57 with SMTP id m23-20020aa7c2d7000000b0043a78af6e57mr31507181edp.163.1657630211186; Tue, 12 Jul 2022 05:50:11 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id pv5-20020a170907208500b0072af4af2f46sm3764846ejb.74.2022.07.12.05.50.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:10 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 07/18] configure: allow more host/target combos to use the host compiler Date: Tue, 12 Jul 2022 14:49:45 +0200 Message-Id: <20220712124956.150451-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gwerzvcF; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1616CF0z9ryY for ; Tue, 12 Jul 2022 22:58:49 +1000 (AEST) Received: from localhost ([::1]:43240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFTT-0006R5-M5 for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:58:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLI-00037d-VR for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:54116) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLE-0001Rx-2z for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630215; 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=gwerzvcFfaJRN9fj3NQawuUIh/2TegP6bq9nmh8tDEGU1rc+TkhQsu1fQStAP59TJr+107 fN5hAzC7eLrmBKruzn9I8TxzRZS+s6rfaWrA3OQI1traRxrmGBow6dLuyaxk5fu/cNHuS6 BomngspLRW7HDYC5yqhb4UEAtgJnfEc= 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-403-O9wd1JSbPaSjOWb6XA7osg-1; Tue, 12 Jul 2022 08:50:14 -0400 X-MC-Unique: O9wd1JSbPaSjOWb6XA7osg-1 Received: by mail-ej1-f72.google.com with SMTP id sh39-20020a1709076ea700b0072aa3156a68so2252741ejc.19 for ; Tue, 12 Jul 2022 05:50:14 -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=lfJGEegh8T/18Z0o4A0pv3ygcaIkXsi4fWhheiIWErJVQUzwakzpBC03pxpvOzeogm B3QEb6fCXard/uZE+v0EFcxHql/l3coOnghJLiSb4esnAtnbZGkukTM3V31kRZzlJfT8 a2kU/ndtAMyR/H+MpKhZ1STl/ftbevXhAE9AZcdZ1bVpVOutB8zs3o3dL2RJ+u80LiFS CA5bBNUiJmd328lxe7cDbVVSS0bQARkAdEpcWcOgy7itRgn5QcxxrGC+DAqRU75dtMs4 7iQPWZkl9FmWB7Aj9mDgciyON+XXWMva0dNCb1DfsZqcIAB/RW7TQ+DpqhXxFrJgASoJ J92w== X-Gm-Message-State: AJIora/FfH8sApDrIRYAh4/pxfC82XL+np31Fg15g7nuaZ+5Ky3vdPh2 LazaEG6sULOwa4M5QC9k/htO7ZKsanboOihlGm1Tl9b7WzlKyUR7Br5HfQUVaWKV0tbIl/kA49h 6Jwu26F12TgoT/+Fkl+Zz0BrqQH6rtIU2zeR+NNRTPfmermQpPjF2wBF8JDatfpGGRmI= X-Received: by 2002:a05:6402:348e:b0:43a:953d:ade8 with SMTP id v14-20020a056402348e00b0043a953dade8mr31804965edc.135.1657630212883; Tue, 12 Jul 2022 05:50:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vNm94WruIMDdeVC9jo2ODDBDBWLiqqJPgADnnEzeXqOWjCNV9jeaEhh6PoiV7+Zg8paXzsLQ== X-Received: by 2002:a05:6402:348e:b0:43a:953d:ade8 with SMTP id v14-20020a056402348e00b0043a953dade8mr31804937edc.135.1657630212567; Tue, 12 Jul 2022 05:50:12 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id lx20-20020a170906af1400b0072737733f9asm3744791ejb.106.2022.07.12.05.50.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 08/18] configure: write EXTRA_CFLAGS for all sub-Makefiles Date: Tue, 12 Jul 2022 14:49:46 +0200 Message-Id: <20220712124956.150451-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655423 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=G0JpMhE/; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1WY385sz9ryY for ; Tue, 12 Jul 2022 23:17:28 +1000 (AEST) Received: from localhost ([::1]:40376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFlT-0007Th-B1 for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 09:17:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLK-00037p-Ai for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:55703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLI-0001Ss-Ep for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630219; 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=G0JpMhE/YqDcgKJurEpnal2pSE8C0lsKp3AZkgbnOu5GE9yX3i9HqK4JIDUpXYr/i1+569 jx43M8V4lZAsS3sYIQtVEI2YmaAhzy+jmG76B4aCw2hfehwCBhBI6h+Js8PljWgVO9TzJW d+9koHaQtRYETYj4lRmddiAEu2Eg9sc= 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-260-bfNTCLlvPZKc9KOhXHx84A-1; Tue, 12 Jul 2022 08:50:15 -0400 X-MC-Unique: bfNTCLlvPZKc9KOhXHx84A-1 Received: by mail-ed1-f71.google.com with SMTP id c9-20020a05640227c900b0043ad14b1fa0so4003334ede.1 for ; Tue, 12 Jul 2022 05:50:15 -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=fyt/c4iIvdSiWUhMgZb7GF+z69ANFN6CRJHHqz1G5CwGe9hF8muh8CxpSLV4obnlFQ bV998RPMSjbQdmahN6Pr5PZvaWqOD/BwNXMlrhnEs1L14oyPldPLbvVddBkWRod+c+87 jSZhqTO+as7a9sMSSa83ZpaXpJBNk5mKXp5i+MOu/eAHhnUQTuxjPpZxICBw1UF23MS7 NE8iJAb23dXyuTUn+2riCyQnPz+KXUfYVmy1uK8XRRXkUVShaZD0NzfC8dHT/jEeY9eY zZAXDyEaIUAh8oo7vpDB/Wa8ECsaq8n6FCf2JeltOPs7/i+6kHsq0yN9u8wdSR/MGzaQ 04sQ== X-Gm-Message-State: AJIora+x1P4FQlPtqwaLN5yoNztwkZ4X05Fdi3clBIW7Ih/OZLy9idRj ZyiSKYVuMudnOlJ+FFQhqYByGOnsa/F2rWVtLtnvvm4zzCLc/RP2hRrwt/8ko6FG+WyMVOljczy mgZFNVDaAcHnE+VSKLKuEGrjhrlwDf84cEURJ0S4ymcVJ1uhciKRFjVwfa75kBsRlZkE= X-Received: by 2002:a17:907:7292:b0:726:95e4:5a21 with SMTP id dt18-20020a170907729200b0072695e45a21mr24082084ejc.266.1657630214029; Tue, 12 Jul 2022 05:50:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tLawvZHJuvj4b9THQm6/o32Lw2izbNCfyIxfQa7a4Eo1zQM4rI2984YvveqyOH+KE+KXE+Qw== X-Received: by 2002:a17:907:7292:b0:726:95e4:5a21 with SMTP id dt18-20020a170907729200b0072695e45a21mr24082043ejc.266.1657630213670; Tue, 12 Jul 2022 05:50:13 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id 25-20020a170906309900b00722e57fa051sm3810358ejv.90.2022.07.12.05.50.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 09/18] tests/tcg: compile system emulation tests as freestanding Date: Tue, 12 Jul 2022 14:49:47 +0200 Message-Id: <20220712124956.150451-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FPhpnJqv; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1Jw6fqTz9ryY for ; Tue, 12 Jul 2022 23:08:16 +1000 (AEST) Received: from localhost ([::1]:59954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFcc-0001T0-L9 for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 09:08:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLL-00037w-Qu for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLI-0001TL-Rb for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630220; 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=7qmpefHMeFqt7J+eOJs+uvYBST3HY9OKBgcZualR70g=; b=FPhpnJqvasNtp8LLf60564EVNIRyER4w4c1yGas2Aib1RcZSWUsn60oz/giA9BgUqNv+tH TNkg3897T41czfvTQA4DdsZ33zRdMcPD3lV6yMi87jrkL4aOcLPN+R5Xs7oOcDo6ZqwZoq IRs/lrdLaALkzARWFNMmRjrSzSfGABw= 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-338-Q8eEJzbHNmmJOFV0HYn54w-1; Tue, 12 Jul 2022 08:50:16 -0400 X-MC-Unique: Q8eEJzbHNmmJOFV0HYn54w-1 Received: by mail-ed1-f69.google.com with SMTP id b15-20020a056402278f00b0043acaf76f8dso4733770ede.21 for ; Tue, 12 Jul 2022 05:50:16 -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=7qmpefHMeFqt7J+eOJs+uvYBST3HY9OKBgcZualR70g=; b=UAO8hjGsfMhHYX0vgfuDvU8JNiiK7IOZN44MQFeljeoPYybyYbh56bKJgAYTRtej04 Y5FE1IbnPMLW2AzQuYXnZodVhBubrm9JzTNW8dVUXm3KAByqanYDQ2FCaG3qErAqZ269 Hc1osC1zV+1j03NEuMO9fLzaqNxudjmvaA7lhDnYNLmVzHLA4kteMlg+TTzdIK8JjUbl NBpi5ImNIURr5JIGlpDFk6neaKByV63Ptya+hXjSPoSyM8fsuYPTkb14UVGpeGIJZH8W QtF1IcoNmnpK2tfCyCBIvD7EgtxZRhfqG61KtbLweLwZXtfd1Xa+Z/7AYBnC/GD0mARr y2uw== X-Gm-Message-State: AJIora8/ZNoCM08uyPw8LDID4w7llqvtevJfwHssMB22JwDnlRFk7PRt 0LxeUargbmNE4/Mgwy1xuzoCXuDehRPyAKw+/VDoy1DD91pNm5YIWNm9j9wCNZMVUT8/xOX9f+9 QsOF42kO2erhIFDgORv29AmWp/4n4jsOG9ZUcHlnykUkyFhSwR9lWk7NXZ6nhb6EBcXs= X-Received: by 2002:a05:6402:c48:b0:437:d938:9691 with SMTP id cs8-20020a0564020c4800b00437d9389691mr31279340edb.254.1657630215257; Tue, 12 Jul 2022 05:50:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uGfcQtSFvKNFQloyESJXKNvldgaKsuebolDUYvclxDIMYTkWPOrzNbihmwZxtamH2Ku3m7iA== X-Received: by 2002:a05:6402:c48:b0:437:d938:9691 with SMTP id cs8-20020a0564020c4800b00437d9389691mr31279298edb.254.1657630214900; Tue, 12 Jul 2022 05:50:14 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id d18-20020a170906345200b007052b183d51sm3762346ejb.132.2022.07.12.05.50.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:14 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 10/18] configure: pass whole target name to probe_target_compiler Date: Tue, 12 Jul 2022 14:49:48 +0200 Message-Id: <20220712124956.150451-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Let probe_target_compiler know if it is looking for a compiler for a softmmu (freestanding) or a linux-user (hosted) environment. The detection for the compiler has to be done differently in the two cases. Signed-off-by: Paolo Bonzini --- configure | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 0fd2838e82..5256bc88e5 100755 --- a/configure +++ b/configure @@ -1875,6 +1875,17 @@ compute_target_variable() { fi } +# probe_target_compiler TARGET +# +# 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 TARGET is a user-mode emulation target, also set build_static to +# "y" if static linking is possible. +# probe_target_compiler() { # reset all output variables container_image= @@ -1896,7 +1907,8 @@ probe_target_compiler() { target_ranlib= target_strip= - case $1 in + target_arch=${1%%-*} + case $target_arch in aarch64) container_hosts="x86_64 aarch64" ;; alpha) container_hosts=x86_64 ;; arm) container_hosts="x86_64 aarch64" ;; @@ -1925,7 +1937,7 @@ probe_target_compiler() { for host in $container_hosts; do test "$container" != no || continue test "$host" = "$cpu" || continue - case $1 in + case $target_arch in aarch64) # We don't have any bigendian build tools so we only use this for AArch64 container_image=debian-arm64-cross @@ -2041,23 +2053,23 @@ 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}\"" + eval "target_cflags=\${cross_cc_cflags_$target_arch}" + if eval test -n "\"\${cross_cc_$target_arch}\""; then + if eval has "\"\${cross_cc_$target_arch}\""; then + eval "target_cc=\"\${cross_cc_$target_arch}\"" fi else - compute_target_variable $1 target_cc gcc + compute_target_variable $target_arch 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 - case "$1:$cpu" in + compute_target_variable $target_arch target_ar ar + compute_target_variable $target_arch target_as as + compute_target_variable $target_arch target_ld ld + compute_target_variable $target_arch target_nm nm + compute_target_variable $target_arch target_objcopy objcopy + compute_target_variable $target_arch target_ranlib ranlib + compute_target_variable $target_arch target_strip strip + case "$target_arch:$cpu" in aarch64_be:aarch64 | \ armeb:arm | \ i386:x86_64 | \ @@ -2079,7 +2091,7 @@ probe_target_compiler() { ;; esac if test -n "$target_cc"; then - case $1 in + case $target_arch in i386|x86_64) if $target_cc --version | grep -qi "clang"; then unset target_cc @@ -2241,7 +2253,7 @@ done # Mac OS X ships with a broken assembler roms= -probe_target_compiler i386 +probe_target_compiler i386-softmmu if test -n "$target_cc" && test "$targetos" != "darwin" && test "$targetos" != "sunos" && \ test "$targetos" != "haiku" && test "$softmmu" = yes ; then @@ -2264,7 +2276,7 @@ if test -n "$target_cc" && fi fi -probe_target_compiler ppc +probe_target_compiler ppc-softmmu if test -n "$target_cc" && test "$softmmu" = yes; then roms="$roms pc-bios/vof" config_mak=pc-bios/vof/config.mak @@ -2275,7 +2287,7 @@ fi # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10 # (which is the lowest architecture level that Clang supports) -probe_target_compiler s390x +probe_target_compiler s390x-softmmu if test -n "$target_cc" && test "$softmmu" = yes; then write_c_skeleton do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC @@ -2488,7 +2500,6 @@ tcg_tests_targets= for target in $target_list; do arch=${target%%-*} - probe_target_compiler ${arch} config_target_mak=tests/tcg/config-$target.mak echo "# Automatically generated by configure - do not modify" > $config_target_mak @@ -2507,6 +2518,7 @@ for target in $target_list; do ;; esac + probe_target_compiler $target got_cross_cc=no unset build_static From patchwork Tue Jul 12 12:49:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=e1MhHSMj; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1Pk629rz9sFk for ; Tue, 12 Jul 2022 23:12:26 +1000 (AEST) Received: from localhost ([::1]:36440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFgd-0004f8-69 for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 09:12:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLU-0003Ep-U0 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLH-0001Sp-NP for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630219; 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=pCs0cyrj/ENyELnGuzGXsZmFkpS6XumC8TYkq/Y7rNg=; b=e1MhHSMjA93BYGxmdDoPtEgWRUy494pDx1PHzB18+znfiG6T9FPly9C19KKuTqx7jKntH+ wBQ96TDtKeRGeFY2HrYLWVPipQWO8IDwfaBIZHk11aqMH8Tady14NsyToFnp8kFIDupg3m IfYxQyV8er2jSY+K2SChm2Lx+rnF8jE= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-434-9IGfbdj8Ot6a2xyIxcfCJw-1; Tue, 12 Jul 2022 08:50:18 -0400 X-MC-Unique: 9IGfbdj8Ot6a2xyIxcfCJw-1 Received: by mail-ej1-f69.google.com with SMTP id gb37-20020a170907962500b0072b820af09dso645286ejc.20 for ; Tue, 12 Jul 2022 05:50:17 -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=pCs0cyrj/ENyELnGuzGXsZmFkpS6XumC8TYkq/Y7rNg=; b=gWhUIW7YaTXycwVaHtpC6HVdOrb6bKj1fv4zJTFzi84Mw4qsk7v8YCdJ+Slu6MGOpH u5NmtUJNeF9XSUjW/rGDmFw2xDB+pHGJ6d+UQL3Ua+992aGtoSTqc6PXI9lxB46bZ4Ne DUHT6AvJ+A0Y+vEGYY55OX0XoX6qIXkgtzAouEv3L8gG8ehOPMXt2BKZ3SL2OOpF3N45 b6okGUR+vdhZeJVMwTd5OpZ633t9oTiyzzABI6AW90dcc+2Sfq0oigsP1tMyGVol0kFc 59PVIdPEwQMGwjXf+h+5fKHV1kzwUdkFIggQ2n+LbCN1Lselz/PfggjqCXP7IXwLvbn4 3kzQ== X-Gm-Message-State: AJIora+7XEPUIindmyLnqyHpWB9P7vDWw2tRCbTI4yj9UrB9WP708+kx V00rNBOOC1QY1e4Qi/F5F4sWUMR7mNsEC8L8QJNALZQilhAQQ3Sd/l3gDioyx5VRuYkc9FuwnB5 G0qXl3L/FkbRXUuzIRrs4tR92BsSNeh1NNh4M/sZvMktJwyRbeI0LTiDv0LQuKQDkT5Y= X-Received: by 2002:a17:907:b0a:b0:72b:3176:3fe5 with SMTP id h10-20020a1709070b0a00b0072b31763fe5mr19921980ejl.48.1657630216474; Tue, 12 Jul 2022 05:50:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tlhIU8GhL42Vfj8a6HtVkjr3AlElTLNYNjywiM/COQMlMuKNUA4zih6t3QzS7iaIZRrcXCDw== X-Received: by 2002:a17:907:b0a:b0:72b:3176:3fe5 with SMTP id h10-20020a1709070b0a00b0072b31763fe5mr19921952ejl.48.1657630216166; Tue, 12 Jul 2022 05:50:16 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id 26-20020a170906311a00b0070e238ff66fsm3756976ejx.96.2022.07.12.05.50.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Matheus Kowalczuk Ferst Subject: [PULL 11/18] build: try both native and cross compilers Date: Tue, 12 Jul 2022 14:49:49 +0200 Message-Id: <20220712124956.150451-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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, 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+incoming=patchwork.ozlabs.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 the softmmu emulation target to basically a test for the presence of libgcc. Tested-by: Matheus Kowalczuk Ferst Signed-off-by: Paolo Bonzini --- configure | 159 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 95 insertions(+), 64 deletions(-) diff --git a/configure b/configure index 5256bc88e5..e8cc850727 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\"" @@ -1888,6 +1889,7 @@ compute_target_variable() { # probe_target_compiler() { # reset all output variables + got_cross_cc=no container_image= container_hosts= container_cross_cc= @@ -1898,14 +1900,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= target_arch=${1%%-*} case $target_arch in @@ -2053,22 +2047,8 @@ probe_target_compiler() { : ${container_cross_strip:=${container_cross_prefix}strip} done - eval "target_cflags=\${cross_cc_cflags_$target_arch}" - if eval test -n "\"\${cross_cc_$target_arch}\""; then - if eval has "\"\${cross_cc_$target_arch}\""; then - eval "target_cc=\"\${cross_cc_$target_arch}\"" - fi - else - compute_target_variable $target_arch target_cc gcc - fi - target_ccas=$target_cc - compute_target_variable $target_arch target_ar ar - compute_target_variable $target_arch target_as as - compute_target_variable $target_arch target_ld ld - compute_target_variable $target_arch target_nm nm - compute_target_variable $target_arch target_objcopy objcopy - compute_target_variable $target_arch target_ranlib ranlib - compute_target_variable $target_arch target_strip strip + local t try + try=cross case "$target_arch:$cpu" in aarch64_be:aarch64 | \ armeb:arm | \ @@ -2077,27 +2057,101 @@ 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 $target_arch in - i386|x86_64) - if $target_cc --version | grep -qi "clang"; then - unset target_cc + eval "target_cflags=\${cross_cc_cflags_$target_arch}" + 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_$target_arch}\""; then + if eval has "\"\${cross_cc_$target_arch}\""; then + eval "target_cc=\"\${cross_cc_$target_arch}\"" + fi + else + compute_target_variable $target_arch target_cc gcc + fi + target_ccas=$target_cc + compute_target_variable $target_arch target_ar ar + compute_target_variable $target_arch target_as as + compute_target_variable $target_arch target_ld ld + compute_target_variable $target_arch target_nm nm + compute_target_variable $target_arch target_objcopy objcopy + compute_target_variable $target_arch target_ranlib ranlib + compute_target_variable $target_arch target_strip strip + ;; + esac + + if test -n "$target_cc"; then + case $target_arch 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 + + write_c_skeleton + case $1 in + *-softmmu) + if do_compiler "$target_cc" $target_cflags -o $TMPO -c $TMPC && + do_compiler "$target_cc" $target_cflags -r -nostdlib -o "${TMPDIR1}/${TMPB}2.o" "$TMPO" -lgcc; then + got_cross_cc=yes + break + fi + ;; + *) + if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC -static ; then + build_static=y + got_cross_cc=yes + break + fi + if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC ; then + build_static= + got_cross_cc=yes + break fi ;; esac + 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 } @@ -2519,29 +2573,6 @@ for target in $target_list; do esac probe_target_compiler $target - 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 Tue Jul 12 12:49:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SJb2ozP7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1DZ5dQyz9ryY for ; Tue, 12 Jul 2022 23:04:30 +1000 (AEST) Received: from localhost ([::1]:51472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFYy-00045Q-KZ for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 09:04:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLL-00037v-OK for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLI-0001TO-Vt for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630220; 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=ZeBXSVYVoPc/3PZYqaDg7TCVfS9L6tfIu0acozVHuz8=; b=SJb2ozP7h5N9uaTtZiyrQK3VuzJvlj5cRedPczeFRSCJ+ijFtpD88KD2VP6MCZIv5YbsTI fi5Db72d0u/IOj8pl+HOEx0YTx1HgokcgtgWfI/WXVt6iV1QFKVSVzb/8QIa7JyoRH8owa PXuusp+E+bXbOIWtsxCKssoC5P/YTjI= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-542-veTa6RwLPXKWmo5_1i--Gg-1; Tue, 12 Jul 2022 08:50:19 -0400 X-MC-Unique: veTa6RwLPXKWmo5_1i--Gg-1 Received: by mail-ed1-f72.google.com with SMTP id t5-20020a056402524500b0043a923324b2so6197677edd.22 for ; Tue, 12 Jul 2022 05:50:19 -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=ZeBXSVYVoPc/3PZYqaDg7TCVfS9L6tfIu0acozVHuz8=; b=rAorehVa1zoKHXhAz/JI8xs9SI4+XX6utnKwZBwNyZHCbKAfHXo/Y82YRxVk6vzinl 5ts4puozIcPyYGjpP7egQJmiHgFG8WanDo9pYrzd8EoRgs0knKDMKBP7IlLTd/RGYcYu rIEaeRESNNt/zU2xubbSAwT5AXFVSUznRIM8+zs5Ym2LX6vWQmC9TBwy5Xg/hKl2xVEW gz2XOt45HMw0lDFqfSob5vyWFJW3o+SblbpFDDpOpBM5Zi6cndsYbzxMNP29sd0nMfgY D68ptqmBZUgnNfWbwrAM8K+A8KKro3eaD+ttKgOhMAiZZGV+lv08A3AI5RyQQ3eCmhoc sjAw== X-Gm-Message-State: AJIora8jEf6ely4j3YZQJ5lrrKvbPk/efmzntEufXDbBQiHz/Av6/dOp PXmhrPI63CZyjzRamUvWC1GnDW2XmuamPgF8PcKdOJwOUKAsaBgafwtCzyW3T6h5tAmrfu1O4AW EBFQRHh03hE00DxcUvKREFmKcR2ky91zDdeQhkeiv5SZaQYTWyxwaxPFCaAB8G28R5l4= X-Received: by 2002:a17:907:2723:b0:72b:5af3:5a11 with SMTP id d3-20020a170907272300b0072b5af35a11mr8863180ejl.584.1657630217963; Tue, 12 Jul 2022 05:50:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u09XIwYte+Hvndy6KfJAxJatrT886KRStWzpUPc+8lyP1t8e5QM/Ty7pfPbwP2bOEyWt1qJQ== X-Received: by 2002:a17:907:2723:b0:72b:5af3:5a11 with SMTP id d3-20020a170907272300b0072b5af35a11mr8863155ejl.584.1657630217707; Tue, 12 Jul 2022 05:50:17 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id vs24-20020a170907139800b00703671ebe65sm3734333ejb.198.2022.07.12.05.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Alexander Bulekov Subject: [PULL 12/18] build: improve -fsanitize-coverage-allowlist check Date: Tue, 12 Jul 2022 14:49:50 +0200 Message-Id: <20220712124956.150451-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 bc5569ace1..013c694a49 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 Tue Jul 12 12:49:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B/IsfQRV; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1600jd7z9ryY for ; Tue, 12 Jul 2022 22:58:48 +1000 (AEST) Received: from localhost ([::1]:43028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFTR-0006Is-Ub for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:58:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLS-0003Bt-CI for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLQ-0001UY-Mg for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630228; 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=B/IsfQRVBDt41nU0UIhiJpyUUfrk+6z5rUfr9JlaS1v2k8P8nxbxfVHcoTbo7I/tUE+Wmg ZnPv981GQ4WBf1MsclKoIMhHX2WKN53ozat/Yl4KBhNqf/+YHB3l/p19ewpGNo6vfZOpR3 F/hM2PD7sFGaH2UMC2iTGspNcTyPrAc= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-480-Zp8_VYIyM_yhilpuLD9uEg-1; Tue, 12 Jul 2022 08:50:21 -0400 X-MC-Unique: Zp8_VYIyM_yhilpuLD9uEg-1 Received: by mail-ed1-f72.google.com with SMTP id o13-20020a056402438d00b0043aa846b2d2so6090285edc.8 for ; Tue, 12 Jul 2022 05:50:20 -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=zlS1macLaNTd81Oj5ywPGgZlXurfmcD93ODxkTdfIMY+TBa5fHf3Qc6kLVSBgrF5zz Vb/stS0kzQYWhdTRobPSvmxRusbzFituo1LaimbRKPkWUPLdiAfS18YNRTqtr0CreS8c Pl8YFLjHiAQo2xgPfxkDVjYlJICXCkrJNI3tjyG2iA5glce4h07fK9ITl1yemobFyHk7 g5vC6OME98hzozk+uZ8nXxY9ApvfMPzEZoWXadQxCx3Op4NsuRcYV6kOJ6LnHiMcV5fP VZcogAN9zLayKTdyocj+R5B6EQq9XhP3DeI/G9Dg11F8cjnh5vMLJo0BR98MOVaT6w5x ziPQ== X-Gm-Message-State: AJIora/7PnGGQiqWwZNgrAIIcu9b79jrrDIwpMzhOfGy1EfpOzLY4LRX HZQQTfuNLx1d/Q63AtEE19NW5tuZoExu6mQiW/dVAysTyxCWoLbmw+AutS+OtlF7Xv/VTlvCttW OJiam87dVL47wciv4TVhodZy+O4PZZvYfEGDi2BnknSmpZyjh31U0Zsqc9g2ulj/4m38= X-Received: by 2002:a05:6402:3785:b0:435:5d0e:2a2e with SMTP id et5-20020a056402378500b004355d0e2a2emr32821315edb.307.1657630219588; Tue, 12 Jul 2022 05:50:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u6OueKGRBOWqdhexCi8XcyZCK6lcdD6T3N3+aKammkLWfdCVe88p0NZLJUv8KE5GtAyjgbnQ== X-Received: by 2002:a05:6402:3785:b0:435:5d0e:2a2e with SMTP id et5-20020a056402378500b004355d0e2a2emr32821280edb.307.1657630219235; Tue, 12 Jul 2022 05:50:19 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id i19-20020a170906115300b007262b9f7120sm3747043eja.167.2022.07.12.05.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Alexander Bulekov , Darren Kenny Subject: [PULL 13/18] fuzz: only use generic-fuzz targets on oss-fuzz Date: Tue, 12 Jul 2022 14:49:51 +0200 Message-Id: <20220712124956.150451-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 Tue Jul 12 12:49:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZFjtF9eM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1FF34pRz9ryY for ; Tue, 12 Jul 2022 23:05:05 +1000 (AEST) Received: from localhost ([::1]:53244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFZX-0005Go-A1 for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 09:05:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLQ-0003Af-5u for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:42568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLN-0001U1-EQ for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630224; 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=7mYAXtu9QqChUwSoBVw/A2QmHhKrw9riHG3v6wKjbGo=; b=ZFjtF9eMH4iXg/hW6aZpciMuhXhHhOVpvhm6S9SkrLU2KfPcdCyOU0GGhT9G86PVQTk4Uf zMGtIKJ9zVLRF/Z3cUqAVkDUGKU44MFjFW3lpRcJAccrzmnqaOhRj+8hA4OJFbBxewGdx/ mT4VQMqIl0/RHG3GgRfq+rEo3wjuTq4= 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-563-KquNBRq8PWiz4M-qBg5nXw-1; Tue, 12 Jul 2022 08:50:23 -0400 X-MC-Unique: KquNBRq8PWiz4M-qBg5nXw-1 Received: by mail-ej1-f71.google.com with SMTP id qb28-20020a1709077e9c00b0072af6ccc1aeso2238243ejc.6 for ; Tue, 12 Jul 2022 05:50:22 -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=7mYAXtu9QqChUwSoBVw/A2QmHhKrw9riHG3v6wKjbGo=; b=XD73HsMWoiXGE6KT9PBooeuEl1DgVvtxFPmJRjT7Dc8T3HfGK8+hqHaY2E7NbCgW4l zxm+RO8q3dl6+HoOGypAgdOiv0hFLM/2zxSfVSPK5qTcaifSZZEUnoEqdmn6X75tTP6L ricm4q+lAfRvzd1NjZ2Z9jQD1xETUMybFKErtR3H4xkSKXmvvciORLZSc8/aIOzAkZ39 Ai3h/AR2nNj36nQVQBqHi6vG+sp23KOP01iXd5w1si59ktbLe16J1TFN/cQbYKMSuUCC sJ5HWbsfK1nJUclec9QlH85iNdzXdK0t8PSBCQrYO5qxO6InI8snFNCc7Be5kKuzf862 cn9Q== X-Gm-Message-State: AJIora+K+IqwaJEpnWGn5JnW80qDnZ+sipNMZ8Un8VcHzertps34Euzf 5r9499cpGXM+LJItk2lKMcPhByjAvKPamMpGlRuqrqlrQ/k+9xR6L8xTH9IPHfCxXIPjwX7hXsa bcYtI20sDmQV7CoUBhQTjemu0NG3XXrirAzShLYOE+V+EfU/5E1UQBnG6smf85aCCTpI= X-Received: by 2002:a17:907:1c12:b0:72b:4a03:2290 with SMTP id nc18-20020a1709071c1200b0072b4a032290mr13631200ejc.163.1657630221482; Tue, 12 Jul 2022 05:50:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tMptqa0O5Z0T/1yIKRWTyd/rfyf/a793pjiBZDIq5SqCbov+fw29LSr1GRExV5eVEXGRn1Zg== X-Received: by 2002:a17:907:1c12:b0:72b:4a03:2290 with SMTP id nc18-20020a1709071c1200b0072b4a032290mr13631184ejc.163.1657630221257; Tue, 12 Jul 2022 05:50:21 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id f1-20020aa7d841000000b0043a2b8ab377sm6014984eds.88.2022.07.12.05.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Subject: [PULL 14/18] audio/dbus: fix building Date: Tue, 12 Jul 2022 14:49:52 +0200 Message-Id: <20220712124956.150451-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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 013c694a49..ad92d288a6 100644 --- a/meson.build +++ b/meson.build @@ -1672,6 +1672,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 Tue Jul 12 12:49:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YgyOOpDJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj11z4pG4z9sFk for ; Tue, 12 Jul 2022 22:55:19 +1000 (AEST) Received: from localhost ([::1]:34936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFPz-0000dW-ER for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 08:55:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLR-0003BD-7u for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLO-0001U6-7N for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630225; 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=YgyOOpDJAeOACpc102EU10FkP61vs+RqdslHAl9R+2gNaWyoMl3LE0Eh82hi7SSQhNOzeM pfkSF/z8FnIpXqHQoCEkrAuonzUHq+Nmi8nZt01NDZIXAsgXMwG9iDnoeYLIJdolDE4xrT 3yz/BP/AdfUe6BoQLcOpB835abkdQL4= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-596-cMKDymXpMiqpwk_9Vq4U3A-1; Tue, 12 Jul 2022 08:50:24 -0400 X-MC-Unique: cMKDymXpMiqpwk_9Vq4U3A-1 Received: by mail-ed1-f72.google.com with SMTP id g7-20020a056402424700b0043ac55ccf15so5254246edb.4 for ; Tue, 12 Jul 2022 05:50:24 -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=lTSyLVivx8uOV75cCZxDXVV+0+gfQ4jVzyngFOIS9kXuZExFA8F1uweTbE7/rrSufT 0DWq1Its4g1UMyUKWxLHxIQq2Fzobfvi7eD1vHWSQG/zcNiJZ6URF1ezslIde/k1eia2 Wsia+jafP5vt2XAUuYoMcAnjZUVZXyXxU+Hkx2G5vwzTnEeLLlszfNcWaW30Ws7K7OHD oCeXMPknBLeeqQ7/rm5aaDIUWfYznf9poDJAgG0RVn21esT5/ocuupUrYZrxjzuDEKnE awbdbEQaCeXva/YVh1kdvAO/+jUkPVkCr8cPOpfjftQK4L+8HI6nQe2ab1lDKedolrgK Gm0g== X-Gm-Message-State: AJIora9MiDnshZ9PZs+0RNPxUWx6+N3/Kvo1hjj8K65jmTbVn3J8YHmK 1nq/zruNdRgjE7BfhQJ/D4ybBkTqaeBA4j42FugT6LqMCdAy490/m3SH+NLZTBHOvWsqDnHrIpn LGit9yn6nEVWaM2fFgjIFtFb7BjcTKmftJnMX9nhtX371WsaL8nrLyVZER4OhJfNrbLQ= X-Received: by 2002:a17:907:a05b:b0:72b:33f9:f927 with SMTP id gz27-20020a170907a05b00b0072b33f9f927mr18783895ejc.707.1657630223073; Tue, 12 Jul 2022 05:50:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZng0larLNfY8GrXnARghrTYV5rFS4agsUQfJ8E9VWQ0YoJ8KKVDIc/kPCmy48jM1aAcRAyQ== X-Received: by 2002:a17:907:a05b:b0:72b:33f9:f927 with SMTP id gz27-20020a170907a05b00b0072b33f9f927mr18783871ejc.707.1657630222770; Tue, 12 Jul 2022 05:50:22 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id x24-20020aa7d398000000b0043ab1ad0b6bsm6020205edq.37.2022.07.12.05.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Miaoqian Lin Subject: [PULL 15/18] accel: kvm: Fix memory leak in find_stats_descriptors Date: Tue, 12 Jul 2022 14:49:53 +0200 Message-Id: <20220712124956.150451-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.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; From patchwork Tue Jul 12 12:49:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=iUevqCQp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1DX3bXMz9ryY for ; Tue, 12 Jul 2022 23:04:28 +1000 (AEST) Received: from localhost ([::1]:51272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFYw-0003xU-A1 for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 09:04:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLZ-0003Fb-5y for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:31588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLX-0001WM-OE for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630235; 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=VRrYKlDmJSTg+EmFGqVl3x/Dcb1GLjJtX5irMQnBiqU=; b=iUevqCQpMvJWG9hYeR8ZnmqIPNmLUh44gFTvu1Ff/juHJMgRpmlnSo66InDto0A2WVDi4o oBN11exS4vK4ZyK6HTmsVemnF2yrbU3zfBUPW3giTLUtTBZ/uLxI96VmYy+dBrfSld8TwA EcDeA0TkMzHyJZkCdPdjHRgswcggdqM= 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-623-vLFJrqgrMxKcfXZyU77Y0g-1; Tue, 12 Jul 2022 08:50:26 -0400 X-MC-Unique: vLFJrqgrMxKcfXZyU77Y0g-1 Received: by mail-ej1-f70.google.com with SMTP id sa13-20020a1709076d0d00b0072a8791298aso2259186ejc.7 for ; Tue, 12 Jul 2022 05:50:26 -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=VRrYKlDmJSTg+EmFGqVl3x/Dcb1GLjJtX5irMQnBiqU=; b=zbYJJPkR930XU7uacXjLYFSuoff4zrS/dg9foJwSVsTk/IJMhupqiPVuhnAzmChAif dA6jxIggyWczfS3J2YkkWpoi+6HAKEEaHdw+XpngiYFiC0eLZYQUQS9dmHNBZDUYUyxb F7emA/pnn6PYg7bbNDFgPTBZ4SlHuyAnME6W94TL0+2MjmDD7uo12Y0G8y4kiT/H1yEc 8DH8jOM1ADz6erOIkqJncgGs7f2GOTECynO8Vo+bHshe7t5WItLkKv+wDbpqaoPttRCk sSEfuD4+sdt0/3NLSX8fgOyGfwNq4RNtuM92VvRp8zpWanWa8quDel47Cq2w/6p2pL7i xtlg== X-Gm-Message-State: AJIora+z6ilcN8khJl6i7u3VE3YAWJv10m7L97JGF36L6/3nMCUd0Q8T vQfIsWKGy8l74a0DRfTg6ewu3XJI614pIAWlqPnZfLrJ5RwOEgPMc9EYwdJAIQzRhbq/b8SzfqG 0w2wY/JDLRHGaLJrgygrzDAOfH+00+wKfgTHe4qFQA/fVrPhRl+yQOOxKwusTvTbTCDw= X-Received: by 2002:a05:6402:1914:b0:43a:d548:8adc with SMTP id e20-20020a056402191400b0043ad5488adcmr13885457edz.214.1657630224993; Tue, 12 Jul 2022 05:50:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tYeB+Mpcvx6iV5Tl26e1eLdsBKIZZHK5tYDbj6cd3+BD7JNkK0eC1fBlHFhVTo1ahZRIUpWg== X-Received: by 2002:a05:6402:1914:b0:43a:d548:8adc with SMTP id e20-20020a056402191400b0043ad5488adcmr13885416edz.214.1657630224681; Tue, 12 Jul 2022 05:50:24 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id ap13-20020a17090735cd00b0072a66960843sm3832951ejc.51.2022.07.12.05.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:24 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Akihiko Odaki Subject: [PULL 16/18] build: Do not depend on pc-bios for config-host.mak Date: Tue, 12 Jul 2022 14:49:54 +0200 Message-Id: <20220712124956.150451-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Akihiko Odaki Commit 45f1eecdd63f9e4fa93fef01dd826e7706ac6d7b removed the dependency from configure to pc-bios Signed-off-by: Akihiko Odaki Message-Id: <20220624150258.50449-1-akihiko.odaki@gmail.com> Signed-off-by: Paolo Bonzini --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec4445db9a..b4feda93c8 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ x := $(shell rm -rf meson-private meson-info meson-logs) endif # 1. ensure config-host.mak is up-to-date -config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/scripts/meson-buildoptions.sh $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION +config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/scripts/meson-buildoptions.sh $(SRC_PATH)/VERSION @echo config-host.mak is out-of-date, running configure @if test -f meson-private/coredata.dat; then \ ./config.status --skip-meson; \ From patchwork Tue Jul 12 12:49:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XBBJ1ZrJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1DS1vLvz9ryY for ; Tue, 12 Jul 2022 23:04:22 +1000 (AEST) Received: from localhost ([::1]:50918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFYp-0003jn-8H for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 09:04:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLU-0003CE-0P for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:34891) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLS-0001Uo-54 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630229; 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=VKBzYHIAT6VBcq03PETtR4a9TQUaMhkMxNp2UTkCvng=; b=XBBJ1ZrJNiloE50Aj7wQShcb9Deo0LCg2ihCpcHgb2rGClCWxlFJEWO3OwCU0OvAT+Tew3 Q8FmluKtqaGe0RUUCygaOfjywm9/feXoTLV4r6qgzDJL4CXWx0JxkYYHr5RVTM8Ycnr0sw TjTWqzPAicMMQs7L4FIjqHwsBNe2A+0= 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-15-EM5US8_lNIuLVkINNcwxuQ-1; Tue, 12 Jul 2022 08:50:28 -0400 X-MC-Unique: EM5US8_lNIuLVkINNcwxuQ-1 Received: by mail-ej1-f72.google.com with SMTP id gb37-20020a170907962500b0072b820af09dso645471ejc.20 for ; Tue, 12 Jul 2022 05:50:28 -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=VKBzYHIAT6VBcq03PETtR4a9TQUaMhkMxNp2UTkCvng=; b=Q1TucxX8Vp5puXVdBvI13EKmPMoK75BgSq9Fx/2SioW/URbWPESQraktRA/vXj+eIL qHe0tDH/PoW4qd3cg+9CIzqBHuOvJXRxOwSSiXmiVFujJlWPAHywOdPyWFQ+A2YRMRP1 K9QVcCVMeliDYBHRn4Mwu5XkJRqDybqxlltnAhfp3e8jrMkZLiWvYr/BhCELvDU6xczY b/o4di7pkn/rD1DFtL/1TcMOXd/ZvX+SkCY75u8znga7gmJW4k24ICg9QhLDOwZEDH+/ lnlglbb3/Vum9xXxlrEgs0szVkZTRih1GhZ/L5wxzs1ZzUSnEWApNDvSPkXCER48ovmU ae6g== X-Gm-Message-State: AJIora+YizsvpLRt8rG3pRYfm2ogcmOkyYXMw1+Yv0djfwSR9MenD2L0 NajvlH+UVseiArYTSJg1t5koC5VMnKYYyRhkClEByZUULrSiGSbmyfp//y1pW6WIsk8cDpdT9la Pj8XypGtxVfUDD5yNhn+1iayGgf59ckteBPKfY0nF99Ds9yQoJPQiioKx1ssioKs9BdI= X-Received: by 2002:a17:907:7202:b0:722:e4d6:2e17 with SMTP id dr2-20020a170907720200b00722e4d62e17mr23557876ejc.434.1657630227121; Tue, 12 Jul 2022 05:50:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tf22oQqrWUCezgPW3nunB3SitYzOfN4V2IsxM+yv/zV6CCI9y2lxR/OXV8sewlC4kbvQPvYA== X-Received: by 2002:a17:907:7202:b0:722:e4d6:2e17 with SMTP id dr2-20020a170907720200b00722e4d62e17mr23557857ejc.434.1657630226848; Tue, 12 Jul 2022 05:50:26 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id u1-20020a1709061da100b006fe8c831632sm100496ejh.73.2022.07.12.05.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Akihiko Odaki Subject: [PULL 17/18] qga: Relocate a path emitted in the help text Date: Tue, 12 Jul 2022 14:49:55 +0200 Message-Id: <20220712124956.150451-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Akihiko Odaki Signed-off-by: Akihiko Odaki Message-Id: <20220624145455.50058-1-akihiko.odaki@gmail.com> Signed-off-by: Paolo Bonzini --- qga/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index c373fec3ee..5f1efa2333 100644 --- a/qga/main.c +++ b/qga/main.c @@ -223,6 +223,10 @@ void reopen_fd_to_null(int fd) static void usage(const char *cmd) { +#ifdef CONFIG_FSFREEZE + g_autofree char *fsfreeze_hook = get_relocated_path(QGA_FSFREEZE_HOOK_DEFAULT); +#endif + printf( "Usage: %s [-m -p ] []\n" "QEMU Guest Agent " QEMU_FULL_VERSION "\n" @@ -270,7 +274,7 @@ QEMU_HELP_BOTTOM "\n" , cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT, dfl_pathnames.pidfile, #ifdef CONFIG_FSFREEZE - QGA_FSFREEZE_HOOK_DEFAULT, + fsfreeze_hook, #endif dfl_pathnames.state_dir); } From patchwork Tue Jul 12 12:49:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1655420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=V96PLMdr; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj1Jq024Cz9ryY for ; Tue, 12 Jul 2022 23:08:11 +1000 (AEST) Received: from localhost ([::1]:59538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBFcW-0001BT-Da for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2022 09:08:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLY-0003Fa-MT for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37144) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBFLU-0001Vg-6N for qemu-devel@nongnu.org; Tue, 12 Jul 2022 08:50:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657630230; 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=IEBtrhHOZoW2IpVmQ2emXJdx/NNh7WPD0iaL+UDhKTg=; b=V96PLMdrvH6O3N79TMUSJVtxsKjRnOWODEXcZQIXpNHjKO5v1A0ZJwvDtPcbm5ZhFahy6d ScZ2knbKhGxQtIkVYpBF22fcA9lVSfw993k94eQolcJII9Llbb5InuznO4/M1UigZafHCW svmwweltIozyhHJrpMMpQuDORfk944M= 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-404-7BuHiN8fMS2SE_DwlFesHA-1; Tue, 12 Jul 2022 08:50:29 -0400 X-MC-Unique: 7BuHiN8fMS2SE_DwlFesHA-1 Received: by mail-ed1-f69.google.com with SMTP id f13-20020a0564021e8d00b00437a2acb543so6086362edf.7 for ; Tue, 12 Jul 2022 05:50:29 -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=IEBtrhHOZoW2IpVmQ2emXJdx/NNh7WPD0iaL+UDhKTg=; b=o+vnV03zk/7XmhY5gSA0hNtiMNM5hDTeuhl5atNUHHVYLYK9gc7Ti7nmgiKECsQyZK RAucGqrM9GpRilXNne+Asv3aLArKV7V4/eph33btfH8YfaE+Ale24BOV7JNeBR5n2f2x vsvIIL4vnjL1V3S0T72OSQ2tCKdp2xQvfErhTnJSx8SwcshkHjm+RnUWWYNisTmFUPzr 5amxfW55kB0xcSos6qnv3P67y5uWBEyRmI9wt+EKYitz54axQyzXyoqSlsxGdo7uFZjO 5Dp9Hc64hk3zxgMt5AYC4SmCThfz9AGQfY+9jEWn+3ZsFeyE9yvimyJgJFmzf0EASl5D 020w== X-Gm-Message-State: AJIora9Av/goghLy3Da48xabrOUCGLTR06VvkMDI5evsaojEuxVIsYo+ BQFUcumpyx1IudfT67eoJ5lcIGeYI0Sd7WUHFZufTGPsFhf3tU0qnqC+SqvMNxvoA2zjeVTUwI8 rNiVutDUfjA/vjGM2A786DYS8z8Sfa2uNPY4Plm+l40Q1bw7UyLX8/a8qxZGbtHf8X9M= X-Received: by 2002:aa7:c84a:0:b0:437:bc9c:af63 with SMTP id g10-20020aa7c84a000000b00437bc9caf63mr30491562edt.370.1657630228293; Tue, 12 Jul 2022 05:50:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vu4zLlhw1hr+9GIvJX6L1lvEE8SZ0MaoXpH+NOCBMro1PRjhSvXxur8+8MasIu/dT3r+K5sA== X-Received: by 2002:aa7:c84a:0:b0:437:bc9c:af63 with SMTP id g10-20020aa7c84a000000b00437bc9caf63mr30491542edt.370.1657630228077; Tue, 12 Jul 2022 05:50:28 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id ec10-20020a0564020d4a00b0043a45dc7158sm5916949edb.72.2022.07.12.05.50.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:50:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 18/18] meson: place default firmware path under .../share Date: Tue, 12 Jul 2022 14:49:56 +0200 Message-Id: <20220712124956.150451-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220712124956.150451-1-pbonzini@redhat.com> References: <20220712124956.150451-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, 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Fixes: c09c1ce7e9 ("configure: switch directory options to automatic parsing", 2022-05-07) Signed-off-by: Paolo Bonzini --- meson_options.txt | 2 +- scripts/meson-buildoptions.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 97c38109b1..9a034f875b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,7 +6,7 @@ option('qemu_suffix', type : 'string', value: 'qemu', description: 'Suffix for QEMU data/modules/config directories (can be empty)') option('docdir', type : 'string', value : 'share/doc', description: 'Base directory for documentation installation (can be empty)') -option('qemu_firmwarepath', type : 'string', value : 'qemu-firmware', +option('qemu_firmwarepath', type : 'string', value : 'share/qemu-firmware', description: 'search PATH for firmware files') option('pkgversion', type : 'string', value : '', description: 'use specified string as sub-version of the package') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index d0e14fd6de..4b7b8ffaa2 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -42,7 +42,7 @@ meson_options_help() { printf "%s\n" ' --enable-trace-backends=CHOICES' printf "%s\n" ' Set available tracing backends [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/syslog/ust)' - printf "%s\n" ' --firmwarepath=VALUE search PATH for firmware files [qemu-firmware]' + printf "%s\n" ' --firmwarepath=VALUE search PATH for firmware files [share/qemu-firmware]' printf "%s\n" ' --iasl=VALUE Path to ACPI disassembler' printf "%s\n" ' --includedir=VALUE Header file directory [include]' printf "%s\n" ' --interp-prefix=VALUE where to find shared libraries etc., use %M for'