Link libbfd statically
authorStephane Glondu <steph@glondu.net>
Thu, 24 Mar 2011 18:11:56 +0000 (19:11 +0100)
committerStephane Glondu <steph@glondu.net>
Thu, 24 Mar 2011 18:31:42 +0000 (19:31 +0100)
Binutils's libbfd provides no ABI compatibility between different
versions, making ocaml depend strongly on the version of binutils it
was compiled with. Let's use libbfd.a instead. Note: we are already
using libiberty.a, for which there is no shared library at all.

debian/rules

index 936b99255e015cd741e05ce621c058737906190b..7f78cc3cfa4aa32632e168b141b9fd506b07555e 100755 (executable)
@@ -61,6 +61,7 @@ CONFIGURE_OPTS := \
   -tklibs "-L/usr/lib -ltk8.5 -ltcl8.5"
 
 CONFIGURE_SED := \
+  -e "/LIBBFD_LINK/s%-lbfd%-Wl,-Bstatic -lbfd -Wl,-Bdynamic%" \
   -e "s%MANDIR=.*$$%MANDIR=\$$(PREFIX)/share/man%g" \
   -e "s%LIBDIR=.*$$%LIBDIR=\$$(PREFIX)/lib/ocaml%g" \
   -e "s%STUBLIBDIR=.*$$%STUBLIBDIR=\$$(PREFIX)/lib/ocaml/stublibs%g"