From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C58143C62; Wed, 6 Mar 2024 23:24:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 111E0402C0; Wed, 6 Mar 2024 23:24:07 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2081.outbound.protection.outlook.com [40.107.20.81]) by mails.dpdk.org (Postfix) with ESMTP id D3D88400EF for ; Wed, 6 Mar 2024 23:24:04 +0100 (CET) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Q/pTCdxcUtw+bm83KAeErZJIz0+VHlGdJ5zG64wBKwqw5pn5MJHAqsUJXLObKdnH3rsWnupc6y1tzfH6CPLJVTzWDXkyJMnC29xqvFyoXqiBySD/r2FFD1DgPfJAbl0k8cDcNk9o/jbOQKE2D3OIoqy8XSv54qtI03+O2n0tbVpaBgdpYRr8dPXZALBmTaBOcZn1h6lLO5CtmR/cxGwSZDlHUJ2he3Rn4Yobtn0i6UCvXgzHCbr/O1wdbOkr/bUllxbaPvyEEJGXP1o0vp5abE/mzmTtSbffF9elWrZIJ2vo7gBBu2Kw9H0WoUetGK+BJOzCMyny5OuDGtBWwO0ubw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y/aKcgafNrPOFFEVgAr6BmRyaSzQRd4oRiz4PcQUSeE=; b=mIO/jZMt7MQobF8sbexoqs9LjcuPi3te243vaj4nMP5cDtXj32nQ1/OSb/kExMxk06BWN6Qg7tFgQvN9U4JWOuOyX6kz1ZBjvfJm/tRBUqM2CElrZOKkEbARvmII8fFgRU7pYCn3lD+8WoUTygDL2N14k80Thoo87cvwml4lG0Da7vLHL7lbX4/qP1FiZtDiOCwYKdaXqE2sI7TFpZPU6PQBJn/dcYs2OODsnuHzGzmtO+hwOyyrcQBJIUeWqgorS5N8maQ5Y2apkQMp2tqK9bFwJrVs9vKL2IXJtLTru6AViVoMfI/SRKaRTK0ljJ+XN86tDI+OOm1om4QX22MqXg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y/aKcgafNrPOFFEVgAr6BmRyaSzQRd4oRiz4PcQUSeE=; b=6czPJVaJN7HOGs5Up56ws+fJE9thAgOtf8n1tll6qSXJZ6FlqNmm7eVt38HaQK6VvbpvGa93yG2TddKapt4oMzVH9uAfFxIStsGfocfRJTJy+PufHnyvEbFFdrzPSehthRsVUw/5DcogL65itMoqCAsePCQBBg3Xl2x8c58/RWs= Received: from DB8PR03CA0001.eurprd03.prod.outlook.com (2603:10a6:10:be::14) by GV2PR08MB8075.eurprd08.prod.outlook.com (2603:10a6:150:7d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Wed, 6 Mar 2024 22:23:58 +0000 Received: from DB1PEPF00050A01.eurprd03.prod.outlook.com (2603:10a6:10:be:cafe::ad) by DB8PR03CA0001.outlook.office365.com (2603:10a6:10:be::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24 via Frontend Transport; Wed, 6 Mar 2024 22:23:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB1PEPF00050A01.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Wed, 6 Mar 2024 22:23:58 +0000 Received: ("Tessian outbound 5180408f3322:v276"); Wed, 06 Mar 2024 22:23:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d530894e9d75d1cb X-CR-MTA-TID: 64aa7808 Received: from f707f5fb3535.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3F915D8E-7388-4B65-B0F7-6309D78CFDEE.1; Wed, 06 Mar 2024 22:23:52 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f707f5fb3535.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 06 Mar 2024 22:23:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZUHMePuKkesL3p3x5y+4Ya3mbTATEelBb5HUQsyXF3KyGEtwlk7O/b8t1Ij4Tn5OClvDOwHbv20QBIS56FjSNMvtxewXUEUBSSlMqBDV+QG5ju+eIRDlM3jHvdLbjRJga+g0EkrJoxYmL7OZgzbGNOkw+1gEuYguhttPaMTJTK3CWJBG11BmhlEpVzG0JcyveYFlGXSAWEOOWZk8By8GhcnW+j5Qz1ag5t5WfH7tfbN/e8Y6l0OW8g6xnTeB3xXI6tduMr3xQEzURbM3xZnty0yp5EeFqNDxOclHipDd1AtMEaOri7vG5FGpWmIkcWOd9ZgiMmVPBA3pQebepO32sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y/aKcgafNrPOFFEVgAr6BmRyaSzQRd4oRiz4PcQUSeE=; b=SXjuQZOLiKJDTf6JknvgDmjEq5ism4uM3v7OW7m6JhZJmO9GvSpiIWwBrSJG38yvxmrxVEK7tXwNa7fvxdeVYnIhaUZWDdkA2OOc+ah+1FlDYV4KQAAYmQ+7NA1MdobtJX2NTUKjbN4oTxaF69dhvrYnFjIEC3wctUUkmuZm4VI4zQaAAOyDGdP8JqY+LavFvLOnZxhLQBrqeS5/g8ryMKDlDc+zE8yn9cuZzDU1o8XTz7YwTxRcercXRbDUrYl2+50RVXClHQmbblEoz+NsbBVqO1s4CtUZJ3fsLAd6u9dt+GURdr7pXBPm/ElKwiF1rQatBSy9ZCg2xis6cB8f7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y/aKcgafNrPOFFEVgAr6BmRyaSzQRd4oRiz4PcQUSeE=; b=6czPJVaJN7HOGs5Up56ws+fJE9thAgOtf8n1tll6qSXJZ6FlqNmm7eVt38HaQK6VvbpvGa93yG2TddKapt4oMzVH9uAfFxIStsGfocfRJTJy+PufHnyvEbFFdrzPSehthRsVUw/5DcogL65itMoqCAsePCQBBg3Xl2x8c58/RWs= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB4PR08MB8151.eurprd08.prod.outlook.com (2603:10a6:10:381::16) by AM7PR08MB5447.eurprd08.prod.outlook.com (2603:10a6:20b:10b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Wed, 6 Mar 2024 22:23:50 +0000 Received: from DB4PR08MB8151.eurprd08.prod.outlook.com ([fe80::a021:80c7:5fca:634]) by DB4PR08MB8151.eurprd08.prod.outlook.com ([fe80::a021:80c7:5fca:634%6]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 22:23:50 +0000 Message-ID: Date: Wed, 6 Mar 2024 22:23:45 +0000 User-Agent: Mozilla Thunderbird Cc: nd@arm.com, thomas@monjalon.net, dev@dpdk.org Subject: Re: [RFC v1 1/1] devtools: allow libraries with no global section To: David Marchand , Bruce Richardson References: <20240306143539.160467-1-paul.szczepanek@arm.com> <20240306143539.160467-2-paul.szczepanek@arm.com> Content-Language: en-US From: Paul Szczepanek In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA1PR05CA0008.namprd05.prod.outlook.com (2603:10b6:806:2d2::15) To DB4PR08MB8151.eurprd08.prod.outlook.com (2603:10a6:10:381::16) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB4PR08MB8151:EE_|AM7PR08MB5447:EE_|DB1PEPF00050A01:EE_|GV2PR08MB8075:EE_ X-MS-Office365-Filtering-Correlation-Id: 9bc89074-c78e-4891-18d9-08dc3e2c1e03 X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: sXav4AOOXHCkSiVt2qSjsro8jgjjdaG/0WpDxUA2nvLO1Ry3A9kSFQjSSx8hdlm/vL2E67JSrTFlXRbpyLJNxSpdP02eF2/tdQRA/F1X09N5ZivMHEWaDmbIPlv7J/EGWwV0p4fC9jgytIN9ZgrNJiWWwWeB9jeHRe1jk4yT2EgehQyneg/jk8MPrQtsMu6OLhlL6xjhxqEJ4IumSLkaxrEtNMPkjIWmfQhyPZFlkDmZtWPuFupKFIdtgTuOWVm/LQQZncN+q+bn0DID9TRL0pqTlmxMy8Ge+k/iqYeIO+Fc0ypnFzlLblfYhky4CVw/GjkO7Keyb7nY+xd3OzjTsoNiosOiPD+kXT+YzdCV8diGQHsQ1rT8AmZCYwZeSO0ANnKmLR83tLags68TdP1oXpRqFP8I/OAjRaYIg9O6hpKZLI7r6GAO2AUpooceorIgQm/caEQ5THpqPW8cPm28lZz1xrz6B53NBJgTPqD06RzadMAwy4Puo486X8l2VX1NZfqA+x+jrSKvfdoHcPlFU5fGqWb88Ppb2bnJuiNFihq2tjqjyv3MdIbUBs5fk7wcn8U2s8OSvLbZy4DwYbP7u72WE/EXDdM93x7kDrzBWF0= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB4PR08MB8151.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5447 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF00050A01.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 7417c7dc-ff64-4cd1-c565-08dc3e2c1957 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D5hqVbfHP9m5DV5w02lJVbq7kNG5NYJ3ERnfqBemjGWow2lxN0h868HhknH2MEyO1fr2k99A5Cez48PKyfaPmaP8DhXXjIrAlITndZkKKqg5je0+IF8wUaIytLbgqp6tQtl6Ou/CLQkaCSdMH6qSbfLczJi56XPS4fa9XOJapkdKs9OWibFHMoZAdQ+hAzrzu1nfWRZTkSS1ojjg+sUQ20KmHmxTxFtMQc9f/g0DV0UdmgAueYxoF3OmOZ5dRA5TBsM5Pdshls7ASUV482I9o3vPmWvdtEvhEzRDA92ZUZhfEOt68lfHjbvo1ol5dQDGTA1BqQILroXMMJkudC3NhOiLKB08RcbUzogI/c/GmE15rpA3wzRu6jKXTw+Stp377R99mif8JRrNalZCuyoy+O8WG++FaGBE3WRFD3YEOerj+TW9wbVoh2o/eLpwM0/uf20FshrsNdsby8VbTcE5ShaMUaZM83DzqaiGrSeroz2x7RdvnDRdD0t6nJb6ucx/Maj8IkTvTh+GGeLd+9ltubiraZhLD132KuZnpk84PIM1/A8spc1hi73IBA/56St3pSyTwgN5UuhwmRykMkAoUfqMGs313PRi0Wgw1qXp/bV7P/rxHZzdhgIBd8trbZytmE13xaOjZAyeuwn6UrDwIgarOlKPO1BdR79o8zYJurWrUt62wTzFimKrW97nojwX6PJ+O/DEuO1YxUZqG7tu4A== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 22:23:58.2770 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9bc89074-c78e-4891-18d9-08dc3e2c1e03 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF00050A01.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB8075 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 06/03/2024 16:51, David Marchand wrote: > On Wed, Mar 6, 2024 at 5:40 PM Bruce Richardson > wrote: >> >> On Wed, Mar 06, 2024 at 05:14:15PM +0100, David Marchand wrote: >>> On Wed, Mar 6, 2024 at 3:36 PM Paul Szczepanek wrote: >>>> >>>> If a library has no global section in the version.map >>>> allow it not to have symbols and not report it as an error. >>>> This happens if a library doesn't export any functions >>>> if they're all inline. >>>> >>>> Signed-off-by: Paul Szczepanek >>> >>> Added Bruce. >>> >>> Having a library without any actual code compiled is (I think) new in DPDK. >>> >>> On the other hand, for headers only, there should be no need for a >>> version.map file at all. >>> >>> The current meson code expects that every library provides some files >>> to compile via the sources variable and it expects a version.map file >>> too. >>> I wonder if we could skip the whole library generation at the >>> lib/meson.build level. >>> Something like: >>> >>> diff --git a/lib/meson.build b/lib/meson.build >>> index 179a272932..f0bbab6658 100644 >>> --- a/lib/meson.build >>> +++ b/lib/meson.build >>> @@ -222,6 +222,10 @@ foreach l:libraries >>> includes += include_directories(l) >>> dpdk_includes += include_directories(l) >>> >>> + if sources.length() == 0 >>> + continue >>> + endif >>> + >>> if developer_mode and is_windows and use_function_versioning >>> message('@0@: Function versioning is not supported by >>> Windows.'.format(name)) >>> endif >>> >>> No version.map, no check to update :-) >>> >> Two thoughts/suggestions here: >> >> * in original meson port we did have support for header only libraries - I >> think for rte_compat.h, but that was done away with when the header was >> just merged into EAL. See [1] >> * for a header only lib - if we are prepared to forego being able to >> disable it - the easiest enablement path may be to not add the directory >> to the list of libraries, and just add the header file path to the global >> include path, or perhaps some other library include path. How to make it >> work best may depend on what the library does and what other DPDK libs, if >> any, it depends upon. > > If the goal is to provide those headers as public API, you still need > to call install_headers() somewhere. > And I don't like losing control over disabling about what is shipped. > > I prefer [1]. > > I have uploaded a PATCH that follows [1]: https://patches.dpdk.org/project/dpdk/patch/20240306221709.166722-2-paul.szczepanek@arm.com/ It might be easier to review by applying first as most of the diff is just tab indentation change caused by the if. I have tested it with my header only library and it works.