DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk
       [not found] <017274>
@ 2015-05-11 23:14 ` Keith Wiles
  2015-05-11 23:14   ` [dpdk-dev] [PATCH v7 2/2] Update Docs for new EXTRA_LDLIBS variable Keith Wiles
                     ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Keith Wiles @ 2015-05-11 23:14 UTC (permalink / raw)
  To: dev

    Trying to simplify the ifdefs in rte.app.mk to make the code
    more readable and maintainable by moving LDLIBS variable to use
    the same style as LDLIBS-y being used in the rest of the code.

    Added a new variable called EXTRA_LDLIBS to be used by example apps
    instead of using LDLIBS directly. The new internal variable _LDLIBS
    should not be used outside of the rte.app.mk file.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 mk/rte.app.mk | 242 +++++++++++++++-------------------------------------------
 1 file changed, 60 insertions(+), 182 deletions(-)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 62a76ae..b8030d2 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -1,7 +1,7 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-#   Copyright(c) 2014 6WIND S.A.
+#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+#   Copyright(c) 2014-2015 6WIND S.A.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@ LDSCRIPT = $(RTE_LDSCRIPT)
 endif
 
 # default path for libs
-LDLIBS += -L$(RTE_SDK_BIN)/lib
+_LDLIBS-y += -L$(RTE_SDK_BIN)/lib
 
 #
 # Include libraries depending on config if NO_AUTOLIBS is not set
@@ -59,215 +59,93 @@ LDLIBS += -L$(RTE_SDK_BIN)/lib
 #
 ifeq ($(NO_AUTOLIBS),)
 
-LDLIBS += --whole-archive
+_LDLIBS-y += --whole-archive
 
-ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
-LDLIBS += -l$(RTE_LIBNAME)
-endif
+_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS)    += -l$(RTE_LIBNAME)
 
 ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
 
-ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y)
-LDLIBS += -lrte_distributor
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y)
-LDLIBS += -lrte_reorder
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR)    += -lrte_distributor
+_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 
-ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
-LDLIBS += -lrte_kni
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM)        += -lrte_ivshmem
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y)
-ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
-LDLIBS += -lrte_ivshmem
-endif
-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_METER)          += -lrte_meter
 
-ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y)
-LDLIBS += -lrte_pipeline
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrt
 
-ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y)
-LDLIBS += -lrte_table
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PORT),y)
-LDLIBS += -lrte_port
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y)
-LDLIBS += -lrte_timer
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_HASH),y)
-LDLIBS += -lrte_hash
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y)
-LDLIBS += -lrte_jobstats
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
-LDLIBS += -lrte_lpm
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_POWER),y)
-LDLIBS += -lrte_power
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
-LDLIBS += -lrte_acl
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_METER),y)
-LDLIBS += -lrte_meter
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
-LDLIBS += -lrte_sched
-LDLIBS += -lm
-LDLIBS += -lrt
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y)
-LDLIBS += -lrte_vhost
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lrte_vhost
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lpcap
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lpcap
 
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn)
-LDLIBS += -lfuse
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lfuse
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
-LDLIBS += -libverbs
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs
 
-LDLIBS += --start-group
+_LDLIBS-y += --start-group
 
 ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
 
-ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
-LDLIBS += -lrte_kvargs
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y)
-LDLIBS += -lrte_mbuf
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y)
-LDLIBS += -lrte_ip_frag
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y)
-LDLIBS += -lethdev
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y)
-LDLIBS += -lrte_malloc
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y)
-LDLIBS += -lrte_mempool
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_RING),y)
-LDLIBS += -lrte_ring
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_EAL),y)
-LDLIBS += -lrte_eal
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y)
-LDLIBS += -lrte_cmdline
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y)
-LDLIBS += -lrte_cfgfile
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
-LDLIBS += -lrte_pmd_bond
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
-LDLIBS += -lrte_pmd_xenvirt
-LDLIBS += -lxenstore
-endif
+_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_MALLOC)         += -lrte_malloc
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool
+_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
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
 
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
 # plugins (link only if static libraries)
 
-ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y)
-LDLIBS += -lrte_pmd_vmxnet3_uio
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
-LDLIBS += -lrte_pmd_virtio
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y)
-LDLIBS += -lrte_pmd_enic
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
-LDLIBS += -lrte_pmd_i40e
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
-LDLIBS += -lrte_pmd_fm10k
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
-LDLIBS += -lrte_pmd_ixgbe
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y)
-LDLIBS += -lrte_pmd_e1000
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
-LDLIBS += -lrte_pmd_mlx4
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
-LDLIBS += -lrte_pmd_ring
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lrte_pmd_pcap
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)
-LDLIBS += -lrte_pmd_af_packet
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y)
-LDLIBS += -lrte_pmd_null
-endif
-
-endif # plugins
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD)    += -lrte_pmd_vmxnet3_uio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD)     += -lrte_pmd_virtio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD)       += -lrte_pmd_enic
+_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD)       += -lrte_pmd_i40e
+_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD)      += -lrte_pmd_fm10k
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD)      += -lrte_pmd_ixgbe
+_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD)      += -lrte_pmd_e1000
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -lrte_pmd_mlx4
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING)       += -lrte_pmd_ring
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
+
+endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-LDLIBS += $(EXECENV_LDLIBS)
-
-LDLIBS += --end-group
-
-LDLIBS += --no-whole-archive
+_LDLIBS-y += $(EXECENV_LDLIBS)
+_LDLIBS-y += --end-group
+_LDLIBS-y += --no-whole-archive
 
 endif # ifeq ($(NO_AUTOLIBS),)
 
-LDLIBS += $(CPU_LDLIBS)
+LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
 
 .PHONY: all
 all: install
-- 
2.3.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [dpdk-dev] [PATCH v7 2/2] Update Docs for new EXTRA_LDLIBS variable
  2015-05-11 23:14 ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Keith Wiles
@ 2015-05-11 23:14   ` Keith Wiles
  2015-05-12 15:44   ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Olivier MATZ
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 19+ messages in thread
From: Keith Wiles @ 2015-05-11 23:14 UTC (permalink / raw)
  To: dev

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 doc/build-sdk-quick.txt                          | 1 +
 doc/guides/prog_guide/dev_kit_build_system.rst   | 2 ++
 doc/guides/prog_guide/dev_kit_root_make_help.rst | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt
index 041a40e..26d5442 100644
--- a/doc/build-sdk-quick.txt
+++ b/doc/build-sdk-quick.txt
@@ -13,6 +13,7 @@ Build variables
 	EXTRA_CPPFLAGS   preprocessor options
 	EXTRA_CFLAGS     compiler options
 	EXTRA_LDFLAGS    linker options
+	EXTRA_LDLIBS     linker libary options
 	RTE_KERNELDIR    linux headers path
 	CROSS     toolchain prefix
 	V         verbose
diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
index 5bfef58..50bfe34 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -413,6 +413,8 @@ Variables that Can be Set/Overridden by the User in a Makefile or Command Line
 
 *   EXTRA_LDFLAGS: The content of this variable is appended after LDFLAGS when linking.
 
+*   EXTRA_LDLIBS: The content of this variable is appended after LDLIBS when linking.
+
 *   EXTRA_ASFLAGS: The content of this variable is appended after ASFLAGS when assembling.
 
 *   EXTRA_CPPFLAGS: The content of this variable is appended after CPPFLAGS when using a C preprocessor on assembly files.
diff --git a/doc/guides/prog_guide/dev_kit_root_make_help.rst b/doc/guides/prog_guide/dev_kit_root_make_help.rst
index 333b007..e522c12 100644
--- a/doc/guides/prog_guide/dev_kit_root_make_help.rst
+++ b/doc/guides/prog_guide/dev_kit_root_make_help.rst
@@ -218,7 +218,7 @@ The following variables can be specified on the command line:
 
     Enable dependency debugging. This provides some useful information about why a target is built or not.
 
-*   EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
+*   EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_LDLIBS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
 
     Append specific compilation, link or asm flags.
 
-- 
2.3.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk
  2015-05-11 23:14 ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Keith Wiles
  2015-05-11 23:14   ` [dpdk-dev] [PATCH v7 2/2] Update Docs for new EXTRA_LDLIBS variable Keith Wiles
