[lng-odp] [PATCHv3] linux-generic: configure: add conditional shared library support
Add support for the --enable-shared=[yes|no] configure options. --enable-shared=yes is the default and results in suppressing the use of inlines for ODP API functions to enhance ABI compatibility at potentially some performance cost. When --enable-shared=no is specified, inlines are allowed to boost performance at the possible loss of ABI compatibility. This patch addresses Bug https://bugs.linaro.org/show_bug.cgi?id=2490 Note: This patch is a port of the corresponding enhancements made to odp-dpdk with a few changes, mainly that inlines are now part of the odp/api/plat directory, and all ODP APIs are now treated uniformly with regard to whether inlining is permitted. Suggested-by: Zoltan Kiss Signed-off-by: Bill Fischofer --- v3: Move .gitignore for inlines.h to platform/linux-generic. Correct blank lines at EOF for git am v2: Add byteorder.h to list of APIs with controlled inlining configure.ac | 7 + example/Makefile.inc | 3 +- helper/Makefile.am | 1 + platform/linux-generic/.gitignore | 1 + platform/linux-generic/Makefile.am | 9 + platform/linux-generic/include/odp/api/atomic.h| 384 +--- platform/linux-generic/include/odp/api/byteorder.h | 114 +- .../include/odp/api/plat/atomic_inlines.h | 385 + .../include/odp/api/plat/byteorder_inlines.h | 140 .../include/odp/api/plat/inlines.h.in | 33 ++ .../include/odp/api/plat/std_clib_inlines.h| 36 ++ .../include/odp/api/plat/sync_inlines.h| 47 +++ platform/linux-generic/include/odp/api/std_clib.h | 18 +- platform/linux-generic/include/odp/api/sync.h | 18 +- platform/linux-generic/m4/configure.m4 | 3 +- platform/linux-generic/odp_atomic.c| 3 + platform/linux-generic/odp_byteorder.c | 10 + platform/linux-generic/odp_std_clib.c | 10 + platform/linux-generic/odp_sync.c | 10 + 19 files changed, 712 insertions(+), 520 deletions(-) create mode 100644 platform/linux-generic/.gitignore create mode 100644 platform/linux-generic/include/odp/api/plat/atomic_inlines.h create mode 100644 platform/linux-generic/include/odp/api/plat/byteorder_inlines.h create mode 100644 platform/linux-generic/include/odp/api/plat/inlines.h.in create mode 100644 platform/linux-generic/include/odp/api/plat/std_clib_inlines.h create mode 100644 platform/linux-generic/include/odp/api/plat/sync_inlines.h create mode 100644 platform/linux-generic/odp_byteorder.c create mode 100644 platform/linux-generic/odp_std_clib.c create mode 100644 platform/linux-generic/odp_sync.c diff --git a/configure.ac b/configure.ac index 6551287..982aff7 100644 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,13 @@ AM_CONDITIONAL([test_example], [test x$test_example = xyes ]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"]) AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) +if test x$enable_shared != xyes; +then + _ODP_INLINES="_ODP_INLINES" +else + _ODP_INLINES="_ODP_NO_INLINES" +fi +AC_SUBST(_ODP_INLINES) ## # Setup doxygen documentation diff --git a/example/Makefile.inc b/example/Makefile.inc index 70ba2c0..9fb2f29 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -6,6 +6,7 @@ AM_CFLAGS += \ -I$(top_srcdir)/example \ -I$(top_srcdir)/platform/@with_platform@/include \ -I$(top_srcdir)/include/ \ - -I$(top_srcdir)/helper/include + -I$(top_srcdir)/helper/include \ + -I$(top_builddir)/platform/@with_platform@/include AM_LDFLAGS += -L$(LIB) diff --git a/helper/Makefile.am b/helper/Makefile.am index a82a11a..b6e6a1d 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -7,6 +7,7 @@ LIB = $(top_builddir)/lib AM_CFLAGS = -I$(srcdir)/include AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include AM_CFLAGS += -I$(top_srcdir)/include +AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)' diff --git a/platform/linux-generic/.gitignore b/platform/linux-generic/.gitignore new file mode 100644 index 000..ec6ca37 --- /dev/null +++ b/platform/linux-generic/.gitignore @@ -0,0 +1 @@ +include/odp/api/plat/inlines.h diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 0cfd0fe..ae3cbba 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -6,6 +6,7 @@ include $(top_srcdir)/platform/@with_platform@/Makefile.inc AM_CFLAGS += -I$(srcdir)/include AM_CFLAGS += -I$(top_srcdir)/include +AM_CFLAGS += -Iinclude include_HEADERS = \ $(top_s
Re: [lng-odp] [PATCHv3] linux-generic: configure: add conditional shared library support
Ping - any reviews for this so that we can have step one ABI compatibility by LAS16 ? On 30 August 2016 at 21:37, Bill Fischofer wrote: > Add support for the --enable-shared=[yes|no] configure options. > --enable-shared=yes is the default and results in suppressing the use > of inlines for ODP API functions to enhance ABI compatibility at > potentially some performance cost. When --enable-shared=no is specified, > inlines are allowed to boost performance at the possible loss of ABI > compatibility. > > This patch addresses Bug https://bugs.linaro.org/show_bug.cgi?id=2490 > > Note: This patch is a port of the corresponding enhancements made to > odp-dpdk with a few changes, mainly that inlines are now part of the > odp/api/plat directory, and all ODP APIs are now treated uniformly with > regard to whether inlining is permitted. > > Suggested-by: Zoltan Kiss > Signed-off-by: Bill Fischofer > --- > v3: Move .gitignore for inlines.h to platform/linux-generic. > Correct blank lines at EOF for git am > > v2: Add byteorder.h to list of APIs with controlled inlining > > configure.ac | 7 + > example/Makefile.inc | 3 +- > helper/Makefile.am | 1 + > platform/linux-generic/.gitignore | 1 + > platform/linux-generic/Makefile.am | 9 + > platform/linux-generic/include/odp/api/atomic.h| 384 > +--- > platform/linux-generic/include/odp/api/byteorder.h | 114 +- > .../include/odp/api/plat/atomic_inlines.h | 385 > + > .../include/odp/api/plat/byteorder_inlines.h | 140 > .../include/odp/api/plat/inlines.h.in | 33 ++ > .../include/odp/api/plat/std_clib_inlines.h| 36 ++ > .../include/odp/api/plat/sync_inlines.h| 47 +++ > platform/linux-generic/include/odp/api/std_clib.h | 18 +- > platform/linux-generic/include/odp/api/sync.h | 18 +- > platform/linux-generic/m4/configure.m4 | 3 +- > platform/linux-generic/odp_atomic.c| 3 + > platform/linux-generic/odp_byteorder.c | 10 + > platform/linux-generic/odp_std_clib.c | 10 + > platform/linux-generic/odp_sync.c | 10 + > 19 files changed, 712 insertions(+), 520 deletions(-) > create mode 100644 platform/linux-generic/.gitignore > create mode 100644 platform/linux-generic/include/odp/api/plat/atomic_ > inlines.h > create mode 100644 platform/linux-generic/include/odp/api/plat/ > byteorder_inlines.h > create mode 100644 platform/linux-generic/include/odp/api/plat/inlines. > h.in > create mode 100644 platform/linux-generic/include/odp/api/plat/std_clib_ > inlines.h > create mode 100644 platform/linux-generic/include/odp/api/plat/sync_ > inlines.h > create mode 100644 platform/linux-generic/odp_byteorder.c > create mode 100644 platform/linux-generic/odp_std_clib.c > create mode 100644 platform/linux-generic/odp_sync.c > > diff --git a/configure.ac b/configure.ac > index 6551287..982aff7 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -176,6 +176,13 @@ AM_CONDITIONAL([test_example], [test x$test_example = > xyes ]) > AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"]) > AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) > AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) > +if test x$enable_shared != xyes; > +then > + _ODP_INLINES="_ODP_INLINES" > +else > + _ODP_INLINES="_ODP_NO_INLINES" > +fi > +AC_SUBST(_ODP_INLINES) > > > ## > # Setup doxygen documentation > diff --git a/example/Makefile.inc b/example/Makefile.inc > index 70ba2c0..9fb2f29 100644 > --- a/example/Makefile.inc > +++ b/example/Makefile.inc > @@ -6,6 +6,7 @@ AM_CFLAGS += \ > -I$(top_srcdir)/example \ > -I$(top_srcdir)/platform/@with_platform@/include \ > -I$(top_srcdir)/include/ \ > - -I$(top_srcdir)/helper/include > + -I$(top_srcdir)/helper/include \ > + -I$(top_builddir)/platform/@with_platform@/include > > AM_LDFLAGS += -L$(LIB) > diff --git a/helper/Makefile.am b/helper/Makefile.am > index a82a11a..b6e6a1d 100644 > --- a/helper/Makefile.am > +++ b/helper/Makefile.am > @@ -7,6 +7,7 @@ LIB = $(top_builddir)/lib > AM_CFLAGS = -I$(srcdir)/include > AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include > AM_CFLAGS += -I$(top_srcdir)/include > +AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include > > AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)' > > diff --git a/platform/linux-generic/.gitignore b/platform/linux-generic/. > gitignore > new file mode 100644 > index 000..ec6ca37 > --- /dev/null > +++ b/platform/linux-generic/.gitignore > @@ -0,0 +1 @@ > +include/odp/api/plat/inlines.h > diff --git a/platform/linux-generic/Makefile.am b/platform/linux-gene
Re: [lng-odp] [PATCHv3] linux-generic: configure: add conditional shared library support
Reviewed-by: Balakrishna Garapati /Krishna On 6 September 2016 at 17:46, Mike Holmes wrote: > Ping - any reviews for this so that we can have step one ABI compatibility > by LAS16 ? > > On 30 August 2016 at 21:37, Bill Fischofer > wrote: > > > Add support for the --enable-shared=[yes|no] configure options. > > --enable-shared=yes is the default and results in suppressing the use > > of inlines for ODP API functions to enhance ABI compatibility at > > potentially some performance cost. When --enable-shared=no is specified, > > inlines are allowed to boost performance at the possible loss of ABI > > compatibility. > > > > This patch addresses Bug https://bugs.linaro.org/show_bug.cgi?id=2490 > > > > Note: This patch is a port of the corresponding enhancements made to > > odp-dpdk with a few changes, mainly that inlines are now part of the > > odp/api/plat directory, and all ODP APIs are now treated uniformly with > > regard to whether inlining is permitted. > > > > Suggested-by: Zoltan Kiss > > Signed-off-by: Bill Fischofer > > --- > > v3: Move .gitignore for inlines.h to platform/linux-generic. > > Correct blank lines at EOF for git am > > > > v2: Add byteorder.h to list of APIs with controlled inlining > > > > configure.ac | 7 + > > example/Makefile.inc | 3 +- > > helper/Makefile.am | 1 + > > platform/linux-generic/.gitignore | 1 + > > platform/linux-generic/Makefile.am | 9 + > > platform/linux-generic/include/odp/api/atomic.h| 384 > > +--- > > platform/linux-generic/include/odp/api/byteorder.h | 114 +- > > .../include/odp/api/plat/atomic_inlines.h | 385 > > + > > .../include/odp/api/plat/byteorder_inlines.h | 140 > > .../include/odp/api/plat/inlines.h.in | 33 ++ > > .../include/odp/api/plat/std_clib_inlines.h| 36 ++ > > .../include/odp/api/plat/sync_inlines.h| 47 +++ > > platform/linux-generic/include/odp/api/std_clib.h | 18 +- > > platform/linux-generic/include/odp/api/sync.h | 18 +- > > platform/linux-generic/m4/configure.m4 | 3 +- > > platform/linux-generic/odp_atomic.c| 3 + > > platform/linux-generic/odp_byteorder.c | 10 + > > platform/linux-generic/odp_std_clib.c | 10 + > > platform/linux-generic/odp_sync.c | 10 + > > 19 files changed, 712 insertions(+), 520 deletions(-) > > create mode 100644 platform/linux-generic/.gitignore > > create mode 100644 platform/linux-generic/include/odp/api/plat/atomic_ > > inlines.h > > create mode 100644 platform/linux-generic/include/odp/api/plat/ > > byteorder_inlines.h > > create mode 100644 platform/linux-generic/include/odp/api/plat/inlines. > > h.in > > create mode 100644 platform/linux-generic/ > include/odp/api/plat/std_clib_ > > inlines.h > > create mode 100644 platform/linux-generic/include/odp/api/plat/sync_ > > inlines.h > > create mode 100644 platform/linux-generic/odp_byteorder.c > > create mode 100644 platform/linux-generic/odp_std_clib.c > > create mode 100644 platform/linux-generic/odp_sync.c > > > > diff --git a/configure.ac b/configure.ac > > index 6551287..982aff7 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -176,6 +176,13 @@ AM_CONDITIONAL([test_example], [test x$test_example > = > > xyes ]) > > AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"]) > > AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) > > AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) > > +if test x$enable_shared != xyes; > > +then > > + _ODP_INLINES="_ODP_INLINES" > > +else > > + _ODP_INLINES="_ODP_NO_INLINES" > > +fi > > +AC_SUBST(_ODP_INLINES) > > > > > > ## > > # Setup doxygen documentation > > diff --git a/example/Makefile.inc b/example/Makefile.inc > > index 70ba2c0..9fb2f29 100644 > > --- a/example/Makefile.inc > > +++ b/example/Makefile.inc > > @@ -6,6 +6,7 @@ AM_CFLAGS += \ > > -I$(top_srcdir)/example \ > > -I$(top_srcdir)/platform/@with_platform@/include \ > > -I$(top_srcdir)/include/ \ > > - -I$(top_srcdir)/helper/include > > + -I$(top_srcdir)/helper/include \ > > + -I$(top_builddir)/platform/@with_platform@/include > > > > AM_LDFLAGS += -L$(LIB) > > diff --git a/helper/Makefile.am b/helper/Makefile.am > > index a82a11a..b6e6a1d 100644 > > --- a/helper/Makefile.am > > +++ b/helper/Makefile.am > > @@ -7,6 +7,7 @@ LIB = $(top_builddir)/lib > > AM_CFLAGS = -I$(srcdir)/include > > AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include > > AM_CFLAGS += -I$(top_srcdir)/include > > +AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include > > > > AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
Re: [lng-odp] [PATCHv3] linux-generic: configure: add conditional shared library support
Merged, Maxim. On 09/07/16 10:54, Krishna Garapati wrote: Reviewed-by: Balakrishna Garapati /Krishna On 6 September 2016 at 17:46, Mike Holmes wrote: Ping - any reviews for this so that we can have step one ABI compatibility by LAS16 ? On 30 August 2016 at 21:37, Bill Fischofer wrote: Add support for the --enable-shared=[yes|no] configure options. --enable-shared=yes is the default and results in suppressing the use of inlines for ODP API functions to enhance ABI compatibility at potentially some performance cost. When --enable-shared=no is specified, inlines are allowed to boost performance at the possible loss of ABI compatibility. This patch addresses Bug https://bugs.linaro.org/show_bug.cgi?id=2490 Note: This patch is a port of the corresponding enhancements made to odp-dpdk with a few changes, mainly that inlines are now part of the odp/api/plat directory, and all ODP APIs are now treated uniformly with regard to whether inlining is permitted. Suggested-by: Zoltan Kiss Signed-off-by: Bill Fischofer --- v3: Move .gitignore for inlines.h to platform/linux-generic. Correct blank lines at EOF for git am v2: Add byteorder.h to list of APIs with controlled inlining configure.ac | 7 + example/Makefile.inc | 3 +- helper/Makefile.am | 1 + platform/linux-generic/.gitignore | 1 + platform/linux-generic/Makefile.am | 9 + platform/linux-generic/include/odp/api/atomic.h| 384 +--- platform/linux-generic/include/odp/api/byteorder.h | 114 +- .../include/odp/api/plat/atomic_inlines.h | 385 + .../include/odp/api/plat/byteorder_inlines.h | 140 .../include/odp/api/plat/inlines.h.in | 33 ++ .../include/odp/api/plat/std_clib_inlines.h| 36 ++ .../include/odp/api/plat/sync_inlines.h| 47 +++ platform/linux-generic/include/odp/api/std_clib.h | 18 +- platform/linux-generic/include/odp/api/sync.h | 18 +- platform/linux-generic/m4/configure.m4 | 3 +- platform/linux-generic/odp_atomic.c| 3 + platform/linux-generic/odp_byteorder.c | 10 + platform/linux-generic/odp_std_clib.c | 10 + platform/linux-generic/odp_sync.c | 10 + 19 files changed, 712 insertions(+), 520 deletions(-) create mode 100644 platform/linux-generic/.gitignore create mode 100644 platform/linux-generic/include/odp/api/plat/atomic_ inlines.h create mode 100644 platform/linux-generic/include/odp/api/plat/ byteorder_inlines.h create mode 100644 platform/linux-generic/include/odp/api/plat/inlines. h.in create mode 100644 platform/linux-generic/ include/odp/api/plat/std_clib_ inlines.h create mode 100644 platform/linux-generic/include/odp/api/plat/sync_ inlines.h create mode 100644 platform/linux-generic/odp_byteorder.c create mode 100644 platform/linux-generic/odp_std_clib.c create mode 100644 platform/linux-generic/odp_sync.c diff --git a/configure.ac b/configure.ac index 6551287..982aff7 100644 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,13 @@ AM_CONDITIONAL([test_example], [test x$test_example = xyes ]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"]) AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) +if test x$enable_shared != xyes; +then + _ODP_INLINES="_ODP_INLINES" +else + _ODP_INLINES="_ODP_NO_INLINES" +fi +AC_SUBST(_ODP_INLINES) ## # Setup doxygen documentation diff --git a/example/Makefile.inc b/example/Makefile.inc index 70ba2c0..9fb2f29 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -6,6 +6,7 @@ AM_CFLAGS += \ -I$(top_srcdir)/example \ -I$(top_srcdir)/platform/@with_platform@/include \ -I$(top_srcdir)/include/ \ - -I$(top_srcdir)/helper/include + -I$(top_srcdir)/helper/include \ + -I$(top_builddir)/platform/@with_platform@/include AM_LDFLAGS += -L$(LIB) diff --git a/helper/Makefile.am b/helper/Makefile.am index a82a11a..b6e6a1d 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -7,6 +7,7 @@ LIB = $(top_builddir)/lib AM_CFLAGS = -I$(srcdir)/include AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include AM_CFLAGS += -I$(top_srcdir)/include +AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)' diff --git a/platform/linux-generic/.gitignore b/platform/linux-generic/. gitignore new file mode 100644 index 000..ec6ca37 --- /dev/null +++ b/platform/linux-generic/.gitignore @@ -0,0 +1 @@ +include/odp/api/plat/inlines.h diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/