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 CBB42A0524 for ; Fri, 5 Feb 2021 12:30:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7101188945; Fri, 5 Feb 2021 12:30:00 +0100 (CET) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 22CFE1887BD for ; Fri, 5 Feb 2021 12:29:59 +0100 (CET) Received: by mail-wr1-f50.google.com with SMTP id d16so7245372wro.11 for ; Fri, 05 Feb 2021 03:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pZQCsJDVfDE99ijVfxiE1DxLcZ0xpuy2CRy9PkJKD6M=; b=p/EHqkOh/lUd7b1iBRL26LW6snmXTzUNfKQrTiW6Sjin2jX5kQQjGAjVfzKr39TPF3 x6NUa4yt8SewMCyEbcmMyEEOJq7nX+ux2WDjn6rctekoQDZRl9UQImnGgUNU/Or9VkHK unkRIZB+BvAiZQC3InwSeOi/xYP7HsYsw6+qDJEGoKujYMFvQagYax+60ulXckKyinB6 HZvZd2w1r5Mi7bOm5oJzFvjONYsQkvtCNWyVrQ1Q+g/NV7k9b+KSaJrSVZnvvlyDKbxn oLbcytV/TNQ9aPGpNklI9Cj2048lb21NUYEM5O1U57QAbBoVXLY4is62Zz3mIl8vWDbW 9wQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pZQCsJDVfDE99ijVfxiE1DxLcZ0xpuy2CRy9PkJKD6M=; b=FckO3hdXBcRMx2tB1YosE9T6DNhRFjgUgyR1XgPz9zSopepaKKFbbk/VW9i7F4NvDH bhsow2/NEKIe2SFyt0QrLNC4U2+HDIyl7Vfd9L2FB9k+FEpm9N4k7B/X3oC5jgYednzU ZjwlvLCWVU2SKtxl9fIDGYKpzpbnpFgGMYcKXWBsNy+nqzY5bInZ9dVx53Z8Ytfrusa/ EwLtPgLDaSq2IoYlRPkhXuS4DjwBa8Lj2rX4xTuChlMdtLjDQzUeGuhL2X7e1c3pqq47 isU67ISrPEXqDMKGGwTIrGqP4xkMdaa+TjrwKz81xlN0l0zLxzEJ33F75GQjGZHOEK6X 8OuA== X-Gm-Message-State: AOAM531+llJl/2fKgmBw7pjve+UhhBoq1lO+s5FCafge2v0LCLJLVxct 5Opk/oWVym/y1UZs5qgKKWOCeQajTjb5+9mH X-Google-Smtp-Source: ABdhPJxcVvEOYAjvz9mH3JdVM3GEa6yOXOhkileeHb7jvwQnngxIS4Kp2Do71qF+5fBlAVQhtRl1Aw== X-Received: by 2002:a5d:6a8f:: with SMTP id s15mr4564039wru.252.1612524598966; Fri, 05 Feb 2021 03:29:58 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id a24sm7601238wmj.23.2021.02.05.03.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:29:58 -0800 (PST) From: luca.boccassi@gmail.com To: Dmitry Kozlyuk Cc: Ranjit Menon , dpdk stable Date: Fri, 5 Feb 2021 11:16:19 +0000 Message-Id: <20210205111920.1272063-93-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'build: fix linker flags on Windows' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/a0e0fe9adf716b5a723fff45ca60cc198d3b2802 Thanks. Luca Boccassi --- >From a0e0fe9adf716b5a723fff45ca60cc198d3b2802 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk Date: Tue, 12 Jan 2021 03:36:02 +0300 Subject: [PATCH] build: fix linker flags on Windows [ upstream commit da042bcfc6c870fd067329a22e4084c4b2c4be2a ] The --export-dynamic linker option is only applicable to ELF. On Windows, where COFF is used, it causes warnings: x86_64-w64-mingw32-ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols? (MinGW) LINK : warning LNK4044: unrecognized option '/-export-dynamic'; ignored (clang) Don't add --export-dynamic on Windows anywhere. Fixes: b031e13d7f0d ("build: fix plugin load on static build") Signed-off-by: Dmitry Kozlyuk Acked-by: Ranjit Menon --- app/meson.build | 2 +- buildtools/pkg-config/meson.build | 6 +++++- examples/meson.build | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/meson.build b/app/meson.build index fd72d7da68..903117b866 100644 --- a/app/meson.build +++ b/app/meson.build @@ -26,7 +26,7 @@ lib_execinfo = cc.find_library('execinfo', required: false) default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API'] default_ldflags = [] -if get_option('default_library') == 'static' +if get_option('default_library') == 'static' and not is_windows default_ldflags += ['-Wl,--export-dynamic'] endif diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build index 168ee08e58..39a8fd1c8e 100644 --- a/buildtools/pkg-config/meson.build +++ b/buildtools/pkg-config/meson.build @@ -37,6 +37,10 @@ Use libdpdk.pc instead of this file to query DPDK compile/link arguments''', libraries: ['-Wl,--as-needed'] + dpdk_libraries, libraries_private: dpdk_extra_ldflags) +platform_flags = [] +if not is_windows + platform_flags += ['-Wl,--export-dynamic'] # ELF only +endif pkg.generate(name: 'DPDK', # main DPDK pkgconfig file filebase: 'libdpdk', version: meson.project_version(), @@ -47,7 +51,7 @@ This is required for a number of static inline functions in the public headers.' # if libbsd is not enabled, then this is blank libraries_private: ['-Wl,--whole-archive'] + dpdk_drivers + dpdk_static_libraries + - ['-Wl,--no-whole-archive', '-Wl,--export-dynamic'] + ['-Wl,--no-whole-archive'] + platform_flags ) # For static linking with dependencies as shared libraries, diff --git a/examples/meson.build b/examples/meson.build index f643ec1bad..b9ab24223f 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -64,7 +64,7 @@ if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation' endif default_ldflags = dpdk_extra_ldflags -if get_option('default_library') == 'static' +if get_option('default_library') == 'static' and not is_windows default_ldflags += ['-Wl,--export-dynamic'] endif -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:33.457265458 +0000 +++ 0093-build-fix-linker-flags-on-Windows.patch 2021-02-05 11:18:28.946693778 +0000 @@ -1 +1 @@ -From da042bcfc6c870fd067329a22e4084c4b2c4be2a Mon Sep 17 00:00:00 2001 +From a0e0fe9adf716b5a723fff45ca60cc198d3b2802 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit da042bcfc6c870fd067329a22e4084c4b2c4be2a ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org