@ 2015-05-12 15:44   ` Olivier MATZ
  2015-05-12 19:11   ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify " Keith Wiles
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 19+ messages in thread
From: Olivier MATZ @ 2015-05-12 15:44 UTC (permalink / raw)
  To: Keith Wiles, dev

Hi Keith,

On 05/12/2015 01:14 AM, Keith Wiles wrote:
>      Trying to simplify the ifdefs in rte.app.mk to make the code
>      more readable and maintainable by moving LDLIBS variable to use
>      the same style as LDLIBS-y being used in the rest of the code.
>
>      Added a new variable called EXTRA_LDLIBS to be used by example apps
>      instead of using LDLIBS directly. The new internal variable _LDLIBS
>      should not be used outside of the rte.app.mk file.
>
> Signed-off-by: Keith Wiles <keith.wiles@intel.com>

Sorry to comment again :)

I think it should be split differently, by topic/feature and not
by location (mk vs doc)

The first commit should only do what the title says, which is
"simplify the makefile", and not add the EXTRA_LIBS variable.

The second commit should add the EXTRA_LIBS + the associated doc.

Few nits:
- the commit log is right-shifted
- the titles could be prefixed by "mk:"
- don't forget the "--in-reply-to" :)

Regards,
Olivier

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk
  2015-05-11 23:14 ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Keith Wiles
  2015-05-11 23:14   ` [dpdk-dev] [PATCH v7 2/2] Update Docs for new EXTRA_LDLIBS variable Keith Wiles
  2015-05-12 15:44   ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Olivier MATZ
@ 2015-05-12 19:11   ` Keith Wiles
  2015-05-12 19:11     ` [dpdk-dev] [PATCH v8 2/2] mk:Update Docs for new EXTRA_LDLIBS variable Keith Wiles
  2015-05-13  7:41     ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk Olivier MATZ
  2015-05-13 16:35   ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Keith Wiles
  2015-05-14 14:21   ` [dpdk-dev] [PATCH v10 " Keith Wiles
  4 siblings, 2 replies; 19+ messages in thread
From: Keith Wiles @ 2015-05-12 19:11 UTC (permalink / raw)
  To: dev

Simplify the ifdefs in rte.app.mk to make the code more
readable and maintainable by moving LDLIBS variable to
use the same style as LDLIBS-y being used in the rest
of the code. The new internal variable _LDLIBS should
not be used outside of the rte.app.mk file.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 mk/rte.app.mk | 242 +++++++++++++++-------------------------------------------
 1 file changed, 60 insertions(+), 182 deletions(-)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 62a76ae..b8030d2 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -1,7 +1,7 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-#   Copyright(c) 2014 6WIND S.A.
+#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+#   Copyright(c) 2014-2015 6WIND S.A.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@ LDSCRIPT = $(RTE_LDSCRIPT)
 endif
 
 # default path for libs
-LDLIBS += -L$(RTE_SDK_BIN)/lib
+_LDLIBS-y += -L$(RTE_SDK_BIN)/lib
 
 #
 # Include libraries depending on config if NO_AUTOLIBS is not set
@@ -59,215 +59,93 @@ LDLIBS += -L$(RTE_SDK_BIN)/lib
 #
 ifeq ($(NO_AUTOLIBS),)
 
-LDLIBS += --whole-archive
+_LDLIBS-y += --whole-archive
 
-ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
-LDLIBS += -l$(RTE_LIBNAME)
-endif
+_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS)    += -l$(RTE_LIBNAME)
 
 ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
 
-ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y)
-LDLIBS += -lrte_distributor
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y)
-LDLIBS += -lrte_reorder
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR)    += -lrte_distributor
+_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 
-ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
-LDLIBS += -lrte_kni
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM)        += -lrte_ivshmem
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y)
-ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
-LDLIBS += -lrte_ivshmem
-endif
-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_METER)          += -lrte_meter
 
-ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y)
-LDLIBS += -lrte_pipeline
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrt
 
-ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y)
-LDLIBS += -lrte_table
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PORT),y)
-LDLIBS += -lrte_port
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y)
-LDLIBS += -lrte_timer
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_HASH),y)
-LDLIBS += -lrte_hash
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y)
-LDLIBS += -lrte_jobstats
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
-LDLIBS += -lrte_lpm
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_POWER),y)
-LDLIBS += -lrte_power
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
-LDLIBS += -lrte_acl
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_METER),y)
-LDLIBS += -lrte_meter
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
-LDLIBS += -lrte_sched
-LDLIBS += -lm
-LDLIBS += -lrt
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y)
-LDLIBS += -lrte_vhost
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lrte_vhost
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lpcap
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lpcap
 
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn)
-LDLIBS += -lfuse
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lfuse
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
-LDLIBS += -libverbs
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs
 
-LDLIBS += --start-group
+_LDLIBS-y += --start-group
 
 ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
 
-ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
-LDLIBS += -lrte_kvargs
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y)
-LDLIBS += -lrte_mbuf
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y)
-LDLIBS += -lrte_ip_frag
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y)
-LDLIBS += -lethdev
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y)
-LDLIBS += -lrte_malloc
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y)
-LDLIBS += -lrte_mempool
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_RING),y)
-LDLIBS += -lrte_ring
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_EAL),y)
-LDLIBS += -lrte_eal
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y)
-LDLIBS += -lrte_cmdline
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y)
-LDLIBS += -lrte_cfgfile
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
-LDLIBS += -lrte_pmd_bond
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
-LDLIBS += -lrte_pmd_xenvirt
-LDLIBS += -lxenstore
-endif
+_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_MALLOC)         += -lrte_malloc
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool
+_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
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
 
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
 # plugins (link only if static libraries)
 
-ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y)
-LDLIBS += -lrte_pmd_vmxnet3_uio
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
-LDLIBS += -lrte_pmd_virtio
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y)
-LDLIBS += -lrte_pmd_enic
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
-LDLIBS += -lrte_pmd_i40e
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
-LDLIBS += -lrte_pmd_fm10k
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
-LDLIBS += -lrte_pmd_ixgbe
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y)
-LDLIBS += -lrte_pmd_e1000
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
-LDLIBS += -lrte_pmd_mlx4
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
-LDLIBS += -lrte_pmd_ring
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lrte_pmd_pcap
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)
-LDLIBS += -lrte_pmd_af_packet
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y)
-LDLIBS += -lrte_pmd_null
-endif
-
-endif # plugins
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD)    += -lrte_pmd_vmxnet3_uio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD)     += -lrte_pmd_virtio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD)       += -lrte_pmd_enic
+_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD)       += -lrte_pmd_i40e
+_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD)      += -lrte_pmd_fm10k
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD)      += -lrte_pmd_ixgbe
+_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD)      += -lrte_pmd_e1000
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -lrte_pmd_mlx4
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING)       += -lrte_pmd_ring
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
+
+endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-LDLIBS += $(EXECENV_LDLIBS)
-
-LDLIBS += --end-group
-
-LDLIBS += --no-whole-archive
+_LDLIBS-y += $(EXECENV_LDLIBS)
+_LDLIBS-y += --end-group
+_LDLIBS-y += --no-whole-archive
 
 endif # ifeq ($(NO_AUTOLIBS),)
 
-LDLIBS += $(CPU_LDLIBS)
+LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
 
 .PHONY: all
 all: install
-- 
2.3.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [dpdk-dev] [PATCH v8 2/2] mk:Update Docs for new EXTRA_LDLIBS variable
  2015-05-12 19:11   ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify " Keith Wiles
@ 2015-05-12 19:11     ` Keith Wiles
  2015-05-13  7:41     ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk Olivier MATZ
  1 sibling, 0 replies; 19+ messages in thread
From: Keith Wiles @ 2015-05-12 19:11 UTC (permalink / raw)
  To: dev

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 doc/build-sdk-quick.txt                          | 1 +
 doc/guides/prog_guide/dev_kit_build_system.rst   | 2 ++
 doc/guides/prog_guide/dev_kit_root_make_help.rst | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt
index 041a40e..26d5442 100644
--- a/doc/build-sdk-quick.txt
+++ b/doc/build-sdk-quick.txt
@@ -13,6 +13,7 @@ Build variables
 	EXTRA_CPPFLAGS   preprocessor options
 	EXTRA_CFLAGS     compiler options
 	EXTRA_LDFLAGS    linker options
