summaryrefslogtreecommitdiffstats
path: root/ospfclient
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-10 20:10:19 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-10-01 14:56:18 +0200
commitd6e762570619f84318ade5b44fdeb2f920637f1f (patch)
tree753c129e6a267da47b70931a1fe6467797942519 /ospfclient
parentMerge pull request #3111 from pacovn/Coverity_1302499_Logically_dead_code (diff)
downloadfrr-d6e762570619f84318ade5b44fdeb2f920637f1f.tar.xz
frr-d6e762570619f84318ade5b44fdeb2f920637f1f.zip
build: add --enable-static-bin option
This option can be used to get statically linked binaries. Note: libfrr.la is removed from modules' library dependency list. This is intentional and explained in a comment in lib/subdir.am. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ospfclient')
-rw-r--r--ospfclient/subdir.am14
1 files changed, 13 insertions, 1 deletions
diff --git a/ospfclient/subdir.am b/ospfclient/subdir.am
index df7d85a1f..d42c5b450 100644
--- a/ospfclient/subdir.am
+++ b/ospfclient/subdir.am
@@ -23,9 +23,21 @@ endif
ospfclient_ospfclient_LDADD = \
ospfclient/libfrrospfapiclient.la \
- lib/libfrr.la \
@LIBCAP@ \
# end
+
+if STATIC_BIN
+# libfrr is linked in through libfrrospfapiclient. If we list it here too,
+# it gets linked twice and we get a ton of symbol collisions.
+
+else # !STATIC_BIN
+# For most systems we don't need this, except Debian, who patch their linker
+# to disallow transitive references *while* *als* not patching their libtool
+# to work appropriately. RedHat has the same linker behaviour, but things
+# work as expected since they also patch libtool.
+ospfclient_ospfclient_LDADD += lib/libfrr.la
+endif
+
ospfclient_ospfclient_SOURCES = \
ospfclient/ospfclient.c \
# end