[BUG] default CXXFLAGS on powerpc

Raphael Collet raphael.collet at uclouvain.be
Mon Jun 30 09:34:36 CEST 2008


Thanks a lot, Keri.  I just checked in (a close variant of) your fix.

Cheers,
raph


Keri Harris wrote:
> On Sun, 29 Jun 2008 20:41:46 Raphael Collet wrote:
>> Keri Harris wrote:
>>> configure sets incorrect CXXFLAGS on powerpc.
>>> <snip>
>>>
>> Dear Keri,
>>
>> Thank you for mentioning this.  This part of the system was never tried
>> on PowerPC architectures, I think.  I also noticed a missing symbol for
>> big endianness on this architecture.
>>
>> I have checked in a patch for the configure script on the svn trunk
>> (revision 17006).  Can you give it a try?
> 
> configure works a treat on powerpc, thanks.
> 
> However msl_crypto.cc doesn't compile (ppc-linux; g++ 4.1.2):
> 
> g++ -mtune=powerpc -DBIG_ENDIAN_HOST -O3 -fomit-frame-pointer -funsigned-char -I. -I./include -fno-exceptions -Winline -Weffc++ -Wall -Wold-style-cast -Woverloaded-virtual -Wshadow   -c -o 
> msl_crypto.o ./src/msl_crypto.cc
> <snip warnings>
> ../src/msl_crypto.cc: In member function 'void 
> _msl_internal::MD5::transform(BYTE*)':
> ../src/msl_crypto.cc:936: error: expected unqualified-id before 'int'
> ../src/msl_crypto.cc:936: error: 'j' was not declared in this scope
> 
> The following diff fixes this for me. *Note that the argument to 
> gf_char2integer() also is fixed:*
> 
> --- mozart.orig/platform/dss/src/msl_crypto.cc  2008-06-27 01:39:31.000000000 
> +1200
> +++ mozart/platform/dss/src/msl_crypto.cc       2008-06-30 19:16:02.000000000 
> +1200
> @@ -933,7 +933,8 @@
>      u32 a = state[0], b = state[1], c = state[2], d = state[3], x[MD5_SIZE];
>      // Move contents of block to x, putting bytes in little-endian order.
>  #ifdef BIG_ENDIAN_HOST
> -    for (int i = 0, int j = 0; i < MD5_SIZE; i++, j+= 4){ x[i] = 
> gf_char2integer(block[j]); }
> +    int i = 0, j = 0;
> +    for (; i < MD5_SIZE; i++, j+= 4){ x[i] = gf_char2integer(&block[j]); }
>  #else
>      memcpy( x, block, 64 );
>  #endif
> 
> 
> Keri
> _________________________________________________________________________________
> mozart-hackers mailing list                           mozart-hackers at mozart-oz.org      
> http://www.mozart-oz.org/mailman/listinfo/mozart-hackers



More information about the mozart-hackers mailing list