+	EXTRA_LDLIBS     linker libary options
 	RTE_KERNELDIR    linux headers path
 	CROSS     toolchain prefix
 	V         verbose
diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
index 5bfef58..50bfe34 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -413,6 +413,8 @@ Variables that Can be Set/Overridden by the User in a Makefile or Command Line
 
 *   EXTRA_LDFLAGS: The content of this variable is appended after LDFLAGS when linking.
 
+*   EXTRA_LDLIBS: The content of this variable is appended after LDLIBS when linking.
+
 *   EXTRA_ASFLAGS: The content of this variable is appended after ASFLAGS when assembling.
 
 *   EXTRA_CPPFLAGS: The content of this variable is appended after CPPFLAGS when using a C preprocessor on assembly files.
diff --git a/doc/guides/prog_guide/dev_kit_root_make_help.rst b/doc/guides/prog_guide/dev_kit_root_make_help.rst
index 333b007..e522c12 100644
--- a/doc/guides/prog_guide/dev_kit_root_make_help.rst
+++ b/doc/guides/prog_guide/dev_kit_root_make_help.rst
@@ -218,7 +218,7 @@ The following variables can be specified on the command line:
 
     Enable dependency debugging. This provides some useful information about why a target is built or not.
 
-*   EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
+*   EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_LDLIBS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
 
     Append specific compilation, link or asm flags.
 
