]> git.puffer.fish Git - matthieu/frr.git/commitdiff
build: fix more libtool stupidity for modules
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 11 Nov 2021 13:27:13 +0000 (14:27 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 11 Nov 2021 13:40:03 +0000 (14:40 +0100)
libtool, the radioactive dumpster fire of the GNU ecosystem.

A module should not have a SONAME set.  SONAMEs are for (versioned)
libraries on search paths.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
configure.ac

index b1c6cdc1263cb0fcb4d43f84894a229bf62f983a..aea17e58ba0812e412b592d2d4b90dca1ccc501b 100644 (file)
@@ -517,6 +517,15 @@ AC_SUBST([AC_LDFLAGS])
 AC_SUBST([AC_LDFLAGS_EXEC])
 AM_CONDITIONAL([STATIC_BIN], [test "$enable_static_bin" = "yes"])
 
+dnl libtool, the repository of all knowledge related linkers, is too stupid to
+dnl correctly tell the linker how to build modules.
+if test -z "$module_cmds"; then
+  module_cmds="`echo \"$archive_cmds\" | sed -e 's%$wl-soname $wl$soname%%'`"
+fi
+if test -z "$module_expsym_cmds"; then
+  module_expsym_cmds="`echo \"$archive_expsym_cmds\" | sed -e 's%$wl-soname $wl$soname%%'`"
+fi
+
 AC_ARG_ENABLE([rpath],
   [AS_HELP_STRING([--enable-rpath], [set hardcoded rpaths in the executable @<:@default=yes@:>@])],
   [],