From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 85B01CBA6 for ; Thu, 30 Apr 2015 16:31:16 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 30 Apr 2015 07:31:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,677,1422950400"; d="scan'208";a="688047859" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga001.jf.intel.com with ESMTP; 30 Apr 2015 07:31:15 -0700 Received: from orsmsx154.amr.corp.intel.com (10.22.226.12) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 30 Apr 2015 07:31:15 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by ORSMSX154.amr.corp.intel.com (10.22.226.12) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 30 Apr 2015 07:31:14 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.26]) by fmsmsx158.amr.corp.intel.com ([169.254.15.151]) with mapi id 14.03.0224.002; Thu, 30 Apr 2015 07:31:14 -0700 From: "Wiles, Keith" To: Olivier MATZ , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 1/2] Simplify the ifdefs in rte.app.mk. Thread-Index: AQHQgpEO7hFBTWcYakiihIqUUjAQOJ1lxQiA///pQQCAAFfZgP//ut8A Date: Thu, 30 Apr 2015 14:31:13 +0000 Message-ID: References: <1430321158-17805-1-git-send-email-keith.wiles@intel.com> <5541F9C1.9050701@6wind.com> <5542305D.9070505@6wind.com> In-Reply-To: <5542305D.9070505@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.204.210] Content-Type: text/plain; charset="Windows-1252" Content-ID: <39DF1F6815B39D48A4431599B88067DA@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 1/2] Simplify the ifdefs in rte.app.mk. 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: Thu, 30 Apr 2015 14:31:17 -0000 On 4/30/15, 8:38 AM, "Olivier MATZ" wrote: >Hi Keith, > >On 04/30/2015 03:24 PM, Wiles, Keith wrote: >> >> >> On 4/30/15, 4:45 AM, "Olivier MATZ" wrote: >> >>> Hi Keith, >>> >>> Thank you for submitting a clean-up. Please see some comments below. >>> >>> On 04/29/2015 05:25 PM, 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. >>> >>> If I understand well, the goal of this patch is only a cleanup in >>> rte.app.mk, but at the end, it changes the makefile user "API", >>> which could probably be a problem for applications using the >>> dpdk makefile framework. >>> >>> Why not just having an temporary internal variable (let's say >>> _LDLIBS-y) that would allow to do the clean-up without modifying >>> the user interface? >>> >>> Also, with your patch, the approach for EXTRA_LDLIBS would be >>> different than CFLAGS or LDFLAGS: >>> - CFLAGS/LDFLAGS are in Makefiles only >>> - EXTRA_CFLAGS/EXTRA_LDFLAGS are prefered in command line >>> to add flags to the default ones >>> >>> I'm not opposed to add EXTRA_LDLIBS in addition to LDLIBS, >>> keeping a compatibility with existing application Makefiles. >> >> The docs for DPDK 28.3.6 states they can be used for both command line >>and >> Makefile, so I think I like the current solution unless everyone wants >>it >> as you suggested. >> >>=20 >>http://dpdk.readthedocs.org/en/v2.0.0/prog_guide/dev_kit_build_system.htm >>l > > From the link you have sent: > >- About CFLAGS: > >"28.3.4. Variables that Can be Set/Overridden in a Makefile Only >[...] >CFLAGS: Flags to use for C compilation. The user should use +=3D to append >data in this variable." > >nothing in 28.3.6 > > >- About EXTRA_CFLAGS: > >nothing in 28.3.4 > >"28.3.6. Variables that Can be Set/Overridden by the User in a Makefile >or Command Line >[...] >EXTRA_CFLAGS: The content of this variable is appended after CFLAGS when >compiling." The point was that EXTRA_XXX can be used for command line and Makefile as it was pointed out in a previous email the assumption was EXTRA_XXX was only for the command line. (Just to make sure we understood EXTRA_XXX was not just for command line options.) This was the reason I sent the link an to point out using EXTRA_XXX is a much cleaner method then allowing someone to modify what I believe is an internal variable. > > >It seems it's the description I have made above. > >Also, you don't answer to the Makefile API issue. From what I >understand, your patch would break external Makefiles using >LDLIBS just for doing an internal clean-up. I believe using these variables CFLAGS, LDLIBS, =8A Are really internal variables and EXTRA_XXX should have been used instead. I would like to fix that issue and I do not feel the impact is that big as it is a simple search replace problem. But it looks like we want to keep the old way just for a very minor change IMHO. I will send out a new patch using _LDLIBS-y as the internal variable and then set LDLIBS at the correct location towards the end of the file. Does that work for you? Regards, ++Keith > > >Regards, >Olivier > > >> >> >>> >>> What do you think? >>> >>> Regards, >>> Olivier >>> >>> >>> >>>> >>>> Signed-off-by: Keith Wiles >>>> --- >>>> examples/dpdk_qat/Makefile | 4 +- >>>> examples/vm_power_manager/Makefile | 2 +- >>>> mk/rte.app.mk | 254 >>>> ++++++++++--------------------------- >>>> mk/rte.hostapp.mk | 4 +- >>>> mk/rte.shared.mk | 12 +- >>>> 5 files changed, 77 insertions(+), 199 deletions(-) >>>> >>>> diff --git a/examples/dpdk_qat/Makefile b/examples/dpdk_qat/Makefile >>>> index f1e06a1..90ca1d3 100644 >>>> --- a/examples/dpdk_qat/Makefile >>>> +++ b/examples/dpdk_qat/Makefile >>>> @@ -77,8 +77,8 @@ else >>>> ICP_LIBRARY_PATH =3D $(ICP_ROOT)/build/libicp_qa_al.a >>>> endif >>>> >>>> -LDLIBS +=3D -L$(ICP_ROOT)/build >>>> -LDLIBS +=3D $(ICP_LIBRARY_PATH) \ >>>> +EXTRA_LDLIBS +=3D -L$(ICP_ROOT)/build >>>> +EXTRA_LDLIBS +=3D $(ICP_LIBRARY_PATH) \ >>>> -lz \ >>>> -losal \ >>>> -ladf_proxy \ >>>> diff --git a/examples/vm_power_manager/Makefile >>>> b/examples/vm_power_manager/Makefile >>>> index 113dbc4..8fb78d4 100644 >>>> --- a/examples/vm_power_manager/Makefile >>>> +++ b/examples/vm_power_manager/Makefile >>>> @@ -48,7 +48,7 @@ SRCS-y +=3D channel_monitor.c >>>> CFLAGS +=3D -O3 -I$(RTE_SDK)/lib/librte_power/ >>>> CFLAGS +=3D $(WERROR_FLAGS) >>>> >>>> -LDLIBS +=3D -lvirt >>>> +EXTRA_LDLIBS +=3D -lvirt >>>> >>>> # workaround for a gcc bug with noreturn attribute >>>> # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D12603 >>>> diff --git a/mk/rte.app.mk b/mk/rte.app.mk >>>> index 62a76ae..c41de82 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) 2015 6WIND S.A. >>>> # All rights reserved. >>>> # >>>> # Redistribution and use in source and binary forms, with or >>>>without >>>> @@ -51,7 +51,7 @@ LDSCRIPT =3D $(RTE_LDSCRIPT) >>>> endif >>>> >>>> # default path for libs >>>> -LDLIBS +=3D -L$(RTE_SDK_BIN)/lib >>>> +LDLIBS-y +=3D -L$(RTE_SDK_BIN)/lib >>>> >>>> # >>>> # Include libraries depending on config if NO_AUTOLIBS is not set >>>> @@ -59,215 +59,93 @@ LDLIBS +=3D -L$(RTE_SDK_BIN)/lib >>>> # >>>> ifeq ($(NO_AUTOLIBS),) >>>> >>>> -LDLIBS +=3D --whole-archive >>>> +LDLIBS-y +=3D --whole-archive >>>> >>>> -ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y) >>>> -LDLIBS +=3D -l$(RTE_LIBNAME) >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS) +=3D -l$(RTE_LIBNAME) >>>> >>>> ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y) >>>> -LDLIBS +=3D -lrte_distributor >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_REORDER),y) >>>> -LDLIBS +=3D -lrte_reorder >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) +=3D -lrte_distributor >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) +=3D -lrte_reorder >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) >>>> ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) >>>> -LDLIBS +=3D -lrte_kni >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_KNI) +=3D -lrte_kni >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_IVSHMEM) +=3D -lrte_ivshmem >>>> endif >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y) >>>> -ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) >>>> -LDLIBS +=3D -lrte_ivshmem >>>> -endif >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE) +=3D -lrte_pipeline >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_TABLE) +=3D -lrte_table >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PORT) +=3D -lrte_port >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) +=3D -lrte_timer >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_HASH) +=3D -lrte_hash >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_JOBSTATS) +=3D -lrte_jobstats >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_LPM) +=3D -lrte_lpm >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) +=3D -lrte_power >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) +=3D -lrte_acl >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_METER) +=3D -lrte_meter >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y) >>>> -LDLIBS +=3D -lrte_pipeline >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) +=3D -lrte_sched >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) +=3D -lm >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) +=3D -lrt >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y) >>>> -LDLIBS +=3D -lrte_table >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PORT),y) >>>> -LDLIBS +=3D -lrte_port >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_TIMER),y) >>>> -LDLIBS +=3D -lrte_timer >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_HASH),y) >>>> -LDLIBS +=3D -lrte_hash >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_JOBSTATS),y) >>>> -LDLIBS +=3D -lrte_jobstats >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_LPM),y) >>>> -LDLIBS +=3D -lrte_lpm >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_POWER),y) >>>> -LDLIBS +=3D -lrte_power >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) >>>> -LDLIBS +=3D -lrte_acl >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_METER),y) >>>> -LDLIBS +=3D -lrte_meter >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y) >>>> -LDLIBS +=3D -lrte_sched >>>> -LDLIBS +=3D -lm >>>> -LDLIBS +=3D -lrt >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_VHOST), y) >>>> -LDLIBS +=3D -lrte_vhost >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) +=3D -lrte_vhost >>>> >>>> endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) >>>> -LDLIBS +=3D -lpcap >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) +=3D -lpcap >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_VHOST)$(CONFIG_RTE_LIBRTE_VHOST_USER),yn) >>>> -LDLIBS +=3D -lfuse >>>> +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) +=3D -lfuse >>>> endif >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y) >>>> -LDLIBS +=3D -libverbs >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) +=3D -libverbs >>>> >>>> -LDLIBS +=3D --start-group >>>> +LDLIBS-y +=3D --start-group >>>> >>>> ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y) >>>> -LDLIBS +=3D -lrte_kvargs >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MBUF),y) >>>> -LDLIBS +=3D -lrte_mbuf >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_IP_FRAG),y) >>>> -LDLIBS +=3D -lrte_ip_frag >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y) >>>> -LDLIBS +=3D -lethdev >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y) >>>> -LDLIBS +=3D -lrte_malloc >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y) >>>> -LDLIBS +=3D -lrte_mempool >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_RING),y) >>>> -LDLIBS +=3D -lrte_ring >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_EAL),y) >>>> -LDLIBS +=3D -lrte_eal >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) >>>> -LDLIBS +=3D -lrte_cmdline >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),y) >>>> -LDLIBS +=3D -lrte_cfgfile >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y) >>>> -LDLIBS +=3D -lrte_pmd_bond >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y) >>>> -LDLIBS +=3D -lrte_pmd_xenvirt >>>> -LDLIBS +=3D -lxenstore >>>> -endif >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) +=3D -lrte_kvargs >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) +=3D -lrte_mbuf >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG) +=3D -lrte_ip_frag >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER) +=3D -lethdev >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_MALLOC) +=3D -lrte_malloc >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) +=3D -lrte_mempool >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_RING) +=3D -lrte_ring >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) +=3D -lrte_eal >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE) +=3D -lrte_cmdline >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) +=3D -lrte_cfgfile >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) +=3D -lrte_pmd_bond >>>> + >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) +=3D -lrte_pmd_xenvirt >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) +=3D -lxenstore >>>> >>>> ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) >>>> # plugins (link only if static libraries) >>>> >>>> -ifeq ($(CONFIG_RTE_LIBRTE_VMXNET3_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_vmxnet3_uio >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_virtio >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_enic >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_i40e >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_fm10k >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_ixgbe >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_E1000_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_e1000 >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y) >>>> -LDLIBS +=3D -lrte_pmd_mlx4 >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y) >>>> -LDLIBS +=3D -lrte_pmd_ring >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) >>>> -LDLIBS +=3D -lrte_pmd_pcap >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y) >>>> -LDLIBS +=3D -lrte_pmd_af_packet >>>> -endif >>>> - >>>> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y) >>>> -LDLIBS +=3D -lrte_pmd_null >>>> -endif >>>> - >>>> -endif # plugins >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) +=3D -lrte_pmd_vmxnet3_ui= o >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) +=3D -lrte_pmd_virtio >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) +=3D -lrte_pmd_enic >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD) +=3D -lrte_pmd_i40e >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) +=3D -lrte_pmd_fm10k >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) +=3D -lrte_pmd_ixgbe >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD) +=3D -lrte_pmd_e1000 >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) +=3D -lrte_pmd_mlx4 >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) +=3D -lrte_pmd_ring >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) +=3D -lrte_pmd_pcap >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) +=3D -lrte_pmd_af_packet >>>> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL) +=3D -lrte_pmd_null >>>> + >>>> +endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB) >>>> >>>> endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS >>>> >>>> -LDLIBS +=3D $(EXECENV_LDLIBS) >>>> - >>>> -LDLIBS +=3D --end-group >>>> - >>>> -LDLIBS +=3D --no-whole-archive >>>> +LDLIBS-y +=3D $(EXECENV_LDLIBS) >>>> +LDLIBS-y +=3D --end-group >>>> +LDLIBS-y +=3D --no-whole-archive >>>> >>>> endif # ifeq ($(NO_AUTOLIBS),) >>>> >>>> -LDLIBS +=3D $(CPU_LDLIBS) >>>> +LDLIBS-y +=3D $(EXTRA_LDLIBS) >>>> >>>> .PHONY: all >>>> all: install >>>> @@ -286,10 +164,10 @@ ifeq ($(LINK_USING_CC),1) >>>> override EXTRA_LDFLAGS :=3D $(call linkerprefix,$(EXTRA_LDFLAGS)) >>>> O_TO_EXE =3D $(CC) $(CFLAGS) $(LDFLAGS_$(@)) \ >>>> -Wl,-Map=3D$(@).map,--cref -o $@ $(OBJS-y) $(call >>>> linkerprefix,$(LDFLAGS)) \ >>>> - $(EXTRA_LDFLAGS) $(call linkerprefix,$(LDLIBS)) >>>> + $(EXTRA_LDFLAGS) $(call linkerprefix,$(LDLIBS-y)) >>>> else >>>> O_TO_EXE =3D $(LD) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ >>>> - -Map=3D$(@).map --cref -o $@ $(OBJS-y) $(LDLIBS) >>>> + -Map=3D$(@).map --cref -o $@ $(OBJS-y) $(LDLIBS-y) >>>> endif >>>> O_TO_EXE_STR =3D $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlig= ht >>>> O_TO_EXE_DISP =3D $(if $(V),"$(O_TO_EXE_STR)"," LD $(@)") >>>> @@ -302,12 +180,12 @@ O_TO_EXE_DO =3D @set -e; \ >>>> -include .$(APP).cmd >>>> >>>> # path where libraries are retrieved >>>> -LDLIBS_PATH :=3D $(subst -Wl$(comma)-L,,$(filter >>>> -Wl$(comma)-L%,$(LDLIBS))) >>>> -LDLIBS_PATH +=3D $(subst -L,,$(filter -L%,$(LDLIBS))) >>>> +LDLIBS_PATH :=3D $(subst -Wl$(comma)-L,,$(filter >>>> -Wl$(comma)-L%,$(LDLIBS-y))) >>>> +LDLIBS_PATH +=3D $(subst -L,,$(filter -L%,$(LDLIBS-y))) >>>> >>>> # list of .a files that are linked to this application >>>> -LDLIBS_NAMES :=3D $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS))) >>>> -LDLIBS_NAMES +=3D $(patsubst -Wl$(comma)-l%,lib%.a,$(filter >>>> -Wl$(comma)-l%,$(LDLIBS))) >>>> +LDLIBS_NAMES :=3D $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS-y))) >>>> +LDLIBS_NAMES +=3D $(patsubst -Wl$(comma)-l%,lib%.a,$(filter >>>> -Wl$(comma)-l%,$(LDLIBS-y))) >>>> >>>> # list of found libraries files (useful for deps). If not found, >>>>the >>>> # library is silently ignored and dep won't be checked >>>> diff --git a/mk/rte.hostapp.mk b/mk/rte.hostapp.mk >>>> index c44d0f8..51e8c1d 100644 >>>> --- a/mk/rte.hostapp.mk >>>> +++ b/mk/rte.hostapp.mk >>>> @@ -58,7 +58,7 @@ build: _postbuild >>>> exe2cmd =3D $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) >>>> >>>> O_TO_EXE =3D $(HOSTCC) $(HOST_LDFLAGS) $(LDFLAGS_$(@)) \ >>>> - $(EXTRA_HOST_LDFLAGS) -o $@ $(OBJS-y) $(LDLIBS) >>>> + $(EXTRA_HOST_LDFLAGS) -o $@ $(OBJS-y) $(LDLIBS-y) >>>> O_TO_EXE_STR =3D $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlig= ht >>>> O_TO_EXE_DISP =3D $(if $(V),"$(O_TO_EXE_STR)"," HOSTLD $(@)") >>>> O_TO_EXE_CMD =3D "cmd_$@ =3D $(O_TO_EXE_STR)" >>>> @@ -72,7 +72,7 @@ O_TO_EXE_DO =3D @set -e; \ >>>> # list of .a files that are linked to this application >>>> LDLIBS_FILES :=3D $(wildcard \ >>>> $(addprefix $(RTE_OUTPUT)/lib/, \ >>>> - $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS))))) >>>> + $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS-y))))) >>>> >>>> # >>>> # Compile executable file if needed >>>> diff --git a/mk/rte.shared.mk b/mk/rte.shared.mk >>>> index fc6b0b4..56f20bb 100644 >>>> --- a/mk/rte.shared.mk >>>> +++ b/mk/rte.shared.mk >>>> @@ -60,10 +60,10 @@ exe2cmd =3D $(strip $(call dotfile,$(patsubst >>>> %,%.cmd,$(1)))) >>>> ifeq ($(LINK_USING_CC),1) >>>> override EXTRA_LDFLAGS :=3D $(call linkerprefix,$(EXTRA_LDFLAGS)) >>>> O_TO_SO =3D $(CC) $(call linkerprefix,$(LDFLAGS)) $(LDFLAGS_$(@)) >>>> $(EXTRA_LDFLAGS) \ >>>> - -shared -o $@ $(OBJS-y) $(call linkerprefix,$(LDLIBS)) >>>> + -shared -o $@ $(OBJS-y) $(call linkerprefix,$(LDLIBS-y)) >>>> else >>>> O_TO_SO =3D $(LD) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ >>>> - -shared -o $@ $(OBJS-y) $(LDLIBS) >>>> + -shared -o $@ $(OBJS-y) $(LDLIBS-y) >>>> endif >>>> >>>> O_TO_SO_STR =3D $(subst ','\'',$(O_TO_SO)) #'# fix syntax highlight >>>> @@ -77,12 +77,12 @@ O_TO_SO_DO =3D @set -e; \ >>>> -include .$(SHARED).cmd >>>> >>>> # path where libraries are retrieved >>>> -LDLIBS_PATH :=3D $(subst -Wl$(comma)-L,,$(filter >>>> -Wl$(comma)-L%,$(LDLIBS))) >>>> -LDLIBS_PATH +=3D $(subst -L,,$(filter -L%,$(LDLIBS))) >>>> +LDLIBS_PATH :=3D $(subst -Wl$(comma)-L,,$(filter >>>> -Wl$(comma)-L%,$(LDLIBS-y))) >>>> +LDLIBS_PATH +=3D $(subst -L,,$(filter -L%,$(LDLIBS-y))) >>>> >>>> # list of .a files that are linked to this application >>>> -LDLIBS_NAMES :=3D $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS))) >>>> -LDLIBS_NAMES +=3D $(patsubst -Wl$(comma)-l%,lib%.a,$(filter >>>> -Wl$(comma)-l%,$(LDLIBS))) >>>> +LDLIBS_NAMES :=3D $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS-y))) >>>> +LDLIBS_NAMES +=3D $(patsubst -Wl$(comma)-l%,lib%.a,$(filter >>>> -Wl$(comma)-l%,$(LDLIBS-y))) >>>> >>>> # list of found libraries files (useful for deps). If not found, >>>>the >>>> # library is silently ignored and dep won't be checked >>>> >>> >> >