-- 
2.3.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk
  2015-05-12 19:11   ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify " Keith Wiles
  2015-05-12 19:11     ` [dpdk-dev] [PATCH v8 2/2] mk:Update Docs for new EXTRA_LDLIBS variable Keith Wiles
@ 2015-05-13  7:41     ` Olivier MATZ
  2015-05-13 13:17       ` Wiles, Keith
  1 sibling, 1 reply; 19+ messages in thread
From: Olivier MATZ @ 2015-05-13  7:41 UTC (permalink / raw)
  To: Keith Wiles, dev

Hi,

On 05/12/2015 09:11 PM, Keith Wiles wrote:
> Simplify the ifdefs in rte.app.mk to make the code more
> readable and maintainable by moving LDLIBS variable to
> use the same style as LDLIBS-y being used in the rest
> of the code. The new internal variable _LDLIBS should
> not be used outside of the rte.app.mk file.
>
> Signed-off-by: Keith Wiles <keith.wiles@intel.com>
> ---
>   mk/rte.app.mk | 242 +++++++++++++++-------------------------------------------
>   1 file changed, 60 insertions(+), 182 deletions(-)
>
> diff --git a/mk/rte.app.mk b/mk/rte.app.mk
> index 62a76ae..b8030d2 100644
> --- a/mk/rte.app.mk
> +++ b/mk/rte.app.mk
> @@ -1,7 +1,7 @@
>   #   BSD LICENSE
>   #
> -#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> -#   Copyright(c) 2014 6WIND S.A.
> +#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
> +#   Copyright(c) 2014-2015 6WIND S.A.
>   #   All rights reserved.
>   #
>   #   Redistribution and use in source and binary forms, with or without
> @@ -51,7 +51,7 @@ LDSCRIPT = $(RTE_LDSCRIPT)
>   endif
>
>   # default path for libs
> -LDLIBS += -L$(RTE_SDK_BIN)/lib
> +_LDLIBS-y += -L$(RTE_SDK_BIN)/lib
>
>   #
>   # Include libraries depending on config if NO_AUTOLIBS is not set
> @@ -59,215 +59,93 @@ LDLIBS += -L$(RTE_SDK_BIN)/lib
>   #
>   ifeq ($(NO_AUTOLIBS),)
>
> -LDLIBS += --whole-archive
> +_LDLIBS-y += --whole-archive
>
> -ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
> -LDLIBS += -l$(RTE_LIBNAME)
> -endif
> +_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS)    += -l$(RTE_LIBNAME)
>
>   ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
>
> -ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y)
> -LDLIBS += -lrte_distributor
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y)
> -LDLIBS += -lrte_reorder
> -endif
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR)    += -lrte_distributor
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
>
> -ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
>   ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
> -LDLIBS += -lrte_kni
> -endif
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM)        += -lrte_ivshmem
>   endif
>
> -ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y)
> -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
> -LDLIBS += -lrte_ivshmem
> -endif
> -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_METER)          += -lrte_meter
>
> -ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y)
> -LDLIBS += -lrte_pipeline
> -endif
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lm
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrt
>
> -ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y)
> -LDLIBS += -lrte_table
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_PORT),y)
> -LDLIBS += -lrte_port
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y)
> -LDLIBS += -lrte_timer
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_HASH),y)
> -LDLIBS += -lrte_hash
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y)
> -LDLIBS += -lrte_jobstats
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
> -LDLIBS += -lrte_lpm
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_POWER),y)
> -LDLIBS += -lrte_power
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
> -LDLIBS += -lrte_acl
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_METER),y)
> -LDLIBS += -lrte_meter
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
> -LDLIBS += -lrte_sched
> -LDLIBS += -lm
> -LDLIBS += -lrt
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y)
> -LDLIBS += -lrte_vhost
> -endif
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lrte_vhost
>
>   endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
>
> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
> -LDLIBS += -lpcap
> -endif
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lpcap
>
> -ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn)
> -LDLIBS += -lfuse
> +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n)
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lfuse
>   endif
>
> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
> -LDLIBS += -libverbs
> -endif
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs
>
> -LDLIBS += --start-group
> +_LDLIBS-y += --start-group
>
>   ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
>
> -ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
> -LDLIBS += -lrte_kvargs
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y)
> -LDLIBS += -lrte_mbuf
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y)
> -LDLIBS += -lrte_ip_frag
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y)
> -LDLIBS += -lethdev
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y)
> -LDLIBS += -lrte_malloc
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y)
> -LDLIBS += -lrte_mempool
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_RING),y)
> -LDLIBS += -lrte_ring
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_EAL),y)
> -LDLIBS += -lrte_eal
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y)
> -LDLIBS += -lrte_cmdline
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y)
> -LDLIBS += -lrte_cfgfile
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
> -LDLIBS += -lrte_pmd_bond
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
> -LDLIBS += -lrte_pmd_xenvirt
> -LDLIBS += -lxenstore
> -endif
> +_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_MALLOC)         += -lrte_malloc
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool
> +_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
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
>
>   ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
>   # plugins (link only if static libraries)
>
> -ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y)
> -LDLIBS += -lrte_pmd_vmxnet3_uio
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
> -LDLIBS += -lrte_pmd_virtio
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y)
> -LDLIBS += -lrte_pmd_enic
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
> -LDLIBS += -lrte_pmd_i40e
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
> -LDLIBS += -lrte_pmd_fm10k
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
> -LDLIBS += -lrte_pmd_ixgbe
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y)
> -LDLIBS += -lrte_pmd_e1000
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
> -LDLIBS += -lrte_pmd_mlx4
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
> -LDLIBS += -lrte_pmd_ring
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
> -LDLIBS += -lrte_pmd_pcap
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)
> -LDLIBS += -lrte_pmd_af_packet
> -endif
> -
> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y)
> -LDLIBS += -lrte_pmd_null
> -endif
> -
> -endif # plugins
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD)    += -lrte_pmd_vmxnet3_uio
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD)     += -lrte_pmd_virtio
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD)       += -lrte_pmd_enic
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD)       += -lrte_pmd_i40e
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD)      += -lrte_pmd_fm10k
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD)      += -lrte_pmd_ixgbe
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD)      += -lrte_pmd_e1000
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -lrte_pmd_mlx4
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING)       += -lrte_pmd_ring
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
> +
> +endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)
>
>   endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
>
> -LDLIBS += $(EXECENV_LDLIBS)
> -
> -LDLIBS += --end-group
> -
> -LDLIBS += --no-whole-archive
> +_LDLIBS-y += $(EXECENV_LDLIBS)
> +_LDLIBS-y += --end-group
> +_LDLIBS-y += --no-whole-archive
>
>   endif # ifeq ($(NO_AUTOLIBS),)
>
> -LDLIBS += $(CPU_LDLIBS)
> +LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
>

As discussed in the previous mail, all things that are about
EXTRA_LDLIBS should be moved in the second patch. Therefore,
the title of the second patch should not be "update doc...", but
something like "mk: introduce EXTRA_LDLIBS...".

By the way, I missed that before, but it seems that your
patch removes CPU_LDLIBS, I don't think it's correct.


Regards,
Olivier


>   .PHONY: all
>   all: install
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk
  2015-05-13  7:41     ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk Olivier MATZ
@ 2015-05-13 13:17       ` Wiles, Keith
  2015-05-13 13:56         ` Olivier MATZ
  0 siblings, 1 reply; 19+ messages in thread
From: Wiles, Keith @ 2015-05-13 13:17 UTC (permalink / raw)
  To: Olivier MATZ, dev



On 5/13/15, 2:41 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:

>Hi,
>
>On 05/12/2015 09:11 PM, Keith Wiles wrote:
>> Simplify the ifdefs in rte.app.mk to make the code more
>> readable and maintainable by moving LDLIBS variable to
>> use the same style as LDLIBS-y being used in the rest
>> of the code. The new internal variable _LDLIBS should
>> not be used outside of the rte.app.mk file.
>>
>> Signed-off-by: Keith Wiles <keith.wiles@intel.com>
>> ---
>>   mk/rte.app.mk | 242
>>+++++++++++++++-------------------------------------------
>>   1 file changed, 60 insertions(+), 182 deletions(-)
>>
>> diff --git a/mk/rte.app.mk b/mk/rte.app.mk
>> index 62a76ae..b8030d2 100644
>> --- a/mk/rte.app.mk
>> +++ b/mk/rte.app.mk
>> @@ -1,7 +1,7 @@
>>   #   BSD LICENSE
>>   #
>> -#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
>> -#   Copyright(c) 2014 6WIND S.A.
>> +#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
>> +#   Copyright(c) 2014-2015 6WIND S.A.
>>   #   All rights reserved.
>>   #
>>   #   Redistribution and use in source and binary forms, with or without
>> @@ -51,7 +51,7 @@ LDSCRIPT = $(RTE_LDSCRIPT)
>>   endif
>>
>>   # default path for libs
>> -LDLIBS += -L$(RTE_SDK_BIN)/lib
>> +_LDLIBS-y += -L$(RTE_SDK_BIN)/lib
>>
>>   #
>>   # Include libraries depending on config if NO_AUTOLIBS is not set
>> @@ -59,215 +59,93 @@ LDLIBS += -L$(RTE_SDK_BIN)/lib
>>   #
>>   ifeq ($(NO_AUTOLIBS),)
>>
>> -LDLIBS += --whole-archive
>> +_LDLIBS-y += --whole-archive
>>
>> -ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
>> -LDLIBS += -l$(RTE_LIBNAME)
>> -endif
>> +_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS)    += -l$(RTE_LIBNAME)
>>
>>   ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y)
>> -LDLIBS += -lrte_distributor
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y)
>> -LDLIBS += -lrte_reorder
>> -endif
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR)    += -lrte_distributor
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
>>   ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
>> -LDLIBS += -lrte_kni
>> -endif
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM)        += -lrte_ivshmem
>>   endif
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y)
>> -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
>> -LDLIBS += -lrte_ivshmem
>> -endif
>> -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_METER)          += -lrte_meter
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y)
>> -LDLIBS += -lrte_pipeline
>> -endif
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lm
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrt
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y)
>> -LDLIBS += -lrte_table
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_PORT),y)
>> -LDLIBS += -lrte_port
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y)
>> -LDLIBS += -lrte_timer
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_HASH),y)
>> -LDLIBS += -lrte_hash
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y)
>> -LDLIBS += -lrte_jobstats
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
>> -LDLIBS += -lrte_lpm
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_POWER),y)
>> -LDLIBS += -lrte_power
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
>> -LDLIBS += -lrte_acl
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_METER),y)
>> -LDLIBS += -lrte_meter
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
>> -LDLIBS += -lrte_sched
>> -LDLIBS += -lm
>> -LDLIBS += -lrt
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y)
>> -LDLIBS += -lrte_vhost
>> -endif
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lrte_vhost
>>
>>   endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
>> -LDLIBS += -lpcap
>> -endif
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lpcap
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn)
>> -LDLIBS += -lfuse
>> +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n)
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lfuse
>>   endif
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
>> -LDLIBS += -libverbs
>> -endif
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs
>>
>> -LDLIBS += --start-group
>> +_LDLIBS-y += --start-group
>>
>>   ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
>> -LDLIBS += -lrte_kvargs
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y)
>> -LDLIBS += -lrte_mbuf
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y)
>> -LDLIBS += -lrte_ip_frag
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y)
>> -LDLIBS += -lethdev
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y)
>> -LDLIBS += -lrte_malloc
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y)
>> -LDLIBS += -lrte_mempool
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_RING),y)
>> -LDLIBS += -lrte_ring
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_EAL),y)
>> -LDLIBS += -lrte_eal
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y)
>> -LDLIBS += -lrte_cmdline
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y)
>> -LDLIBS += -lrte_cfgfile
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
>> -LDLIBS += -lrte_pmd_bond
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
>> -LDLIBS += -lrte_pmd_xenvirt
>> -LDLIBS += -lxenstore
>> -endif
>> +_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_MALLOC)         += -lrte_malloc
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool
>> +_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
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
>>
>>   ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
>>   # plugins (link only if static libraries)
>>
>> -ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y)
>> -LDLIBS += -lrte_pmd_vmxnet3_uio
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
>> -LDLIBS += -lrte_pmd_virtio
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y)
>> -LDLIBS += -lrte_pmd_enic
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
>> -LDLIBS += -lrte_pmd_i40e
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
>> -LDLIBS += -lrte_pmd_fm10k
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
>> -LDLIBS += -lrte_pmd_ixgbe
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y)
>> -LDLIBS += -lrte_pmd_e1000
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
>> -LDLIBS += -lrte_pmd_mlx4
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
>> -LDLIBS += -lrte_pmd_ring
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
>> -LDLIBS += -lrte_pmd_pcap
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)
>> -LDLIBS += -lrte_pmd_af_packet
>> -endif
>> -
>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y)
>> -LDLIBS += -lrte_pmd_null
>> -endif
>> -
>> -endif # plugins
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD)    += -lrte_pmd_vmxnet3_uio
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD)     += -lrte_pmd_virtio
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD)       += -lrte_pmd_enic
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD)       += -lrte_pmd_i40e
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD)      += -lrte_pmd_fm10k
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD)      += -lrte_pmd_ixgbe
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD)      += -lrte_pmd_e1000
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -lrte_pmd_mlx4
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING)       += -lrte_pmd_ring
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
>> +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
>> +
>> +endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)
>>
>>   endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
>>
>> -LDLIBS += $(EXECENV_LDLIBS)
>> -
>> -LDLIBS += --end-group
>> -
>> -LDLIBS += --no-whole-archive
>> +_LDLIBS-y += $(EXECENV_LDLIBS)
>> +_LDLIBS-y += --end-group
>> +_LDLIBS-y += --no-whole-archive
>>
>>   endif # ifeq ($(NO_AUTOLIBS),)
>>
>> -LDLIBS += $(CPU_LDLIBS)
>> +LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
>>
>
>As discussed in the previous mail, all things that are about
>EXTRA_LDLIBS should be moved in the second patch. Therefore,
>the title of the second patch should not be "update doc...", but
>something like "mk: introduce EXTRA_LDLIBS...".
>
>By the way, I missed that before, but it seems that your
>patch removes CPU_LDLIBS, I don't think it's correct.

I found no reference to CPU_LDLIBS in the docs or code other then then one
line. We now have EXTRA_LDLIBS for the command line, right?
>
>
>Regards,
>Olivier
>
>
>>   .PHONY: all
>>   all: install
>>
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk
  2015-05-13 13:17       ` Wiles, Keith
@ 2015-05-13 13:56         ` Olivier MATZ
  2015-05-13 14:04           ` Wiles, Keith
  0 siblings, 1 reply; 19+ messages in thread
From: Olivier MATZ @ 2015-05-13 13:56 UTC (permalink / raw)
  To: Wiles, Keith, dev

Hi Keith,

