From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DFE64C8B8 for ; Wed, 29 Apr 2015 17:13:55 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 29 Apr 2015 08:13:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,671,1422950400"; d="scan'208";a="687496146" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga001.jf.intel.com with ESMTP; 29 Apr 2015 08:13:41 -0700 Received: from orsmsx154.amr.corp.intel.com (10.22.226.12) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 29 Apr 2015 08:13:39 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by ORSMSX154.amr.corp.intel.com (10.22.226.12) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 29 Apr 2015 08:13:39 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.26]) by FMSMSX152.amr.corp.intel.com ([169.254.6.233]) with mapi id 14.03.0224.002; Wed, 29 Apr 2015 08:13:39 -0700 From: "Wiles, Keith" To: "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH v2 1/2] Simplify the ifdefs in rte.app.mk. Thread-Index: AQHQgoooNOd/2v2CUEC+vahIrVIQyp1kjesA//+sqYA= Date: Wed, 29 Apr 2015 15:13:39 +0000 Message-ID: References: <1430318263-3189-1-git-send-email-keith.wiles@intel.com> <20150429151154.GA3716@bricha3-MOBL3> In-Reply-To: <20150429151154.GA3716@bricha3-MOBL3> 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="us-ascii" Content-ID: <97E7E31A8CC9D64EB2FA442E66624A6D@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 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: Wed, 29 Apr 2015 15:13:58 -0000 On 4/29/15, 10:11 AM, "Richardson, Bruce" wrote: >On Wed, Apr 29, 2015 at 09:37:42AM -0500, 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. >>=20 >> Added a new variable called EXTRA_LDLIBS to be used by example apps >> instead of using LDLIBS directly. >>=20 >> Signed-off-by: Keith Wiles > >Since EXTRA_* flags are designed that they can be overridden on the >makefile, >what happens if someone does a compile via: "EXTRA_LDLIBS=3DX make"? Does >the=20 >compile/link still work? The code in rte.app.mk adds the EXTRA_LDLIBS to the end of LDLIBS-y > >/Bruce > > >> --- >> 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(-) >>=20 >> 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 >> =20 >> -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) >> =20 >> -LDLIBS +=3D -lvirt >> +EXTRA_LDLIBS +=3D -lvirt >> =20 >> # 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..ed471ad 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 >> =20 >> # default path for libs >> -LDLIBS +=3D -L$(RTE_SDK_BIN)/lib >> +LDLIBS-y =3D -L$(RTE_SDK_BIN)/lib >> =20 >> # >> # 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),) >> =20 >> -LDLIBS +=3D --whole-archive >> +LDLIBS-y +=3D --whole-archive >> =20 >> -ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),y) >> -LDLIBS +=3D -l$(RTE_LIBNAME) >> -endif >> +LDLIBS-$(CONFIG_RTE_BUILD_COMBINE_LIBS) +=3D -l$(RTE_LIBNAME) >> =20 >> ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) >> =20 >> -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 >> =20 >> -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 >> =20 >> -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 >> =20 >> -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 >> =20 >> -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 >> =20 >> endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS >> =20 >> -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) >> -LDLIBS +=3D -lpcap >> -endif >> +LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) +=3D -lpcap >> =20 >> -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 >> =20 >> -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y) >> -LDLIBS +=3D -libverbs >> -endif >> +LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) +=3D -libverbs >> =20 >> -LDLIBS +=3D --start-group >> +LDLIBS-y +=3D --start-group >> =20 >> ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) >> =20 >> -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 >> =20 >> ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) >> # plugins (link only if static libraries) >> =20 >> -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_uio >> +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) >> =20 >> endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS >> =20 >> -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 >> =20 >> endif # ifeq ($(NO_AUTOLIBS),) >> =20 >> -LDLIBS +=3D $(CPU_LDLIBS) >> +LDLIBS-y +=3D $(EXTRA_LDLIBS) >> =20 >> .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 highlight >> 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 >> =20 >> # 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))) >> =20 >> # 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))) >> =20 >> # 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)))) >> =20 >> 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 highlight >> 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))))) >> =20 >> # >> # 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 >> =20 >> 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 >> =20 >> # 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))) >> =20 >> # 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))) >> =20 >> # list of found libraries files (useful for deps). If not found, the >> # library is silently ignored and dep won't be checked >> --=20 >> 2.3.0 >>=20