summaryrefslogtreecommitdiffstats
path: root/m4
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 /m4
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 'm4')
-rw-r--r--m4/.gitignore1
-rw-r--r--m4/libtool-whole-archive.patch18
2 files changed, 19 insertions, 0 deletions
diff --git a/m4/.gitignore b/m4/.gitignore
index 357e65588..2c0416365 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -1,4 +1,5 @@
*.m4
+!*.patch
!ax_compare_version.m4
!ax_prog_perl_modules.m4
diff --git a/m4/libtool-whole-archive.patch b/m4/libtool-whole-archive.patch
new file mode 100644
index 000000000..7e2749c90
--- /dev/null
+++ b/m4/libtool-whole-archive.patch
@@ -0,0 +1,18 @@
+--- /usr/share/libtool/build-aux/ltmain.sh 2017-08-01 07:13:09.611041402 +0200
++++ ltmain.sh 2018-08-31 17:32:15.381903718 +0200
+@@ -8439,8 +8439,13 @@
+ # shared platforms.
+ if test unsupported != "$hardcode_direct"; then
+ test -n "$old_library" && linklib=$old_library
+- compile_deplibs="$dir/$linklib $compile_deplibs"
+- finalize_deplibs="$dir/$linklib $finalize_deplibs"
++ if test yes,yes = "$export_dynamic,$with_gnu_ld"; then
++ compile_deplibs="-Wl,--no-whole-archive $dir/$linklib -Wl,--whole-archive $compile_deplibs"
++ finalize_deplibs="-Wl,--no-whole-archive $dir/$linklib -Wl,--whole-archive $finalize_deplibs"
++ else
++ compile_deplibs="$dir/$linklib $compile_deplibs"
++ finalize_deplibs="$dir/$linklib $finalize_deplibs"
++ fi
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"