On 05/13/2015 03:17 PM, Wiles, Keith wrote:
>>>
>>>    endif # ifeq ($(NO_AUTOLIBS),)
>>>
>>> -LDLIBS += $(CPU_LDLIBS)
>>> +LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
>>>
>>
>> As discussed in the previous mail, all things that are about
>> EXTRA_LDLIBS should be moved in the second patch. Therefore,
>> the title of the second patch should not be "update doc...", but
>> something like "mk: introduce EXTRA_LDLIBS...".
>>
>> By the way, I missed that before, but it seems that your
>> patch removes CPU_LDLIBS, I don't think it's correct.
>
> I found no reference to CPU_LDLIBS in the docs or code other then then one
> line. We now have EXTRA_LDLIBS for the command line, right?

Yes, but your patch says "simplify the ifdef". Removing
a variable (even if it is not used) in this patch is not
a good idea.

Now, the CPU_CFLAGS, CPU_LDFLAGS, CPU_LDLIBS can be defined internally
by the rte.vars.mk in mk/arch/ or mk/machine/ directories.

Regards,
Olivier

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk
  2015-05-13 13:56         ` Olivier MATZ
@ 2015-05-13 14:04           ` Wiles, Keith
  2015-05-13 14:28             ` Olivier MATZ
  0 siblings, 1 reply; 19+ messages in thread
From: Wiles, Keith @ 2015-05-13 14:04 UTC (permalink / raw)
  To: Olivier MATZ, dev



On 5/13/15, 8:56 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:

>Hi Keith,
>
>On 05/13/2015 03:17 PM, Wiles, Keith wrote:
>>>>
>>>>    endif # ifeq ($(NO_AUTOLIBS),)
>>>>
>>>> -LDLIBS += $(CPU_LDLIBS)
>>>> +LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
>>>>
>>>
>>> As discussed in the previous mail, all things that are about
>>> EXTRA_LDLIBS should be moved in the second patch. Therefore,
>>> the title of the second patch should not be "update doc...", but
>>> something like "mk: introduce EXTRA_LDLIBS...".
>>>
>>> By the way, I missed that before, but it seems that your
>>> patch removes CPU_LDLIBS, I don't think it's correct.
>>
>> I found no reference to CPU_LDLIBS in the docs or code other then then
>>one
>> line. We now have EXTRA_LDLIBS for the command line, right?
>
>Yes, but your patch says "simplify the ifdef". Removing
>a variable (even if it is not used) in this patch is not
>a good idea.
>
>Now, the CPU_CFLAGS, CPU_LDFLAGS, CPU_LDLIBS can be defined internally
>by the rte.vars.mk in mk/arch/ or mk/machine/ directories.

No docs for CPU_LDLIBS or reference to that variable, which means it does
not exist, right?
If it was used or documented then I would agree. Having magic variables is
not a good idea. I will add the CPU_LDLIBS in to the line, but someone
will have to document that variable.
>
>Regards,
>Olivier
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk
  2015-05-13 14:04           ` Wiles, Keith
@ 2015-05-13 14:28             ` Olivier MATZ
  2015-05-13 14:34               ` Wiles, Keith
  0 siblings, 1 reply; 19+ messages in thread
From: Olivier MATZ @ 2015-05-13 14:28 UTC (permalink / raw)
  To: Wiles, Keith, dev


On 05/13/2015 04:04 PM, Wiles, Keith wrote:
>
>
> On 5/13/15, 8:56 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:
>
>> Hi Keith,
>>
>> On 05/13/2015 03:17 PM, Wiles, Keith wrote:
>>>>>
>>>>>     endif # ifeq ($(NO_AUTOLIBS),)
>>>>>
>>>>> -LDLIBS += $(CPU_LDLIBS)
>>>>> +LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
>>>>>
>>>>
>>>> As discussed in the previous mail, all things that are about
>>>> EXTRA_LDLIBS should be moved in the second patch. Therefore,
>>>> the title of the second patch should not be "update doc...", but
>>>> something like "mk: introduce EXTRA_LDLIBS...".
>>>>
>>>> By the way, I missed that before, but it seems that your
>>>> patch removes CPU_LDLIBS, I don't think it's correct.
>>>
>>> I found no reference to CPU_LDLIBS in the docs or code other then then
>>> one
>>> line. We now have EXTRA_LDLIBS for the command line, right?
>>
>> Yes, but your patch says "simplify the ifdef". Removing
>> a variable (even if it is not used) in this patch is not
>> a good idea.
>>
>> Now, the CPU_CFLAGS, CPU_LDFLAGS, CPU_LDLIBS can be defined internally
>> by the rte.vars.mk in mk/arch/ or mk/machine/ directories.
>
> No docs for CPU_LDLIBS or reference to that variable, which means it does
> not exist, right?
> If it was used or documented then I would agree. Having magic variables is
> not a good idea. I will add the CPU_LDLIBS in to the line, but someone
> will have to document that variable.

First, this variable is internal to DPDK framework. It is not
documented, because the goal of the documentation is not to
document all internal variables. In one word, it's not a magic
variable at all, it is simply a variable.

Now, the heart of the matter is that your patch silently remove
this line. This is not acceptable and that's why I'm commenting
on it. The goal of patch splitting and proper title is to separate
features, and win time when searching in the git log for the cause
of a problem.

This is the same problem with EXTRA_LDLIBS. How can you justify
having 2 patches:
- "simplify the ifdef" that also adds the EXTRA_LDLIBS
  then
- "update the documentation for EXTRA_LDLIBS"

Regards,
Olivier



>>
>> Regards,
>> Olivier
>>
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk
  2015-05-13 14:28             ` Olivier MATZ
@ 2015-05-13 14:34               ` Wiles, Keith
  0 siblings, 0 replies; 19+ messages in thread
From: Wiles, Keith @ 2015-05-13 14:34 UTC (permalink / raw)
  To: Olivier MATZ, dev



On 5/13/15, 9:28 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:

>
>On 05/13/2015 04:04 PM, Wiles, Keith wrote:
>>
>>
>> On 5/13/15, 8:56 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:
>>
>>> Hi Keith,
>>>
>>> On 05/13/2015 03:17 PM, Wiles, Keith wrote:
>>>>>>
>>>>>>     endif # ifeq ($(NO_AUTOLIBS),)
>>>>>>
>>>>>> -LDLIBS += $(CPU_LDLIBS)
>>>>>> +LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
>>>>>>
>>>>>
>>>>> As discussed in the previous mail, all things that are about
>>>>> EXTRA_LDLIBS should be moved in the second patch. Therefore,
>>>>> the title of the second patch should not be "update doc...", but
>>>>> something like "mk: introduce EXTRA_LDLIBS...".
>>>>>
>>>>> By the way, I missed that before, but it seems that your
>>>>> patch removes CPU_LDLIBS, I don't think it's correct.
>>>>
>>>> I found no reference to CPU_LDLIBS in the docs or code other then then
>>>> one
>>>> line. We now have EXTRA_LDLIBS for the command line, right?
>>>
>>> Yes, but your patch says "simplify the ifdef". Removing
>>> a variable (even if it is not used) in this patch is not
>>> a good idea.
>>>
>>> Now, the CPU_CFLAGS, CPU_LDFLAGS, CPU_LDLIBS can be defined internally
>>> by the rte.vars.mk in mk/arch/ or mk/machine/ directories.
>>
>> No docs for CPU_LDLIBS or reference to that variable, which means it
>>does
>> not exist, right?
>> If it was used or documented then I would agree. Having magic variables
>>is
>> not a good idea. I will add the CPU_LDLIBS in to the line, but someone
>> will have to document that variable.
>
>First, this variable is internal to DPDK framework. It is not

Not referenced in the code any place except the one line and not
referenced in the docs, which means no one used that variable. By
definition this is some magic variable that someone could use only because
he knew about that variable.

As I stated before, I will add that variable back, but it must be
documented, correct?

