On Saturday 2018-04-28 00:29, Yuri Gribov wrote:
>--- a/Make_global.am
>+++ b/Make_global.am
>@@ -5,4 +5,4 @@
> LIBVERSION=2:0:2
> 
> AM_CPPFLAGS = -I$(top_srcdir)/include
>-AM_CFLAGS = -Wall
>+AM_CFLAGS = -Wall @VISFLAGS@

Only use @@ in .am files when you must (like, left-hand sides).
Otherwise, just ${VISFLAGS}.

>+dnl Visibility annotations...
>+OLDCFLAGS="$CFLAGS"
>+CFLAGS="$CFLAGS -fvisibility=hidden"
>+VISFLAGS=
>+AC_SUBST(VISFLAGS)
>+AC_MSG_CHECKING(whether compiler supports visibility annotations)
>+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void 
>__attribute__((visibility("default"))) foo() {}]])],
>+                  [AC_MSG_RESULT(yes); VISFLAGS='-DNFNL_ENABLE_VISIBILITY'],
>+                  AC_MSG_RESULT(no))
>+CFLAGS="$OLDCFLAGS"
>+
>+dnl Version scripts...
>+OLDLDFLAGS="$LDFLAGS"
>+LDFLAGS="$LDFLAGS -Wl,--version-script=$srcdir/nfnl.version"
>+LDSFLAGS=
>+AC_SUBST(LDSFLAGS)
>+AC_MSG_CHECKING(whether linker accepts version scripts)
>+AC_TRY_LINK(,,
>+            [AC_MSG_RESULT(yes); 
>LDSFLAGS='-Wl,--version-script=$(top_srcdir)/nfnl.version'];
>+            AC_MSG_RESULT(no))
>+LDFLAGS="$OLDLDFLAGS"

I don't think most of this is needed in practice - just use -fvisibility and
-Wl,-version-script unconditionally from Makefile.am, most of the netfilter
utilities don't work with anything but GNU and Linux.

>@@ -0,0 +1,4 @@
>+{
>+  global: nfnl*; nlif*;
>+  local: *;
>+};

This ought to be

NFNETLINK_1.0.1 {
        global: <individual symbol list, no wildcards>...
        local: *;
};
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to