From 36ea374ed12dda2130f3fc4f886b62aa3ac6343e Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Sat, 17 Aug 2019 16:38:18 +0200 Subject: [PATCH] Statically link -lbfd to avoid a tight dep with libbinutils --- debian/rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/rules b/debian/rules index fdf8616e..8d383502 100755 --- a/debian/rules +++ b/debian/rules @@ -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 -- 2.30.2