Skip to content
Permalink
Browse files
ocamlyices2: use --without-gmp-embedded by default
After giving it some thoughts, the need for having a self-contained libyices.a
(which would only need -lyices, no -lgmp needed) in ocamlyices2 is pointless
as 'zarith' will still need '-lgmp' anyway.

The Makefile will still put libgmp.a and libyices.a inside src/ so that
the static version of gmp is used (with -L.) instead of the shared version.

Rationale: disabling the partial linking fixes the build on Arch Linux, which
(I re-tested on a docker image) cannot accept partial linking with -lgmp when
only libgmp.so is available. Here is the failing command:

    ld -r *.o -lgmp -o libyices.o
  • Loading branch information
maelvls committed Jun 17, 2017
1 parent df7c89a commit 70dc5de5e921561480cce199d380b53c3c5197f6
Showing 2 changed files with 15 additions and 18 deletions.
@@ -1387,13 +1387,12 @@ Optional Packages:
be searched. This option forces the use of the
shared version. This applies for both shared and
static libraries.
--without-gmp-embedded By default, the static library libyices.a created
will be partially linked (ld -r) so that the GMP
library is not needed afterwards (i.e., only -lyices
is needed). If you want to disable the partial
linking (and thus -lgmp and -lyices will be needed),
you can use this flag. Enable this flag if your
system does not like the `ld -r` option.
--with-gmp-embedded By default, the static library libyices.a is created
without gmp embedded (i.e., both -lgmp and -lyices
will be needed for using libyices.a). With this
option, the libyices.a created will be partially
linked (ld -r) so that the GMP library is not needed
afterwards.
--with-libyices=<path/libyices.a>
By default, the static library libyices.a is built
from the source in ext/yices. If you want to give
@@ -4040,9 +4039,9 @@ fi
# Check whether --with-gmp-embedded was given.
if test "${with_gmp_embedded+set}" = set; then :
withval=$with_gmp_embedded; GMP_EMBEDDED=no
withval=$with_gmp_embedded; GMP_EMBEDDED=yes
else
GMP_EMBEDDED=yes
GMP_EMBEDDED=no
fi
@@ -118,15 +118,13 @@ else
CSL_CHECK_STATIC_GMP([$static_libgmp],[])
fi

AC_ARG_WITH([gmp-embedded],[AS_HELP_STRING([--without-gmp-embedded],
[By default, the static library libyices.a
created will be partially linked (ld -r) so that the GMP library is not
needed afterwards (i.e., only -lyices is needed). If you want to disable
the partial linking (and thus -lgmp and -lyices will be needed), you
can use this flag. Enable this flag if your system does not like the
`ld -r` option.])],
[GMP_EMBEDDED=no],
[GMP_EMBEDDED=yes])
AC_ARG_WITH([gmp-embedded],[AS_HELP_STRING([--with-gmp-embedded],
[By default, the static library libyices.a is created without gmp embedded
(i.e., both -lgmp and -lyices will be needed for using libyices.a).
With this option, the libyices.a created will be partially linked (ld -r)
so that the GMP library is not needed afterwards.])],
[GMP_EMBEDDED=yes],
[GMP_EMBEDDED=no])
AC_SUBST(GMP_EMBEDDED)

AC_ARG_WITH([libyices],

0 comments on commit 70dc5de

Please sign in to comment.