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 901725A57 for ; Tue, 21 Jul 2015 12:18:18 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 21 Jul 2015 03:18:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,515,1432623600"; d="scan'208";a="768239524" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2015 03:18:17 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t6LAIFb9029679 for ; Tue, 21 Jul 2015 11:18:15 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t6LAIBuH017317 for ; Tue, 21 Jul 2015 11:18:11 +0100 Received: (from smonroy@localhost) by sivswdev02.ir.intel.com with id t6LAIAmS017313 for dev@dpdk.org; Tue, 21 Jul 2015 11:18:10 +0100 From: Sergio Gonzalez Monroy To: dev@dpdk.org Date: Tue, 21 Jul 2015 11:18:09 +0100 Message-Id: <1437473890-17279-1-git-send-email-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 1.8.5.4 In-Reply-To: <313CE12EB78416478E6F6FC8F09CCF8C353CAD@IRSMSX101.ger.corp.intel.com> References: <313CE12EB78416478E6F6FC8F09CCF8C353CAD@IRSMSX101.ger.corp.intel.com> Subject: [dpdk-dev] [PATCH] malloc: fix combined lib build 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: Tue, 21 Jul 2015 10:18:19 -0000 Malloc was moved to the EAL and dummy malloc library was left to not brake apps that had a librte_malloc.so dependency. Note that the dummy library will be removed in the next release. When building a combined library, all objects are copied to the same directory before creating the library itself. There a couple of issues: - CONFIG_RTE_LIBRTE_MALLOC is not a valid option anymore resulting in wrong syntax and a compilation failure. Fix it by replacing it with CONFIG_RTE_LIBRTE_EAL. - As we kept a dummy library, there are now two objects with the same name. This means that the proper rte_malloc.o object in eal gets overwritten by an empty rte_malloc.o object from the dummy malloc lib. Fix it by changing the name of rte_malloc.o object in the dummy library. Fixes: 2f9d47013e4dbb738 ("mem: move librte_malloc to eal/common") Reported-by: Alin Rauta Signed-off-by: Sergio Gonzalez Monroy --- lib/librte_malloc/Makefile | 4 ++-- lib/librte_malloc/rte_malloc.c | 34 ---------------------------------- lib/librte_malloc/rte_malloc_empty.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 lib/librte_malloc/rte_malloc.c create mode 100644 lib/librte_malloc/rte_malloc_empty.c diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile index 32d86b9..9558f3d 100644 --- a/lib/librte_malloc/Makefile +++ b/lib/librte_malloc/Makefile @@ -40,9 +40,9 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 EXPORT_MAP := rte_malloc_version.map # all source are stored in SRCS-y -SRCS-$(CONFIG_RTE_LIBRTE_MALLOC) := rte_malloc.c +SRCS-$(CONFIG_RTE_LIBRTE_EAL) := rte_malloc_empty.c # this lib needs eal -DEPDIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += lib/librte_eal +DEPDIRS-$(CONFIG_RTE_LIBRTE_EAL) += lib/librte_eal include $(RTE_SDK)/mk/rte.lib.mk diff --git a/lib/librte_malloc/rte_malloc.c b/lib/librte_malloc/rte_malloc.c deleted file mode 100644 index 4b9dc7f..0000000 --- a/lib/librte_malloc/rte_malloc.c +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Empty file to be able to create a dummy library for deprecation policy */ diff --git a/lib/librte_malloc/rte_malloc_empty.c b/lib/librte_malloc/rte_malloc_empty.c new file mode 100644 index 0000000..4b9dc7f --- /dev/null +++ b/lib/librte_malloc/rte_malloc_empty.c @@ -0,0 +1,34 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Empty file to be able to create a dummy library for deprecation policy */ -- 1.9.3