build: remove special handling for node library
Subsystems (2)
PATCH 1/1 build: remove special handling for node library
What is the point of adding librte_node a second time separately?
--- app/test/meson.build | 4 +--- examples/meson.build | 4 +--- lib/meson.build | 3 --- meson.build | 1 - 4 files changed, 2 insertions(+), 10 deletions(-)
app/test/meson.build +1 -3
@@ -415,15 +415,13 @@ endforeach test_dep_objs += cc.find_library('execinfo', required: false) link_libs = [] -link_nodes = [] if get_option('default_library') == 'static' link_libs = dpdk_static_libraries + dpdk_drivers - link_nodes = dpdk_graph_nodes endif dpdk_test = executable('dpdk-test', test_sources, - link_whole: link_libs + link_nodes, + link_whole: link_libs, dependencies: test_dep_objs, c_args: cflags, install_rpath: driver_install_path,
examples/meson.build +1 -3
@@ -2,10 +2,8 @@ # Copyright(c) 2017-2019 Intel Corporation link_whole_libs = [] -node_libs = [] if get_option('default_library') == 'static' link_whole_libs = dpdk_static_libraries + dpdk_drivers - node_libs = dpdk_graph_nodes endif execinfo = cc.find_library('execinfo', required: false)
@@ -101,7 +99,7 @@ foreach example: examples endif executable('dpdk-' + name, sources, include_directories: includes, - link_whole: link_whole_libs + node_libs, + link_whole: link_whole_libs, link_args: dpdk_extra_ldflags, c_args: cflags, dependencies: dep_objs)
lib/meson.build +0 -3
@@ -202,9 +202,6 @@ foreach l:libraries dpdk_libraries = [shared_lib] + dpdk_libraries dpdk_static_libraries = [static_lib] + dpdk_static_libraries - if libname == 'rte_node' - dpdk_graph_nodes = [static_lib] - endif endif # sources.length() > 0 set_variable('shared_rte_' + name, shared_dep)
meson.build +0 -1
@@ -16,7 +16,6 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] -dpdk_graph_nodes = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = []
Signature · 1 line
2.26.2
Quoted 4 lines · Thomas Monjalon
What is the point of adding
librte_nodea second time separately?Signed-off-by Thomas Monjalon <[email protected]>---
I suspect that this is a hangover from when we did not explicitly link_whole all DPDK libs.
Quoted 9 lines · Bruce Richardson
Quoted 4 lines · Thomas Monjalon
What is the point of adding
librte_nodea second time separately?Signed-off-by Thomas Monjalon <[email protected]>---
I suspect that this is a hangover from when we did not explicitly
link_wholeall DPDK libs.
Yes. The constructor functions are not getting linked if there is NO dependency from this library.
02/07/2020 11:53, Jerin Jacob:
Quoted 6 lines
Quoted 4 lines · Bruce Richardson
Quoted 2 lines · Thomas Monjalon
What is the point of adding
librte_nodea second time separately?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Thomas Monjalon <[email protected]>---
I suspect that this is a hangover from when we did not explicitly
link_wholeall DPDK libs.Yes. The constructor functions are not getting linked if there is NO dependency from this library.
OK, so I can change the commit log to explain that it is not needed anymore because we link whole, including register.
PATCH v2 1/1 build: remove special handling for node library
In reply to Thomas MonjalonThe node library had a need of being linked as a whole to make some constructors effective.
Now that all libraries are linked with --whole-archive, there is no need to have this library separate.
---
v2: write real commit log
--- app/test/meson.build | 4 +--- examples/meson.build | 4 +--- lib/meson.build | 3 --- meson.build | 1 - 4 files changed, 2 insertions(+), 10 deletions(-)
app/test/meson.build +1 -3
@@ -415,15 +415,13 @@ endforeach test_dep_objs += cc.find_library('execinfo', required: false) link_libs = [] -link_nodes = [] if get_option('default_library') == 'static' link_libs = dpdk_static_libraries + dpdk_drivers - link_nodes = dpdk_graph_nodes endif dpdk_test = executable('dpdk-test', test_sources, - link_whole: link_libs + link_nodes, + link_whole: link_libs, dependencies: test_dep_objs, c_args: cflags, install_rpath: driver_install_path,
examples/meson.build +1 -3
@@ -2,10 +2,8 @@ # Copyright(c) 2017-2019 Intel Corporation link_whole_libs = [] -node_libs = [] if get_option('default_library') == 'static' link_whole_libs = dpdk_static_libraries + dpdk_drivers - node_libs = dpdk_graph_nodes endif execinfo = cc.find_library('execinfo', required: false)
@@ -101,7 +99,7 @@ foreach example: examples endif executable('dpdk-' + name, sources, include_directories: includes, - link_whole: link_whole_libs + node_libs, + link_whole: link_whole_libs, link_args: dpdk_extra_ldflags, c_args: cflags, dependencies: dep_objs)
lib/meson.build +0 -3
@@ -202,9 +202,6 @@ foreach l:libraries dpdk_libraries = [shared_lib] + dpdk_libraries dpdk_static_libraries = [static_lib] + dpdk_static_libraries - if libname == 'rte_node' - dpdk_graph_nodes = [static_lib] - endif endif # sources.length() > 0 set_variable('shared_rte_' + name, shared_dep)
meson.build +0 -1
@@ -16,7 +16,6 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] -dpdk_graph_nodes = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = []
Signature · 1 line
2.26.2
Quoted 9 lines · Thomas Monjalon
The node library had a need of being linked as a whole to make some constructors effective.
Now that all libraries are linked with --whole-archive, there is no need to have this library separate.Fixes e2db26f76673 ("build: always link whole DPDK static libraries")Signed-off-by Thomas Monjalon <[email protected]>
Tested the change with: echo "node_list_dump" | sudo
./build/app/test/dpdk-test -c 0x3
Quoted 83 lines
---
v2: write real commit log--- app/test/meson.build | 4 +--- examples/meson.build | 4 +--- lib/meson.build | 3 --- meson.build | 1 - 4 files changed, 2 insertions(+), 10 deletions(-)app/test/meson.build +1
-3@@ -415,15 +415,13 @@ endforeach test_dep_objs += cc.find_library('execinfo', required: false) link_libs = [] -link_nodes = [] if get_option('default_library') == 'static' link_libs = dpdk_static_libraries + dpdk_drivers - link_nodes = dpdk_graph_nodes endif dpdk_test = executable('dpdk-test', test_sources, - link_whole: link_libs + link_nodes, + link_whole: link_libs, dependencies: test_dep_objs, c_args: cflags, install_rpath: driver_install_path,examples/meson.build +1
-3@@ -2,10 +2,8 @@ # Copyright(c) 2017-2019 Intel Corporation link_whole_libs = [] -node_libs = [] if get_option('default_library') == 'static' link_whole_libs = dpdk_static_libraries + dpdk_drivers - node_libs = dpdk_graph_nodes endif execinfo = cc.find_library('execinfo', required: false)@@ -101,7 +99,7 @@ foreach example: examples endif executable('dpdk-' + name, sources, include_directories: includes, - link_whole: link_whole_libs + node_libs, + link_whole: link_whole_libs, link_args: dpdk_extra_ldflags, c_args: cflags, dependencies: dep_objs)lib/meson.build +0
-3@@ -202,9 +202,6 @@ foreach l:libraries dpdk_libraries = [shared_lib] + dpdk_libraries dpdk_static_libraries = [static_lib] + dpdk_static_libraries - if libname == 'rte_node' - dpdk_graph_nodes = [static_lib] - endif endif # sources.length() > 0 set_variable('shared_rte_' + name, shared_dep)meson.build +0
-2@@ -16,7 +16,6 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] -dpdk_graph_nodes = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] --2.26.2
Thomas Monjalon
Applied04/07/2020 16:22, Jerin Jacob:
Quoted 7 lines · Thomas Monjalon
Quoted 6 lines
The node library had a need of being linked as a whole to make some constructors effective.
Now that all libraries are linked with --whole-archive, there is no need to have this library separate.
Quoted 8 lines
Quoted 3 lines
Fixes e2db26f76673 ("build: always link whole DPDK static libraries")Signed-off-by Thomas Monjalon <[email protected]>Tested the change with: echo "
node_list_dump" | sudo
./build/app/test/dpdk-test -c0x3Tested-by Jerin Jacob <[email protected]>
Applied