aboutsummaryrefslogtreecommitdiffstats
path: root/docs/gettingstarted/developers/multiarch
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-10-24 09:23:23 -0400
committerDamjan Marion <dmarion@me.com>2018-10-24 15:20:41 +0000
commit8a6928938c468639232350bccb0e6c4364fff4c4 (patch)
treeca3d2b8d081ea4f199f65b654335ccad3c1bea16 /docs/gettingstarted/developers/multiarch
parent9787f5f90a6802e39fa7954c344ba89b03a6c4af (diff)
DOC ONLY: fix doc bugs
multiarch support: change autotools -> cmake getting a patch reviewed: improve patch conflict resolution section Change-Id: I2f07e1d3f21dd8cefb4d4bb3b451965d9314211a Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'docs/gettingstarted/developers/multiarch')
-rw-r--r--docs/gettingstarted/developers/multiarch/nodefns.rst52
1 files changed, 15 insertions, 37 deletions
diff --git a/docs/gettingstarted/developers/multiarch/nodefns.rst b/docs/gettingstarted/developers/multiarch/nodefns.rst
index ad68385d6c5..a43d40e301f 100644
--- a/docs/gettingstarted/developers/multiarch/nodefns.rst
+++ b/docs/gettingstarted/developers/multiarch/nodefns.rst
@@ -117,44 +117,22 @@ example, a bunch of functions with names of the form
shows up with a name of the form "xxx_inline.isra.1", it's quite likely
that the inline was declared "static inline" instead of "always_inline".
-Add the required Makefile.am content
-------------------------------------
+Modify CMakeLists.txt
+---------------------
-If the component in question already sets a "multiversioning_sources"
-variable, simply add the indicated .c file to the list. If not, add
-the required boilerplate:
+If the component in question already lists "MULTIARCH_SOURCES", simply
+add the indicated .c file to the list. Otherwise, add as shown
+below. Note that the added file "new_multiarch_node.c" should appear in
+*both* SOURCES and MULTIARCH_SOURCES:
::
- if CPU_X86_64
- sdp_multiversioning_sources = \
- sdp/node.c \
- sdp/sdp_slookup.c
-
- if CC_SUPPORTS_AVX2
- ###############################################################
- # AVX2
- ###############################################################
- libsdp_plugin_avx2_la_SOURCES = $(sdp_multiversioning_sources)
- libsdp_plugin_avx2_la_CFLAGS = \
- $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
- -DCLIB_MARCH_VARIANT=avx2
- noinst_LTLIBRARIES += libsdp_plugin_avx2.la
- sdp_plugin_la_LIBADD += libsdp_plugin_avx2.la
- endif
-
- if CC_SUPPORTS_AVX512
- ###############################################################
- # AVX512
- ###############################################################
- libsdp_plugin_avx512_la_SOURCES = $(sdp_multiversioning_sources)
- libsdp_plugin_avx512_la_CFLAGS = \
- $(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
- -DCLIB_MARCH_VARIANT=avx512
- noinst_LTLIBRARIES += libsdp_plugin_avx512.la
- sdp_plugin_la_LIBADD += libsdp_plugin_avx512.la
- endif
- endif
-
-A certain amount of cut-paste-modify is currently required. Hopefully
-we'll manage to improve the scheme in the future.
+ add_vpp_plugin(myplugin
+ SOURCES
+ new_multiarch_node.c
+ ...
+
+ MULTIARCH_SOURCES
+ new_ multiarch_node.c
+ ...
+ )