Re: Want make check to test shared, static lib

2013-11-25 Thread Paolo Bonzini
Il 20/11/2013 09:47, Torbjorn Granlund ha scritto:
 Christian Rössel christian.roes...@gmx.de writes:
 
   assuming that you are using libtool, just configure twice, with
   --enable-static --disable-shared' and '--disable-static
   --enable-shared' respectively. Maybe this is not the solution you are
   looking for, but it is an easy workaround that is trivial to automate;
   and you don't have to touch any Makefile.am.
   
 We do just that for our (automated) own testing.  We cannot tell end
 users to do that.  (Or, we sure can, but they won't do it,
 realistically.)

Compile the tests twice, add --tag disable-shared to the linker flags
of the second copy.

Something like

check_TESTS = test-add test-add-static \
test-sub test-sub-static
...
test_add_static_LDFLAGS = $(LDFLAGS) --tag disable-shared
test_add_static_LDADD = ../path/to/lib.la
test_sub_static_LDFLAGS = $(LDFLAGS) --tag disable-shared
test_sub_static_LDADD = ../path/to/lib.la
...

Paolo




Re: Want make check to test shared, static lib

2013-11-20 Thread Torbjorn Granlund
Christian Rössel christian.roes...@gmx.de writes:

  assuming that you are using libtool, just configure twice, with
  --enable-static --disable-shared' and '--disable-static
  --enable-shared' respectively. Maybe this is not the solution you are
  looking for, but it is an easy workaround that is trivial to automate;
  and you don't have to touch any Makefile.am.
  
We do just that for our (automated) own testing.  We cannot tell end
users to do that.  (Or, we sure can, but they won't do it,
realistically.)

-- 
Torbjörn



Re: Want make check to test shared, static lib

2013-11-15 Thread Torbjorn Granlund
Thien-Thi Nguyen t...@gnu.org writes:

  () Torbjorn Granlund t...@gmplib.org
  () Wed, 13 Nov 2013 18:45:30 +0100
  
 We in the GMP project would like to have make check run through our
 testsuite for both the static and shared libs (when both are built).
  
  This is only necessary if there are significant differences (in
  user-visible behavior) between a static and shared-lib build.  That
  sounds weird to me.  What am i missing?

Certainly the shared and static lib should perform the same operations.
We want to check that configuration and compilation worked correctly by
having make check test both.

We run very extensive tests on about 400 configurations before release.
Unfortunately, users use other compiler releases, other assemblers, and
other linkers, and in other combinations.  Bugs or portability problems
do happen in the field.

-- 
Torbjörn



Re: Want make check to test shared, static lib

2013-11-14 Thread Thien-Thi Nguyen
() Torbjorn Granlund t...@gmplib.org
() Wed, 13 Nov 2013 18:45:30 +0100

   We in the GMP project would like to have make check run through our
   testsuite for both the static and shared libs (when both are built).

This is only necessary if there are significant differences (in
user-visible behavior) between a static and shared-lib build.  That
sounds weird to me.  What am i missing?

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
  read my lisp: (responsep (questions 'technical)
   (not (via 'mailing-list)))
 = nil


pgp0uqKNmug8h.pgp
Description: PGP signature