[dpdk-dev] [PATCH] app/testpmd: fix static build link ordering

Ferruh Yigit ferruh.yigit at intel.com
Thu Jan 12 16:27:30 CET 2017


On 1/12/2017 1:58 PM, Jerin Jacob wrote:
> On Thu, Jan 12, 2017 at 10:26:08AM +0100, Thomas Monjalon wrote:
>> 2017-01-12 13:16, Jerin Jacob:
>>> +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
>>>  _LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe
>>> +endif
>>
>> _LDLIBS is an internal variable of rte.app.mk.
>> Please could you check that there is no issue when using LDLIBS instead
>> of _LDLIBS?
> 
> Tested it. Suggested change has issue in shared lib configuration.
> 
> [dpdk-master] $ git diff
> diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
> index 050663a..27cadd5 100644
> --- a/app/test-pmd/Makefile
> +++ b/app/test-pmd/Makefile
> @@ -59,9 +59,7 @@ SRCS-y += csumonly.c
>  SRCS-y += icmpecho.c
>  SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c
>  
> -ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
> -_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe
> -endif
> +LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe

It is LDLIBS instead of LDLIBS-y, following may work:

-_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe
+ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
+ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
+LDLIBS += -lrte_pmd_ixgbe
+endif
+endif


Also using EXTRA_LDLIBS instead of LDLIBS may remove the requirement of
the SHARED_LIB check, because of where it is located, but this seems
just coincidental.





More information about the dev mailing list