Skip to content

Commit 70dc5de

Browse files
committed
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
1 parent df7c89a commit 70dc5de

2 files changed

Lines changed: 15 additions & 18 deletions

File tree

configure

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,13 +1387,12 @@ Optional Packages:
13871387
be searched. This option forces the use of the
13881388
shared version. This applies for both shared and
13891389
static libraries.
1390-
--without-gmp-embedded By default, the static library libyices.a created
1391-
will be partially linked (ld -r) so that the GMP
1392-
library is not needed afterwards (i.e., only -lyices
1393-
is needed). If you want to disable the partial
1394-
linking (and thus -lgmp and -lyices will be needed),
1395-
you can use this flag. Enable this flag if your
1396-
system does not like the `ld -r` option.
1390+
--with-gmp-embedded By default, the static library libyices.a is created
1391+
without gmp embedded (i.e., both -lgmp and -lyices
1392+
will be needed for using libyices.a). With this
1393+
option, the libyices.a created will be partially
1394+
linked (ld -r) so that the GMP library is not needed
1395+
afterwards.
13971396
--with-libyices=<path/libyices.a>
13981397
By default, the static library libyices.a is built
13991398
from the source in ext/yices. If you want to give
@@ -4040,9 +4039,9 @@ fi
40404039
40414040
# Check whether --with-gmp-embedded was given.
40424041
if test "${with_gmp_embedded+set}" = set; then :
4043-
withval=$with_gmp_embedded; GMP_EMBEDDED=no
4042+
withval=$with_gmp_embedded; GMP_EMBEDDED=yes
40444043
else
4045-
GMP_EMBEDDED=yes
4044+
GMP_EMBEDDED=no
40464045
fi
40474046
40484047

configure.ac

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,13 @@ else
118118
CSL_CHECK_STATIC_GMP([$static_libgmp],[])
119119
fi
120120

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

132130
AC_ARG_WITH([libyices],

0 commit comments

Comments
 (0)