From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 6B1DE2BAB for ; Fri, 10 Jun 2016 15:19:23 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id v199so148589842wmv.0 for ; Fri, 10 Jun 2016 06:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wt8x2IHgAa9MUHViCkljemBmfk80ykTYwB0HHunepzA=; b=O0+r+9fEo0cR7GiWLDJWw++i1aqchm+AwzxGEsBGzJe8BT30RlHvfJXllKUcy25nDN M5N2NiDtr6VBLEASW0MY8CEBZydZ0v28lWMXoIZ6etT3sSqZ3Z84AJAwv3IOUxXRkpSq fqTw5xf7fqp+8Zb6Y5SdNt7Vp5BRk1at08hRVBlG/eJWfi8WJ+ndd8Xk0lECXHN9Y6tD ZYjVmZJIqC9Ax6VI6cWKtY1EC3vigLSyppZd/yZEo1HyjOUTqTKvQ76GRGHZFasykojk WV7pPkPpQimhqbjc/EkGNbTDBWXslT1yZNnOk6v/EXAbpZzFbPfIk8sfnI3YuD9kZToT Mvuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wt8x2IHgAa9MUHViCkljemBmfk80ykTYwB0HHunepzA=; b=dPVT0Ck51VU9fH8cMq6YZbeTSLr9ZVIsp7wu73DoUhS79o+OoRgbduMAjM+POor2vR nlAg+pXpQsfXhepELYZc4WRnoZl7zQkr7E5Xb0tof1ZeZV15pwdypswyh+y/204Y7jV/ 7B1iSZji/jA6MS3ljVW+jLMMwZTkd76/xe23TWZCIt2GO9w25kY71XH6ur7dimJITpSQ en/o2PeGqDs8aa3mWfx6YXr5FBEKfKcGIsnSe+0z7dbc1YiU3NB/NCLBsSMFZ6H4Rz5V FJNyKL917zvpgZssBkIiaIpkhCghkgY7q72sT7Qywx/vnrKKIYvubDtn9dKJjtLLW435 0Bxw== X-Gm-Message-State: ALyK8tKtRfZjMXRjHg8dzBi7pAfXx95Smey27W4v8pjd/vmfGFglWB7QQV9tfak3EM/8u6il X-Received: by 10.194.104.102 with SMTP id gd6mr2197487wjb.170.1465564763059; Fri, 10 Jun 2016 06:19:23 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id o4sm12302758wjx.45.2016.06.10.06.19.22 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2016 06:19:22 -0700 (PDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org Date: Fri, 10 Jun 2016 15:19:08 +0200 Message-Id: <1465564749-1405-6-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1465564749-1405-1-git-send-email-thomas.monjalon@6wind.com> References: <1464367686-3475-1-git-send-email-ferruh.yigit@intel.com> <1465564749-1405-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v2 5/6] mk: sort libraries in level order when linking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 13:19:23 -0000 As stated in the comment: Order is important: from higher level to lower level This is an attempt to make the layering order better respected. It will help to restrict the --whole-archive scope for plugins. Signed-off-by: Thomas Monjalon --- mk/rte.app.mk | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index d01a79f..99a7047 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -62,9 +62,6 @@ _LDLIBS-y += -L$(RTE_SDK_BIN)/lib _LDLIBS-y += --whole-archive -_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += -lrte_distributor -_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) += -lrte_reorder - ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) _LDLIBS-$(CONFIG_RTE_LIBRTE_KNI) += -lrte_kni _LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += -lrte_ivshmem @@ -73,34 +70,23 @@ endif _LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE) += -lrte_pipeline _LDLIBS-$(CONFIG_RTE_LIBRTE_TABLE) += -lrte_table _LDLIBS-$(CONFIG_RTE_LIBRTE_PORT) += -lrte_port -_LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) += -lrte_timer -_LDLIBS-$(CONFIG_RTE_LIBRTE_HASH) += -lrte_hash -_LDLIBS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += -lrte_jobstats -_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_DISTRIBUTOR) += -lrte_distributor +_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) += -lrte_reorder +_LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += -lrte_ip_frag _LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lrte_meter _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrte_sched -_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost +_LDLIBS-$(CONFIG_RTE_LIBRTE_LPM) += -lrte_lpm +_LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) += -lrte_acl +_LDLIBS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += -lrte_jobstats +_LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) += -lrte_power -# The static libraries do not know their dependencies. -# So linking with static library requires explicit dependencies. -ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) -_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm -_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt -_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lm -ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) -_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lnuma -endif -ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) -_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse -endif -_LDLIBS-$(CONFIG_RTE_PORT_PCAP) += -lpcap -endif # !CONFIG_RTE_BUILD_SHARED_LIBS +_LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) += -lrte_timer +_LDLIBS-$(CONFIG_RTE_LIBRTE_HASH) += -lrte_hash +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs _LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) += -lrte_mbuf -_LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += -lrte_ip_frag _LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER) += -lethdev _LDLIBS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += -lrte_cryptodev _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += -lrte_mempool @@ -108,6 +94,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_RING) += -lrte_ring _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrte_eal _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE) += -lrte_cmdline _LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) += -lrte_cfgfile + _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += -lrte_pmd_bond _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lrte_pmd_xenvirt -lxenstore @@ -149,7 +136,22 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += -lrte_pmd_snow3g _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += -L$(LIBSSO_PATH)/build -lsso endif # CONFIG_RTE_LIBRTE_CRYPTODEV -endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB) +endif # !CONFIG_RTE_BUILD_SHARED_LIBS + +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) +# The static libraries do not know their dependencies. +# So linking with static library requires explicit dependencies. +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt +_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lm +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lnuma +endif +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse +endif +_LDLIBS-$(CONFIG_RTE_PORT_PCAP) += -lpcap +endif # !CONFIG_RTE_BUILD_SHARED_LIBS _LDLIBS-y += $(EXECENV_LDLIBS) -- 2.7.0