[dpdk-dev,v3,02/20] kvargs: build before EAL

Message ID 996543406679ba5e61341a71c030f06dd83f4ccf.1522105876.git.gaetan.rivet@6wind.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Gaëtan Rivet March 26, 2018, 11:18 p.m. UTC
  Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 lib/Makefile                                                      | 3 +--
 lib/librte_eal/common/Makefile                                    | 2 +-
 lib/librte_kvargs/Makefile                                        | 2 +-
 lib/librte_kvargs/rte_kvargs.c                                    | 3 +--
 lib/{librte_eal/common/include => librte_kvargs}/rte_string_fns.h | 0
 5 files changed, 4 insertions(+), 6 deletions(-)
 rename lib/{librte_eal/common/include => librte_kvargs}/rte_string_fns.h (100%)
  

Comments

Bruce Richardson March 27, 2018, 9:12 a.m. UTC | #1
On Tue, Mar 27, 2018 at 01:18:26AM +0200, Gaetan Rivet wrote:
> Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> ---
>  lib/Makefile                                                      | 3 +--
>  lib/librte_eal/common/Makefile                                    | 2 +-
>  lib/librte_kvargs/Makefile                                        | 2 +-
>  lib/librte_kvargs/rte_kvargs.c                                    | 3 +--
>  lib/{librte_eal/common/include => librte_kvargs}/rte_string_fns.h | 0
>  5 files changed, 4 insertions(+), 6 deletions(-)
>  rename lib/{librte_eal/common/include => librte_kvargs}/rte_string_fns.h (100%)
> 
Don't forget to update the meson.build file. You need to move kvargs before
EAL in the list of libraries, and modify the special case for
default dependencies for non-EAL libs.

/Bruce
  
Gaëtan Rivet March 27, 2018, 9:53 a.m. UTC | #2
On Tue, Mar 27, 2018 at 10:12:20AM +0100, Bruce Richardson wrote:
> On Tue, Mar 27, 2018 at 01:18:26AM +0200, Gaetan Rivet wrote:
> > Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> > ---
> >  lib/Makefile                                                      | 3 +--
> >  lib/librte_eal/common/Makefile                                    | 2 +-
> >  lib/librte_kvargs/Makefile                                        | 2 +-
> >  lib/librte_kvargs/rte_kvargs.c                                    | 3 +--
> >  lib/{librte_eal/common/include => librte_kvargs}/rte_string_fns.h | 0
> >  5 files changed, 4 insertions(+), 6 deletions(-)
> >  rename lib/{librte_eal/common/include => librte_kvargs}/rte_string_fns.h (100%)
> > 
> Don't forget to update the meson.build file. You need to move kvargs before
> EAL in the list of libraries, and modify the special case for
> default dependencies for non-EAL libs.
> 
> /Bruce

Sure, I will tackle meson build once everything is a little more stable.

I'm not at all convinced by this librte_kvargs move, these two patches
are verging on RFC.

Once I know where everything will be, I will complete the build support.
  

Patch

diff --git a/lib/Makefile b/lib/Makefile
index ec965a606..fc7a55a37 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -4,6 +4,7 @@ 
 include $(RTE_SDK)/mk/rte.vars.mk
 
 DIRS-y += librte_compat
+DIRS-$(CONFIG_RTE_LIBRTE_KVARGS) += librte_kvargs
 DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_PCI) += librte_pci
 DEPDIRS-librte_pci := librte_eal
@@ -71,8 +72,6 @@  DEPDIRS-librte_flow_classify :=  librte_net librte_table librte_acl
 DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += librte_sched
 DEPDIRS-librte_sched := librte_eal librte_mempool librte_mbuf librte_net
 DEPDIRS-librte_sched += librte_timer
-DIRS-$(CONFIG_RTE_LIBRTE_KVARGS) += librte_kvargs
-DEPDIRS-librte_kvargs := librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += librte_distributor
 DEPDIRS-librte_distributor := librte_eal librte_mbuf librte_ether
 DIRS-$(CONFIG_RTE_LIBRTE_PORT) += librte_port
diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index ea824a3a8..75776d3e2 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -9,7 +9,7 @@  INC += rte_errno.h rte_launch.h rte_lcore.h
 INC += rte_log.h rte_memory.h rte_memzone.h
 INC += rte_per_lcore.h rte_random.h
 INC += rte_tailq.h rte_interrupts.h rte_alarm.h
-INC += rte_string_fns.h rte_version.h
+INC += rte_version.h
 INC += rte_eal_memconfig.h rte_malloc_heap.h
 INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h
 INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
diff --git a/lib/librte_kvargs/Makefile b/lib/librte_kvargs/Makefile
index 4eaa9334d..43e28fc53 100644
--- a/lib/librte_kvargs/Makefile
+++ b/lib/librte_kvargs/Makefile
@@ -37,7 +37,6 @@  include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_kvargs.a
 
 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
-LDLIBS += -lrte_eal
 
 EXPORT_MAP := rte_kvargs_version.map
 
@@ -48,6 +47,7 @@  SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) := rte_kvargs.c
 
 # install includes
 INCS := rte_kvargs.h
+INCS += rte_string_fns.h
 SYMLINK-$(CONFIG_RTE_LIBRTE_KVARGS)-include := $(INCS)
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c
index d6b187aac..e73a5c6c1 100644
--- a/lib/librte_kvargs/rte_kvargs.c
+++ b/lib/librte_kvargs/rte_kvargs.c
@@ -7,8 +7,7 @@ 
 #include <string.h>
 #include <stdlib.h>
 
-#include <rte_string_fns.h>
-
+#include "rte_string_fns.h"
 #include "rte_kvargs.h"
 
 /*
diff --git a/lib/librte_eal/common/include/rte_string_fns.h b/lib/librte_kvargs/rte_string_fns.h
similarity index 100%
rename from lib/librte_eal/common/include/rte_string_fns.h
rename to lib/librte_kvargs/rte_string_fns.h