Trac ticket 26 "Have make check check both shared and static code"
Solution below
For each function that we want to have a static version of (shared is tested
by default)
eg dive_1.asm for generic-x86 is used by the test t-fat.c in tests/mpn
So to tests/mpn/Makefule.am we add
if ENABLE_STATIC
if ENABLE_SHARED
check_PROGRAMS += static_t_fat
static_t_fat_SOURCES = t-fat.c
static_t_fat_LDFLAGS = -static
endif
endif
this gives us another test "static_t_fat" which is only built and run in the
case when we build both libraries .
This fix is architecture independent , so if , for example , alpha wanted a
static verision of mpn_divrem_1 then all other arch's would have the extra
static test whether they needed it or not. I dont think this is a major
problem as , most functions are implemented in similar ways , and if it is we
could also special case a particular arch , or just ignore it(which is
effectively what we do now)
Jason