Statically link -lbfd to avoid a tight dep with libbinutils
authorStephane Glondu <steph@glondu.net>
Sat, 17 Aug 2019 14:38:18 +0000 (16:38 +0200)
committerStephane Glondu <Stéphane Glondu glondu@debian.org>
Sat, 17 Aug 2019 14:38:18 +0000 (16:38 +0200)
debian/rules

index fdf8616e1e3b6fb8de51239ad82935ee8feb23c6..8d383502b4e59bd5785f126d0e8aee0c9cbdb193 100755 (executable)
@@ -60,6 +60,9 @@ CONFIGURE_OPTS := \
   --with-x \
   -mandir $(DEB_TEST_BUILD_PREFIX)/usr/share/man \
 
+CONFIGURE_SED := \
+  -e "/LIBBFD_LINK/s%-lbfd%-Wl,-Bstatic -lbfd -Wl,-Bdynamic%"
+
 # Upstream recommends dropping support on armel, see https://github.com/ocaml/ocaml/issues/7642
 # Binaries generated by ocamlopt segfault on x32
 # ld reports spurious messages on powerpc, see https://github.com/ocaml/ocaml/issues/8846
@@ -124,6 +127,7 @@ override_dh_auto_configure: config-stamp ocamlinit-stamp
 
 config-stamp: pre-config-stamp
        ./configure $(CONFIGURE_OPTS)
+       sed -i $(CONFIGURE_SED) Makefile.config
        touch $@
 
 ocamlinit-stamp: $(TARBALL_TARGET) config-stamp