[dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' has been queued to LTS release 18.11.7
Kevin Traynor
ktraynor at redhat.com
Fri Feb 14 18:03:02 CET 2020
Hi,
FYI, your patch has been queued to LTS release 18.11.7
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/20/20. 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/kevintraynor/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/bad8e72a9709911cf3ab60b8ae249753bdb8e69d
Thanks.
Kevin.
---
>From bad8e72a9709911cf3ab60b8ae249753bdb8e69d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?=
<espindola at scylladb.com>
Date: Thu, 12 Dec 2019 09:53:12 -0800
Subject: [PATCH] mk: avoid combining -r and -export-dynamic linker options
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ]
Running ld with -r switches the linker to a very special mode where
some other linker options don't make sense.
In particular, -export-dynamic normally requires that all global
symbols be included in the dynamic symbol table, but a .o file doesn't
even have a dynamic symbol table.
When given both options it looks like the gnu linker just ignores
-export-dynamic.
Unfortunately some versions of lld (https://lld.llvm.org/) have a bug
that causes it to try to create a dynamic symbol table in the output
.o file and ends up corrupting it
(https://bugs.llvm.org/show_bug.cgi?id=43552). Current (git) version
of lld now issues an error.
This patch filters out -export-dynamic from $(LDFLAGS) when using
-r. With this patch I can build dpdk with lld.
Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")
Signed-off-by: Rafael Ávila de Espíndola <espindola at scylladb.com>
---
mk/internal/rte.compile-pre.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 0cf3791b4d..82fe098f7c 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -62,5 +62,5 @@ CHECK_EXPERIMENTAL = $(EXPERIMENTAL_CHECK) $(SRCDIR)/$(EXPORT_MAP) $@
PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c
PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@.pmd.o $@.pmd.c
-PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
+PMDINFO_LD = $(CROSS)ld -r $(filter-out -export-dynamic,$(LDFLAGS)) -o $@.o $@.pmd.o $@
PMDINFO_TO_O = if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \
echo "$(if $V,$(PMDINFO_GEN), PMDINFO $@.pmd.c)" && \
--
2.21.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-14 17:02:37.500280292 +0000
+++ 0008-mk-avoid-combining-r-and-export-dynamic-linker-optio.patch 2020-02-14 17:02:36.932408335 +0000
@@ -1 +1 @@
-From 5a352a3a98e3297555cb08d2db6e45a93ce7e058 Mon Sep 17 00:00:00 2001
+From bad8e72a9709911cf3ab60b8ae249753bdb8e69d Mon Sep 17 00:00:00 2001
@@ -9,0 +10,2 @@
+[ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ]
+
@@ -30 +31,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list