From: Panu Matilainen <pmatilai@redhat.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 1/3] mk: clear up libm and librt linkage confusion
Date: Thu, 10 Mar 2016 15:15:59 +0200 [thread overview]
Message-ID: <fc408f8f11af4ab7995af672165cbcc8d39b6122.1457615519.git.pmatilai@redhat.com> (raw)
In-Reply-To: <cover.1457615519.git.pmatilai@redhat.com>
In-Reply-To: <cover.1457615519.git.pmatilai@redhat.com>
There are two places that need -lm (test app and librte_sched) and
exactly one that needs -lrt (librte_sched). Add the relevant
DT_NEEDED entries to both, and eliminate the bogus discrepancy
between Linux and BSD EXECENV_LDLIBS wrt these libs.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
app/test/Makefile | 2 ++
lib/librte_sched/Makefile | 3 +++
mk/exec-env/linuxapp/rte.vars.mk | 2 +-
mk/rte.app.mk | 6 ++----
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/app/test/Makefile b/app/test/Makefile
index ec33e1a..00e4df2 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -160,6 +160,8 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS += -D_GNU_SOURCE
+LDLIBS += -lm
+
# Disable VTA for memcpy test
ifeq ($(CC), gcc)
ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile
index b1cb285..4d631f6 100644
--- a/lib/librte_sched/Makefile
+++ b/lib/librte_sched/Makefile
@@ -41,6 +41,9 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS_rte_red.o := -D_GNU_SOURCE
+LDLIBS += -lm
+LDLIBS += -lrt
+
EXPORT_MAP := rte_sched_version.map
LIBABIVER := 1
diff --git a/mk/exec-env/linuxapp/rte.vars.mk b/mk/exec-env/linuxapp/rte.vars.mk
index 5fd7d85..d51bd17 100644
--- a/mk/exec-env/linuxapp/rte.vars.mk
+++ b/mk/exec-env/linuxapp/rte.vars.mk
@@ -48,7 +48,7 @@ endif
# Workaround lack of DT_NEEDED entry
EXECENV_LDFLAGS = --no-as-needed
-EXECENV_LDLIBS = -lrt -lm
+EXECENV_LDLIBS =
EXECENV_ASFLAGS =
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index daac09f..cadc7ab 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -77,11 +77,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_LPM) += -lrte_lpm
_LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) += -lrte_power
_LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) += -lrte_acl
_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lrte_meter
-
_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrte_sched
-_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm
-_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt
-
_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost
ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
@@ -104,6 +100,8 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lxenstore
_LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += -lgxio
# QAT PMD has a dependency on libcrypto (from openssl) for calculating HMAC precomputes
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += -lcrypto
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt
endif # !CONFIG_RTE_BUILD_SHARED_LIBS
_LDLIBS-y += --start-group
--
2.5.0
next prev parent reply other threads:[~2016-03-10 13:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 11:47 [dpdk-dev] [PATCH v2] mk: fix external shared library dependencies of libraries Panu Matilainen
2015-12-08 16:28 ` Sergio Gonzalez Monroy
2015-12-09 12:09 ` Panu Matilainen
2016-03-10 13:15 ` [dpdk-dev] [PATCH v3 0/3] mk: add DT_NEEDED entries for external library deps Panu Matilainen
2016-03-13 19:28 ` Thomas Monjalon
2016-03-10 13:15 ` Panu Matilainen [this message]
2016-03-14 16:44 ` [dpdk-dev] [PATCH v3 1/3] mk: clear up libm and librt linkage confusion Ferruh Yigit
2016-03-15 6:24 ` Panu Matilainen
2016-03-10 13:16 ` [dpdk-dev] [PATCH v3 2/3] mk: add DT_NEEDED entries for librte_vhost external dependencies Panu Matilainen
2016-03-10 13:16 ` [dpdk-dev] [PATCH v3 3/3] mk: add DT_NEEDED entries for librte_eal " Panu Matilainen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc408f8f11af4ab7995af672165cbcc8d39b6122.1457615519.git.pmatilai@redhat.com \
--to=pmatilai@redhat.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).