This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: java fails to build


> The Linux linker seems to see the two symbols and not complain:

> $ nm class.o parse.o | grep WORDS_TO_D
> 0000002c t WORDS_TO_DOUBLE
> 0000002c t WORDS_TO_DOUBLE


> The SCO linkers see duplicate global definitions for the two symbols and
> fusses.

> $ nm class.o parse.o | grep WORDS_TO   
> [198]   |       124|      28|FUNC |GLOB |0    |1      |WORDS_TO_DOUBLE
> [199]   |        92|      31|FUNC |GLOB |0    |1      |WORDS_TO_LONG
> [493]   |       124|      28|FUNC |GLOB |0    |1      |WORDS_TO_DOUBLE
> [494]   |        92|      31|FUNC |GLOB |0    |1      |WORDS_TO_LONG

Ah, do:

make class.o CFLAGS=-E | more

in java, and look at the source:

static  double 
WORDS_TO_DOUBLE(uint32  hi, uint32  lo)
{ union DWord wu;
  wu.l = WORDS_TO_LONG(hi, lo);
  return wu.d;
} 

In the javaop.h file, I see:

inline jdouble
WORDS_TO_DOUBLE(jword hi, jword lo)
{ union DWord wu;
  wu.l = WORDS_TO_LONG(hi, lo);
  return wu.d;
} 

Do you -Dinline ?  Bad.  Do you compile with something other than gcc,
bad!  Do you autoconf with something other than gcc for stage1, and
then use gcc, but don't reautoconf, bad!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]