sparcv9-sun-solaris2.8 ABI=64 fails to build

Dennis Clarke dclarke at blastwave.org
Tue Jul 14 23:38:47 CEST 2009


> Dennis Clarke <dclarke at blastwave.org> writes:
>
>   I have tried this with GCC 4.3.3 and binutils 2.19.1 and the build
> process
>   fails at mpn/sparc64/dive_1.c because of a problem in
>   mpn/sparc64/sparc64.h
>
>   Studio compilers file also, of course.
>
>   The issue seems to be with the absence of HALF_ENDIAN_ADJ defined.
>
>   in mpn/sparc64/sparc64.h we have :
>
>   /* Halfword number i in src is accessed as src[i+HALF_ENDIAN_ADJ(i)].
>      Plain src[i] would be incorrect in big endian, HALF_ENDIAN_ADJ has
> the
>      effect of swapping the two halves in this case.  */
>   #if HAVE_LIMB_BIG_ENDIAN
>   #define HALF_ENDIAN_ADJ(i)  (1 - (((i) & 1) << 1))   /* +1 even, -1 odd
> */
>   #endif
>   #if HAVE_LIMB_LITTLE_ENDIAN
>   #define HALF_ENDIAN_ADJ(i)  0                        /* no adjust */
>   #endif
>   #ifndef HALF_ENDIAN_ADJ
>   Error, error, unknown limb endianness;
>   #endif
>
>   So if HALF_ENDIAN_ADJ is not defined we get an error.
>
>   That is what happens.
>
> [snip]
>
>   any thoughts ?
>
> You need to figure out why HAVE_LIMB_BIG_ENDIAN is left undefined on
> your system.
>
> I good place to start is to look in config.log.  It should be quite
> clear there, or at least it should give a pretty good hint.

found the issue ( I think )

I had run configure with --host=none and that was a problem.

I tried again with :

../gmp-4.3.1/configure --host=sparcv9-sun-solaris2.8 ABI=64
--prefix=/opt/csw --enable-cxx

and it all builds to completion.

The next issue is getting the tests to run clean, I keep hitting these :

/opt/csw/gcc4/bin/gcc -DHAVE_CONFIG_H -I. -I../../../gmp-4.3.1/tests/mpn
-I../.. -I../../../gmp-4.3.1 -I../../../gmp-4.3.1/tests 
-I/opt/csw/include  -m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9 -mno-app-regs -g
-Qy -c ../../../gmp-4.3.1/tests/mpn/t-asmtype.c
ld.so.1: cc1: fatal:
/export/medusa/dclarke/build/LIBGMP/sparc_v9_gcc/.libs/libgmp.so.3: wrong
ELF class: ELFCLASS64
gcc: Internal error: Killed (program cc1)

which is odd.

I'm still digging into this.

Dennis




More information about the gmp-bugs mailing list