numam-dpdk/mk/internal
Rafael Ávila de Espíndola 5a352a3a98 mk: avoid combining -r and -export-dynamic linker options
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: 3d781ca328 ("mk: do post processing on objects that register a driver")
Cc: stable@dpdk.org

Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
2020-01-20 00:00:28 +01:00
..
rte.build-post.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.build-pre.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.clean-post.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.clean-pre.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.compile-post.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.compile-pre.mk mk: avoid combining -r and -export-dynamic linker options 2020-01-20 00:00:28 +01:00
rte.extvars.mk mk: fix external build 2018-02-05 23:39:04 +01:00
rte.install-post.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.install-pre.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00