From patchwork Mon Sep 11 19:53:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 812578 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="DCPeutxr"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xrf5B2Fgkz9s0Z for ; Tue, 12 Sep 2017 06:03:58 +1000 (AEST) Received: from localhost ([::1]:60265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drUw0-0003xY-FF for incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 16:03:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drUpE-0006JV-5W for qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:57:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drUpA-0002KK-7M for qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:56:56 -0400 Received: from mail-by2nam03on0078.outbound.protection.outlook.com ([104.47.42.78]:23232 helo=NAM03-BY2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1drUp9-0002Ji-SM for qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:56:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WkoXh+C6Y2peglX/yappldaH2L/CQB7rjhPI52qehCM=; b=DCPeutxrpiVussnPs8W9fXKKUNvPPYK/wkylAO83QPQrBAqwBZgUElHL9JQwfaUA+2cgviPbQQIiM9AHoPZ/f9kvnIL80lBFw8VL6g46dXLlgrlp8LfHXr/MJz3PpiPM3VLc560NRuYIO6/a1k69PTA7O4FUl1w7tf1k/l09AeM= Received: from CY4PR02CA0028.namprd02.prod.outlook.com (10.175.57.142) by BN3PR02MB1126.namprd02.prod.outlook.com (10.162.168.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Mon, 11 Sep 2017 19:56:49 +0000 Received: from CY1NAM02FT055.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::209) by CY4PR02CA0028.outlook.office365.com (2603:10b6:903:117::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Mon, 11 Sep 2017 19:56:48 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT055.mail.protection.outlook.com (10.152.74.80) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.13.11 via Frontend Transport; Mon, 11 Sep 2017 19:56:48 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1drUp5-0000Ix-KZ; Mon, 11 Sep 2017 12:56:47 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1drUp5-00005y-G2; Mon, 11 Sep 2017 12:56:47 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v8BJubQt017539; Mon, 11 Sep 2017 12:56:37 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1drUov-000055-Cy; Mon, 11 Sep 2017 12:56:37 -0700 From: Alistair Francis To: Date: Mon, 11 Sep 2017 12:53:02 -0700 Message-ID: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23322.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(8936002)(8676002)(9786002)(50226002)(2906002)(81156014)(81166006)(478600001)(50466002)(2870700001)(36756003)(36386004)(5820100001)(189998001)(118296001)(33646002)(54906002)(106466001)(2351001)(47776003)(4326008)(110136004)(39060400002)(305945005)(76176999)(5660300001)(6666003)(6916009)(23676002)(356003)(63266004)(2950100002)(77096006)(50986999)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR02MB1126; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT055; 1:W65NMV6DukhdJfhTGD1CIIi5hhlfk+Bg1vLrsdz1/MKw8eE3vaL7pYffgaOQvL1HCfyRTWZhHVjY9fbkEC2yX9UsPK0JiLEDOkRkk8xnWoFIMTtfzPsfgf7KvFO2EWz3 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 879489c6-146f-45ea-7222-08d4f94f3cd2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR02MB1126; X-Microsoft-Exchange-Diagnostics: 1; BN3PR02MB1126; 3:r/dbJqwdPnFg5dfg1ehQ/e79G58ZSFd11AUVIO/DOvyutKmBZbCE3q56j9MJbCmzAWhyu2z7JaDwXvF9Exd6mVyV9fo9x+nIpeEWD3+dMNgamGCVySgCBI4h4kWjE+GkNEi9J4evlWVrnrHCjBoIwphgP21LX6bJRFbj7NPdIxPuywwyLWy2lCLpKSO01zPrkzogqT8r0HBwPYMpL3Na7obEihe13nvA5ptMBdcvhNK+3WigSIVzv0x2pfDoiCKecp4Bezz8ZNYwj1JtciTRbRVujy99caa2XNMuJ2lyaSDLqievaViZxzk/gGtFUklSeIpWO5V22sxiY2Ta+bU5fNELt443Emd4c68E5WSh6S4=; 25:5Jw6Iv9w1aNmc5CoMWHD93Eqcmnsc/N8YTwjB3FSEqtMfFatI9WlcbyZbw04sCpiBXAHdORnJDqgzd4LOYqnhCGTYEHmD7QpO0oHyAvc4tac+SpLBdrpCw8AJ7Xd/o0yGmkyl3m2Ov0w+Hb/R/SY8T8HnYjobQU+Xu1nocnSCeAZGQnK1GDn80q7EixNqPDZCUz64HWm5nzthYOe9f107ybOP1X3ZrOt6erIHWf5zyU1I9Wt5NQQO7QOEnuNsNd6XIoJxrDG3q+i0mOKhlt2To+9dV0fMkimPnIpGya1Gk/G6SeiOxOdihSd1209c1Ftveqv5lRUEu5XtcVRJZ603g== X-MS-TrafficTypeDiagnostic: BN3PR02MB1126: X-Microsoft-Exchange-Diagnostics: 1; BN3PR02MB1126; 31:n7aRy5xFKekxPbxyTRApzwKNpD7dIg0z7bIlvEamHBygZF/QIVELARFH37Cx5JvPcxP3BFvfCZG330mNNe64Vl5GJvVIIHE2NI6WBaEObsGSXRSo/Pajd+h/iM2RhU8Eq/gwx3rp3Fn/I9AdG6tlkNnIQG7fFtglqhgCwforb5TycZgCfVp63z4qbThOA3mS86NxNNQ2YLL2rpG+PkdDCLHv+RPdyRTjvkkomhFEKWc=; 20:1Y+N12K6vcXIe8gdooVQObjfcIB4STaczj6OhcqZblyoWOnnwKp4hgF11ZxSn+xRfqdVRzZsXbpm9WOPGTu7qtfwLlg5w+9u/IyynKbMZFZZD7DKrWmJHqfqy1wt/6NnJa5VTx3kiW7D5dpcytO48KJP0uTTyoFKTJXXyrOaacQl6noauFBoJJxD5XhWAIODzyk+6Cs8QA72FH1Oxlp8aUL+2ZQQYuSStkxLQdzZkQYijHf/+7xfoLuoziY117812dxNR0DxiwjUNbYIszKUOH7V0Eu1O54w3xpqUxVJpjqMKPko89rMrXJiz4LNSNEFrh0dfwHs3L6NQl+hmoy/RL6tZVHdjVYCccX5F6ZCTH2AsNLHs8ldySd2ANGv4++metCG5x8sBCcJAdXp29jWWAT4ygmUbTmH1WyNeUw8GVPk4YCjv9Ws2nI6y3bu5ixKN2NQlTPEJ2tPlUoPRBvFxQpfnK94/5hceMZKHG1R3YTKnY1Pgwbm66EIXmSLw9R8 X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(100000703101)(100105400095)(93006095)(93004095)(10201501046)(6055026)(6041248)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR02MB1126; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR02MB1126; X-Microsoft-Exchange-Diagnostics: 1; BN3PR02MB1126; 4:BK1lGPYoLAoEL8ul7sJaafFmW3naNuVzZ4PetbGY45MJMQdIL/YU3nUsQ2zkYxGUOLaBF78WclWbWMda0Nanznv12/t9Dogy5MfzEmz5q2h4lee6UV51zpz1Gt0vv+BPlEYtTavpaZ8EdW8F1wb+mFyGKLBeEgKjvdYhfH0mq+6wydcdoEOcq9vg+/7b3pWLpXjRfQaCDFlE4tHh7AVXX2sdkP3tWwWGGCwnjVq/2ZufIMuVY6MXKHeRwC8rrsN9eYgKkXEFPl/EMmKkReWC+qLcCyE3txmQBST4xcDC0Uw= X-Forefront-PRVS: 04270EF89C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR02MB1126; 23:11puOWBAZdsakqE44bSCkDKNgpPYOYuftlGEw1YN3?= ruCKwgzqV0D2b8DYEtjNGp2gkPvch0FyIdPZ8w4WG0z6VyMQnwrB8fSJ4Nn0JtU+Z32y6O1cK4KKrkFXd6lEbNSuObWSkNqbsfmwjRLUIz3HH20tnHnX8qllJQxUJ09vm2+9xho53xDOSrDPn2GbjWUUCMkqqheyQnKprI5jQHXXPqgeITUpca1W9obOLImRhDWIH0VMKgctOma8NM0oIhlL/AlkSq7VIwpXqVwOUAeKgpNaNjhCd3n0uA8DE4Asuu0aJTLNVXxgeraL2Vnq5TeF0NRr+8Zr9rXkY+au9WvgtAhbkCvQPjFqSMTPCbSTA0t2N5b7DvvNhh3JzwhYEqaJ8m8acpAeiN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1pJHVKoIprkQrJXNPzu4cuNBYiHF2wXtz/Ab2z1e+MLqs36j3yAaNqTQH9OJzaEp7VQ==; 24:xwooTq5n+0jxCoBjuDPBneZoUVrCEcB360vukAjXDrBlP6rtWL8GkQ3Eo8/sJ6a+dLP6lF6nx1mtNxwK89kNtfBwirdsRom+vYaYtvf4pwA=; 7:xpe+PxxM1w5xYHja6XRpsW5Ixx4QCIJq7N6oZaq7u0bgoRYZHBOf/jrErC6wV+kDX5vxzeyYui5PJj7An+l5sz9blIhhb7JHfKjT5gncO6OB+aSjHfI8zknE5Uu4VSubxEiFjlwIALxOpnjEST56EfR5YvpEqk8uwCC+MSbY8RW+lJM/h2am3rvTbRR5uxicrmomNa8W3Y7/Uy+G4duKJTXSNkeQzhu6YZjm9BdFIf4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2017 19:56:48.0646 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR02MB1126 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.42.78 Subject: [Qemu-devel] [PATCH v4 7/8] Makefile: Remove libqemustub.a 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: alistair23@gmail.com, pbonzini@redhat.com, armbru@redhat.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Using two libraries (libqemuutil.a and libqemustub.a) would sometimes result in circular dependencies. To avoid these issues let's just combine both into a single library that functions as both. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- V3: - Fix up the docs - Rebase into this series V2: - Skipped Makefile | 7 +++---- Makefile.target | 2 +- docs/devel/build-system.txt | 16 +++++++--------- tests/Makefile.include | 6 +++--- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 337a1f6f9b..8f1273a159 100644 --- a/Makefile +++ b/Makefile @@ -344,7 +344,7 @@ subdir-dtc:dtc/libfdt dtc/tests dtc/%: mkdir -p $@ -$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(chardev-obj-y) \ +$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \ $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) @@ -364,12 +364,11 @@ Makefile: $(version-obj-y) ###################################################################### # Build libraries -libqemustub.a: $(stub-obj-y) -libqemuutil.a: $(util-obj-y) $(trace-obj-y) +libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y) ###################################################################### -COMMON_LDADDS = libqemuutil.a libqemustub.a +COMMON_LDADDS = libqemuutil.a qemu-img.o: qemu-img-cmds.h diff --git a/Makefile.target b/Makefile.target index 7f42c45db8..0a80caf79c 100644 --- a/Makefile.target +++ b/Makefile.target @@ -193,7 +193,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y) $(QEMU_PROG_BUILD): config-devices.mak -COMMON_LDADDS = ../libqemuutil.a ../libqemustub.a +COMMON_LDADDS = ../libqemuutil.a # build either PROG or PROGW $(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS) diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt index 2af1e668c5..0d54294cb1 100644 --- a/docs/devel/build-system.txt +++ b/docs/devel/build-system.txt @@ -232,15 +232,13 @@ The utility code that is used by all binaries is built into a static archive called libqemuutil.a, which is then linked to all the binaries. In order to provide hooks that are only needed by some of the binaries, code in libqemuutil.a may depend on other functions that are -not fully implemented by all QEMU binaries. To deal with this there is a -second library called libqemustub.a which provides dummy stubs for all -these functions. These will get lazy linked into the binary if the real -implementation is not present. In this way, the libqemustub.a static -library can be thought of as a portable implementation of the weak -symbols concept. All binaries should link to both libqemuutil.a and -libqemustub.a. e.g. - - qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a libqemustub.a +not fully implemented by all QEMU binaries. Dummy stubs for all these +functions are also provided by this library, and will get lazy linked +into the binary if the real implementation is not present. In this way, +this static library can be thought of as a portable implementation of +the weak symbols concept. All binaries should link to libqemuutil.a. e.g. + + qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a Windows platform portability diff --git a/tests/Makefile.include b/tests/Makefile.include index fae5715e9c..3d6726e95c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -561,7 +561,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests # Deps that are common to various different sets of tests below -test-util-obj-y = libqemuutil.a libqemustub.a +test-util-obj-y = libqemuutil.a test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y) test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \ tests/test-qapi-event.o tests/test-qmp-introspect.o \ @@ -617,8 +617,8 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \ $(test-io-obj-y) tests/test-timed-average$(EXESUF): tests/test-timed-average.o $(test-util-obj-y) tests/test-base64$(EXESUF): tests/test-base64.o \ - libqemuutil.a libqemustub.a -tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o libqemustub.a + libqemuutil.a +tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o $(test-util-obj-y) tests/test-logging$(EXESUF): tests/test-logging.o $(test-util-obj-y)