>documented, because the goal of the documentation is not to
>document all internal variables. In one word, it's not a magic
>variable at all, it is simply a variable.
>
>Now, the heart of the matter is that your patch silently remove
>this line. This is not acceptable and that's why I'm commenting
>on it. The goal of patch splitting and proper title is to separate
>features, and win time when searching in the git log for the cause
>of a problem.
>
>This is the same problem with EXTRA_LDLIBS. How can you justify
>having 2 patches:
>- "simplify the ifdef" that also adds the EXTRA_LDLIBS
>  then
>- "update the documentation for EXTRA_LDLIBS"
>
>Regards,
>Olivier
>
>
>
>>>
>>> Regards,
>>> Olivier
>>>
>>
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile
  2015-05-11 23:14 ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Keith Wiles
                     ` (2 preceding siblings ...)
  2015-05-12 19:11   ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify " Keith Wiles
@ 2015-05-13 16:35   ` Keith Wiles
  2015-05-13 16:35     ` [dpdk-dev] [PATCH v9 2/2] mk:Introduce the EXTRA_LDLIBS variable Keith Wiles
  2015-05-14 12:30     ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Olivier MATZ
  2015-05-14 14:21   ` [dpdk-dev] [PATCH v10 " Keith Wiles
  4 siblings, 2 replies; 19+ messages in thread
From: Keith Wiles @ 2015-05-13 16:35 UTC (permalink / raw)
  To: dev

Simplify the ifdefs in rte.app.mk to make the code more
readable and maintainable by introducing a internal
_LDLIBS-y variable to build up the LDLIBS variable.

The new internal variable _LDLIBS-y should not be
used outside of the rte.app.mk file.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 mk/rte.app.mk | 243 +++++++++++++++-------------------------------------------
 1 file changed, 61 insertions(+), 182 deletions(-)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index af8a1b0..1a2043a 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -1,7 +1,7 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-#   Copyright(c) 2014 6WIND S.A.
+#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+#   Copyright(c) 2014-2015 6WIND S.A.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -51,218 +51,97 @@ LDSCRIPT = $(RTE_LDSCRIPT)
 endif
 
 # default path for libs
-LDLIBS += -L$(RTE_SDK_BIN)/lib
+_LDLIBS-y += -L$(RTE_SDK_BIN)/lib
 
 #
 # Order is important: from higher level to lower level
 #
-LDLIBS += --whole-archive
 
-ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
-LDLIBS += -l$(RTE_LIBNAME)
-endif
+_LDLIBS-y += --whole-archive
 
-ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
+_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS)    += -l$(RTE_LIBNAME)
 
-ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y)
-LDLIBS += -lrte_distributor
-endif
+ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
 
-ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y)
-LDLIBS += -lrte_reorder
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR)    += -lrte_distributor
+_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 
-ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
-LDLIBS += -lrte_kni
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM)        += -lrte_ivshmem
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y)
-ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
-LDLIBS += -lrte_ivshmem
-endif
-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_METER)          += -lrte_meter
 
-ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y)
-LDLIBS += -lrte_pipeline
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrt
 
-ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y)
-LDLIBS += -lrte_table
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PORT),y)
-LDLIBS += -lrte_port
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y)
-LDLIBS += -lrte_timer
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_HASH),y)
-LDLIBS += -lrte_hash
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y)
-LDLIBS += -lrte_jobstats
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
-LDLIBS += -lrte_lpm
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_POWER),y)
-LDLIBS += -lrte_power
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
-LDLIBS += -lrte_acl
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_METER),y)
-LDLIBS += -lrte_meter
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
-LDLIBS += -lrte_sched
-LDLIBS += -lm
-LDLIBS += -lrt
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y)
-LDLIBS += -lrte_vhost
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lrte_vhost
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lpcap
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lpcap
 
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn)
-LDLIBS += -lfuse
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lfuse
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
-LDLIBS += -libverbs
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs
 
-LDLIBS += --start-group
+_LDLIBS-y += --start-group
 
 ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
 
-ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
-LDLIBS += -lrte_kvargs
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y)
-LDLIBS += -lrte_mbuf
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y)
-LDLIBS += -lrte_ip_frag
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y)
-LDLIBS += -lethdev
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y)
-LDLIBS += -lrte_malloc
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y)
-LDLIBS += -lrte_mempool
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_RING),y)
-LDLIBS += -lrte_ring
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_EAL),y)
-LDLIBS += -lrte_eal
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y)
-LDLIBS += -lrte_cmdline
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y)
-LDLIBS += -lrte_cfgfile
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
-LDLIBS += -lrte_pmd_bond
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
-LDLIBS += -lrte_pmd_xenvirt
-LDLIBS += -lxenstore
-endif
+_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_MALLOC)         += -lrte_malloc
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool
+_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
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
 
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
 # plugins (link only if static libraries)
 
-ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y)
-LDLIBS += -lrte_pmd_vmxnet3_uio
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
-LDLIBS += -lrte_pmd_virtio
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y)
-LDLIBS += -lrte_pmd_enic
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
-LDLIBS += -lrte_pmd_i40e
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
-LDLIBS += -lrte_pmd_fm10k
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
-LDLIBS += -lrte_pmd_ixgbe
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y)
-LDLIBS += -lrte_pmd_e1000
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
-LDLIBS += -lrte_pmd_mlx4
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
-LDLIBS += -lrte_pmd_ring
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lrte_pmd_pcap
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)
-LDLIBS += -lrte_pmd_af_packet
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y)
-LDLIBS += -lrte_pmd_null
-endif
-
-endif # plugins
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD)    += -lrte_pmd_vmxnet3_uio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD)     += -lrte_pmd_virtio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD)       += -lrte_pmd_enic
+_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD)       += -lrte_pmd_i40e
+_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD)      += -lrte_pmd_fm10k
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD)      += -lrte_pmd_ixgbe
+_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD)      += -lrte_pmd_e1000
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -lrte_pmd_mlx4
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING)       += -lrte_pmd_ring
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
+
+endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-LDLIBS += $(EXECENV_LDLIBS)
-
-LDLIBS += --end-group
-
-LDLIBS += --no-whole-archive
+_LDLIBS-y += $(EXECENV_LDLIBS)
+_LDLIBS-y += --end-group
+_LDLIBS-y += --no-whole-archive
 
-LDLIBS += $(CPU_LDLIBS)
+LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS)
 
 .PHONY: all
 all: install
-- 
2.3.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [dpdk-dev] [PATCH v9 2/2] mk:Introduce the EXTRA_LDLIBS variable
  2015-05-13 16:35   ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Keith Wiles
@ 2015-05-13 16:35     ` Keith Wiles
  2015-05-14 12:30     ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Olivier MATZ
  1 sibling, 0 replies; 19+ messages in thread
From: Keith Wiles @ 2015-05-13 16:35 UTC (permalink / raw)
  To: dev

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 doc/build-sdk-quick.txt                          | 1 +
 doc/guides/prog_guide/dev_kit_build_system.rst   | 2 ++
 doc/guides/prog_guide/dev_kit_root_make_help.rst | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt
index 041a40e..bf18b48 100644
--- a/doc/build-sdk-quick.txt
+++ b/doc/build-sdk-quick.txt
@@ -13,6 +13,7 @@ Build variables
 	EXTRA_CPPFLAGS   preprocessor options
 	EXTRA_CFLAGS     compiler options
 	EXTRA_LDFLAGS    linker options
+	EXTRA_LDLIBS     linker library options
 	RTE_KERNELDIR    linux headers path
 	CROSS     toolchain prefix
 	V         verbose
diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
index 04f1d4e..7dc2de6 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -411,6 +411,8 @@ Variables that Can be Set/Overridden by the User in a Makefile or Command Line
 
 *   EXTRA_LDFLAGS: The content of this variable is appended after LDFLAGS when linking.
 
+*   EXTRA_LDLIBS: The content of this variable is appended after LDLIBS when linking.
+
 *   EXTRA_ASFLAGS: The content of this variable is appended after ASFLAGS when assembling.
 
 *   EXTRA_CPPFLAGS: The content of this variable is appended after CPPFLAGS when using a C preprocessor on assembly files.
diff --git a/doc/guides/prog_guide/dev_kit_root_make_help.rst b/doc/guides/prog_guide/dev_kit_root_make_help.rst
index 333b007..e522c12 100644
--- a/doc/guides/prog_guide/dev_kit_root_make_help.rst
+++ b/doc/guides/prog_guide/dev_kit_root_make_help.rst
@@ -218,7 +218,7 @@ The following variables can be specified on the command line:
 
     Enable dependency debugging. This provides some useful information about why a target is built or not.
 
-*   EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
+*   EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_LDLIBS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
 
     Append specific compilation, link or asm flags.
 
-- 
2.3.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile
  2015-05-13 16:35   ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Keith Wiles
  2015-05-13 16:35     ` [dpdk-dev] [PATCH v9 2/2] mk:Introduce the EXTRA_LDLIBS variable Keith Wiles
