From nobody Sun Nov 9 20:45:47 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552298031330853.5080175662371; Mon, 11 Mar 2019 02:53:51 -0700 (PDT) Received: from localhost ([127.0.0.1]:58692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Hct-0007xj-0O for importer@patchew.org; Mon, 11 Mar 2019 05:53:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3HaW-0006Zj-FQ for qemu-devel@nongnu.org; Mon, 11 Mar 2019 05:51:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3HaU-00008h-MG for qemu-devel@nongnu.org; Mon, 11 Mar 2019 05:51:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50084) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3HaU-00004t-8z for qemu-devel@nongnu.org; Mon, 11 Mar 2019 05:51:14 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5DC0AC04BE02; Mon, 11 Mar 2019 09:51:11 +0000 (UTC) Received: from thuth.com (ovpn-116-155.ams2.redhat.com [10.36.116.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93C5619736; Mon, 11 Mar 2019 09:51:03 +0000 (UTC) From: Thomas Huth To: Paolo Bonzini , qemu-devel@nongnu.org Date: Mon, 11 Mar 2019 10:50:54 +0100 Message-Id: <1552297854-25847-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 11 Mar 2019 09:51:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] hw/char/parallel: Make it possible to compile also without CONFIG_PARALLEL X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Miroslav Rezanina , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" For the downstream distribution of QEMU, we want to compile without CONFIG_PARALLEL. Commit 9157eee1b1c076ff3 already moved the function parallel_hds_isa_init() (which is still required for linking) into a file that is included anyway, but commit bb3d5ea858e7f888563a moved it to a separate file which is only compiled again if CONFIG_PARALLEL is set. To be able to link QEMU again without CONFIG_PARALLEL, the file should be considered for linking for all targets that have CONFIG_ISA_BUS. And while we're at it, add a proper comment in there with the rationale for the separate file. Signed-off-by: Thomas Huth --- v2: - Include parallel-isa.o only for CONFIG_ISA_BUS (since it depends on ISA) - Do not rename the file anymore - Removed the check via object_class_by_name() - otherwise user might get confused if the specify one parallel port which is then silently ignored hw/char/Makefile.objs | 2 +- hw/char/parallel-isa.c | 3 +++ hw/i386/Kconfig | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/char/Makefile.objs b/hw/char/Makefile.objs index c4947d7..cf086e7 100644 --- a/hw/char/Makefile.objs +++ b/hw/char/Makefile.objs @@ -2,7 +2,7 @@ common-obj-$(CONFIG_IPACK) +=3D ipoctal232.o common-obj-$(CONFIG_ESCC) +=3D escc.o common-obj-$(CONFIG_NRF51_SOC) +=3D nrf51_uart.o common-obj-$(CONFIG_PARALLEL) +=3D parallel.o -common-obj-$(CONFIG_PARALLEL) +=3D parallel-isa.o +common-obj-$(CONFIG_ISA_BUS) +=3D parallel-isa.o common-obj-$(CONFIG_PL011) +=3D pl011.o common-obj-$(CONFIG_SERIAL) +=3D serial.o common-obj-$(CONFIG_SERIAL_ISA) +=3D serial-isa.o diff --git a/hw/char/parallel-isa.c b/hw/char/parallel-isa.c index 639e179..a043832 100644 --- a/hw/char/parallel-isa.c +++ b/hw/char/parallel-isa.c @@ -1,6 +1,9 @@ /* * QEMU Parallel PORT (ISA bus helpers) * + * These functions reside in a separate file since they also might be + * required for linking when compiling QEMU without CONFIG_PARALLEL. + * * Copyright (c) 2003 Fabrice Bellard * * SPDX-License-Identifier: MIT diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 78fd703..4e4415f 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -9,6 +9,7 @@ config PC imply ISA_IPMI_KCS imply ISA_IPMI_BT imply ISA_DEBUG + imply PARALLEL imply PCI_DEVICES imply PVPANIC imply QXL @@ -25,8 +26,6 @@ config PC select I82374 select I8257 select MC146818RTC - # Needed by the board code: - select PARALLEL # For ACPI builder: select SERIAL_ISA select ACPI_VMGENID --=20 1.8.3.1