From patchwork Fri Sep 24 18:08:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 99643 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43187A0C41; Fri, 24 Sep 2021 20:08:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2852041323; Fri, 24 Sep 2021 20:08:30 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 3FB60412F8 for ; Fri, 24 Sep 2021 20:08:29 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id w11so6995034plz.13 for ; Fri, 24 Sep 2021 11:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bcEVS2Gxg8NO8tYIGPuzbyFGvEtOc2N4CDV1bljAe6g=; b=T+opyjMVN3I/5/8TOKH9FlmbqdR5mPhNBeG2qxOSTGCiWa2nvs6iU+UOFqU6xW/48x sekM4yFuJCxgLXoKcv7dOSnPEOOHTH644o+3InRPd3Ae/VuFCs5pZfPR9/xkHPDBrDnL vnIlvMwfCt+d7ahzO5JUHblKbgBvxM7UgrthwT5PUQpJjqUBis5vtGir51ZyRWaV86VR JbJLZnzLhxAJspokk2LT6VyaUQ8oafCn0oKYOVu/BJHXB5H3scoxFeDOtBTOrlExDHzR RY0O+zd5kA69o8uNEv60cRO9KKRYSJiinCcKZx5nGa9GxmuvL7c2IqqXNmpsrNgK7rMp Yq2A== 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:mime-version :content-transfer-encoding; bh=bcEVS2Gxg8NO8tYIGPuzbyFGvEtOc2N4CDV1bljAe6g=; b=EeukHfJabElrDXGiVCfJbqsaTyOG34l1I1s2Ym5FDwkmr9HiuTRV98oTxKiRa9zlh5 BmB2MV6hEBGcvD2nLFbz3DVzavtXLbHwhvcdyc8ENk/jo6xxU5bIBIh6orMfnIl8lZHk ax9scvBpxNePP0bbd5PW7db9cv6lJG4db3kGXe9H2HXc48O2ZqYrVYaLnBg2TvHqZrRt eLqSnd0xhcfXqX9lhJw5XcB0D0z08bueG/0fQrL4wR7+xHNMrILfzibl0FTgSd/G1kWw EyxC8jD7z/NXabeTpL8GinEW52KOaApSR6Fc8sAt2X6wXNOumdMcRACNTJ6dXHSrSt/W KFfw== X-Gm-Message-State: AOAM531nrZ2cuSb7t5vK772CGe3/X/bb903Xsr69K1r8U3kCwrp8daWc OHuoW8+AvEnWQrmMJwXVadRiqLOhVv8= X-Google-Smtp-Source: ABdhPJz5mIx4H5U2AQUuuIv+BlLHWOvyJBQuylgc8mV5A/mNJT8My72MwmPRcPjJCCD+HO25IQ5e9w== X-Received: by 2002:a17:902:b40a:b0:13d:cbcd:2e64 with SMTP id x10-20020a170902b40a00b0013dcbcd2e64mr10273085plr.18.1632506907831; Fri, 24 Sep 2021 11:08:27 -0700 (PDT) Received: from localhost.localdomain (ec2-44-226-139-1.us-west-2.compute.amazonaws.com. [44.226.139.1]) by smtp.gmail.com with ESMTPSA id q4sm4655077pfl.50.2021.09.24.11.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 11:08:27 -0700 (PDT) From: William Tu To: dev@dpdk.org Cc: bruce.richardson@intel.com, dmitry.kozliuk@gmail.com Date: Fri, 24 Sep 2021 18:08:16 +0000 Message-Id: <20210924180816.150-1-u9012063@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v1] build/pkg-config: Fix warning for Windows 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 Sender: "dev" Windows does not support linker option '/-no-whole-archive' or '/whole-archive'. The patch removes them under Windows build. Signed-off-by: William Tu --- buildtools/pkg-config/meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build index 0412883c8f..989033db89 100644 --- a/buildtools/pkg-config/meson.build +++ b/buildtools/pkg-config/meson.build @@ -40,7 +40,13 @@ Use libdpdk.pc instead of this file to query DPDK compile/link arguments''', platform_flags = [] if not is_windows platform_flags += ['-Wl,--export-dynamic'] # ELF only + libraries_args = ['-Wl,--whole-archive'] + + dpdk_drivers + dpdk_static_libraries + + ['-Wl,--no-whole-archive'] + platform_flags +else + libraries_args = dpdk_drivers + dpdk_static_libraries endif + pkg.generate(name: 'DPDK', # main DPDK pkgconfig file filebase: 'libdpdk', version: meson.project_version(), @@ -49,9 +55,7 @@ Note that CFLAGS might contain an -march flag higher than typical baseline. This is required for a number of static inline functions in the public headers.''', requires: ['libdpdk-libs', libbsd], # may need libbsd for string funcs # if libbsd is not enabled, then this is blank - libraries_private: ['-Wl,--whole-archive'] + - dpdk_drivers + dpdk_static_libraries + - ['-Wl,--no-whole-archive'] + platform_flags + libraries_private: libraries_args ) # For static linking with dependencies as shared libraries,