@ 2015-05-14 12:30     ` Olivier MATZ
  2015-05-14 15:14       ` Wiles, Keith
  1 sibling, 1 reply; 19+ messages in thread
From: Olivier MATZ @ 2015-05-14 12:30 UTC (permalink / raw)
  To: Keith Wiles, dev

Hi,

On 05/13/2015 06:35 PM, Keith Wiles wrote:
> Simplify the ifdefs in rte.app.mk to make the code more
> readable and maintainable by introducing a internal
> _LDLIBS-y variable to build up the LDLIBS variable.
> 
> The new internal variable _LDLIBS-y should not be
> used outside of the rte.app.mk file.
> 
> Signed-off-by: Keith Wiles <keith.wiles@intel.com>
> ---
>  mk/rte.app.mk | 243 +++++++++++++++-------------------------------------------
>  1 file changed, 61 insertions(+), 182 deletions(-)
> 
> diff --git a/mk/rte.app.mk b/mk/rte.app.mk
> index af8a1b0..1a2043a 100644
> --- a/mk/rte.app.mk
> +++ b/mk/rte.app.mk
> [...]
>  
> -LDLIBS += $(CPU_LDLIBS)
> +LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS)
>  
>  .PHONY: all
>  all: install


You are still adding EXTRA_LDLIBS in a patch called "simplify the
ifdefs".

A good idea before sending a new version of a patch on the mailing
list is to check the list of the modifications that were discussed.
Then this list can be added in the cover letter or after the "---"
marker of your patch, allowing the reviewers to better understand
what changed in this version.

Regards,
Olivier

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [dpdk-dev] [PATCH v10 1/2] mk:Simplify the ifdefs in the makefile
  2015-05-11 23:14 ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Keith Wiles
                     ` (3 preceding siblings ...)
  2015-05-13 16:35   ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Keith Wiles
@ 2015-05-14 14:21   ` Keith Wiles
  2015-05-14 14:21     ` [dpdk-dev] [PATCH v10 2/2] mk:Introduce the EXTRA_LDLIBS variable Keith Wiles
  2015-05-14 15:42     ` [dpdk-dev] [PATCH v10 1/2] mk:Simplify the ifdefs in the makefile Olivier MATZ
  4 siblings, 2 replies; 19+ messages in thread
From: Keith Wiles @ 2015-05-14 14:21 UTC (permalink / raw)
  To: dev

Simplify the ifdefs in rte.app.mk to make the code more
readable and maintainable by introducing a internal
_LDLIBS-y variable to build up the LDLIBS variable.

The new internal variable _LDLIBS-y should not be
used outside of the rte.app.mk file.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 mk/rte.app.mk | 243 +++++++++++++++-------------------------------------------
 1 file changed, 61 insertions(+), 182 deletions(-)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index af8a1b0..4fc582a 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -1,7 +1,7 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-#   Copyright(c) 2014 6WIND S.A.
+#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+#   Copyright(c) 2014-2015 6WIND S.A.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -51,218 +51,97 @@ LDSCRIPT = $(RTE_LDSCRIPT)
 endif
 
 # default path for libs
-LDLIBS += -L$(RTE_SDK_BIN)/lib
+_LDLIBS-y += -L$(RTE_SDK_BIN)/lib
 
 #
 # Order is important: from higher level to lower level
 #
-LDLIBS += --whole-archive
 
-ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y)
-LDLIBS += -l$(RTE_LIBNAME)
-endif
+_LDLIBS-y += --whole-archive
 
-ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
+_LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS)    += -l$(RTE_LIBNAME)
 
-ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y)
-LDLIBS += -lrte_distributor
-endif
+ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
 
-ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y)
-LDLIBS += -lrte_reorder
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR)    += -lrte_distributor
+_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 
-ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
-LDLIBS += -lrte_kni
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM)        += -lrte_ivshmem
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y)
-ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
-LDLIBS += -lrte_ivshmem
-endif
-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_METER)          += -lrte_meter
 
-ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y)
-LDLIBS += -lrte_pipeline
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrt
 
-ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y)
-LDLIBS += -lrte_table
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PORT),y)
-LDLIBS += -lrte_port
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y)
-LDLIBS += -lrte_timer
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_HASH),y)
-LDLIBS += -lrte_hash
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y)
-LDLIBS += -lrte_jobstats
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
-LDLIBS += -lrte_lpm
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_POWER),y)
-LDLIBS += -lrte_power
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
-LDLIBS += -lrte_acl
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_METER),y)
-LDLIBS += -lrte_meter
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
-LDLIBS += -lrte_sched
-LDLIBS += -lm
-LDLIBS += -lrt
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y)
-LDLIBS += -lrte_vhost
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lrte_vhost
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lpcap
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lpcap
 
-ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn)
-LDLIBS += -lfuse
+ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lfuse
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
-LDLIBS += -libverbs
-endif
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs
 
-LDLIBS += --start-group
+_LDLIBS-y += --start-group
 
 ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
 
-ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
-LDLIBS += -lrte_kvargs
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y)
-LDLIBS += -lrte_mbuf
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y)
-LDLIBS += -lrte_ip_frag
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y)
-LDLIBS += -lethdev
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y)
-LDLIBS += -lrte_malloc
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y)
-LDLIBS += -lrte_mempool
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_RING),y)
-LDLIBS += -lrte_ring
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_EAL),y)
-LDLIBS += -lrte_eal
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y)
-LDLIBS += -lrte_cmdline
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y)
-LDLIBS += -lrte_cfgfile
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
-LDLIBS += -lrte_pmd_bond
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
-LDLIBS += -lrte_pmd_xenvirt
-LDLIBS += -lxenstore
-endif
+_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_MALLOC)         += -lrte_malloc
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool
+_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
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
 
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
 # plugins (link only if static libraries)
 
-ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y)
-LDLIBS += -lrte_pmd_vmxnet3_uio
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y)
-LDLIBS += -lrte_pmd_virtio
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y)
-LDLIBS += -lrte_pmd_enic
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
-LDLIBS += -lrte_pmd_i40e
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
-LDLIBS += -lrte_pmd_fm10k
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
-LDLIBS += -lrte_pmd_ixgbe
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y)
-LDLIBS += -lrte_pmd_e1000
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
-LDLIBS += -lrte_pmd_mlx4
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
-LDLIBS += -lrte_pmd_ring
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lrte_pmd_pcap
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)
-LDLIBS += -lrte_pmd_af_packet
-endif
-
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y)
-LDLIBS += -lrte_pmd_null
-endif
-
-endif # plugins
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD)    += -lrte_pmd_vmxnet3_uio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD)     += -lrte_pmd_virtio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD)       += -lrte_pmd_enic
+_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD)       += -lrte_pmd_i40e
+_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD)      += -lrte_pmd_fm10k
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD)      += -lrte_pmd_ixgbe
+_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD)      += -lrte_pmd_e1000
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -lrte_pmd_mlx4
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING)       += -lrte_pmd_ring
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
+
+endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-LDLIBS += $(EXECENV_LDLIBS)
-
-LDLIBS += --end-group
-
-LDLIBS += --no-whole-archive
+_LDLIBS-y += $(EXECENV_LDLIBS)
+_LDLIBS-y += --end-group
+_LDLIBS-y += --no-whole-archive
 
-LDLIBS += $(CPU_LDLIBS)
+LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS)
 
 .PHONY: all
 all: install
-- 
2.3.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [dpdk-dev] [PATCH v10 2/2] mk:Introduce the EXTRA_LDLIBS variable
  2015-05-14 14:21   ` [dpdk-dev] [PATCH v10 " Keith Wiles
@ 2015-05-14 14:21     ` Keith Wiles
  2015-05-14 15:42     ` [dpdk-dev] [PATCH v10 1/2] mk:Simplify the ifdefs in the makefile Olivier MATZ
  1 sibling, 0 replies; 19+ messages in thread
From: Keith Wiles @ 2015-05-14 14:21 UTC (permalink / raw)
  To: dev

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 doc/build-sdk-quick.txt                          | 1 +
 doc/guides/prog_guide/dev_kit_build_system.rst   | 2 ++
 doc/guides/prog_guide/dev_kit_root_make_help.rst | 2 +-
 mk/rte.app.mk                                    | 2 +-
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt
index 041a40e..bf18b48 100644
--- a/doc/build-sdk-quick.txt
+++ b/doc/build-sdk-quick.txt
@@ -13,6 +13,7 @@ Build variables
 	EXTRA_CPPFLAGS   preprocessor options
 	EXTRA_CFLAGS     compiler options
 	EXTRA_LDFLAGS    linker options
+	EXTRA_LDLIBS     linker library options
 	RTE_KERNELDIR    linux headers path
 	CROSS     toolchain prefix
 	V         verbose
diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
index 04f1d4e..7dc2de6 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -411,6 +411,8 @@ Variables that Can be Set/Overridden by the User in a Makefile or Command Line
 
 *   EXTRA_LDFLAGS: The content of this variable is appended after LDFLAGS when linking.
 
+*   EXTRA_LDLIBS: The content of this variable is appended after LDLIBS when linking.
+
 *   EXTRA_ASFLAGS: The content of this variable is appended after ASFLAGS when assembling.
 
 *   EXTRA_CPPFLAGS: The content of this variable is appended after CPPFLAGS when using a C preprocessor on assembly files.
diff --git a/doc/guides/prog_guide/dev_kit_root_make_help.rst b/doc/guides/prog_guide/dev_kit_root_make_help.rst
index 333b007..e522c12 100644
--- a/doc/guides/prog_guide/dev_kit_root_make_help.rst
+++ b/doc/guides/prog_guide/dev_kit_root_make_help.rst
@@ -218,7 +218,7 @@ The following variables can be specified on the command line:
 
     Enable dependency debugging. This provides some useful information about why a target is built or not.
 
-*   EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
+*   EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_LDLIBS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
 
     Append specific compilation, link or asm flags.
 
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 4fc582a..1a2043a 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -141,7 +141,7 @@ _LDLIBS-y += $(EXECENV_LDLIBS)
 _LDLIBS-y += --end-group
 _LDLIBS-y += --no-whole-archive
 
-LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS)
+LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS)
 
 .PHONY: all
 all: install
-- 
2.3.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile
  2015-05-14 12:30     ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Olivier MATZ
@ 2015-05-14 15:14       ` Wiles, Keith
  0 siblings, 0 replies; 19+ messages in thread
From: Wiles, Keith @ 2015-05-14 15:14 UTC (permalink / raw)
  To: Olivier MATZ, dev



On 5/14/15, 7:30 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:

>Hi,
>
>On 05/13/2015 06:35 PM, Keith Wiles wrote:
>> Simplify the ifdefs in rte.app.mk to make the code more
>> readable and maintainable by introducing a internal
>> _LDLIBS-y variable to build up the LDLIBS variable.
>> 
>> The new internal variable _LDLIBS-y should not be
>> used outside of the rte.app.mk file.
>> 
>> Signed-off-by: Keith Wiles <keith.wiles@intel.com>
>> ---
>>  mk/rte.app.mk | 243
>>+++++++++++++++-------------------------------------------
>>  1 file changed, 61 insertions(+), 182 deletions(-)
>> 
>> diff --git a/mk/rte.app.mk b/mk/rte.app.mk
>> index af8a1b0..1a2043a 100644
>> --- a/mk/rte.app.mk
>> +++ b/mk/rte.app.mk
>> [...]
>>  
>> -LDLIBS += $(CPU_LDLIBS)
>> +LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS)
>>  
>>  .PHONY: all
>>  all: install
>
>
>You are still adding EXTRA_LDLIBS in a patch called "simplify the
>ifdefs".

I did have them split correctly and its my bad I somehow did not get then
committed correctly.

>
>A good idea before sending a new version of a patch on the mailing
>list is to check the list of the modifications that were discussed.
>Then this list can be added in the cover letter or after the "---"
>marker of your patch, allowing the reviewers to better understand
>what changed in this version.
>
>Regards,
>Olivier

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v10 1/2] mk:Simplify the ifdefs in the makefile
  2015-05-14 14:21   ` [dpdk-dev] [PATCH v10 " Keith Wiles
  2015-05-14 14:21     ` [dpdk-dev] [PATCH v10 2/2] mk:Introduce the EXTRA_LDLIBS variable Keith Wiles
@ 2015-05-14 15:42     ` Olivier MATZ
  2015-05-14 21:38       ` Thomas Monjalon
  1 sibling, 1 reply; 19+ messages in thread
From: Olivier MATZ @ 2015-05-14 15:42 UTC (permalink / raw)
  To: Keith Wiles, dev

Hi Keith,

On 05/14/2015 04:21 PM, Keith Wiles wrote:
> Simplify the ifdefs in rte.app.mk to make the code more
> readable and maintainable by introducing a internal
> _LDLIBS-y variable to build up the LDLIBS variable.
> 
> The new internal variable _LDLIBS-y should not be
> used outside of the rte.app.mk file.
> 
> Signed-off-by: Keith Wiles <keith.wiles@intel.com>

Series
Acked-by: Olivier Matz <olivier.matz@6wind.com>

Thanks,
Olivier

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [dpdk-dev] [PATCH v10 1/2] mk:Simplify the ifdefs in the makefile
  2015-05-14 15:42     ` [dpdk-dev] [PATCH v10 1/2] mk:Simplify the ifdefs in the makefile Olivier MATZ
@ 2015-05-14 21:38       ` Thomas Monjalon
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas Monjalon @ 2015-05-14 21:38 UTC (permalink / raw)
  To: Keith Wiles; +Cc: dev

2015-05-14 17:42, Olivier MATZ:
> Hi Keith,
> 
> On 05/14/2015 04:21 PM, Keith Wiles wrote:
> > Simplify the ifdefs in rte.app.mk to make the code more
> > readable and maintainable by introducing a internal
> > _LDLIBS-y variable to build up the LDLIBS variable.
> > 
> > The new internal variable _LDLIBS-y should not be
> > used outside of the rte.app.mk file.
> > 
> > Signed-off-by: Keith Wiles <keith.wiles@intel.com>
> 
> Series
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-05-14 21:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <017274>
2015-05-11 23:14 ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Keith Wiles
2015-05-11 23:14   ` [dpdk-dev] [PATCH v7 2/2] Update Docs for new EXTRA_LDLIBS variable Keith Wiles
2015-05-12 15:44   ` [dpdk-dev] [PATCH v7 1/2] Simplify the ifdefs in rte.app.mk Olivier MATZ
2015-05-12 19:11   ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify " Keith Wiles
2015-05-12 19:11     ` [dpdk-dev] [PATCH v8 2/2] mk:Update Docs for new EXTRA_LDLIBS variable Keith Wiles
2015-05-13  7:41     ` [dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk Olivier MATZ
2015-05-13 13:17       ` Wiles, Keith
2015-05-13 13:56         ` Olivier MATZ
2015-05-13 14:04           ` Wiles, Keith
2015-05-13 14:28             ` Olivier MATZ
2015-05-13 14:34               ` Wiles, Keith
2015-05-13 16:35   ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Keith Wiles
2015-05-13 16:35     ` [dpdk-dev] [PATCH v9 2/2] mk:Introduce the EXTRA_LDLIBS variable Keith Wiles
2015-05-14 12:30     ` [dpdk-dev] [PATCH v9 1/2] mk:Simplify the ifdefs in the makefile Olivier MATZ
2015-05-14 15:14       ` Wiles, Keith
2015-05-14 14:21   ` [dpdk-dev] [PATCH v10 " Keith Wiles
2015-05-14 14:21     ` [dpdk-dev] [PATCH v10 2/2] mk:Introduce the EXTRA_LDLIBS variable Keith Wiles
2015-05-14 15:42     ` [dpdk-dev] [PATCH v10 1/2] mk:Simplify the ifdefs in the makefile Olivier MATZ
2015-05-14 21:38       ` Thomas Monjalon

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).